Commit 8e3b262e authored by 郭志伟's avatar 郭志伟

Merge branch 'master' of http://git.quantgroup.cn/ui/cauchy-ui

parents c6674aa3 a2a79f6d
......@@ -71,14 +71,12 @@ export default {
this.queryhome();
}
},
async searchPhoneNo(e) {
console.log(e);
async searchPhoneNo() {
setTimeout(() => {
this.inputBlur = false;
}, 500);
if (!this.phoneNo) return;
if (!checkPhoneFormat(this.phoneNo)) {
if (this.phoneNo && !checkPhoneFormat(this.phoneNo)) {
this.$toast.fail('请您输入正确的手机号');
this.input();
return;
......
......@@ -77,7 +77,7 @@ export default {
},
async goOrderApi() {
const { skuNo, salePrice } = this.selectedRechargeInfo;
const [res] = await orderApi.orderCreate({
const [res, error] = await orderApi.orderCreate({
totalFee: salePrice,
terminal: 'H5',
account: this.rechargePhoneInfo?.phoneNo,
......@@ -90,6 +90,10 @@ export default {
}
]
});
console.log(error, 'error', res);
if (error) {
return;
}
res && this.$router.push({ path: '/pay', query: { orderNo: res.orderNo } });
}
}
......
......@@ -59,22 +59,8 @@ export default {
payList: this?.value?.payList || {}
};
},
mounted() {
console.log(this.value, 'value');
},
methods: {
changePayType(payType) {
// 需要初始化全部的选中状态
for (let item in this.payList) {
if (this.payList[item].payType === payType) {
this.payList[item].isCheck = true;
continue;
}
this.payList[item].isCheck = false;
}
this.$emit('changePayType', payType);
}
}
mounted() {},
methods: {}
};
</script>
<style lang="less">
......
......@@ -64,7 +64,7 @@ export default {
},
methods: {
changePayType({ payType, mergePayPretreatmentInfo }) {
if (this.disabled || this.value.disabled) {
if (this.disabled || this.value.disabled || this.isGroupPay) {
return;
}
this.$emit('click');
......
<template>
<div>
<div @click="changePayType(thirdPayInfo)">
<div class="groupCard">
<PayCardItem
:is-group-pay="true"
......@@ -89,11 +89,10 @@ export default {
},
methods: {
changePayType({ payType, mergePayPretreatmentInfo }) {
console.log(mergePayPretreatmentInfo, 'mergePayPretreatmentInfo');
if (this.disabled || this.creditPayInfo.disabled) {
return;
}
this.payCard.changePayType(payType, mergePayPretreatmentInfo);
this.pay.changePayType(payType, mergePayPretreatmentInfo);
},
openCouponModal() {
if (this.couponDisabled) return;
......
......@@ -5,7 +5,7 @@ export const goUrlExtends = {
// 商城地址
const returnUrl = this.getReturnUrl();
if (returnUrl) {
window.location.replace = `${returnUrl}`;
window.location.replace(`${returnUrl}`);
return;
}
this.$router.replace({ name: 'home' });
......@@ -13,16 +13,16 @@ export const goUrlExtends = {
goOrderList() {
const returnUrl = this.getReturnUrl();
if (returnUrl) {
window.location.replace = `${returnUrl}/orderList`;
window.location.replace(`${returnUrl}/orderList`);
return;
}
this.$router.replace({ name: 'orderList' }, 'sessionStorage');
this.$router.replace({ name: 'orderList' });
},
goOrderDetail() {
const returnUrl = this.getReturnUrl();
const orderNo = localStorage.get('orderNo')?.orderNo;
if (returnUrl) {
window.location.replace = `${returnUrl}/orderDetail?orderNo=${orderNo}`;
window.location.replace(`${returnUrl}/orderDetail?orderNo=${orderNo}`);
return;
}
this.$router.push({
......
......@@ -41,7 +41,7 @@
>重新支付</cr-button
>
</div>
<RecoGoods />
<RecoGoods v-if="!getReturnUrl()" />
</div>
</template>
<script>
......
......@@ -120,7 +120,7 @@ export default {
async getList() {
const [res] = await rechargeApi.getSpuList();
if (res) {
this.account = res.userPhoneInfo.phoneNo;
this.account = res?.userPhoneInfo?.phoneNo;
this.spuData = res.vipLife;
this.updateSpuInfo(this.spuData[this.currentTab - 1].itemList[0]);
this.getSkuListDebounce();
......@@ -152,7 +152,7 @@ export default {
return this.$toast.fail('请填写账号!');
if (!this.skuInfo.skuNo) return this.$toast.fail('请选择类型!');
const { skuNo, salePrice } = this.skuInfo;
const [res] = await orderApi.orderCreate({
const [res, error] = await orderApi.orderCreate({
account: this.account,
totalFee: salePrice,
virtualRechargeType: this.spuInfo.type,
......@@ -163,6 +163,9 @@ export default {
}
]
});
if (error) {
return;
}
res && this.$router.push({ path: '/pay', query: { orderNo: res.orderNo } });
}, 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