|  |  |  | 
|---|
|  |  |  | url: { | 
|---|
|  |  |  | enable: true, | 
|---|
|  |  |  | config: { | 
|---|
|  |  |  | limit: 1024, // 设定转换尺寸上限 | 
|---|
|  |  |  | limit: 2024, // 设定转换尺寸上限 | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | cssModules: { | 
|---|
|  |  |  | 
|---|
|  |  |  | url: { | 
|---|
|  |  |  | enable: true, | 
|---|
|  |  |  | config: { | 
|---|
|  |  |  | limit: 1024, // 设定转换尺寸上限 | 
|---|
|  |  |  | limit: 2024, // 设定转换尺寸上限 | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | cssModules: { | 
|---|
|  |  |  | 
|---|
|  |  |  | 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 ?? ''); | 
|---|
|  |  |  | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script setup lang="ts"> | 
|---|
|  |  |  | import { useUser, useAccessLogin, useTabRouteEnhance } from '@/hooks'; | 
|---|
|  |  |  | import { useAccessLogin } from '@/hooks'; | 
|---|
|  |  |  | import { useUserStore } from '@/stores/modules/user'; | 
|---|
|  |  |  | import Taro from '@tarojs/taro'; | 
|---|
|  |  |  | import IconLogo from '@/assets/home/icon-logo.png'; | 
|---|
|  |  |  | import { OrderInputType } from '@life-payment/constants'; | 
|---|
|  |  |  | import { RechargeGrid } from '@life-payment/components'; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <img :src="IconTabBg1" alt="" class="loginB-form-tab-item-bg1" /> | 
|---|
|  |  |  | <div class="loginB-form-tab-item-content"> | 
|---|
|  |  |  | <div class="loginB-form-tab-item-text">验证码登录</div> | 
|---|
|  |  |  | <div class="loginB-form-tab-item-text">登录</div> | 
|---|
|  |  |  | <div class="loginB-form-tab-item-line"></div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | 
|---|
|  |  |  | type="text" | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </nut-form-item> | 
|---|
|  |  |  | <nut-form-item label="" class="bole-form-item" prop="verificationCode" required> | 
|---|
|  |  |  | <!-- <nut-form-item label="" class="bole-form-item" prop="verificationCode" required> | 
|---|
|  |  |  | <nut-input | 
|---|
|  |  |  | v-model.trim="form.verificationCode" | 
|---|
|  |  |  | class="bole-input-text" | 
|---|
|  |  |  | 
|---|
|  |  |  | ></ProFormCaptcha> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </nut-input> | 
|---|
|  |  |  | </nut-form-item> | 
|---|
|  |  |  | </nut-form-item> --> | 
|---|
|  |  |  | </nut-form> | 
|---|
|  |  |  | <LargeButton class="login-btn" @click="handleLogin" :loading="form.loading">登录</LargeButton> | 
|---|
|  |  |  | <!-- <div class="go-register-btn" @click="goRegister">立即注册</div> --> | 
|---|
|  |  |  | 
|---|
|  |  |  | let res = await blLifeRecharge.login( | 
|---|
|  |  |  | { | 
|---|
|  |  |  | phoneNumber: form.phoneNumber, | 
|---|
|  |  |  | code: form.verificationCode, | 
|---|
|  |  |  | // code: form.verificationCode, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | showLoading: false, | 
|---|
|  |  |  | 
|---|
|  |  |  | export const isMobile = isH5 || isWeChat || isApp; | 
|---|
|  |  |  | export const isWeb = isH5 || isPC; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | export const isInAlipay = /AlipayClient/i.test(navigator.userAgent); | 
|---|
|  |  |  | export const isInWeChat = /MicroMessenger/i.test(navigator.userAgent); | 
|---|
|  |  |  | export const isInAlipay = /AlipayClient/i.test(navigator?.userAgent); | 
|---|
|  |  |  | export const isInWeChat = /MicroMessenger/i.test(navigator?.userAgent); | 
|---|
|  |  |  | 
|---|
|  |  |  | export class BlLifeRechargeServices<TResponse = any, TRequestOptions = any> { | 
|---|
|  |  |  | private request: IRequest; | 
|---|
|  |  |  | constructor({ axiosConfig }: BlLifeRechargeServicesOptions<TResponse, TRequestOptions>) { | 
|---|
|  |  |  | this.request = Request.create(axiosConfig); | 
|---|
|  |  |  | this.request = Request.create({ | 
|---|
|  |  |  | ...axiosConfig, | 
|---|
|  |  |  | // baseURL: isWeb ? process.env.BASE_URL_H5 : process.env.BASE_URL, | 
|---|
|  |  |  | timeout: 10 * 1000, | 
|---|
|  |  |  | headers: { | 
|---|
|  |  |  | Accept: 'application/json, text/plain, */*', | 
|---|
|  |  |  | 'Content-Type': 'application/json', | 
|---|
|  |  |  | 'X-Requested-With': 'XMLHttpRequest', | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | withCredentials: true, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | async lifePayPhoneMesssageCodeLogin(body: PhoneMesssageCodeLoginInput, options?: RequestConfig) { | 
|---|
|  |  |  | 
|---|
|  |  |  | /** 手机号 */ | 
|---|
|  |  |  | phoneNumber: string; | 
|---|
|  |  |  | /** 验证码 */ | 
|---|
|  |  |  | code: string; | 
|---|
|  |  |  | // code: string; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | export interface LifePayRateListOutput { | 
|---|
|  |  |  | 
|---|
|  |  |  | import { type RequestConfig } from 'senior-request'; | 
|---|
|  |  |  | import { type AxiosRequestConfig } from 'axios'; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | export type BlLifeRechargeServicesOptions<TResponse = any, TRequestOptions = any> = { | 
|---|
|  |  |  | axiosConfig?: RequestConfig<TResponse, TRequestOptions>; | 
|---|
|  |  |  | axiosConfig?: Omit<RequestConfig<TResponse, TRequestOptions>, keyof AxiosRequestConfig>; | 
|---|
|  |  |  | }; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | export type BlLifeRechargeAccountModelOptions = { | 
|---|