Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
xyxBooking-weapp
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2026-01-16 18:10:25 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7b85243e079686b96ad73490086f94567c615382
7b85243e
1 parent
4f6fb2c5
fix: 替换支付失败提示为模态框并防止重复显示
将支付失败时的toast提示改为模态框提示,并添加防止模态框重复显示的标志位
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
src/pages/submit/index.vue
src/pages/submit/index.vue
View file @
7b85243
<!--
* @Date: 2024-01-15 16:25:51
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2026-01-16 18:0
1:23
* @LastEditTime: 2026-01-16 18:0
5:18
* @FilePath: /xyxBooking-weapp/src/pages/submit/index.vue
* @Description: 预约人员信息
-->
...
...
@@ -149,6 +149,22 @@ const refreshVisitorList = async (options) => {
}
}
let is_showing_pay_modal = false;
const showPayErrorModal = async (content) => {
if (is_showing_pay_modal) return;
is_showing_pay_modal = true;
try {
await Taro.showModal({
title: '提示',
content: content || '支付失败,请稍后再试',
showCancel: false,
confirmText: '我知道了',
});
} finally {
is_showing_pay_modal = false;
}
}
const submitBtn = async () => {
if (is_submitting.value) return;
if (!checked_visitors.value.length) {
...
...
@@ -211,12 +227,12 @@ const submitBtn = async () => {
},
fail(res) {
refreshVisitorList({ reset_checked: true }).catch(() => {});
Taro.showToast({ title: '支付未完成,可再次点击提交订单继续支付', icon: 'none'
});
showPayErrorModal('支付未完成,可再次点击提交订单继续支付').catch(() => {
});
}
})
} else {
refreshVisitorList({ reset_checked: true }).catch(() => {});
Taro.showToast({ title: payParams?.msg || '获取支付信息失败', icon: 'none'
});
showPayErrorModal(payParams?.msg || '获取支付信息失败,请稍后再试').catch(() => {
});
}
} else {
pending_pay_id.value = null;
...
...
Please
register
or
login
to post a comment