优化订单,组件页面下拉刷新,修改评论bug

master
lemon橪 2021-09-27 19:58:18 +08:00
parent cebde87682
commit 3b9b2e8ba2
6 changed files with 42 additions and 30 deletions

View File

@ -2,12 +2,13 @@
<view class="myTracks">
<u-empty text="暂无历史记录" style="margin-top:200rpx;" mode="history" v-if="whetherEmpty"></u-empty>
<div v-else>
<view v-for="(item, index) in trackList" :key="index">
<view v-for="(item, index) in trackList" :key="index">
<view class="myTracks-title" @click="navgaiteToStore(item)">{{item.storeName}}</view>
<view class="myTracks-items">
<view class="myTracks-item">
<u-checkbox-group>
<u-checkbox v-model="item.___isDel" v-if="editFlag" active-color="#ff6b35" style="margin-right: 10rpx" @change="changeChecked(item)"></u-checkbox>
<u-checkbox v-model="item.___isDel" v-if="editFlag" active-color="#ff6b35" style="margin-right: 10rpx"
@change="changeChecked(item)"></u-checkbox>
</u-checkbox-group>
<view class="myTracks-item-img" @click.stop="navgaiteToDetail(item)">
<image :src="item.thumbnail"></image>
@ -33,7 +34,8 @@
<view class="myTracks-action">
<view class="myTracks-action-check">
<u-checkbox-group>
<u-checkbox v-model="allChecked" v-if="editFlag" active-color="#ff6b35" style="margin-right: 10rpx" @change="checkedAllitem"></u-checkbox>
<u-checkbox v-model="allChecked" v-if="editFlag" active-color="#ff6b35" style="margin-right: 10rpx"
@change="checkedAllitem"></u-checkbox>
全选
</u-checkbox-group>
</view>
@ -79,6 +81,10 @@ export default {
onLoad() {
this.getList();
},
onPullDownRefresh() {
this.trackList = [];
this.getList();
},
methods: {
/**
* 导航到店铺

View File

@ -47,7 +47,7 @@
</view>
<view v-if="current == 0 && sku.commentStatus == 'UNFINISHED'">
<view class="evaluate">
<view @click="talkCommont(order)">
<view @click="talkCommont(sku)">
<u-tag text="发表评价" shape="circle" mode="plain" type="error" />
</view>
</view>
@ -192,10 +192,11 @@ export default {
/**
* 发表评价
*/
talkCommont(order) {
talkCommont(sku) {
console.log(sku)
uni.navigateTo({
url: `./releaseEvaluate?sn=${order.sn}&order=${encodeURIComponent(
JSON.stringify(order)
url: `./releaseEvaluate?sn=${sku.sn}&sku=${encodeURIComponent(
JSON.stringify(sku)
)}`,
});
},

View File

@ -1,7 +1,7 @@
<template>
<view>
<!-- 遍历出评价商品 -->
<view v-for="(sku, index) in order.orderItems" :key="index">
<view>
<view class="after-sales-goods-detail-view">
<view>
<view class="goods-item-view">
@ -23,23 +23,27 @@
<view class="sub-title">满意请打好评哦</view>
</view>
<view class="rate-view">
<view class="rate-btn" @click="onGrade('GOOD', index)">
<view style="font-size: 42rpx" :style="{ color: form.grade === 'GOOD' ? 'red' : '#CCCCCC' }" class="alifont icon-haoping1"></view>
<view class="rate-btn" @click="onGrade('GOOD')">
<u-icon name="heart-fill" style="font-size: 42rpx"
:style="{ color: form.grade === 'GOOD' ? 'red' : '#CCCCCC' }"></u-icon>
<text>好评</text>
</view>
<view class="rate-btn" @click="onGrade('MODERATE', index)">
<view style="font-size: 42rpx" :style="{ color: form.grade === 'MODERATE' ? 'red' : '#CCCCCC' }" class="alifont icon-zhongping1"></view>
<view class="rate-btn" @click="onGrade('MODERATE')">
<u-icon name="heart-fill" style="font-size: 42rpx"
:style="{ color: form.grade === 'MODERATE' ? 'red' : '#CCCCCC' }"></u-icon>
<text>中评</text>
</view>
<view class="rate-btn" @click="onGrade('WORSE', index)">
<view style="font-size: 42rpx" :style="{ color: form.grade === 'WORSE' ? 'red' : '#CCCCCC' }" class="alifont icon-chaping"></view>
<view class="rate-btn" @click="onGrade('WORSE')">
<u-icon name="heart-fill" style="font-size: 42rpx"
:style="{ color: form.grade === 'WORSE' ? 'red' : '#CCCCCC' }"></u-icon>
<text>差评</text>
</view>
</view>
</view>
<view class="info-evaluate-view">
<view class="input-view">
<u-input v-model="form.content" height="200" placeholder-style="font-size:12px;color:#CCCCCC" :type="type" :border="border" :maxlength="maxlength" :placeholder="placeholder" />
<u-input v-model="form.content" height="200" placeholder-style="font-size:12px;color:#CCCCCC" :type="type"
:border="border" :maxlength="maxlength" :placeholder="placeholder" />
</view>
<view class="input-num">
<text>{{ form.content.length }}/{{ maxlength }}</text>
@ -47,7 +51,8 @@
</view>
<view class="info-evaluate-view">
<view class="images-view">
<u-upload :header=" { accessToken: storage.getAccessToken() }" :action="action" width="150" @on-uploaded="onUploaded" :max-count="5" :show-progress="false"></u-upload>
<u-upload :header=" { accessToken: storage.getAccessToken() }" :action="action" width="150"
@on-uploaded="onUploaded" :max-count="5" :show-progress="false"></u-upload>
</view>
</view>
</view>
@ -57,7 +62,8 @@
<view class="seller-rate-view">
<view class="rate-title">描述相符</view>
<view>
<u-rate count="count" gutter="20" active-color="#FFC71C" v-model="form.descriptionScore" :size="40"></u-rate>
<u-rate count="count" gutter="20" active-color="#FFC71C" v-model="form.descriptionScore" :size="40">
</u-rate>
</view>
</view>
<view class="seller-rate-view">
@ -94,7 +100,7 @@ export default {
maxlength: 500, //500
placeholder:
"宝贝满足您的期待吗?说说它的优点和美中不足的地方吧。您的评价会帮助更多的人",
order: {}, //
sku: {}, //
form: {
content: "", //
goodsId: "", //id
@ -111,10 +117,9 @@ export default {
onLoad(options) {
//
this.form.orderItemSn = options.sn;
this.order = JSON.parse(decodeURIComponent(options.order));
this.form.goodsId = this.order.orderItems[0].goodsId;
this.form.orderItemSn = this.order.orderItems[0].sn;
this.form.skuId = this.order.orderItems[0].skuId;
this.sku = JSON.parse(decodeURIComponent(options.sku));
this.form.goodsId = this.sku.goodsId;
this.form.skuId = this.sku.skuId;
},
methods: {
/**
@ -141,7 +146,7 @@ export default {
success: () => {
setTimeout(() => {
uni.navigateBack();
}, 2000);
}, 500);
},
});
}

View File

@ -830,9 +830,7 @@ page {
margin-bottom: 20rpx;
color: #666;
}
.address-list {
margin-left: 20rpx;
}
.address-item {
font-weight: normal;
letter-spacing: 1rpx;

View File

@ -135,16 +135,17 @@ export default {
*/
async onLoad(options) {
this.storeId = options.id;
this.goodsParams.storeId = options.id;
this.couponParams.storeId = options.id;
},
onPageScroll(e) {
this.scrollTop = e.scrollTop;
},
onPullDownRefresh() {
this.init();
this.init();
},
mounted() {
// #ifdef MP-WEIXIN
// #ifdef MP-WEIXIN
//
uni.showShareMenu({ withShareTicket: true });
// #endif

View File

@ -168,6 +168,7 @@ export function orderStatusList(val) {
PAID: "已付款",
DELIVERED: "已发货",
CANCELLED: "已取消",
COMPLETED:"已完成",
COMPLETE: "已完成",
TAKE: "待核验",
};