|
@@ -143,8 +143,8 @@ export default defineComponent({
|
|
|
gradeStatus: false,
|
|
|
classStatus: false,
|
|
|
loading: false,
|
|
|
- dialogStatusVisible: false,
|
|
|
- dialogStatusMessage: '',
|
|
|
+ // dialogStatusVisible: false,
|
|
|
+ // dialogStatusMessage: '',
|
|
|
|
|
|
dialogStatus: false,
|
|
|
dialogMessage: '',
|
|
@@ -206,18 +206,18 @@ export default defineComponent({
|
|
|
const pageTimer = useInterval(1000, { controls: true });
|
|
|
pageTimer.pause();
|
|
|
|
|
|
- const countDown = useCountDown({
|
|
|
- // 倒计时 60 秒
|
|
|
- time: forms.countDownTimePay,
|
|
|
- onChange(current: CurrentTime) {
|
|
|
- forms.dialogStatusMessage = `有待支付订单,请在${Math.ceil(
|
|
|
- current.total / 1000
|
|
|
- )}s后重试`;
|
|
|
- },
|
|
|
- onFinish() {
|
|
|
- forms.dialogStatusVisible = false;
|
|
|
- }
|
|
|
- });
|
|
|
+ // const countDown = useCountDown({
|
|
|
+ // // 倒计时 60 秒
|
|
|
+ // time: forms.countDownTimePay,
|
|
|
+ // onChange(current: CurrentTime) {
|
|
|
+ // forms.dialogStatusMessage = `有待支付订单,请在${Math.ceil(
|
|
|
+ // current.total / 1000
|
|
|
+ // )}s后重试`;
|
|
|
+ // },
|
|
|
+ // onFinish() {
|
|
|
+ // forms.dialogStatusVisible = false;
|
|
|
+ // }
|
|
|
+ // });
|
|
|
|
|
|
const overCountDown = useCountDown({
|
|
|
time: forms.activeOverTime,
|
|
@@ -656,51 +656,41 @@ export default defineComponent({
|
|
|
// forms.dialogConfig = paddingConfig;
|
|
|
// forms.messageAlign = 'center';
|
|
|
// return true;
|
|
|
+
|
|
|
+ // 最终确认,有待支付订单直接去支付,没有则才会创建订单
|
|
|
+ state.config = paddingConfig?.paymentConfig;
|
|
|
+ state.orderNo = paddingConfig?.orderNo;
|
|
|
+ await lastSubmit();
|
|
|
+ return true;
|
|
|
// 判断是否可以取消订单
|
|
|
- if (paddingData.cancelPayment) {
|
|
|
- await request.post(
|
|
|
- '/edu-app/userPaymentOrder/cancelPayment/' +
|
|
|
- paddingConfig.orderNo
|
|
|
- );
|
|
|
- return false;
|
|
|
- } else {
|
|
|
- forms.countDownTime = paddingData.cancelTimes;
|
|
|
- countDown.reset(Number(paddingData.cancelTimes));
|
|
|
- countDown.start();
|
|
|
- forms.dialogStatusMessage = `有待支付订单,请在${Math.ceil(
|
|
|
- countDown.current.value.total / 1000
|
|
|
- )}s后重试`;
|
|
|
- forms.dialogStatusVisible = true;
|
|
|
- forms.dialogConfig = paddingData;
|
|
|
- return true;
|
|
|
- }
|
|
|
+ // if (paddingData.cancelPayment) {
|
|
|
+ // await request.post(
|
|
|
+ // '/edu-app/userPaymentOrder/cancelPayment/' +
|
|
|
+ // paddingConfig.orderNo
|
|
|
+ // );
|
|
|
+ // return false;
|
|
|
+ // } else {
|
|
|
+ // // forms.countDownTime = paddingData.cancelTimes;
|
|
|
+ // // countDown.reset(Number(paddingData.cancelTimes));
|
|
|
+ // // countDown.start();
|
|
|
+ // // forms.dialogStatusMessage = `有待支付订单,请在${Math.ceil(
|
|
|
+ // // countDown.current.value.total / 1000
|
|
|
+ // // )}s后重试`;
|
|
|
+ // // forms.dialogStatusVisible = true;
|
|
|
+ // // forms.dialogConfig = paddingData;
|
|
|
+ // // 继续支付
|
|
|
+ // // const paymentConfig = forms.dialogConfig;
|
|
|
+ // state.config = paddingConfig?.paymentConfig;
|
|
|
+ // state.orderNo = paddingConfig?.orderNo;
|
|
|
+ // await lastSubmit();
|
|
|
+ // return true;
|
|
|
+ // }
|
|
|
}
|
|
|
|
|
|
return false;
|
|
|
} else {
|
|
|
return false;
|
|
|
}
|
|
|
-
|
|
|
- // if (!data.id) return false;
|
|
|
-
|
|
|
- // // 判断是否可以取消订单
|
|
|
- // if (data.cancelPayment) {
|
|
|
- // await request.post(
|
|
|
- // '/edu-app/userPaymentOrder/cancelPayment/' + data.orderNo
|
|
|
- // );
|
|
|
- // return false;
|
|
|
- // } else {
|
|
|
- // forms.countDownTime = data.cancelTimes;
|
|
|
- // countDown.reset(Number(data.cancelTimes));
|
|
|
- // countDown.start();
|
|
|
- // forms.dialogMessage = `有待支付订单,请在${Math.ceil(
|
|
|
- // countDown.current.value.total / 1000
|
|
|
- // )}s后重试`;
|
|
|
- // forms.dialogStatus = true;
|
|
|
- // forms.dialogConfig = data;
|
|
|
- // result = true;
|
|
|
- // }
|
|
|
- // return true;
|
|
|
} catch {
|
|
|
//
|
|
|
}
|
|
@@ -1581,7 +1571,7 @@ export default defineComponent({
|
|
|
}}
|
|
|
/>
|
|
|
|
|
|
- <MDialog
|
|
|
+ {/* <MDialog
|
|
|
title="提示"
|
|
|
v-model:show={forms.dialogStatusVisible}
|
|
|
message={forms.dialogStatusMessage}
|
|
@@ -1602,7 +1592,7 @@ export default defineComponent({
|
|
|
applyOver();
|
|
|
}
|
|
|
}}
|
|
|
- />
|
|
|
+ /> */}
|
|
|
|
|
|
<MDialog
|
|
|
title="提示"
|