【fix】优化代码
This commit is contained in:
@ -24,16 +24,11 @@
|
||||
>
|
||||
<view
|
||||
v-for="(item, index) in data.cartInfo"
|
||||
:key="index"
|
||||
class="order-evaluate"
|
||||
:class="{evaluateBtn: data._status._type == 3}"
|
||||
>
|
||||
<view
|
||||
v-if="data._status._type == 3 && item.isReply === 0"
|
||||
class="order-actions-primary order-evaluate-btn"
|
||||
@tap.stop="toEvaluate(item.unique,data.orderId)"
|
||||
>
|
||||
去评价
|
||||
</view>
|
||||
|
||||
<Goods
|
||||
row
|
||||
:jump="false"
|
||||
@ -75,7 +70,14 @@
|
||||
<span v-if="item.orderDetailState===2"> 售后中 </span>
|
||||
<span v-if="item.orderDetailState===3"> 售后完成 </span>
|
||||
</view>
|
||||
<view class="price-box cart-num flex flex-ai__end">
|
||||
<view class="price-box cart-num flex flex-ai__center">
|
||||
<view
|
||||
v-if="data._status._type == 3 && item.isReply === 0"
|
||||
class="order-actions-primary order-evaluate-btn"
|
||||
@tap.stop="toEvaluate(item.unique,data.orderId)"
|
||||
>
|
||||
去评价
|
||||
</view>
|
||||
x{{ item.cartNum }}
|
||||
</view>
|
||||
</view>
|
||||
@ -254,14 +256,17 @@ async function doTakeGoods() {
|
||||
let option = {
|
||||
uni: data.value.orderId,
|
||||
}
|
||||
let payInfo = JSON.parse(data.value.payInfo)
|
||||
showWsReceipt(payInfo.transaction_id).then(async (res) => {
|
||||
if (res === 'success') {
|
||||
await orderTake(option)
|
||||
emit('refresh')
|
||||
toast({title: '已收货'});
|
||||
}
|
||||
})
|
||||
try {
|
||||
let payInfo = JSON.parse(data.value.payInfo)
|
||||
const res = await showWsReceipt(payInfo.transaction_id)
|
||||
if (res !== 'success') return
|
||||
await orderTake(option)
|
||||
emit('refresh')
|
||||
toast({title: '已收货'});
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
toast({title: '收货失败', icon: 'error'});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user