优化订单,组件页面下拉刷新,修改评论bug
parent
cebde87682
commit
3b9b2e8ba2
|
@ -7,7 +7,8 @@
|
||||||
<view class="myTracks-items">
|
<view class="myTracks-items">
|
||||||
<view class="myTracks-item">
|
<view class="myTracks-item">
|
||||||
<u-checkbox-group>
|
<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>
|
</u-checkbox-group>
|
||||||
<view class="myTracks-item-img" @click.stop="navgaiteToDetail(item)">
|
<view class="myTracks-item-img" @click.stop="navgaiteToDetail(item)">
|
||||||
<image :src="item.thumbnail"></image>
|
<image :src="item.thumbnail"></image>
|
||||||
|
@ -33,7 +34,8 @@
|
||||||
<view class="myTracks-action">
|
<view class="myTracks-action">
|
||||||
<view class="myTracks-action-check">
|
<view class="myTracks-action-check">
|
||||||
<u-checkbox-group>
|
<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>
|
</u-checkbox-group>
|
||||||
</view>
|
</view>
|
||||||
|
@ -79,6 +81,10 @@ export default {
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
|
onPullDownRefresh() {
|
||||||
|
this.trackList = [];
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
/**
|
||||||
* 导航到店铺
|
* 导航到店铺
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view v-if="current == 0 && sku.commentStatus == 'UNFINISHED'">
|
<view v-if="current == 0 && sku.commentStatus == 'UNFINISHED'">
|
||||||
<view class="evaluate">
|
<view class="evaluate">
|
||||||
<view @click="talkCommont(order)">
|
<view @click="talkCommont(sku)">
|
||||||
<u-tag text="发表评价" shape="circle" mode="plain" type="error" />
|
<u-tag text="发表评价" shape="circle" mode="plain" type="error" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -192,10 +192,11 @@ export default {
|
||||||
/**
|
/**
|
||||||
* 发表评价
|
* 发表评价
|
||||||
*/
|
*/
|
||||||
talkCommont(order) {
|
talkCommont(sku) {
|
||||||
|
console.log(sku)
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `./releaseEvaluate?sn=${order.sn}&order=${encodeURIComponent(
|
url: `./releaseEvaluate?sn=${sku.sn}&sku=${encodeURIComponent(
|
||||||
JSON.stringify(order)
|
JSON.stringify(sku)
|
||||||
)}`,
|
)}`,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<!-- 遍历出评价商品 -->
|
<!-- 遍历出评价商品 -->
|
||||||
<view v-for="(sku, index) in order.orderItems" :key="index">
|
<view>
|
||||||
<view class="after-sales-goods-detail-view">
|
<view class="after-sales-goods-detail-view">
|
||||||
<view>
|
<view>
|
||||||
<view class="goods-item-view">
|
<view class="goods-item-view">
|
||||||
|
@ -23,23 +23,27 @@
|
||||||
<view class="sub-title">满意请打好评哦</view>
|
<view class="sub-title">满意请打好评哦</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="rate-view">
|
<view class="rate-view">
|
||||||
<view class="rate-btn" @click="onGrade('GOOD', index)">
|
<view class="rate-btn" @click="onGrade('GOOD')">
|
||||||
<view style="font-size: 42rpx" :style="{ color: form.grade === 'GOOD' ? 'red' : '#CCCCCC' }" class="alifont icon-haoping1"></view>
|
<u-icon name="heart-fill" style="font-size: 42rpx"
|
||||||
|
:style="{ color: form.grade === 'GOOD' ? 'red' : '#CCCCCC' }"></u-icon>
|
||||||
<text>好评</text>
|
<text>好评</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="rate-btn" @click="onGrade('MODERATE', index)">
|
<view class="rate-btn" @click="onGrade('MODERATE')">
|
||||||
<view style="font-size: 42rpx" :style="{ color: form.grade === 'MODERATE' ? 'red' : '#CCCCCC' }" class="alifont icon-zhongping1"></view>
|
<u-icon name="heart-fill" style="font-size: 42rpx"
|
||||||
|
:style="{ color: form.grade === 'MODERATE' ? 'red' : '#CCCCCC' }"></u-icon>
|
||||||
<text>中评</text>
|
<text>中评</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="rate-btn" @click="onGrade('WORSE', index)">
|
<view class="rate-btn" @click="onGrade('WORSE')">
|
||||||
<view style="font-size: 42rpx" :style="{ color: form.grade === 'WORSE' ? 'red' : '#CCCCCC' }" class="alifont icon-chaping"></view>
|
<u-icon name="heart-fill" style="font-size: 42rpx"
|
||||||
|
:style="{ color: form.grade === 'WORSE' ? 'red' : '#CCCCCC' }"></u-icon>
|
||||||
<text>差评</text>
|
<text>差评</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="info-evaluate-view">
|
<view class="info-evaluate-view">
|
||||||
<view class="input-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>
|
||||||
<view class="input-num">
|
<view class="input-num">
|
||||||
<text>{{ form.content.length }}/{{ maxlength }}</text>
|
<text>{{ form.content.length }}/{{ maxlength }}</text>
|
||||||
|
@ -47,7 +51,8 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="info-evaluate-view">
|
<view class="info-evaluate-view">
|
||||||
<view class="images-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>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -57,7 +62,8 @@
|
||||||
<view class="seller-rate-view">
|
<view class="seller-rate-view">
|
||||||
<view class="rate-title">描述相符</view>
|
<view class="rate-title">描述相符</view>
|
||||||
<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>
|
</view>
|
||||||
<view class="seller-rate-view">
|
<view class="seller-rate-view">
|
||||||
|
@ -94,7 +100,7 @@ export default {
|
||||||
maxlength: 500, //评价最大字数为500字
|
maxlength: 500, //评价最大字数为500字
|
||||||
placeholder:
|
placeholder:
|
||||||
"宝贝满足您的期待吗?说说它的优点和美中不足的地方吧。您的评价会帮助更多的人",
|
"宝贝满足您的期待吗?说说它的优点和美中不足的地方吧。您的评价会帮助更多的人",
|
||||||
order: {}, //订单信息
|
sku: {}, //订单信息
|
||||||
form: {
|
form: {
|
||||||
content: "", //评价详情
|
content: "", //评价详情
|
||||||
goodsId: "", //商品id
|
goodsId: "", //商品id
|
||||||
|
@ -111,10 +117,9 @@ export default {
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
// 获取上一级传过来的数据进行解析
|
// 获取上一级传过来的数据进行解析
|
||||||
this.form.orderItemSn = options.sn;
|
this.form.orderItemSn = options.sn;
|
||||||
this.order = JSON.parse(decodeURIComponent(options.order));
|
this.sku = JSON.parse(decodeURIComponent(options.sku));
|
||||||
this.form.goodsId = this.order.orderItems[0].goodsId;
|
this.form.goodsId = this.sku.goodsId;
|
||||||
this.form.orderItemSn = this.order.orderItems[0].sn;
|
this.form.skuId = this.sku.skuId;
|
||||||
this.form.skuId = this.order.orderItems[0].skuId;
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
/**
|
||||||
|
@ -141,7 +146,7 @@ export default {
|
||||||
success: () => {
|
success: () => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.navigateBack();
|
uni.navigateBack();
|
||||||
}, 2000);
|
}, 500);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -830,9 +830,7 @@ page {
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
.address-list {
|
|
||||||
margin-left: 20rpx;
|
|
||||||
}
|
|
||||||
.address-item {
|
.address-item {
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
letter-spacing: 1rpx;
|
letter-spacing: 1rpx;
|
||||||
|
|
|
@ -135,12 +135,13 @@ export default {
|
||||||
*/
|
*/
|
||||||
async onLoad(options) {
|
async onLoad(options) {
|
||||||
this.storeId = options.id;
|
this.storeId = options.id;
|
||||||
|
this.goodsParams.storeId = options.id;
|
||||||
|
this.couponParams.storeId = options.id;
|
||||||
},
|
},
|
||||||
onPageScroll(e) {
|
onPageScroll(e) {
|
||||||
this.scrollTop = e.scrollTop;
|
this.scrollTop = e.scrollTop;
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
|
|
||||||
this.init();
|
this.init();
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
|
@ -168,6 +168,7 @@ export function orderStatusList(val) {
|
||||||
PAID: "已付款",
|
PAID: "已付款",
|
||||||
DELIVERED: "已发货",
|
DELIVERED: "已发货",
|
||||||
CANCELLED: "已取消",
|
CANCELLED: "已取消",
|
||||||
|
COMPLETED:"已完成",
|
||||||
COMPLETE: "已完成",
|
COMPLETE: "已完成",
|
||||||
TAKE: "待核验",
|
TAKE: "待核验",
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue