fix: 修改云闪付判断按钮

This commit is contained in:
zhangds 2024-06-18 13:47:09 +08:00
parent 08a81a11c8
commit 951d1902fb
4 changed files with 72 additions and 68 deletions

View File

@ -112,7 +112,7 @@
const phoneReg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/; const phoneReg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
new Vue({ new Vue({
el: "#ysf", el: "#ysf",
data () { data() {
return { return {
ysf: JSON.parse(sessionStorage.getItem('goodsInfo')), ysf: JSON.parse(sessionStorage.getItem('goodsInfo')),
account: null, account: null,
@ -136,7 +136,7 @@
modelPop modelPop
}, },
mounted () { mounted() {
// 领取成功结算 5 // 领取成功结算 5
if (bm_obj_data && !bm_obj_data.settlement_data.is_settlement && bm_obj_data.settlement_data.settlement_type === 5) { if (bm_obj_data && !bm_obj_data.settlement_data.is_settlement && bm_obj_data.settlement_data.settlement_type === 5) {
settlementFun(bm_obj_data.token, bm_obj_data.settlement_data.settlement_type); settlementFun(bm_obj_data.token, bm_obj_data.settlement_data.settlement_type);
@ -170,7 +170,7 @@
} }
}, },
filters: { filters: {
cardType (val) { cardType(val) {
return val.map((item) => { return val.map((item) => {
return item == 1 ? "借记卡" : "信用卡" + " "; return item == 1 ? "借记卡" : "信用卡" + " ";
}).join(" "); }).join(" ");
@ -179,8 +179,9 @@
methods: { methods: {
/* 立即领取 */ /* 立即领取 */
submit () { submit() {
if (this.ysf.available != 1 || this.ysf.available != 11) return; // if (this.ysf.available != 1) return;
if ([1, 11].includes(this.ysf.available)) {
if (phoneReg.test(this.account) && this.confirmAccount) { if (phoneReg.test(this.account) && this.confirmAccount) {
if (this.account === this.confirmAccount) { if (this.account === this.confirmAccount) {
this.finalSubmit(); this.finalSubmit();
@ -190,11 +191,11 @@
} else { } else {
this.tips('请输入正确的手机号'); this.tips('请输入正确的手机号');
} }
}
}, },
/* 验证后 最终提交 */ /* 验证后 最终提交 */
finalSubmit () { finalSubmit() {
if (this.loading) return; if (this.loading) return;
this.loading = true; this.loading = true;
const self = this; const self = this;
@ -225,7 +226,7 @@
}, },
/* 核销云闪付立减金 */ /* 核销云闪付立减金 */
verificationYsf ({ order_number }) { verificationYsf({ order_number }) {
console.log(order_number); console.log(order_number);
let params = { let params = {
order_number: order_number, order_number: order_number,
@ -247,7 +248,7 @@
}, },
/* 返回 */ /* 返回 */
backGoodsFn () { backGoodsFn() {
/* 判断是否web-view打开 则不返回 */ /* 判断是否web-view打开 则不返回 */
if (this.isMini) return; if (this.isMini) return;
if (this.backAble) { if (this.backAble) {
@ -260,14 +261,14 @@
}, },
/* 触发提示 */ /* 触发提示 */
tip (text, status) { tip(text, status) {
this.popText = text; this.popText = text;
this.popStatus = status; /*1 成功 2提示 3失败 */ this.popStatus = status; /*1 成功 2提示 3失败 */
this.popShow = true; this.popShow = true;
}, },
/* 接口异常处理 */ /* 接口异常处理 */
axiosErrorFun (code, message, status) { axiosErrorFun(code, message, status) {
this.is = false; this.is = false;
if (code == 403) { if (code == 403) {
if (this.backAble) { if (this.backAble) {
@ -284,7 +285,7 @@
}, },
/* 触发提示 */ /* 触发提示 */
tips (text) { tips(text) {
this.cls && clearTimeout(this.cls); this.cls && clearTimeout(this.cls);
this.prompt_text = text; this.prompt_text = text;
this.promptShow = true; this.promptShow = true;
@ -294,7 +295,7 @@
}, },
/* 动态font */ /* 动态font */
fonts () { fonts() {
const { denomination, reduce_amount } = this.ysf.entity; const { denomination, reduce_amount } = this.ysf.entity;
const defaultCss = { a: '0.34rem' }; const defaultCss = { a: '0.34rem' };
const count = String(parseFloat(denomination)).length + String(parseFloat(reduce_amount)).length + 4; const count = String(parseFloat(denomination)).length + String(parseFloat(reduce_amount)).length + 4;

View File

@ -105,7 +105,7 @@
const phoneReg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/; const phoneReg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
new Vue({ new Vue({
el: "#ysf", el: "#ysf",
data () { data() {
return { return {
ysf: JSON.parse(sessionStorage.getItem('goodsInfo')), ysf: JSON.parse(sessionStorage.getItem('goodsInfo')),
account: null, account: null,
@ -127,7 +127,7 @@
modelPop modelPop
}, },
mounted () { mounted() {
// 领取成功结算 5 // 领取成功结算 5
if (bm_obj_data && !bm_obj_data.settlement_data.is_settlement && bm_obj_data.settlement_data.settlement_type === 5) { if (bm_obj_data && !bm_obj_data.settlement_data.is_settlement && bm_obj_data.settlement_data.settlement_type === 5) {
settlementFun(bm_obj_data.token, bm_obj_data.settlement_data.settlement_type); settlementFun(bm_obj_data.token, bm_obj_data.settlement_data.settlement_type);
@ -141,8 +141,9 @@
methods: { methods: {
/* 立即领取 */ /* 立即领取 */
submit () { submit() {
if (this.ysf.available != 1 || this.ysf.available != 11) return; // if (this.ysf.available != 1) return;
if ([1, 11].includes(this.ysf.available)) {
if (phoneReg.test(this.account) && this.confirmAccount) { if (phoneReg.test(this.account) && this.confirmAccount) {
if (this.account === this.confirmAccount) { if (this.account === this.confirmAccount) {
this.finalSubmit(); this.finalSubmit();
@ -152,11 +153,11 @@
} else { } else {
this.tips('请输入正确的手机号'); this.tips('请输入正确的手机号');
} }
}
}, },
/* 验证后 最终提交 */ /* 验证后 最终提交 */
finalSubmit () { finalSubmit() {
if (this.loading) return; if (this.loading) return;
this.loading = true; this.loading = true;
const self = this; const self = this;
@ -203,7 +204,7 @@
}, },
/* 返回 */ /* 返回 */
backGoodsFn () { backGoodsFn() {
this.money = 0; this.money = 0;
/* 判断是否web-view打开 则不返回 */ /* 判断是否web-view打开 则不返回 */
if (this.isMini) return; if (this.isMini) return;
@ -215,14 +216,14 @@
}, },
/* 触发提示 */ /* 触发提示 */
tip (text, status,) { tip(text, status,) {
this.popText = text; this.popText = text;
this.popStatus = status; /*1 成功 2提示 3失败 */ this.popStatus = status; /*1 成功 2提示 3失败 */
this.popShow = true; this.popShow = true;
}, },
/* 触发提示 */ /* 触发提示 */
tips (text) { tips(text) {
this.cls && clearTimeout(this.cls); this.cls && clearTimeout(this.cls);
this.prompt_text = text; this.prompt_text = text;
this.promptShow = true; this.promptShow = true;

View File

@ -113,7 +113,7 @@
const phoneReg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/; const phoneReg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
new Vue({ new Vue({
el: "#ysf", el: "#ysf",
data () { data() {
return { return {
ysf: JSON.parse(sessionStorage.getItem('goodsInfo')), ysf: JSON.parse(sessionStorage.getItem('goodsInfo')),
account: null, account: null,
@ -137,7 +137,7 @@
modelPop modelPop
}, },
mounted () { mounted() {
document.title = localStorage.getItem('title'); document.title = localStorage.getItem('title');
/* 判断是否是微信小程序内 */ /* 判断是否是微信小程序内 */
let ua = window.navigator.userAgent.toLowerCase(); let ua = window.navigator.userAgent.toLowerCase();
@ -166,7 +166,7 @@
} }
}, },
filters: { filters: {
cardType (val) { cardType(val) {
return val.map((item) => { return val.map((item) => {
return item == 1 ? "借记卡" : "信用卡" + " "; return item == 1 ? "借记卡" : "信用卡" + " ";
}).join(" "); }).join(" ");
@ -175,8 +175,9 @@
methods: { methods: {
/* 立即领取 */ /* 立即领取 */
submit () { submit() {
if (this.ysf.available != 1 || this.ysf.available != 11) return; // if (this.ysf.available != 1) return;
if ([1, 11].includes(this.ysf.available)) {
if (phoneReg.test(this.account) && this.confirmAccount) { if (phoneReg.test(this.account) && this.confirmAccount) {
if (this.account === this.confirmAccount) { if (this.account === this.confirmAccount) {
this.finalSubmit(); this.finalSubmit();
@ -186,11 +187,11 @@
} else { } else {
this.tips('请输入正确的手机号'); this.tips('请输入正确的手机号');
} }
}
}, },
/* 验证后 最终提交 */ /* 验证后 最终提交 */
finalSubmit () { finalSubmit() {
if (this.loading) return; if (this.loading) return;
this.loading = true; this.loading = true;
const self = this; const self = this;
@ -215,7 +216,7 @@
}, },
/* 核销云闪付立减金 */ /* 核销云闪付立减金 */
verificationYsf ({ order_number }) { verificationYsf({ order_number }) {
console.log(order_number); console.log(order_number);
let params = { let params = {
order_number: order_number, order_number: order_number,
@ -237,7 +238,7 @@
}, },
/* 返回 */ /* 返回 */
backGoodsFn () { backGoodsFn() {
/* 判断是否web-view打开 则不返回 */ /* 判断是否web-view打开 则不返回 */
if (this.isMini) return; if (this.isMini) return;
if (this.backAble) { if (this.backAble) {
@ -250,14 +251,14 @@
}, },
/* 触发提示 */ /* 触发提示 */
tip (text, status) { tip(text, status) {
this.popText = text; this.popText = text;
this.popStatus = status; /*1 成功 2提示 3失败 */ this.popStatus = status; /*1 成功 2提示 3失败 */
this.popShow = true; this.popShow = true;
}, },
/* 接口异常处理 */ /* 接口异常处理 */
axiosErrorFun (code, message, status) { axiosErrorFun(code, message, status) {
this.is = false; this.is = false;
if (code == 403) { if (code == 403) {
if (this.backAble) { if (this.backAble) {
@ -274,7 +275,7 @@
}, },
/* 触发提示 */ /* 触发提示 */
tips (text) { tips(text) {
this.cls && clearTimeout(this.cls); this.cls && clearTimeout(this.cls);
this.prompt_text = text; this.prompt_text = text;
this.promptShow = true; this.promptShow = true;
@ -284,7 +285,7 @@
}, },
/* 动态font */ /* 动态font */
fonts () { fonts() {
const { denomination, reduce_amount } = this.ysf.entity; const { denomination, reduce_amount } = this.ysf.entity;
const defaultCss = { a: '0.34rem' }; const defaultCss = { a: '0.34rem' };
const count = String(parseFloat(denomination)).length + String(parseFloat(reduce_amount)).length + 4; const count = String(parseFloat(denomination)).length + String(parseFloat(reduce_amount)).length + 4;

View File

@ -103,7 +103,7 @@
const phoneReg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/; const phoneReg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
new Vue({ new Vue({
el: "#ysf", el: "#ysf",
data () { data() {
return { return {
ysf: JSON.parse(sessionStorage.getItem('goodsInfo')), ysf: JSON.parse(sessionStorage.getItem('goodsInfo')),
account: null, account: null,
@ -125,7 +125,7 @@
modelPop modelPop
}, },
mounted () { mounted() {
document.title = localStorage.getItem('title'); document.title = localStorage.getItem('title');
/* 判断是否是微信小程序内 */ /* 判断是否是微信小程序内 */
let ua = window.navigator.userAgent.toLowerCase(); let ua = window.navigator.userAgent.toLowerCase();
@ -134,8 +134,9 @@
methods: { methods: {
/* 立即领取 */ /* 立即领取 */
submit () { submit() {
if (this.ysf.available != 1 || this.ysf.available != 11) return; // if (this.ysf.available != 1) return;
if ([1, 11].includes(this.ysf.available)) {
if (phoneReg.test(this.account) && this.confirmAccount) { if (phoneReg.test(this.account) && this.confirmAccount) {
if (this.account === this.confirmAccount) { if (this.account === this.confirmAccount) {
this.finalSubmit(); this.finalSubmit();
@ -145,11 +146,11 @@
} else { } else {
this.tips('请输入正确的手机号'); this.tips('请输入正确的手机号');
} }
}
}, },
/* 验证后 最终提交 */ /* 验证后 最终提交 */
finalSubmit () { finalSubmit() {
if (this.loading) return; if (this.loading) return;
this.loading = true; this.loading = true;
const self = this; const self = this;
@ -189,7 +190,7 @@
}, },
/* 返回 */ /* 返回 */
backGoodsFn () { backGoodsFn() {
this.money = 0; this.money = 0;
/* 判断是否web-view打开 则不返回 */ /* 判断是否web-view打开 则不返回 */
if (this.isMini) return; if (this.isMini) return;
@ -201,14 +202,14 @@
}, },
/* 触发提示 */ /* 触发提示 */
tip (text, status,) { tip(text, status,) {
this.popText = text; this.popText = text;
this.popStatus = status; /*1 成功 2提示 3失败 */ this.popStatus = status; /*1 成功 2提示 3失败 */
this.popShow = true; this.popShow = true;
}, },
/* 触发提示 */ /* 触发提示 */
tips (text) { tips(text) {
this.cls && clearTimeout(this.cls); this.cls && clearTimeout(this.cls);
this.prompt_text = text; this.prompt_text = text;
this.promptShow = true; this.promptShow = true;