提示修改,库存不足的情况

This commit is contained in:
xiaogang 2024-09-26 17:02:33 +08:00
parent 554d252cb5
commit 102cdba7bf
1 changed files with 32 additions and 0 deletions

View File

@ -53,6 +53,12 @@
</view> </view>
<view v-if="bgmPage === 'receive'" class="receive"> <view v-if="bgmPage === 'receive'" class="receive">
<wd-button class="receive-btn" plain hairline @click="receiveFun">立即领取</wd-button> <wd-button class="receive-btn" plain hairline @click="receiveFun">立即领取</wd-button>
<wd-popup custom-style=" width: 599rpx;height: 543rpx;" v-model="show">
<view class="notLogin">
<view class="notLogin-txt">{{ showmsg }}</view>
<view class="notLogin-btn" @click="show = !show"></view>
</view>
</wd-popup>
</view> </view>
<view v-if="bgmPage === 'result'" class="result"> <view v-if="bgmPage === 'result'" class="result">
<view class="mask" style="position: absolute; top: 0; bottom: 0; z-index: 1000"></view> <view class="mask" style="position: absolute; top: 0; bottom: 0; z-index: 1000"></view>
@ -86,6 +92,8 @@ const contentMsg = ref('')
const statusCode = ref(0) const statusCode = ref(0)
const couponId = ref(uni.getStorageSync('couponId') || null) const couponId = ref(uni.getStorageSync('couponId') || null)
const url = ref('') const url = ref('')
const show = ref(false)
const showmsg = ref('商品库存不足!')
onLoad(() => { onLoad(() => {
const { activity_code: code, token } = getUrlParams() const { activity_code: code, token } = getUrlParams()
@ -167,6 +175,9 @@ const receiveFun = async () => {
uni.setStorageSync('myPage', 'result') uni.setStorageSync('myPage', 'result')
uni.setStorageSync('couponId', res.data.coupon_id) uni.setStorageSync('couponId', res.data.coupon_id)
couponId.value = res.data.coupon_id couponId.value = res.data.coupon_id
} else if (res.code === 2003) {
show.value = true
showmsg.value = res.message
} else { } else {
uni.showToast({ uni.showToast({
title: res.message, title: res.message,
@ -245,6 +256,27 @@ page {
margin: 0 50rpx 50rpx; margin: 0 50rpx 50rpx;
overflow-y: auto; overflow-y: auto;
} }
.notLogin {
position: relative;
width: 599rpx;
height: 543rpx;
background-image: url('@/assets/images/gzyd/notLogin.webp');
background-size: 100% 100%;
}
.notLogin-txt {
position: absolute;
top: 278rpx;
left: 0;
width: 100%;
text-align: center;
}
.notLogin-btn {
position: absolute;
top: 421rpx;
left: 177rpx;
width: 246rpx;
height: 79rpx;
}
.rules { .rules {
position: fixed; position: fixed;