|
@@ -84,7 +84,9 @@
|
|
|
<view class="choice-info-content-btn flex">
|
|
|
<view class="choice-info-content-btn-content flex" @click="toPrize(actionInfo.prizeType)">
|
|
|
<view class="choice-info-content-btn-content-txt"
|
|
|
- v-if="actionInfo.prizeType && actionInfo.prizeType.value != 'coin'">去查看我的奖品</view>
|
|
|
+ v-if="actionInfo.prizeType && actionInfo.prizeType.value != 'coin' && goodsType == 2">去订单查看卡密</view>
|
|
|
+ <view class="choice-info-content-btn-content-txt"
|
|
|
+ v-else-if="actionInfo.prizeType && actionInfo.prizeType.value != 'coin'">去查看我的奖品</view>
|
|
|
<view class="choice-info-content-btn-content-txt" v-else>去商城兑换商品</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -132,6 +134,7 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ goodsType: 0,
|
|
|
ticketId: '',
|
|
|
prizeList: [],
|
|
|
total: 0,
|
|
@@ -274,6 +277,9 @@
|
|
|
}).then(res => {
|
|
|
if (res.code == 0) {
|
|
|
this.comfirmShow = true
|
|
|
+ if(item.prizeType && item.prizeType.value == "goods"){
|
|
|
+ this.getSubmitOrder(item)//提货
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
return
|
|
@@ -315,6 +321,9 @@
|
|
|
}).then(res => {
|
|
|
if (res.code == 0) {
|
|
|
_this.comfirmShow = true
|
|
|
+ if(item.prizeType && item.prizeType.value == "goods"){
|
|
|
+ _this.getSubmitOrder(item)//提货
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -328,6 +337,9 @@
|
|
|
}).then(res => {
|
|
|
if (res.code == 0) {
|
|
|
_this.comfirmShow = true
|
|
|
+ if(item.prizeType && item.prizeType.value == "goods"){
|
|
|
+ _this.getSubmitOrder(item)//提货
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -351,9 +363,49 @@
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
+ //卡密商品直接提货
|
|
|
+ getSubmitOrder(data){
|
|
|
+ //首先判断是卡密商品
|
|
|
+ let status = false
|
|
|
+ let ids = []
|
|
|
+ let settleInfo = {}
|
|
|
+ //先获取实物列表
|
|
|
+ $http.post('/api/v1/mp/user/mine/prize/list?pageNum=1&pageSize=10',{}).then(res=>{
|
|
|
+ if(res.code == 0){
|
|
|
+ for (var i = 0; i < res.rows.length; i++) {
|
|
|
+ if(res.rows[i].goodsId == data.refId && res.rows[i].goodsType == 2) {
|
|
|
+ this.goodsType = res.rows[i].goodsType
|
|
|
+ status = true
|
|
|
+ ids.push(res.rows[i].storageId)
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(status){
|
|
|
+ //获取到订单详情
|
|
|
+ $http.post('/api/v1/mp/user/deliver/order/settle', {ids: ids} ).then(res => {
|
|
|
+ if (res.code == 0) {
|
|
|
+ //直接提货
|
|
|
+ $http.post('/api/v1/mp/user/deliver/order/submit', {
|
|
|
+ memo:'',
|
|
|
+ goodsType: 2
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code == 0) {}
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
toPrize(data) {
|
|
|
- if (data.value == 'goods') {
|
|
|
+ if(data.value == 'goods' && this.goodsType == 2){
|
|
|
+ //跳转订单
|
|
|
+ uni.redirectTo({
|
|
|
+ url: `/packageGoods/order/index`
|
|
|
+ })
|
|
|
+ }else if (data.value == 'goods') {
|
|
|
uni.redirectTo({
|
|
|
url: '/packagePrize/prize/index'
|
|
|
})
|