chore:优惠券领取loading
This commit is contained in:
1 parent
0b22601dc8
commit
6ec744de13
1 file changed
+3
-2
@@ -12,7 +12,7 @@
|
||||
</view>
|
||||
<view v-if="couponInfo?.actStatus == '2'" class="text-center card p-3 sub-text-30">已 核 销</view>
|
||||
<template v-else>
|
||||
<view v-if="!isGet" class="text-center card p-3 sub-text-30" @click="doGetCoupon">立 即 领 取</view>
|
||||
<view v-if="!isGet" class="text-center card p-3 sub-text-30" @tap="doGetCoupon">立 即 领 取</view>
|
||||
<view v-if="isGet" class="text-center card p-3 sub-text-30">已 领 取</view>
|
||||
</template>
|
||||
</view>
|
||||
@@ -68,7 +68,8 @@ const getCouponInfo = async () => {
|
||||
// 领取兑换券
|
||||
const doGetCoupon = async () => {
|
||||
try {
|
||||
uni.showLoading({ title: "正在领取..." })
|
||||
uni.showLoading({ title: "正在领取...", mask: true })
|
||||
await new Promise((resolve) => setTimeout(resolve, 2_000))
|
||||
const { code, msg }: any = await actCancel.appGet({ receiverUserId: uni.getStorageSync("user_info")?.sysUser?.userId })
|
||||
if (code != 0) return uni.showToast({ title: msg || "领取失败", icon: "none", mask: true })
|
||||
uni.showToast({ title: "领取成功", icon: "success" })
|
||||
|
||||
Reference in new issue
Block a user