Commit ce87018a authored by FE-安焕焕's avatar FE-安焕焕 👣

修复已知问题

parent 734125c5
...@@ -71,14 +71,12 @@ export default { ...@@ -71,14 +71,12 @@ export default {
this.queryhome(); this.queryhome();
} }
}, },
async searchPhoneNo(e) { async searchPhoneNo() {
console.log(e);
setTimeout(() => { setTimeout(() => {
this.inputBlur = false; this.inputBlur = false;
}, 500); }, 500);
if (!this.phoneNo) return; if (this.phoneNo && !checkPhoneFormat(this.phoneNo)) {
if (!checkPhoneFormat(this.phoneNo)) {
this.$toast.fail('请您输入正确的手机号'); this.$toast.fail('请您输入正确的手机号');
this.input(); this.input();
return; return;
......
...@@ -77,7 +77,7 @@ export default { ...@@ -77,7 +77,7 @@ export default {
}, },
async goOrderApi() { async goOrderApi() {
const { skuNo, salePrice } = this.selectedRechargeInfo; const { skuNo, salePrice } = this.selectedRechargeInfo;
const [res] = await orderApi.orderCreate({ const [res, error] = await orderApi.orderCreate({
totalFee: salePrice, totalFee: salePrice,
terminal: 'H5', terminal: 'H5',
account: this.rechargePhoneInfo?.phoneNo, account: this.rechargePhoneInfo?.phoneNo,
...@@ -90,6 +90,9 @@ export default { ...@@ -90,6 +90,9 @@ export default {
} }
] ]
}); });
if (error) {
return;
}
res && this.$router.push({ path: '/pay', query: { orderNo: res.orderNo } }); res && this.$router.push({ path: '/pay', query: { orderNo: res.orderNo } });
} }
} }
......
...@@ -64,7 +64,7 @@ export default { ...@@ -64,7 +64,7 @@ export default {
}, },
methods: { methods: {
changePayType({ payType, mergePayPretreatmentInfo }) { changePayType({ payType, mergePayPretreatmentInfo }) {
if (this.disabled || this.value.disabled) { if (this.disabled || this.value.disabled || this.isGroupPay) {
return; return;
} }
this.$emit('click'); this.$emit('click');
......
<template> <template>
<div> <div @click="changePayType(thirdPayInfo)">
<div class="groupCard"> <div class="groupCard">
<PayCardItem <PayCardItem
:is-group-pay="true" :is-group-pay="true"
......
...@@ -113,7 +113,7 @@ export default { ...@@ -113,7 +113,7 @@ export default {
async getList() { async getList() {
const [res] = await rechargeApi.getSpuList(); const [res] = await rechargeApi.getSpuList();
if (res) { if (res) {
this.account = res.userPhoneInfo.phoneNo; this.account = res?.userPhoneInfo?.phoneNo;
this.spuData = res.vipLife; this.spuData = res.vipLife;
this.updateSpuInfo(this.spuData[this.currentTab - 1].itemList[0]); this.updateSpuInfo(this.spuData[this.currentTab - 1].itemList[0]);
this.getSkuListDebounce(); this.getSkuListDebounce();
...@@ -145,7 +145,7 @@ export default { ...@@ -145,7 +145,7 @@ export default {
return this.$toast.fail('请填写账号!'); return this.$toast.fail('请填写账号!');
if (!this.skuInfo.skuNo) return this.$toast.fail('请选择类型!'); if (!this.skuInfo.skuNo) return this.$toast.fail('请选择类型!');
const { skuNo, salePrice } = this.skuInfo; const { skuNo, salePrice } = this.skuInfo;
const [res] = await orderApi.orderCreate({ const [res, error] = await orderApi.orderCreate({
account: this.account, account: this.account,
totalFee: salePrice, totalFee: salePrice,
virtualRechargeType: this.spuInfo.type, virtualRechargeType: this.spuInfo.type,
...@@ -156,6 +156,9 @@ export default { ...@@ -156,6 +156,9 @@ export default {
} }
] ]
}); });
if (error) {
return;
}
res && this.$router.push({ path: '/pay', query: { orderNo: res.orderNo } }); res && this.$router.push({ path: '/pay', query: { orderNo: res.orderNo } });
}, 1000) }, 1000)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment