| | |
| | | // userStore.getCurrentUserInfo(); |
| | | } |
| | | if (needAuth && !isLogin.value) { |
| | | Taro.navigateTo({ |
| | | RouteHelper.navigateTo({ |
| | | url: `${RouterPath.loginByForm}?redirect=${router.path}&${object2query(router.params)}`, |
| | | }); |
| | | } |
| | |
| | | Taro.useReady(async () => { |
| | | try { |
| | | //@ts-ignore |
| | | if (!code && isInWeChat && !wxCode.value) { |
| | | location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxf940ff1d35a98493&redirect_uri=${location.href}&response_type=code&scope=snsapi_base#wechat_redirect`; |
| | | if (!code && isInWeChat && !wxCode.value && location?.replace) { |
| | | location.replace( |
| | | `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxf940ff1d35a98493&redirect_uri=${location.href}&response_type=code&scope=snsapi_base#wechat_redirect` |
| | | ); |
| | | } |
| | | if (!!code && !wxCode.value) { |
| | | userStore.setWxCode(router.params.code ?? ''); |
| | |
| | | const router = Taro.useRouter(); |
| | | const { redirectParams } = useLoginedJump(); |
| | | function goLoginFn() { |
| | | // Taro.navigateTo({ |
| | | // RouteHelper.navigateTo({ |
| | | // url: `${RouterPath.authorization}?redirect=${router.path}&${object2query(router.params)}`, |
| | | // }); |
| | | |
| | | Taro.navigateTo({ |
| | | RouteHelper.navigateTo({ |
| | | url: `${RouterPath.loginByForm}?redirect=${redirectParams.value}&tab=${LoginFormTabs.VerificationCodeLogin}`, |
| | | }); |
| | | } |