Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
mlaj
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
2025-05-23 14:56:09 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
eb70376ce59bf9c30991f5ab43d95c1ada80d865
eb70376c
1 parent
9c9bf5b6
fix(结账页面): 在支付成功后返回上一页
在支付成功后,除了清空购物车,还增加了返回上一页的逻辑,以提升用户体验。同时更新了路由守卫文件中的注释标签。
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
src/router/guards.js
src/views/checkout/CheckoutPage.vue
src/router/guards.js
View file @
eb70376
/*
* @Date: 2025-03-20 20:36:36
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-0
3-27 16:49:19
* @LastEditTime: 2025-0
5-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
{
...
...
src/views/checkout/CheckoutPage.vue
View file @
eb70376
...
...
@@ -374,7 +374,9 @@ const handleSubmit = async (e) => {
// 处理支付成功
const handlePaymentSuccess = () => {
orderComplete.value = true
clearCart()
clearCart();
// 返回上一页
router.go(-1)
}
// 处理支付失败
...
...
Please
register
or
login
to post a comment