Merge branch 'master' of http://120.26.58.240:8888/r/LifePaymentFront
| | |
| | | |
| | | OSS_URL: '"https://waterdroptest2.oss-cn-hangzhou.aliyuncs.com/"', |
| | | WEMAP_KEY: 'T2UBZ-N563J-ZCHFF-XDOXN-VCH7S-CJB2T', |
| | | WXPayAppId: 'wxf940ff1d35a98493', |
| | | WXPayAppId: '"wxf940ff1d35a98493"', |
| | | }, |
| | | defineConstants: {}, |
| | | mini: {}, |
| | |
| | | OSS_URL: '"https://parkmanagement.oss-cn-hangzhou.aliyuncs.com"', |
| | | |
| | | WEMAP_KEY: 'DYRBZ-ZGPCF-X3OJN-N2AA3-JWUCE-HEBXJ', |
| | | WXPayAppId: 'wxf940ff1d35a98493', |
| | | WXPayAppId: '"wxf940ff1d35a98493"', |
| | | }, |
| | | defineConstants: {}, |
| | | mini: {}, |
| | |
| | | APP_ENV: '"staging"', |
| | | |
| | | WEMAP_KEY: 'T2UBZ-N563J-ZCHFF-XDOXN-VCH7S-CJB2T', |
| | | WXPayAppId: 'wxf940ff1d35a98493', |
| | | WXPayAppId: '"wxf940ff1d35a98493"', |
| | | }, |
| | | h5: { |
| | | output: { |
| | |
| | | import { LoginFormTabs } from '@/subpackages/login/constants'; |
| | | import { useLoginedJump } from './login'; |
| | | import { useLifeRechargeContext, APIgetLifePayWxIndentityParams } from '@life-payment/core-vue'; |
| | | import { isInWeChat } from '@/utils/env'; |
| | | |
| | | export function useUser() { |
| | | const userStore = useUserStore(); |
| | |
| | | const isAuth = computed(() => !needAuth || isLogin.value); |
| | | |
| | | const router = Taro.useRouter(); |
| | | console.log('222', 222); |
| | | useInitWeixinJSBridge(); |
| | | |
| | | Taro.useReady(async () => { |
| | | if (isLogin.value && userStore.firstGetUserDetail) { |
| | |
| | | const { blLifeRecharge } = useLifeRechargeContext(); |
| | | |
| | | Taro.useReady(async () => { |
| | | if (!code && !!WeixinJSBridge && !wxCode) { |
| | | 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 && !wxCode) { |
| | | try { |
| | | if (!!code && !wxCode.value) { |
| | | userStore.setWxCode(router.params.code ?? ''); |
| | | let res = await getLifePayWxIndentity(); |
| | | userStore.setWxOpenId(res.openId); |
| | | } catch (error) {} |
| | | } |
| | | } catch (error) {} |
| | | }); |
| | | |
| | | async function getLifePayWxIndentity() { |
| | | try { |
| | |
| | | return res; |
| | | } catch (error) {} |
| | | } |
| | | }); |
| | | } |
| | | |
| | | export function useGoLogin() { |