Compare commits
80 Commits
feature/im
...
main
Author | SHA1 | Date |
---|---|---|
王景 | 2c494200c2 | 1 year ago |
王景 | e40200199b | 1 year ago |
ch | ea10aa3d17 | 2 years ago |
ch | 408a4667ce | 2 years ago |
ch | 43c000eae2 | 2 years ago |
ch | 4145f90ac9 | 2 years ago |
ch | 9e6b270987 | 2 years ago |
ch | 24bb9c8c42 | 2 years ago |
ch | cc51bc8709 | 2 years ago |
陈辉 | 425f630b2a | 2 years ago |
ch | 89c0ce7cf5 | 2 years ago |
陈辉 | 29841ba9c4 | 2 years ago |
ch | a10143b26d | 2 years ago |
ch | fde9ef42ef | 2 years ago |
ch | 99c6010bb7 | 2 years ago |
ch | c7199f96db | 2 years ago |
ch | 090fd92d51 | 2 years ago |
ch | 64287e9c3f | 2 years ago |
ch | 8142659b0c | 2 years ago |
ch | 58fdbb7236 | 2 years ago |
ch | 3d5673bbe7 | 2 years ago |
ch | 2117d22715 | 2 years ago |
ch | 2fe0933c25 | 2 years ago |
ch | 35823e2c4a | 2 years ago |
ch | 33f83236a7 | 2 years ago |
ch | b4b38d8a4a | 2 years ago |
ch | 7374cdfdaf | 2 years ago |
ch | ca9c17ba69 | 2 years ago |
ch | 30cb0f66a0 | 2 years ago |
ch | 0c7494a097 | 2 years ago |
ch | 1f398092d2 | 2 years ago |
ch | 9288f0ac43 | 2 years ago |
ch | 9f0a219fa1 | 2 years ago |
ch | cd1032d988 | 2 years ago |
ch | a0bd0ca45c | 2 years ago |
ch | 09ba7e8819 | 2 years ago |
覃昌波 | 56991e2fba | 2 years ago |
覃昌波 | b3b6db82e5 | 2 years ago |
覃昌波 | 4669a69b12 | 2 years ago |
覃昌波 | 20b9748f64 | 2 years ago |
覃昌波 | a8ec9b7c77 | 2 years ago |
覃昌波 | 1ef83e8765 | 2 years ago |
ch | 7af76834f6 | 2 years ago |
ch | e17951e223 | 2 years ago |
ch | 9ec022fc0f | 2 years ago |
ch | 887cea6f90 | 2 years ago |
ch | 430399c54f | 2 years ago |
ch | 10a22e7e52 | 2 years ago |
ch | b067e2130b | 2 years ago |
ch | 302c0b9e40 | 2 years ago |
ch | ebc3039353 | 2 years ago |
ch | 593a3cfcd2 | 2 years ago |
ch | 47deb31894 | 2 years ago |
ch | f04113a6d8 | 2 years ago |
ch | 41c35825fa | 2 years ago |
ch | 9f07b75bea | 2 years ago |
ch | 3a65dd736f | 2 years ago |
ch | 428e3165d1 | 2 years ago |
ch | 510408068d | 2 years ago |
ch | 85fc3fb293 | 2 years ago |
ch | ddc982a35d | 2 years ago |
ch | 2375f95fcb | 2 years ago |
ch | 96176a68cc | 2 years ago |
ch | 1e73cdfbce | 2 years ago |
ch | c8302cf9ef | 2 years ago |
ch | 60b1f0be39 | 2 years ago |
ch | 11878e566f | 2 years ago |
ch | 91812512bc | 2 years ago |
ch | e771928e88 | 2 years ago |
ch | b81c463e9b | 2 years ago |
ch | 8d00cb4242 | 2 years ago |
ch | 845ad5dba8 | 2 years ago |
ch | 264a108a33 | 2 years ago |
ch | e96d372369 | 2 years ago |
ch | a93838e595 | 2 years ago |
ch | e78c41f6c2 | 2 years ago |
ch | 5864830b29 | 2 years ago |
ch | e7540706b9 | 2 years ago |
ch | 3cce4c2c14 | 2 years ago |
ch | 0b70cd4f49 | 2 years ago |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 756 B |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 762 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 850 B |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 613 B |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 445 B |
After Width: | Height: | Size: 445 B |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 375 B |
After Width: | Height: | Size: 386 B |
After Width: | Height: | Size: 386 B |
After Width: | Height: | Size: 9.8 KiB |
After Width: | Height: | Size: 9.4 KiB |
@ -0,0 +1,58 @@
|
||||
<!--
|
||||
* @Author: ch
|
||||
* @Date: 2022-06-23 10:40:04
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-06-30 22:11:19
|
||||
* @Description: file content
|
||||
-->
|
||||
<template>
|
||||
<div class="follow">
|
||||
<b class="follow--title">{{day}}追评:</b>
|
||||
<p class="follow--ctx">{{followComment.commentContent}}</p>
|
||||
<UiImgs v-if="imgs.length" :list="imgs" class="follow--imgs" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import UiImgs from './UiImgs.vue';
|
||||
export default {
|
||||
components: { UiImgs },
|
||||
props : {
|
||||
followComment : {
|
||||
type : Object,
|
||||
default : () => ({})
|
||||
},
|
||||
commentTime : {
|
||||
type : String,
|
||||
default : ''
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
day(){
|
||||
const followTime = (new Date(this.followComment.createTime)).getTime();
|
||||
const commentTime = (new Date(this.commentTime)).getTime();
|
||||
const day = Math.floor((followTime - commentTime) / (24 * 60 * 60 * 1000));
|
||||
return day > 0 ? `${day}天后` : `当天`;
|
||||
},
|
||||
imgs (){
|
||||
let urls = this.followComment.pictureUrl || '';
|
||||
return urls ? urls.split(',') : [];
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.follow{
|
||||
margin-top: 30px;
|
||||
&--title{
|
||||
color: #FF6A19;
|
||||
font-weight: normal;
|
||||
}
|
||||
&--ctx{
|
||||
line-height: 24px;
|
||||
word-break: break-all;
|
||||
}
|
||||
&--imgs{
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,205 @@
|
||||
<!--
|
||||
* @Author: ch
|
||||
* @Date: 2022-06-25 15:29:43
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-06-30 22:53:16
|
||||
* @Description: file content
|
||||
-->
|
||||
<template>
|
||||
|
||||
<div class="submit">
|
||||
<p class="rate-box" v-if="type === COMMENT.TYPE.COMMENT">
|
||||
<b>满意度评分</b>
|
||||
<el-rate v-model="rate"></el-rate>
|
||||
<span>{{reteDesc}}</span>
|
||||
</p>
|
||||
<el-input type="textarea" class="textarea" placeholder="从多个维度评价,可以帮助更多想买的人哦~"
|
||||
v-model="commentContent" show-word-limit :maxlength="500" :rows="6"/>
|
||||
<div class="operation">
|
||||
<el-upload list-type="picture-card"
|
||||
:on-remove="handleRemove" :limit="6"
|
||||
:action="uploadAction" :data="uploadData"
|
||||
:before-upload="handleBeforeUpload"
|
||||
:on-exceed="handleUploadExceed"
|
||||
:on-error="handleUploadError">
|
||||
<i class="el-icon-plus"></i>
|
||||
<p class="upload-txt">我要晒图</p>
|
||||
</el-upload>
|
||||
<UiButton class="upload-btn" :disabled="isDisabled" @click="handleSubmit">发表评论</UiButton>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {ApiPostComment} from '@/plugins/api/comment';
|
||||
import {ApiPostGetOssConfig} from '@/plugins/api/oss';
|
||||
import {COMMENT} from '@/constants';
|
||||
|
||||
export default {
|
||||
props : {
|
||||
type : {
|
||||
type : String | Number,
|
||||
default : COMMENT.TYPE.COMMENT
|
||||
},
|
||||
commentDetail : {
|
||||
type : Object,
|
||||
default : () => ({})
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
COMMENT,
|
||||
rate: 5,
|
||||
commentContent : '',
|
||||
uploadData : {},
|
||||
uploadAction : '',
|
||||
fileList : []
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
isEdit(){
|
||||
return (this.commentContent || this.fileList.length > 0) ? true : false
|
||||
},
|
||||
reteDesc(){
|
||||
return COMMENT.RATE_LEVEL[this.rate];
|
||||
},
|
||||
isDisabled(){
|
||||
let status = false
|
||||
if(this.type === COMMENT.TYPE.COMMENT){
|
||||
status = !this.rate || !this.commentContent.trim();
|
||||
}
|
||||
if(this.type === COMMENT.TYPE.FOLLOW_COMMENT){
|
||||
status = !this.commentContent.trim();
|
||||
}
|
||||
return status;
|
||||
}
|
||||
},
|
||||
watch : {
|
||||
isEdit(val){
|
||||
this.$emit('editStatusChange', val)
|
||||
}
|
||||
},
|
||||
methods : {
|
||||
async handleSubmit(){
|
||||
let data = {
|
||||
commentContent : this.commentContent,
|
||||
commentType : this.type,
|
||||
orderProductId : this.commentDetail.orderProductId,
|
||||
pictureUrl : this.fileList.map(i => i.url).join(',')
|
||||
}
|
||||
if(this.type === COMMENT.TYPE.COMMENT){
|
||||
data.productId = this.commentDetail.productId;
|
||||
data.commentScore = this.rate;
|
||||
}else if(this.type === COMMENT.TYPE.FOLLOW_COMMENT){
|
||||
data.originId = data.parentId = this.commentDetail.id;
|
||||
}
|
||||
const {error, result} = await ApiPostComment(data);
|
||||
if(error){
|
||||
this.$message.error(error.message);
|
||||
return false;
|
||||
}
|
||||
this.commentContent = '';
|
||||
this.fileList = [];
|
||||
this.$nextTick(()=>{
|
||||
this.$emit('submit',result);
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取OSS鉴权信息
|
||||
* configId 自定义文件夹 图片存储的文件夹名称
|
||||
* serviceName 服务名
|
||||
*/
|
||||
async getOssCon(){
|
||||
const {error, result} = await ApiPostGetOssConfig({
|
||||
configId : 'account-comment/',
|
||||
serviceName : 'comment'
|
||||
});
|
||||
if(error){
|
||||
this.$message.error(error.message);
|
||||
return false
|
||||
}
|
||||
return result
|
||||
|
||||
},
|
||||
|
||||
async handleBeforeUpload(file) {
|
||||
let result = await this.getOssCon();
|
||||
if(result){
|
||||
this.uploadAction = result.host;
|
||||
this.uploadData = {
|
||||
...this.uploadData,
|
||||
policy : result.policy,
|
||||
OSSAccessKeyId: result.accessId,
|
||||
success_action_status: 200,
|
||||
signature: result.signature,
|
||||
}
|
||||
}
|
||||
Object.assign(this.uploadData, {
|
||||
key: `${result.dir}${"${filename}"}`,
|
||||
name: file.name,
|
||||
});
|
||||
this.fileList.push({
|
||||
url : `${result.host}/${result.dir}${file.name}`,
|
||||
uid : file.uid
|
||||
})
|
||||
},
|
||||
|
||||
handleUploadError(error, file) {
|
||||
this.handleRemove(file)
|
||||
},
|
||||
handleRemove(file) {
|
||||
this.fileList = this.fileList.filter(i => i.uid != file.uid );
|
||||
},
|
||||
handleUploadExceed(){
|
||||
this.$message.warning('最多只能上传6张照片哦~')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.rate-box{
|
||||
display: flex;
|
||||
b{
|
||||
font-weight: normal;
|
||||
margin-right: 10px;
|
||||
color: #666;
|
||||
}
|
||||
span{
|
||||
color: #FF6A19;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
.textarea{
|
||||
height: 138px;
|
||||
margin-top: 30px;
|
||||
}
|
||||
.operation{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 15px;
|
||||
.upload-txt{
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
}
|
||||
.upload-btn{
|
||||
height: 40px;
|
||||
width: 100px;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
/deep/{
|
||||
.el-upload--picture-card,.el-upload-list__item{
|
||||
height: 70px !important;
|
||||
width: 70px !important;
|
||||
line-height: 20px;
|
||||
}
|
||||
.el-upload--picture-card{
|
||||
padding-top: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,137 @@
|
||||
<!--
|
||||
* @Author: ch
|
||||
* @Date: 2022-06-24 19:07:45
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-06-30 19:40:36
|
||||
* @Description: file content
|
||||
-->
|
||||
<template>
|
||||
<div class="preview-imgs">
|
||||
<ul>
|
||||
<li v-for="(i, idx) in list" :key="idx" :class="{'active' : curIndex == idx}" >
|
||||
<img :src="i" @click="curIndex = idx"/>
|
||||
</li>
|
||||
</ul>
|
||||
<p v-if="curIndex > -1">
|
||||
<img :src="list[curIndex]" @click="curIndex = -1"/>
|
||||
<span class="prev" @click="prev" v-if="curIndex > 0"></span>
|
||||
<span class="next" @click="next" v-if="curIndex < list.length-1"></span>
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props : {
|
||||
list : {
|
||||
type : Array,
|
||||
default : () => ([])
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
curIndex : -1,
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
next(){
|
||||
this.curIndex++;
|
||||
},
|
||||
prev(){
|
||||
this.curIndex--;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.preview-imgs{
|
||||
ul{
|
||||
display: flex;
|
||||
}
|
||||
li{
|
||||
width: 46px;
|
||||
height : 46px;
|
||||
border: 1px solid #eee;
|
||||
margin-right: 10px;
|
||||
padding: 1px;
|
||||
cursor: pointer;
|
||||
img{
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
object-fit: contain;
|
||||
}
|
||||
&.active{
|
||||
border-color: #FF512B;
|
||||
position: relative;
|
||||
&::after{
|
||||
content: '';
|
||||
height: 3px;
|
||||
width: 3px;
|
||||
bottom: -7px;
|
||||
left: 17px;
|
||||
display: block;
|
||||
position: absolute;
|
||||
// transform: rotate(45deg);
|
||||
border: 3px solid #FF512B;
|
||||
border-left-color: transparent;
|
||||
border-right-color: transparent;
|
||||
border-bottom-color: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
p{
|
||||
width: 300px;
|
||||
margin-top: 20px;
|
||||
position: relative;
|
||||
border: 1px solid #eee;
|
||||
img{
|
||||
width: 300px;
|
||||
height: 300px;
|
||||
object-fit: contain;
|
||||
cursor: zoom-out;
|
||||
}
|
||||
&:hover span{
|
||||
display: block;
|
||||
}
|
||||
span{
|
||||
display: none;
|
||||
position: absolute;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background: rgba(0,0,0, .5);
|
||||
top : 130px;
|
||||
cursor: pointer;
|
||||
&::after,&::before{
|
||||
position: absolute;
|
||||
display: block;
|
||||
content: '';
|
||||
background: #fff;
|
||||
height: 20px;
|
||||
width: 4px;
|
||||
border-radius: 4px;
|
||||
left: 16px;
|
||||
top: 4px;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
&::after{
|
||||
transform: rotate(-45deg);
|
||||
top: 16px;
|
||||
}
|
||||
&.prev{
|
||||
left: 10px;
|
||||
|
||||
}
|
||||
&.next{
|
||||
right: 10px;
|
||||
&::after{
|
||||
left: 20px;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
&::before{
|
||||
left: 20px;
|
||||
transform: rotate(-45deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,114 @@
|
||||
<!--
|
||||
* @Author: ch
|
||||
* @Date: 2022-05-08 01:11:33
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-06-28 10:39:35
|
||||
* @Description: file content
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<div class="main">
|
||||
<img class="icon" src="@/assets/img/order/pay_success.png" />
|
||||
<p>评价成功</p>
|
||||
<div>
|
||||
<UiButton type="grey" @click="$router.back()" :radius="true">返回</UiButton>
|
||||
</div>
|
||||
<div v-if="goodsList.length">
|
||||
<b class="product-title">这些宝贝还在等你得评价哦~</b>
|
||||
<ul class="product">
|
||||
<li v-for="(item, idx) in goodsList" :key="idx">
|
||||
<img :src="item.productPicture"/>
|
||||
<p>{{item.productName}}</p>
|
||||
<UiButton type="grey" @click="$router.replace(`/account/comment?orderId=${item.orderId}`)" >
|
||||
{{item.commentStatus == 1 ? '立即评价' : '立即追评'}}
|
||||
</UiButton>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<BsChosen class="chosen"/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import UiButton from '@/components/UiButton.vue';
|
||||
import {ApiGetCommentOrderDetailList} from '@/plugins/api/order';
|
||||
export default {
|
||||
components: { UiButton },
|
||||
data(){
|
||||
return {
|
||||
goodsList : []
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
this.getAwaitGoodsList();
|
||||
},
|
||||
methods:{
|
||||
|
||||
async getAwaitGoodsList (){
|
||||
const {error, result} = await ApiGetCommentOrderDetailList({
|
||||
length:6,
|
||||
pageIndex : 1
|
||||
});
|
||||
if(error){
|
||||
this.$message.warning(error.message)
|
||||
}
|
||||
this.goodsList = result.records.map(item => {
|
||||
return {
|
||||
productPicture : item.productImageUrl,
|
||||
productName : item.productName,
|
||||
commentStatus : item.commentStatus,
|
||||
orderId : item.orderId
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.main{
|
||||
@include layout-box;
|
||||
text-align: center;
|
||||
padding: 100px 0 40px;
|
||||
}
|
||||
.icon{
|
||||
width: 239px;
|
||||
}
|
||||
b{
|
||||
display: block;
|
||||
}
|
||||
p{
|
||||
margin: 10px 0 25px 0;
|
||||
color: #999;
|
||||
}
|
||||
button{
|
||||
margin: 0 10px 30px;
|
||||
}
|
||||
.product-title{
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
text-align: left;
|
||||
background: #F7F7F7;
|
||||
font-weight: normal;
|
||||
color: #666;
|
||||
padding: 0 16px;
|
||||
}
|
||||
.product{
|
||||
display: flex;
|
||||
// justify-content: flex-start;
|
||||
li{
|
||||
margin:40px 0 0 48px;
|
||||
width: 140px;
|
||||
img{
|
||||
width: 140px;
|
||||
height: 140px;
|
||||
object-fit: contain;
|
||||
|
||||
}
|
||||
p{
|
||||
@include ellipses(2);
|
||||
height: 40px;
|
||||
margin: 10px 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,59 @@
|
||||
<!--
|
||||
* @Author: ch
|
||||
* @Date: 2022-05-08 01:11:33
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-06-27 15:37:53
|
||||
* @Description: file content
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<div class="main">
|
||||
<img class="icon" src="@/assets/img/order/pay_success.png" />
|
||||
<!-- <b>交易成功</b> -->
|
||||
<p>交易成功</p>
|
||||
<div>
|
||||
<UiButton type="grey" @click="$router.replace(`/`)" :radius="true">返回首页</UiButton>
|
||||
<UiButton type="yellow_gradual" @click="$router.replace(`./comment?orderId=${orderId}`)" :radius="true">去评价</UiButton>
|
||||
</div>
|
||||
</div>
|
||||
<BsChosen class="chosen"/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import UiButton from '@/components/UiButton.vue';
|
||||
import {ApiGetOrderPaySatus} from '@/plugins/api/order';
|
||||
export default {
|
||||
components: { UiButton },
|
||||
data(){
|
||||
return {
|
||||
orderId : this.$route.query.orderId
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
|
||||
|
||||
},
|
||||
methods:{
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.main{
|
||||
@include layout-box;
|
||||
text-align: center;
|
||||
padding: 100px 0 40px;
|
||||
}
|
||||
.icon{
|
||||
width: 239px;
|
||||
}
|
||||
b{
|
||||
display: block;
|
||||
}
|
||||
p{
|
||||
margin: 10px 0 25px 0;
|
||||
color: #999;
|
||||
}
|
||||
button{
|
||||
margin: 0 10px 30px;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,84 @@
|
||||
<!--
|
||||
* @Author: ch
|
||||
* @Date: 2022-06-25 07:24:32
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-06-29 14:19:36
|
||||
* @Description: file content
|
||||
-->
|
||||
<template>
|
||||
<div class="header">
|
||||
<div class="header--layout">
|
||||
<ul>
|
||||
<li @click="handleJump('detail')" :class="{'active': tabKey =='detail'}">商品详情</li>
|
||||
<li @click="handleJump('comment')" :class="{'active': tabKey =='comment'}">商品评价</li>
|
||||
</ul>
|
||||
<UiButton @click="handleAddCart">加入购物车</UiButton>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import UiButton from '@/components/UiButton.vue'
|
||||
export default {
|
||||
components: { UiButton },
|
||||
props:{
|
||||
tabKey : {
|
||||
type : String,
|
||||
default : 'detail'
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return {}
|
||||
},
|
||||
methods:{
|
||||
handleJump(val){
|
||||
this.$emit('jump', val)
|
||||
},
|
||||
handleAddCart(){
|
||||
this.$emit('addCart')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.header{
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 70px;
|
||||
background: #fff;
|
||||
z-index: 11;
|
||||
&--layout{
|
||||
@include layout-box;
|
||||
padding-left: 256px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
ul{
|
||||
display: flex;
|
||||
font-size: 16px;
|
||||
li{
|
||||
margin-right: 50px;
|
||||
height: 70px;
|
||||
line-height: 70px;
|
||||
&.active{
|
||||
color: #FF6A19;
|
||||
position: relative;
|
||||
&::after{
|
||||
display: block;
|
||||
content: '';
|
||||
position: absolute;
|
||||
height: 2px;
|
||||
width: 40px;
|
||||
background: #FF6A19;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,86 @@
|
||||
/*
|
||||
* @Author: ch
|
||||
* @Date: 2022-06-20 11:38:48
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-06-30 11:48:53
|
||||
* @Description: file content
|
||||
*/
|
||||
|
||||
import {axiosTk} from "../axiosTk";
|
||||
import {axios} from "../axios";
|
||||
import { ToAsyncAwait } from "../utils";
|
||||
import ENV from '../config/env';
|
||||
|
||||
const BASE_URL = `${ENV.base_url}/mall/comment`;
|
||||
|
||||
/**
|
||||
* 根据商品获取评论列表未
|
||||
* @param {*} param0
|
||||
*/
|
||||
export const ApiGetCommentList = (params) =>
|
||||
ToAsyncAwait(axiosTk.get(`${BASE_URL}/app/comment`, {
|
||||
params,
|
||||
headers: {
|
||||
notVerifyToken : true
|
||||
}
|
||||
}));
|
||||
|
||||
/**
|
||||
* 根据商品获取评论总数
|
||||
* @param {*} param0
|
||||
*/
|
||||
export const ApiGetCommentCount = ({productId}) =>
|
||||
ToAsyncAwait(axiosTk.get(`${BASE_URL}/app/comment/getAllCommentCountByProductId/${productId}`,{
|
||||
headers: {
|
||||
notVerifyToken : true
|
||||
}
|
||||
}));
|
||||
/**
|
||||
* 根据商品获取标签评论总数
|
||||
* @param {*} param0
|
||||
*/
|
||||
export const ApiGetCommentTabCount = ({productId}) =>
|
||||
ToAsyncAwait(axiosTk.get(`${BASE_URL}/app/comment/listCommentLabel/${productId}`,{
|
||||
headers: {
|
||||
notVerifyToken : true
|
||||
}
|
||||
}));
|
||||
/**
|
||||
* 获取订单评论详情
|
||||
* @param {*} param0
|
||||
*/
|
||||
export const ApiGetOrderCommentDetail = ({orderId}) =>
|
||||
ToAsyncAwait(axiosTk.get(`${BASE_URL}/app/comment/listOrderCommentByOrderId/${orderId}`));
|
||||
/**
|
||||
* 获取商品满意度
|
||||
* @param {*} param0
|
||||
*/
|
||||
export const ApiGetProductSatisfaction = ({productId}) =>
|
||||
ToAsyncAwait(axios.get(`${BASE_URL}/app/comment/getProductSatisfaction/${productId}`));
|
||||
/**
|
||||
* 获取评论详情
|
||||
* @param {*} param0
|
||||
*/
|
||||
export const ApiGetCommentDetail = ({commentId}) =>
|
||||
ToAsyncAwait(axiosTk.get(`${BASE_URL}/app/comment/getCommentDetail/${commentId}`, {
|
||||
headers: {
|
||||
notVerifyToken : true
|
||||
}
|
||||
}));
|
||||
/**
|
||||
* 新增评论
|
||||
* @param {*} param0
|
||||
*/
|
||||
export const ApiPostComment = (data) =>
|
||||
ToAsyncAwait(axiosTk.post(`${BASE_URL}/app/comment`, data));
|
||||
|
||||
|
||||
/**
|
||||
* 更新评论有用数
|
||||
* @param {*} param0
|
||||
*/
|
||||
export const ApiPutCommentUseful = (data) =>
|
||||
ToAsyncAwait(axiosTk.put(`${BASE_URL}/app/comment/updateUsefulCount`, data));
|
||||
|
||||
|
||||
|
@ -0,0 +1,26 @@
|
||||
/*
|
||||
* @Author: ch
|
||||
* @Date: 2022-05-08 00:44:22
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-06-29 14:51:00
|
||||
* @Description: file content
|
||||
*/
|
||||
|
||||
|
||||
import {axiosTk} from "../axiosTk";
|
||||
import {ToAsyncAwait} from "@/plugins/utils";
|
||||
import ENV from '../config/env';
|
||||
|
||||
const BASE_URL = `${ENV.base_url}/mall/trade`;
|
||||
/**
|
||||
* 获取微信支付二维码
|
||||
* @param {*} data
|
||||
*/
|
||||
export const ApiPostWxPayCdoeImg = (data) =>
|
||||
ToAsyncAwait(axiosTk.post(`${BASE_URL}/payCenter/wxPay/nativeData`, data));
|
||||
/**
|
||||
* 获取支付宝支付二维码
|
||||
* @param {*} data
|
||||
*/
|
||||
export const ApiPostAliPayCdoeImg = (data) =>
|
||||
ToAsyncAwait(axiosTk.post(`${BASE_URL}/payCenter/aliPay/qr`, data));
|
@ -1,17 +0,0 @@
|
||||
/*
|
||||
* @Author: ch
|
||||
* @Date: 2022-05-08 00:44:22
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-05-08 00:47:55
|
||||
* @Description: file content
|
||||
*/
|
||||
|
||||
|
||||
import {axiosTk} from "../axiosTk";
|
||||
import {ToAsyncAwait} from "@/plugins/utils";
|
||||
import ENV from '../config/env';
|
||||
|
||||
const BASE_URL = `${ENV.base_url}/mall/trade`;
|
||||
|
||||
export const ApiPostPayCdoeImg = (data) =>
|
||||
ToAsyncAwait(axiosTk.post(`${BASE_URL}/pay/wxPay/nativeImage`, data));
|