修改bug
This commit is contained in:
parent
f6041a03f1
commit
17a76041eb
|
@ -316,6 +316,13 @@ const flip = debounce(function (index) {
|
|||
})
|
||||
return
|
||||
}
|
||||
if (cardStateArray.length === 0 || cardStateArray.length === 1) {
|
||||
uni.showToast({
|
||||
title: '无抽奖商品',
|
||||
icon: 'error',
|
||||
})
|
||||
return
|
||||
}
|
||||
if (status.value !== 2) {
|
||||
uni.showToast({
|
||||
title: '活动异常',
|
||||
|
|
|
@ -14,14 +14,10 @@
|
|||
<view class="mk2 plr50 flex_column flex_items" style="">
|
||||
<view class="flex_between flex_items" style="width: 100%">
|
||||
<text style="opacity: 0">站位</text>
|
||||
<text v-if="isz == 1" class="f36 bold" style="margin-top: a1e0 rpx; color: #003a6e">
|
||||
<text v-if="isz == 1" class="f36 bold" style="margin-top: 100rpx; color: #003a6e">
|
||||
恭喜您获得
|
||||
</text>
|
||||
<text
|
||||
v-if="isz == 0"
|
||||
class="f36 bold"
|
||||
style="margin-top: a1e0 rpx; color: #003a6e"
|
||||
></text>
|
||||
<text v-if="isz == 0" class="f36 bold" style="margin-top: 100rpx; color: #003a6e"></text>
|
||||
<image
|
||||
src="../../static/images/turntable/guan.png"
|
||||
@click="closemsk"
|
||||
|
@ -29,8 +25,8 @@
|
|||
mode=""
|
||||
></image>
|
||||
</view>
|
||||
<text class="f40 mt20" style="color: #003a6e">{{ jiang }}</text>
|
||||
<text class="f24 mt10" style="color: #003a6e">请到【我的奖品】中查看</text>
|
||||
<text class="f40 mt80" style="color: #003a6e">{{ jiang }}</text>
|
||||
<text v-if="isz === 1" class="f24 mt10" style="color: #003a6e">请到【我的奖品】中查看</text>
|
||||
<view
|
||||
v-if="isz == 1"
|
||||
@click="mypre"
|
||||
|
@ -241,7 +237,7 @@ export default {
|
|||
// title: '加载中...',
|
||||
// })
|
||||
const params = {
|
||||
activity_code: this.activity_code,
|
||||
activity_code: this.activity_code || 'zgp',
|
||||
}
|
||||
Api.getCode(params).then((res) => {
|
||||
uni.hideLoading()
|
||||
|
@ -275,7 +271,7 @@ export default {
|
|||
// 获取奖品列表
|
||||
getPrizeList() {
|
||||
Api.getProducts({
|
||||
activity_code: this.activity_code,
|
||||
activity_code: this.activity_code || 'zgp',
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
const { products } = res.data
|
||||
|
@ -346,6 +342,14 @@ export default {
|
|||
})
|
||||
return
|
||||
}
|
||||
if (this.prizeList.length === 0 || this.prizeList.length === 1) {
|
||||
this.prizeing = false
|
||||
uni.showToast({
|
||||
title: '无抽奖商品',
|
||||
icon: 'error',
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.status !== 2) {
|
||||
this.prizeing = false
|
||||
uni.showToast({
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
</view>
|
||||
<view class="flex_start flex_items mr20" style="color: #eb5e42">
|
||||
<view class="f24">¥</view>
|
||||
<text class="f48 bolder one">{{ item.product_amount }}</text>
|
||||
<text class="f48 bolder one">{{ item.amount }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt40 flex_between flex_items">
|
||||
|
@ -87,7 +87,7 @@
|
|||
</view>
|
||||
<view
|
||||
@click="gomypre(item)"
|
||||
class="f24 f-center"
|
||||
:class="['f24', 'f-center', item.status !== 1 && 'not-view']"
|
||||
style="
|
||||
width: 124rpx;
|
||||
line-height: 48rpx;
|
||||
|
@ -111,7 +111,6 @@
|
|||
>
|
||||
<text>--暂无数据--</text>
|
||||
</view>
|
||||
<Ywatermark :info="'蓝色兄弟'"></Ywatermark>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -119,9 +118,10 @@
|
|||
import api, { imgUrl } from './api'
|
||||
|
||||
const istrue = ref<boolean>(false)
|
||||
const isShow = ref<boolean>(false)
|
||||
const list = reactive<any>([])
|
||||
const query = reactive<any>({
|
||||
activity_code: 'quanyi',
|
||||
activity_code: 'zgp',
|
||||
})
|
||||
|
||||
const dui = (item) => {
|
||||
|
@ -134,13 +134,31 @@ const dui = (item) => {
|
|||
const gomypre = (idx) => {
|
||||
if (idx.status === 1) {
|
||||
const url =
|
||||
'product_id=' + idx.product_id + '&id=' + idx.id + '&activity_code=' + query.activity_code
|
||||
'product_id=' +
|
||||
idx.product_id +
|
||||
'&id=' +
|
||||
idx.id +
|
||||
'&activity_code=' +
|
||||
query.activity_code +
|
||||
'&mobile=' +
|
||||
idx.mobile +
|
||||
'&account_type=' +
|
||||
idx.account_type +
|
||||
'&product_form=' +
|
||||
idx.product_form
|
||||
const newUrl = encodeURIComponent(url)
|
||||
uni.navigateTo({
|
||||
url: '/pages/tt-coupon/product?url=' + newUrl,
|
||||
})
|
||||
} else {
|
||||
idx.order_info && window.open(idx.order_info)
|
||||
if (idx.product_form === 3) {
|
||||
uni.showModal({
|
||||
content: `卡密:${idx.order_info}`,
|
||||
showCancel: false,
|
||||
})
|
||||
} else if (idx.product_form === 1) {
|
||||
idx.order_info && window.open(idx.order_info)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -219,7 +237,9 @@ onLoad(() => {
|
|||
page {
|
||||
background: #f5f5f5 !important;
|
||||
}
|
||||
|
||||
.not-view {
|
||||
background-color: #848486;
|
||||
}
|
||||
.three {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
|
|
@ -340,12 +340,16 @@ function chosem(index) {
|
|||
curindex.value = index
|
||||
}
|
||||
function okdiu() {
|
||||
const params = { id: Number(id.value) }
|
||||
const params = {
|
||||
id: Number(id.value),
|
||||
account: route.mobile,
|
||||
account_type: route.product_form === 2 ? route.account_type : undefined,
|
||||
}
|
||||
api.exchange(params).then((res: any) => {
|
||||
if (res.code === 200) {
|
||||
uni.hideLoading()
|
||||
uni.navigateTo({
|
||||
url: '/pages/tt-coupon/prizes?activity_code=' + route.activity_code,
|
||||
url: '/pages/tt-coupon/index?activity_code=' + route.activity_code,
|
||||
})
|
||||
} else {
|
||||
uni.hideLoading()
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex_items flex_center" style="width: 100%">
|
||||
<view v-if="info.product_form !== 3" class="flex_items flex_center" style="width: 100%">
|
||||
<view
|
||||
class="bgwhite pb30 plr20 pt20 mt35 flex_column"
|
||||
style="width: calc(100% - 100rpx); border-radius: 20rpx"
|
||||
|
@ -138,7 +138,13 @@ function dui() {
|
|||
uni.showLoading({
|
||||
title: '兑换中...',
|
||||
})
|
||||
const params = { id: info.id }
|
||||
if (!info.mobile) {
|
||||
return uni.showToast({
|
||||
title: '充值账号未输入',
|
||||
icon: 'none',
|
||||
})
|
||||
}
|
||||
const params = { id: info.id, account: info.mobile, account_type: info.account_type }
|
||||
api.exchange(params).then((res: any) => {
|
||||
if (res.code === 200) {
|
||||
ismask.value = true
|
||||
|
|
Loading…
Reference in New Issue