hookehuyr

fix(结账页面): 在支付成功后返回上一页

在支付成功后,除了清空购物车,还增加了返回上一页的逻辑,以提升用户体验。同时更新了路由守卫文件中的注释标签。
/*
* @Date: 2025-03-20 20:36:36
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-03-27 16:49:19
* @LastEditTime: 2025-05-23 14:21:22
* @FilePath: /mlaj/src/router/guards.js
* @Description: 路由守卫逻辑
*/
......@@ -24,7 +24,7 @@ export const authRequiredRoutes = [
},
]
// 微信授权检查
// TAG: 微信授权检查
export const checkWxAuth = async () => {
if (!import.meta.env.DEV && wxInfo().isWeiXin) {
try {
......
......@@ -374,7 +374,9 @@ const handleSubmit = async (e) => {
// 处理支付成功
const handlePaymentSuccess = () => {
orderComplete.value = true
clearCart()
clearCart();
// 返回上一页
router.go(-1)
}
// 处理支付失败
......