🐞 fix:修复按钮展示样式问题

This commit is contained in:
wangsongsole 2023-03-01 16:40:34 +08:00
parent 2e94f84a20
commit 4ca0dbcd5f
1 changed files with 25 additions and 22 deletions

View File

@ -29,6 +29,7 @@
-webkit-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%; -ms-text-size-adjust: 100%;
} }
.bind_btn { .bind_btn {
filter: grayscale(100%); filter: grayscale(100%);
} }
@ -58,7 +59,8 @@
满{{reduceInfo.full}}元可用 满{{reduceInfo.full}}元可用
</div> </div>
</div> </div>
<div class="receive_btn" @click="toReceive" :class="reduceInfo.status == 0 ? 'receive_btn' : 'receive_btn bind_btn'">{{reduceInfo.status|statusFn}}</div> <div @click="toReceive" :class="reduceInfo.status == 0 ? 'receive_btn' : 'receive_btn bind_btn'">
{{reduceInfo.status|statusFn}}</div>
<div class="validity"> <div class="validity">
有效期:{{reduceInfo.time_limit.effect_time.start_time}}至{{reduceInfo.time_limit.effect_time.end_time}}</div> 有效期:{{reduceInfo.time_limit.effect_time.start_time}}至{{reduceInfo.time_limit.effect_time.end_time}}</div>
</div> </div>
@ -120,6 +122,7 @@
order_number: id order_number: id
}).then(res => { }).then(res => {
this.reduceInfo = res.data.rule; this.reduceInfo = res.data.rule;
this.reduceInfo.status = res.data.status;
this.couponInfo = res.data; this.couponInfo = res.data;
}).catch(); }).catch();
}, },
@ -132,19 +135,19 @@
channel_user_id: this.openId, // "渠道用户id" channel_user_id: this.openId, // "渠道用户id"
}; };
if (this.disabledBtn) { if (this.disabledBtn) {
return return;
} }
this.disabledBtn = true; this.disabledBtn = true;
req.axiosPost("/voucher/grant", data) req.axiosPost("/voucher/grant", data)
.then((res) => { .then((res) => {
setTimeout(() => { setTimeout(() => {
this.disabledBtn = false; this.disabledBtn = false;
},2000) }, 2000);
if (res.code == 200) { if (res.code == 200) {
window.location.href = './advise.html' window.location.href = './advise.html';
sessionStorage.setItem('messageTip', ''); sessionStorage.setItem('messageTip', '');
} else { } else {
window.location.href = './advise.html' window.location.href = './advise.html';
sessionStorage.setItem('messageTip', res.message); sessionStorage.setItem('messageTip', res.message);
} }
}) })