|
@@ -179,13 +179,6 @@ const checkPayStatus = () => {
|
|
|
payStatus.value = 1; // 待支付
|
|
|
}
|
|
|
|
|
|
-const countdownInterval = ref(null)
|
|
|
-const countdownIntervalInit = () => {
|
|
|
- countdownInterval.value = setInterval(() => {
|
|
|
- countdown()
|
|
|
- }, 1000)
|
|
|
-}
|
|
|
-
|
|
|
// 获得支付订单信息
|
|
|
const setOrder = async () => {
|
|
|
if (!props.id-0) return emit('getOrderFail')
|
|
@@ -197,7 +190,7 @@ const setOrder = async () => {
|
|
|
}
|
|
|
orderInfo.value = data || null
|
|
|
// 剩余支付时间倒计时
|
|
|
- countdownIntervalInit()
|
|
|
+ if (orderInfo.value?.expireTime) countdownIntervalInit()
|
|
|
// 设置支付状态
|
|
|
checkPayStatus()
|
|
|
// await updateAccountInfo()
|
|
@@ -335,7 +328,7 @@ const formatDuration = (remainder) => {
|
|
|
}
|
|
|
|
|
|
// 支付倒计时文案提示
|
|
|
-const countdownText = ref('')
|
|
|
+const countdownText = ref('剩余支付时间-')
|
|
|
const countdown = () => {
|
|
|
const now = Date.now();
|
|
|
const distance = orderInfo.value.expireTime - now
|
|
@@ -352,6 +345,13 @@ const countdown = () => {
|
|
|
|
|
|
countdownText.value = '剩余支付时间: ' + hours + ':' + minutes + ':' + seconds
|
|
|
}
|
|
|
+// 支付倒计时文案提示
|
|
|
+const countdownInterval = ref(null)
|
|
|
+const countdownIntervalInit = () => {
|
|
|
+ countdownInterval.value = setInterval(() => {
|
|
|
+ countdown()
|
|
|
+ }, 1000)
|
|
|
+}
|
|
|
|
|
|
const open = () => {
|
|
|
window.open('/personalRecharge')
|