Sfoglia il codice sorgente

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

feige996 7 mesi fa
parent
commit
084f46407a
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  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
 }