send wash 7.29

This commit is contained in:
2020-07-29 19:01:10 +08:00
parent f21df2f107
commit 120e062fcd
10 changed files with 391 additions and 147 deletions

View File

@@ -35,7 +35,7 @@
<view class="btn" v-if="item.order_status == 20" @click="sendLaundryOrderConfirm(item.laundry_id)">
确认完成
</view>
<view class="btn" v-if="item.order_status == 50">
<view class="btn" v-if="item.order_status == 50" @click="toComment(item.laundry_id)">
去评价
</view>
</view>
@@ -49,8 +49,8 @@
</swiper-item>
<swiper-item class="swiper-item">
<scroll-view scroll-y class="comment">
<view v-for="(item, index) in 3" :key="index" class="comment-item">
<Comment></Comment>
<view v-for="(comment, index) in commentList" :key="index" class="comment-item">
<Comment :info="comment"></Comment>
</view>
</scroll-view>
</swiper-item>
@@ -84,6 +84,7 @@ export default {
page: 1,
orderList: [],
timer: true,
commentList: [],
}
},
components: {
@@ -111,11 +112,22 @@ export default {
return state;
},
},
watch: {
current(index) {
if(index == 1) {
uni.navigateTo({
url: '/pageE/tool/WashOrder'
});
this.showPopup = false;
}
}
},
onShow() {
this.current = 0;
this.swiperCurrent = 0;
this.showPopup = false;
this.sendLaundryOrderList();
this.sendCommentList();
},
methods: {
async sendLaundryOrderList({ load = 'reload' } = {}) {
@@ -159,31 +171,33 @@ export default {
this.page--;
})
},
// 送洗评论列表
sendCommentList() {
this.$u.api.sendCommentList().then(res => {
if(res.errCode == 0) {
this.commentList = res.data.list;
} else {
this.commentList = [];
}
})
},
toComment(id) {
this.$u.route('/pageE/tool/washComment', {
id: id
});
},
tabsChange(index) {
this.swiperCurrent = index;
this.toApplyPage(index);
if (index == 0){
this.showPopup = !this.showPopup;
} else {
this.showPopup = false;
}
},
animationfinish(e) {
let current = e.detail.current;
this.swiperCurrent = current;
this.current = current;
this.toApplyPage(current);
},
toApplyPage(index) {
var that = this;
if(index == 1) {
this.showPopup = false;
uni.navigateTo({
url: '/pageE/tool/WashOrder'
});
} else if (index == 0){
this.history();
} else {
this.showPopup = false;
}
},
history(){
this.showPopup = true;
},
replaces(e){
if(e == 1){