Ver código fonte

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

feige996 7 meses atrás
pai
commit
084f46407a
1 arquivos alterados com 3 adições e 1 exclusões
  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
 }