Feat(我的礼品卡):接口对接
This commit is contained in:
+40
-19
@@ -126,27 +126,12 @@
|
||||
赠言:{{ item.message }}
|
||||
</view>
|
||||
<view
|
||||
v-if="item.status === 1"
|
||||
:class="{
|
||||
'grey': [-2, 3].includes(item._status._type)
|
||||
}"
|
||||
class="btn"
|
||||
>
|
||||
送给朋友
|
||||
<image
|
||||
:src="webUrl + '/icon/icon-gift-share.png'"
|
||||
class="icon"
|
||||
mode="widthFix"
|
||||
/>
|
||||
</view>
|
||||
<view
|
||||
v-if="item.status === 2"
|
||||
class="btn"
|
||||
>
|
||||
已全部领取
|
||||
</view>
|
||||
<view
|
||||
v-if="item.status > 2"
|
||||
class="btn btn-grey"
|
||||
>
|
||||
灰色按钮
|
||||
{{ getStatus(item) }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -259,6 +244,42 @@ export default {
|
||||
this.isLoad = true
|
||||
})
|
||||
},
|
||||
getStatus(order) {
|
||||
const type = Number(order._status._type)
|
||||
let status = ''
|
||||
switch (type) {
|
||||
case 0:
|
||||
status = '待付款'
|
||||
break
|
||||
case 1:
|
||||
status = '礼包待发货'
|
||||
break
|
||||
case 2:
|
||||
status = '礼包待收货'
|
||||
break
|
||||
case 3:
|
||||
status = '礼包已收货'
|
||||
break
|
||||
case 4:
|
||||
status = '已完成'
|
||||
break
|
||||
case -1:
|
||||
status = '退款中'
|
||||
break
|
||||
case -2:
|
||||
status = '已退回'
|
||||
break
|
||||
case -3:
|
||||
status = '退款失败'
|
||||
break
|
||||
case 9:
|
||||
status = '已取消'
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
return status
|
||||
},
|
||||
showTips() {
|
||||
this.$refs.giftTips.showTips = true
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user