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

View File

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