|
|
@ -49,7 +49,8 @@
|
|
|
|
<view class="bottom">
|
|
|
|
<view class="bottom">
|
|
|
|
<view @click="cancel(res,index)" v-if="res.status == '0'" class="exchange btn">取消订单
|
|
|
|
<view @click="cancel(res,index)" v-if="res.status == '0'" class="exchange btn">取消订单
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view @click="commentBtn" v-if="res.status == '2'" class="evaluate btn">评价</view>
|
|
|
|
<view @click="commentBtn(res)" v-if="res.status == '2'" class="evaluate btn">评价
|
|
|
|
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<u-loadmore :status="loadStatus[index]" bgColor="#f2f2f2"></u-loadmore>
|
|
|
|
<u-loadmore :status="loadStatus[index]" bgColor="#f2f2f2"></u-loadmore>
|
|
|
@ -61,7 +62,7 @@
|
|
|
|
<u-modal confirm-color="#F3AF28" :content-style="{padding: '10px'}" :show-cancel-button='true' title="评论"
|
|
|
|
<u-modal confirm-color="#F3AF28" :content-style="{padding: '10px'}" :show-cancel-button='true' title="评论"
|
|
|
|
:zoom="false" v-model="show" @confirm='confirmBtn' @cancel="cancelBtn">
|
|
|
|
:zoom="false" v-model="show" @confirm='confirmBtn' @cancel="cancelBtn">
|
|
|
|
<view style="height: 100px;">
|
|
|
|
<view style="height: 100px;">
|
|
|
|
<textarea placeholder="请输入评论" auto-height />
|
|
|
|
<textarea v-model="commentText" placeholder="请输入评论" auto-height />
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</u-modal>
|
|
|
|
</u-modal>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
@ -75,14 +76,20 @@
|
|
|
|
getOrderListApi,
|
|
|
|
getOrderListApi,
|
|
|
|
cancelOrderApi
|
|
|
|
cancelOrderApi
|
|
|
|
} from '../../api/order.js'
|
|
|
|
} from '../../api/order.js'
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
|
|
|
addCommentApi
|
|
|
|
|
|
|
|
} from '../../api/user.js'
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
ref,
|
|
|
|
ref,
|
|
|
|
computed
|
|
|
|
computed
|
|
|
|
} from 'vue'
|
|
|
|
} from 'vue'
|
|
|
|
//评论弹框显示
|
|
|
|
//评论弹框显示
|
|
|
|
const show = ref(false)
|
|
|
|
const show = ref(false)
|
|
|
|
|
|
|
|
const orderId = ref('')
|
|
|
|
|
|
|
|
const commentText = ref('')
|
|
|
|
//评价点击事件
|
|
|
|
//评价点击事件
|
|
|
|
const commentBtn = () => {
|
|
|
|
const commentBtn = (item) => {
|
|
|
|
|
|
|
|
orderId.value = item.orderId;
|
|
|
|
show.value = true
|
|
|
|
show.value = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const tabs = ref(null);
|
|
|
|
const tabs = ref(null);
|
|
|
@ -211,9 +218,24 @@
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//评论提交
|
|
|
|
//评论提交
|
|
|
|
const confirmBtn = () => {
|
|
|
|
const confirmBtn = async () => {
|
|
|
|
console.log('确定')
|
|
|
|
console.log('确定')
|
|
|
|
show.value = false
|
|
|
|
if (!commentText.value) {
|
|
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
|
|
icon: 'none',
|
|
|
|
|
|
|
|
title: '请填写评论'
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
let res = await addCommentApi({
|
|
|
|
|
|
|
|
orderId: orderId.value,
|
|
|
|
|
|
|
|
openid: uni.getStorageSync('openid'),
|
|
|
|
|
|
|
|
commentText: commentText.value
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
if (res && res.code == 200) {
|
|
|
|
|
|
|
|
show.value = false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//评论取消
|
|
|
|
//评论取消
|
|
|
|
const cancelBtn = () => {
|
|
|
|
const cancelBtn = () => {
|
|
|
|