新增我的评价中订单评论状态

master
lemon橪 2021-11-16 17:43:09 +08:00
parent 56fdb2c2f0
commit 6c8102aecd
1 changed files with 26 additions and 6 deletions

View File

@ -2,7 +2,8 @@
<view> <view>
<view class="wrap"> <view class="wrap">
<view class="u-tabs-box"> <view class="u-tabs-box">
<u-tabs :list="list" :is-scroll="false" inactive-color="#333" :current="current" class="utabs" :active-color="$lightColor" @change="changeTab"></u-tabs> <u-tabs :list="list" :is-scroll="false" inactive-color="#333" :current="current" class="utabs"
:active-color="$lightColor" @change="changeTab"></u-tabs>
</view> </view>
<swiper class="swiper-box" :current="current" @change="changeSwiper" duration="500"> <swiper class="swiper-box" :current="current" @change="changeSwiper" duration="500">
<swiper-item v-for="(item, listIndex) in list" :key="listIndex"> <swiper-item v-for="(item, listIndex) in list" :key="listIndex">
@ -18,7 +19,8 @@
<view v-for="(sku, _index) in order.orderItems" :key="_index"> <view v-for="(sku, _index) in order.orderItems" :key="_index">
<view class="goods-item-view"> <view class="goods-item-view">
<view> <view>
<u-image border-radius="6rpx" width="132rpx" height="132rpx" class="goods_img" :src="sku.image" alt /> <u-image border-radius="6rpx" width="132rpx" height="132rpx" class="goods_img" :src="sku.image"
alt />
</view> </view>
<view class="goods-info"> <view class="goods-info">
<view class="goods-title u-line-2">{{ sku.name }}</view> <view class="goods-title u-line-2">{{ sku.name }}</view>
@ -34,7 +36,8 @@
</view> </view>
<view class="goods-imgs-view" v-if="order.image"> <view class="goods-imgs-view" v-if="order.image">
<view class="img-view" v-if="order.image" v-for="(img, imgIndex) in order.image.split(',')" :key="imgIndex"> <view class="img-view" v-if="order.image" v-for="(img, imgIndex) in order.image.split(',')"
:key="imgIndex">
<u-image v-if="order.image" @click.native=" <u-image v-if="order.image" @click.native="
preview(order.image.split(','), imgIndex) preview(order.image.split(','), imgIndex)
" width="160rpx" height="160rpx" :src="img"></u-image> " width="160rpx" height="160rpx" :src="img"></u-image>
@ -52,8 +55,12 @@
</view> </view>
</view> </view>
</view> </view>
<view class="tips" v-if="sku.commentStatus">
{{groupCommentStatusWay[sku.commentStatus]}}
</view> </view>
</view> </view>
</view>
<uni-load-more :status="params.loadStatus"></uni-load-more> <uni-load-more :status="params.loadStatus"></uni-load-more>
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
@ -69,7 +76,8 @@ import { getComments } from "@/api/members.js";
export default { export default {
data() { data() {
return { return {
list: [ //tab list: [
//tab
{ {
name: "待评价", name: "待评价",
}, },
@ -77,12 +85,19 @@ export default {
name: "已评价", name: "已评价",
}, },
], ],
gradeList: { // gradeList: {
//
GOOD: "好评", GOOD: "好评",
MODERATE: "中评", MODERATE: "中评",
WORSE: "差评", WORSE: "差评",
haveImage: "有图", haveImage: "有图",
}, },
groupCommentStatusWay: {
NEW: "新订单,不能进行评论",
UNFINISHED: "未完成评论",
WAIT_CHASE: "待追评的评论信息",
FINISHED: "已经完成评论",
},
current: 0, //tabIndex current: 0, //tabIndex
orderList: [], // orderList: [], //
params: { params: {
@ -193,7 +208,7 @@ export default {
* 发表评价 * 发表评价
*/ */
talkCommont(sku) { talkCommont(sku) {
console.log(sku) console.log(sku);
uni.navigateTo({ uni.navigateTo({
url: `./releaseEvaluate?sn=${sku.sn}&sku=${encodeURIComponent( url: `./releaseEvaluate?sn=${sku.sn}&sku=${encodeURIComponent(
JSON.stringify(sku) JSON.stringify(sku)
@ -262,6 +277,11 @@ export default {
page { page {
height: 100%; height: 100%;
} }
.tips {
text-align: right;
font-size: 24rpx;
color: #999;
}
.wrap { .wrap {
background: #f6f6f6; background: #f6f6f6;
height: calc(100vh - var(--window-top)); height: calc(100vh - var(--window-top));