|
@@ -2,8 +2,8 @@
|
|
|
<view>
|
|
|
<u-navbar title="选择奖品" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
|
|
|
<view class="choice">
|
|
|
- <view class="choice-title">恭喜你获得</view>
|
|
|
- <view class="choice-all" v-if="total > 1">以下奖品任选其一</view>
|
|
|
+ <view class="choice-title" v-if="!tipShow">恭喜你获得</view>
|
|
|
+ <view class="choice-all" v-if="total > 1 && !tipShow">以下奖品任选其一</view>
|
|
|
<view class="flex choice-list">
|
|
|
<view class="choice-list-item" v-for="(item, index) in prizeList" :key="index"
|
|
|
@click="selectPrize(item, index)">
|
|
@@ -18,9 +18,16 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="flex btn">
|
|
|
- <view class="confirm" @click="confirmPrize">确认</view>
|
|
|
+ <view class="confirm" @click="confirmPrize" v-if="!tipShow">确认</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+
|
|
|
+ <u-popup :show="tipShow" :round="10" mode="center">
|
|
|
+ <view class="null-prize">
|
|
|
+ <view class="title">该盲票已被他人买走了</view>
|
|
|
+ <view class="btn" @click="toIndex">确认</view>
|
|
|
+ </view>
|
|
|
+ </u-popup>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -34,11 +41,14 @@
|
|
|
prizeList: [],
|
|
|
total: 0,
|
|
|
actionIndex: 0,
|
|
|
+ tipShow: false
|
|
|
};
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
this.ticketId = options.id
|
|
|
this.orderId = options.orderId
|
|
|
+ },
|
|
|
+ onShow() {
|
|
|
this.getPrizeList()
|
|
|
},
|
|
|
methods: {
|
|
@@ -46,7 +56,11 @@
|
|
|
uni.showLoading({
|
|
|
title: '加载中'
|
|
|
});
|
|
|
- let data = this.orderId ? { orderId: this.orderId } : { ticketId: this.ticketId }
|
|
|
+ let data = this.orderId ? {
|
|
|
+ orderId: this.orderId
|
|
|
+ } : {
|
|
|
+ ticketId: this.ticketId
|
|
|
+ }
|
|
|
$http.post('/api/v1/mp/user/ticket/queryHitPrizeList', data).then(res => {
|
|
|
uni.hideLoading();
|
|
|
if (res.code == 0) {
|
|
@@ -57,6 +71,10 @@
|
|
|
this.prizeList = res.data.prizeList
|
|
|
this.ticketId = res.data.ticketId
|
|
|
this.total = res.data.length
|
|
|
+ } else if (res.code == 1018) {
|
|
|
+ this.tipShow = true
|
|
|
+ }else{
|
|
|
+ this.tipShow = true
|
|
|
}
|
|
|
}).catch(() => {
|
|
|
uni.hideLoading();
|
|
@@ -98,6 +116,12 @@
|
|
|
})
|
|
|
|
|
|
},
|
|
|
+
|
|
|
+ toIndex() {
|
|
|
+ uni.switchTab({
|
|
|
+ url: '/pages/index/index'
|
|
|
+ })
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -193,4 +217,27 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ .null-prize {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ width: 80vw;
|
|
|
+ height: 320rpx;
|
|
|
+ background-color: #FFFFFF;
|
|
|
+ border: 1px solid rgba(187, 187, 187, 100);
|
|
|
+
|
|
|
+ .btn {
|
|
|
+ margin-top: 60rpx;
|
|
|
+ width: 160rpx;
|
|
|
+ height: 60rpx;
|
|
|
+ line-height: 60rpx;
|
|
|
+ border-radius: 8rpx;
|
|
|
+ background-color: rgba(235, 112, 9, 100);
|
|
|
+ color: rgba(255, 255, 255, 100);
|
|
|
+ font-size: 28rpx;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|