其他宝贝评价

feature/comment-0624-ch
ch 2 years ago
parent a93838e595
commit e96d372369

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-05-08 01:11:33
* @LastEditors: ch
* @LastEditTime: 2022-06-27 19:13:06
* @LastEditTime: 2022-06-28 10:07:13
* @Description: file content
-->
<template>
@ -13,13 +13,14 @@
<div>
<UiButton type="grey" @click="$router.back()" :radius="true">返回</UiButton>
</div>
<div>
<div v-if="goodsList.length">
<b class="product-title">这些宝贝还在等你得评价哦~</b>
<ul class="product">
<li v-for="(item, idx) in list" :key="idx">
<li v-for="(item, idx) in goodsList" :key="idx">
<img :src="item.productPicture"/>
<p>{{item.productName}}</p>
<UiButton type="grey">立即评价</UiButton>
<UiButton type="grey" v-if="item.commentStatus == 1"></UiButton>
<UiButton type="grey" v-if="item.commentStatus == 2"></UiButton>
</li>
</ul>
</div>
@ -29,21 +30,35 @@
</template>
<script>
import UiButton from '@/components/UiButton.vue';
import {ApiGetOrderPaySatus} from '@/plugins/api/order';
import {ApiGetCommentOrderDetailList} from '@/plugins/api/order';
export default {
components: { UiButton },
data(){
return {
orderId : this.$route.query.orderId,
list : [{"id":null,"originId":null,"parentId":null,"userId":null,"userName":null,"commentContent":null,"isShow":null,"createTime":null,"commentType":null,"userAvatar":null,"productId":139,"orderProductId":1075,"skuName":"","productName":"订单设置测试","productPicture":"https://msb-edu-dev.oss-cn-beijing.aliyuncs.com/mall-product/product/cscs.png","pictureUrl":null,"commentScore":null,"isLike":null,"usefulCount":null,"followComment":null,"answerCommentList":null,"merchantComment":null},{"id":null,"originId":null,"parentId":null,"userId":null,"userName":null,"commentContent":null,"isShow":null,"createTime":null,"commentType":null,"userAvatar":null,"productId":73,"orderProductId":1076,"skuName":"L,黄","productName":"测试数据(勿拍)","productPicture":"https://msb-edu-dev.oss-cn-beijing.aliyuncs.com/mall-product/productcute.jpg","pictureUrl":null,"commentScore":null,"isLike":null,"usefulCount":null,"followComment":null,"answerCommentList":null,"merchantComment":null}]
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
}
});
}
}
}
</script>

@ -4,7 +4,7 @@
* @Author: ch
* @Date: 2022-05-04 18:17:25
* @LastEditors: ch
* @LastEditTime: 2022-05-09 11:07:28
* @LastEditTime: 2022-06-28 09:56:23
* @Description: file content
*/
import {axiosTk} from "../axiosTk";
@ -49,6 +49,12 @@ export const ApiGetOrderDetail = (id) =>
export const ApiGetOrderProductDetail = ({orderProductId}) =>
ToAsyncAwait(axiosTk.get(`${BASE_URL}/app/tradeOrder/product/${orderProductId}`));
/**
* 获取待评价订单详请列表
*/
export const ApiGetCommentOrderDetailList = (params) =>
ToAsyncAwait(axiosTk.get(`${BASE_URL}/app/tradeOrder/listOrderProductWaitComment`,{params}))
/**
* 提交订单
* @param {*} data

Loading…
Cancel
Save