| | |
| | | const isAuth = computed(() => !needAuth || isLogin.value); |
| | | |
| | | const router = Taro.useRouter(); |
| | | console.log('222', 222); |
| | | useInitWeixinJSBridge(); |
| | | |
| | | Taro.useReady(async () => { |
| | |
| | | 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 ?? ''); |