🦀️ fix: 优惠券加自定义使用须知

This commit is contained in:
wangsongsole 2024-04-22 19:44:18 +08:00
parent 556c88b906
commit 223d92ab83
1 changed files with 22 additions and 21 deletions

View File

@ -156,7 +156,8 @@
</div>
<div class="content">
<h3>使用须知</h3>
<p>
<p v-html="goodInfo.notice" v-if="goodInfo.notice"></p>
<p v-else>
1、在{{goodInfo.channel==1?'支付宝H5':'微信APP内打开链接'}},点击【一键领取】完成领取{{goodInfo.channel==1?'支付宝':'微信'}}立减金<br />
2、{{goodInfo.channel==1?'支付宝':'微信'}}立减金一旦领取不可撤销、不可转让。注意不要将兑换券泄露给他人
</p>
@ -215,7 +216,7 @@
let goodsCount = null, goodsDetail = null;
new Vue({
el: '#exchangePage',
data() {
data () {
return {
account: '',
reAccount: '',
@ -253,7 +254,7 @@
filters: {
cardType(val) {
cardType (val) {
return val.map((item) => {
return item == 1 ? "借记卡" : "信用卡" + " ";
}).join(" ");
@ -261,17 +262,17 @@
},
watch: {
account(va) {
account (va) {
va && this.watchAccount();
},
reAccount(va) {
reAccount (va) {
va && this.watchAccount();
},
productType: {
immediate: true,
handler(newVal) {
handler (newVal) {
this.maxlen = 50;
this.acctype = "text";
switch (Number(newVal)) {
@ -345,7 +346,7 @@
modelPop
},
created() {
created () {
/* 配置信息 */
document.title = localStorage.getItem('title');
let detailsConfig = JSON.parse(localStorage.getItem('product_detail'));
@ -366,18 +367,18 @@
computed: {
/* 手机号验证 */
computedAccount() {
computedAccount () {
return /^[1][3,4,5,6,7,8,9][0-9]{9}$/.test(this.account);
},
/* 兑换按钮验证 */
computedExChange() {
computedExChange () {
return this.exchangeOpen || (this.goodInfo.product_type === 2 && this.goodInfo.card_show == 2) || this.goodInfo.is_e_card && this.computedAccount && this.jd_code.length === 6;
}
},
methods: {
bindAvailable() {
bindAvailable () {
// if (goodsDetail.wait_pay_order == 1) {
// this.openErrorDialog('您有未支付的订单');
// return;
@ -389,7 +390,7 @@
},
/* 获取京东E卡短信 */
sendJDSms() {
sendJDSms () {
if (this.cunt === 60) {
req.axiosPost('/key/order/jdSendSms', { code_batch_id: this.goodsDetail.code_batch_id, mobile: this.account })
.then((res) => {
@ -410,7 +411,7 @@
},
/* 请求详情 */
getDetails(goods_id, code_batch_id) {
getDetails (goods_id, code_batch_id) {
const token = localStorage.getItem('token');
return new Promise((resolve, reject) => {
req.axiosPost(`/key/product_detail/${goods_id}`, { token, code_batch_id }).then(({ code, data, message }) => {
@ -454,11 +455,11 @@
},
/* 跳转订单 */
toOrder() {
toOrder () {
window.location.replace('./myOrder.html');
},
openErrorDialog(tip, bottomText) {
openErrorDialog (tip, bottomText) {
this.popTitle = '温馨提示';
this.popText = tip;
this.popStatus = 2;
@ -466,7 +467,7 @@
this.bottomText = bottomText;
},
backHandler() {
backHandler () {
if (goodsCount > 1) {
window.location.replace('./couponCollection.html');
} else {
@ -475,7 +476,7 @@
},
// 单条弹框
openDialog(tip) {
openDialog (tip) {
this.promtshow = true;
this.promttip = tip;
setTimeout(() => {
@ -485,14 +486,14 @@
},
/* 弹窗回调 */
backFunctionPop(type) {
backFunctionPop (type) {
if (this.isLogin) {
this.delayedOut();
}
},
/* 延时自动退出 */
delayedOut(time = 1) {
delayedOut (time = 1) {
let entryLink = localStorage.getItem('entryLink');
setTimeout(() => {
window.location.replace(entryLink);
@ -500,7 +501,7 @@
},
//兑换商品
exchangeGoodsFn() {
exchangeGoodsFn () {
// //wait_pay_order 1有订单 5无订单
// if (goodsDetail.wait_pay_order == 1) {
// this.openErrorDialog('您有未支付的订单');
@ -605,7 +606,7 @@
window.location.href = './settlement.html';
},
focusFn(a) {
focusFn (a) {
let ele = document.querySelector('.ipt-acc');
setTimeout(function () {
ele.scrollIntoView(false);
@ -614,7 +615,7 @@
}, 400);
},
/* 监听账号 */
watchAccount() {
watchAccount () {
if ((this.account === this.reAccount) && this.account) {
this.exchangeOpen = true;
} else {