Browse Source

fix(me): 在非微信小程序环境添加登录后重定向参数

feige996 7 months ago
parent
commit
084f46407a
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/pages/me/me.vue

+ 3 - 1
src/pages/me/me.vue

@@ -39,7 +39,9 @@ async function handleLogin() {
   await tokenStore.wxLogin()
   // #endif
   // #ifndef MP-WEIXIN
-  uni.navigateTo({ url: LOGIN_PAGE })
+  uni.navigateTo({
+    url: `${LOGIN_PAGE}?redirect=${encodeURIComponent('/pages/me/me')}`,
+  })
   // #endif
 }