fix: 修哎按钮提示

This commit is contained in:
zhangds 2024-04-12 17:09:38 +08:00
parent e58b88de83
commit 9d297db92c
2 changed files with 38 additions and 14 deletions

View File

@ -92,7 +92,8 @@
</p>
</div>
</div>
<div class="receiveBtn" @click="receiveFn" :class="goodInfo.available!=1?'readOnly':''">{{ goodInfo.available!=1?'已兑换':'立即兑换' }}</div>
<div class="receiveBtn" @click="receiveFn" :class="goodInfo.available!=1?'readOnly':''">{{
globalFormatStatus(goodInfo.available) }}</div>
<div class="coupon_explain">
<h1>- 兑换说明 -</h1>
<div class="content">
@ -207,6 +208,16 @@
},
},
methods: {
globalFormatStatus(type) {
switch (type) {
case 1:
return "立即兑换"
case 9:
return "已兑换"
default:
return "立即兑换"
}
},
backgoodsFn() {
if (goodsCount > 1) {
locationReplace('./homepage.html');

View File

@ -98,7 +98,10 @@
</p>
</div>
</div>
<div class="receiveBtn" @click="receiveFn" :class="goodInfo.available!=1?'readOnly':''">{{ goodInfo.available!=1?'已兑换':'立即兑换' }}</div>
<div class="receiveBtn" @click="receiveFn" :class="goodInfo.available!=1?'readOnly':''">{{
globalFormatStatus(goodInfo.available) }}</div>
<div class="coupon_explain">
<h1>- 兑换说明 -</h1>
<div class="content">
@ -142,7 +145,7 @@
let goodsDetail = null, goodsCount = null;
new Vue({
el: "#reduce",
data () {
data() {
return {
plaflam: 1, //支付宝
promtshow: false,
@ -169,7 +172,7 @@
5、使用立减金的微信支付订单如发生全额退款且立减金仍在有效期内立减金将自动退还给用户如立减金已过期则不退还给用户如发生部分退款用户支付金额将按比例原路退还立减金将不退还给用户<br />`,
};
},
created () {
created() {
document.title = localStorage.getItem('title');
/* 获取立减金信息*/
goodsDetail = JSON.parse(sessionStorage.getItem("goodsInfo"));
@ -205,21 +208,31 @@
}
},
filters: {
cardType (val) {
cardType(val) {
return val.map((item) => {
return item == 1 ? "借记卡" : "信用卡" + " ";
}).join(" ");
},
},
methods: {
backgoodsFn () {
globalFormatStatus(type) {
switch (type) {
case 1:
return "立即兑换"
case 9:
return "已兑换"
default:
return "立即兑换"
}
},
backgoodsFn() {
if (goodsCount > 1) {
window.location.replace('./homepage.html');
} else {
history.go(-2);
}
},
receiveFn () {
receiveFn() {
if (this.loading) return;
this.loading = true;
let self = this;
@ -278,7 +291,7 @@
},
/* 公众号领取 */
publicCollection (order_number) {
publicCollection(order_number) {
let params = {
order_number,
channel: 2,
@ -301,7 +314,7 @@
},
toLinkAlipay () {
toLinkAlipay() {
//支付宝H5跳转
let self = this;
let banklink = encodeURIComponent(
@ -321,18 +334,18 @@
}
},
//错误弹出框关闭
knowFn () {
knowFn() {
this.popboxshow = false;
this.maskshow = false;
},
//错误弹出框
openErrorDialog (tip) {
openErrorDialog(tip) {
this.maskshow = true;
this.tiptext = tip;
this.popboxshow = true;
},
// 单条弹框
openDialog (tip) {
openDialog(tip) {
this.promtshow = true;
this.promttip = tip;
setTimeout(() => {
@ -342,7 +355,7 @@
},
/* 动态font */
fonts () {
fonts() {
const defaultCss = '0.32rem';
const count = String(parseFloat(this.reduceInfo.reduce_amount)).length + 1;
if (count > 4) {
@ -353,7 +366,7 @@
},
//复制文本
copyFn () {
copyFn() {
var textArea = document.createElement("textarea");
textArea.value = this.copyLink;
document.body.appendChild(textArea);