| | |
| | | v-model="state.policyChecked" |
| | | policyBtnText="若手机号未注册,将为您直接注册账号,注册即为同意" |
| | | /> |
| | | <div class="other-login-channel-wrapper" v-if="!isLoginByWeb"> |
| | | <div class="other-login-channel-wrapper" v-if="NODE_ENV === 'development'"> |
| | | <nut-divider>其他登录方式</nut-divider> |
| | | <div class="other-login-channel-list"> |
| | | <div class="other-login-channel-list-item" @click="goLoginByForm()"> |
| | |
| | | import { LoginFormTabs } from '../constants'; |
| | | import * as authServices from '@12333/services/apiV2/auth'; |
| | | import { subscribeMessageTemplateIdsForU } from '@12333/constants'; |
| | | import { NODE_ENV } from '@/constants'; |
| | | |
| | | defineOptions({ |
| | | name: 'authorization', |
| | |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function handleLoginSuccess() { |
| | | try { |
| | | if (!Taro.requestSubscribeMessage) { |
| | | await Message.confirm({ message: '你的微信版本过低,不支持订阅消息,是否继续报名' }); |
| | | } |
| | | const res = await Taro.getSetting({ |
| | | withSubscriptions: true, |
| | | }); |
| | | let setting: boolean[] = []; |
| | | if (res.subscriptionsSetting && res.subscriptionsSetting.itemSettings) { |
| | | setting = subscribeMessageTemplateIdsForU |
| | | .map((id) => res.subscriptionsSetting.itemSettings[id] !== 'accept') |
| | | .filter(Boolean); |
| | | } |
| | | if (setting.length > 0) { |
| | | Taro.requestSubscribeMessage({ |
| | | tmplIds: subscribeMessageTemplateIdsForU, |
| | | success: function (res) { |
| | | console.log('res: ', res); |
| | | }, |
| | | }); |
| | | } |
| | | Message.success('授权登录成功', { |
| | | onClosed: () => { |
| | | jump(); |
| | | }, |
| | | }); |
| | | } catch (error) {} |
| | | function handleLoginSuccess() { |
| | | Message.success('授权登录成功', { |
| | | onClosed: () => { |
| | | jump(); |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | function goLoginByForm(tab = LoginFormTabs.VerificationCodeLogin) { |