index.vue 42 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537
  1. <template>
  2. <view class="login-page bg-body" :isHeaderFixed="true" :isLoginPage="true" :class="{ 'dark': isDark }">
  3. <view class="fixed" />
  4. <view class="main-content">
  5. <uni-row class="demo-uni-row">
  6. <cwg-match-media :min-width="991" style="height: 100%;">
  7. <uni-col :xs="24" :sm="24" :md="12" :lg="14" :xl="16" style="height: 100%">
  8. <view class="left-bg" :style="{ backgroundImage: `url(${loginBg})` }">
  9. <view class="left-box">
  10. <view class="inner">
  11. <view class="title w-700">
  12. {{ `${t('newLoop.item12')} ` }}
  13. <text class="color-white" v-t="'newLoop.item13'"></text>
  14. </view>
  15. <view class="text-white" v-t="'newLoop.item14'"></view>
  16. </view>
  17. <view class="left-content">
  18. <view class="des text-white">
  19. <text v-html="t('newSignin.item12')"></text>
  20. <br />
  21. <text v-html="t('newSignin.item12_1')"></text>
  22. <br />
  23. <text v-html="t('newSignin.item10')"></text>
  24. <br />
  25. <text v-html="t('newSignin.item11')"></text>
  26. <br />
  27. <text v-t="'newSignin.item13'"></text>
  28. <!-- <cwg-link type="pdf" :title="'newSignin.item13_1'"-->
  29. <!-- :url="`pdf/Risk-Disclosures-and-Acknowledgements-2020-08.pdf`" target="_blank"-->
  30. <!-- v-t="'newSignin.item13_1'" class="doc-link" />-->
  31. <text v-t="'newSignin.item13_2'"></text>
  32. <!-- <view v-t="'newSignin.item13_3'"></view>
  33. <text v-t="'newSignin.item13_4'"></text> -->
  34. </view>
  35. </view>
  36. <!-- <image src="/static/images/trust-pilot.png" class="img-fluid mt&#45;&#45;10" mode="widthFix"></image>-->
  37. </view>
  38. </view>
  39. </uni-col>
  40. </cwg-match-media>
  41. <uni-col :xs="24" :sm="24" :md="12" :lg="10" :xl="8" class="right-f">
  42. <cwg-match-media :min-width="991">
  43. <view class="global-header-bar pc-header">
  44. <view class="header-inner">
  45. <view class="logo-placeholder"></view> <!-- 左侧可预留放logo或留空 -->
  46. <LoginHeaderGroup text-color="#fff" :icon-color="isDark ? '#fff' : '#97A1C0'" />
  47. </view>
  48. </view>
  49. </cwg-match-media>
  50. <!-- 移动端顶部栏:悬浮在上方,深色文字 -->
  51. <cwg-match-media :max-width="991">
  52. <view class="mobile-header-bar">
  53. <!-- <view class="fixed"/>-->
  54. <LoginHeaderGroup text-color="#fff" :icon-color="isDark ? '#fff' : '#97A1C0'" />
  55. </view>
  56. </cwg-match-media>
  57. <view class="account">
  58. <view class="company u-flex-y u-flex-y-center">
  59. <image v-if="!isDark" src="/static/images/vu/logo-full.svg"
  60. :class="isMobile ? 'company-icon-mini' : 'company-icon'" mode="widthFix"></image>
  61. <image v-else src="/static/images/vu/logo-full-white.svg"
  62. :class="isMobile ? 'company-icon-mini' : 'company-icon'" mode="widthFix"></image>
  63. </view>
  64. <!-- <view class="tab-list">-->
  65. <!-- <view v-for="tab in tabs" :key="tab.value" class="tab-item cursor-pointer" :class="{ active: activeTab === tab.value }"-->
  66. <!-- @click="handleClick(tab.value)" :data-tooltip="tab.text" data-placement="top">-->
  67. <!-- <text class="tab-label">{{ tab.text }}</text>-->
  68. <!-- </view>-->
  69. <!-- </view>-->
  70. <view v-show="activeTab == 1" style="overflow-y: scroll;">
  71. <view class="title">
  72. <view class="tit1">{{ t('newSignin.item1') }}</view>
  73. <view class="tit2">{{ t('newSignin.item2') }}</view>
  74. </view>
  75. <view>
  76. <uni-forms ref="uFormRef" :model="form" labelWidth="200" label-position="top">
  77. <uni-forms-item :label="t('newSignup.item7')" prop="loginName">
  78. <up-input :customStyle="customStyle" v-model="form.loginName" border="none"
  79. :placeholder="t('signin.form.email')">
  80. </up-input>
  81. </uni-forms-item>
  82. <uni-forms-item :label="t('signin.form.password')" prop="password">
  83. <up-input :customStyle="customStyle" v-model="form.password" :type="inputType" border="none"
  84. :placeholder="t('signin.form.password')">
  85. </up-input>
  86. </uni-forms-item>
  87. </uni-forms>
  88. </view>
  89. <view class="u-flex u-flex-between u-flex-y-center mb1">
  90. <view class="check-box">
  91. <up-checkbox-group v-model="remenber" @change="checkboxChange">
  92. <up-checkbox size="18" labelSize="16" labelColor="#666666" activeColor="#ea002a"
  93. :label="t('newSignin.item5')" name="记住我" class="wcg-checkbox"></up-checkbox>
  94. </up-checkbox-group>
  95. </view>
  96. <navigator url="/pages/login/reset" class="account-tip cursor-pointer" :data-tooltip="t('signin.forget')" data-placement="top">
  97. <text>{{ t('signin.forget') }}</text>
  98. </navigator>
  99. </view>
  100. <view class="cwg-button ">
  101. <button type="primary" class="" @click="submit" >
  102. {{ t('signin.login') }}
  103. </button>
  104. </view>
  105. <view class="account-tip " >
  106. {{ t('signin.words') }}
  107. <text @click="activeTab = 2" class="cursor-pointer" :data-tooltip="t('signin.signup')" data-placement="top">{{ t('signin.signup') }}</text>
  108. </view>
  109. <view class="des-bottom">
  110. <text v-t="'vu.login.agreemnet1'"></text>
  111. <cwg-link type="pdf" url='pdf/Client_Agreement.pdf' target="_blank" :title="'signup.agreemnet2'"
  112. class="desc-link" />
  113. <text v-t="'signup.agreemnet3'"></text>
  114. <cwg-link type="pdf" url='pdf/Terms_Conditions.pdf' target="_blank" :title="'signup.agreemnet4'"
  115. class="desc-link" />
  116. <text v-t="'signup.agreemnet5'"></text>
  117. <cwg-link type="pdf" url='pdf/Privacy_Policy.pdf' target="_blank" :title="'signup.agreemnet6'"
  118. class="desc-link" />
  119. <text v-t="'signup.agreemnet7'"></text>
  120. </view>
  121. </view>
  122. <view v-show="activeTab == 2" style="overflow-y: scroll;">
  123. <view class="title">
  124. <view class="tit1">{{ t('newSignup.item1') }}</view>
  125. <view class="tit2">{{ t('newSignup.item2') }}</view>
  126. </view>
  127. <view>
  128. <uni-forms ref="regForm" :modelValue="formData" :rules="rules" validate-trigger="blur"
  129. label-position="top" label-width="120">
  130. <uni-row :gutter="20" class="formContent">
  131. <uni-col :xs="24" :md="12">
  132. <uni-forms-item name="country" :label="t('newSignup.item3')">
  133. <cwg-combox v-model:value="formData.country" :options="countryOptions" border="none" filterable
  134. :placeholder="t('newSignup.item4')">
  135. </cwg-combox>
  136. </uni-forms-item>
  137. </uni-col>
  138. <uni-col :xs="24" :md="12">
  139. <uni-forms-item name="phone" :label="t('newSignup.item5')">
  140. <uni-easyinput :customStyle="customStyle" v-model="formData.phone" border="none"
  141. :placeholder="t('newSignup.item6')"></uni-easyinput>
  142. </uni-forms-item>
  143. </uni-col>
  144. <uni-col :xs="24" :md="24">
  145. <uni-row :gutter="20">
  146. <uni-col :xs="24" :md="12">
  147. <uni-forms-item name="birthDate" :label="t('newSignup.item18')">
  148. <uni-datetime-picker type="date" v-model="formData.birthDate"
  149. :placeholder="t('newSignup.item19')" @change="checkAge" />
  150. </uni-forms-item>
  151. </uni-col>
  152. </uni-row>
  153. </uni-col>
  154. <uni-col :xs="24" :md="12">
  155. <uni-forms-item name="email" :label="t('newSignup.item7')">
  156. <uni-easyinput :customStyle="customStyle" v-model="formData.email"
  157. :placeholder="t('newSignup.item8')" border="none"
  158. :disabled="!isAgeValid || !formData.birthDate"></uni-easyinput>
  159. </uni-forms-item>
  160. </uni-col>
  161. <uni-col :xs="24" :md="12">
  162. <uni-forms-item name="emailCode" :label="t('newSignup.item9')">
  163. <view style="display: flex;">
  164. <view style="flex: 1;">
  165. <uni-easyinput :customStyle="customStyle" class="code" border="none"
  166. :disabled="!isAgeValid || !formData.birthDate" v-model="formData.emailCode"
  167. :placeholder="t('newSignup.item10')">
  168. </uni-easyinput>
  169. </view>
  170. <view class="btn-code" @click="(!isAgeValid || !formData.birthDate) ? '' : handleGetCode()">
  171. {{ getCodeString }}
  172. </view>
  173. </view>
  174. </uni-forms-item>
  175. </uni-col>
  176. <uni-col :xs="24" :md="24">
  177. <view class="agreemnet9">*{{ t('signup.agreemnet9') }}</view>
  178. </uni-col>
  179. <uni-col :xs="24" :md="12">
  180. <uni-forms-item name="password" :label="t('newSignup.item12')">
  181. <uni-easyinput border="none" :customStyle="customStyle" v-model.trim="formData.password"
  182. :disabled="!isAgeValid || !formData.birthDate" :placeholder="t('newSignup.item13')"
  183. type="password"></uni-easyinput>
  184. </uni-forms-item>
  185. <uni-col :xs="24" :md="24">
  186. <uni-forms-item>
  187. <ul class="pwd">
  188. <li :class="{ fit: rule1 }" v-t="'signup.form.rules.1st'"></li>
  189. <li :class="{ fit: rule2 }" v-t="'signup.form.rules.2nd'"></li>
  190. <li :class="{ fit: rule3 }" v-t="'signup.form.rules.4rd'"></li>
  191. </ul>
  192. </uni-forms-item>
  193. </uni-col>
  194. </uni-col>
  195. <uni-col :xs="24" :md="12">
  196. <uni-forms-item v-if="!isRouteHasId" name="linkValue" :label="t('newSignup.item14')">
  197. <uni-easyinput border="none" :customStyle="customStyle" v-model.trim="formData.linkValue"
  198. :disabled="!isAgeValid || !formData.birthDate" :placeholder="t('newSignup.item15')"
  199. @input="limitAgentIdLength"></uni-easyinput>
  200. </uni-forms-item>
  201. </uni-col>
  202. </uni-row>
  203. <uni-forms-item name="agree">
  204. <view class="check-box" @click="toggleAgree">
  205. <up-checkbox-group v-model="agreeGroup" @change="onAgreeChange">
  206. <up-checkbox size="18" labelSize="24" labelColor="#666666" activeColor="#ea002a" name="agree"
  207. class="wcg-checkbox"></up-checkbox>
  208. </up-checkbox-group>
  209. <text class="checkbox-label">{{ t('signup.agree') }}</text>
  210. </view>
  211. </uni-forms-item>
  212. <uni-forms-item name="isSubscribeEmail">
  213. <view class="check-box" @click="toggleSubscribeEmail">
  214. <up-checkbox-group v-model="subscribeEmailGroup" @change="onSubscribeEmailChange">
  215. <up-checkbox size="18" labelSize="24" labelColor="#666666" activeColor="#ea002a"
  216. name="subscribeEmail" class="wcg-checkbox"></up-checkbox>
  217. </up-checkbox-group>
  218. <text class="checkbox-label">{{ t('signup.agree1') }}</text>
  219. </view>
  220. </uni-forms-item>
  221. </uni-forms>
  222. </view>
  223. <view >
  224. <button class="regiset-btn" @click="register">
  225. {{ t('signup.button') }}
  226. </button>
  227. </view>
  228. <view class="login-link " >
  229. <text>{{ t('newSignup.item16') }}</text>
  230. <view class="link cursor-pointer" :data-tooltip="t('newSignup.item17')" data-placement="top" @click="activeTab = 1">{{ t('newSignup.item17') }}</view>
  231. </view>
  232. <view class="des-bottom">
  233. <text v-t="'signup.agreemnet1'"></text>
  234. <cwg-link type="pdf" url='pdf/Client_Agreement.pdf' target="_blank" :title="'signup.agreemnet2'"
  235. class="desc-link" />
  236. <text v-t="'signup.agreemnet3'"></text>
  237. <cwg-link type="pdf" url='pdf/Terms_Conditions.pdf' target="_blank" :title="'signup.agreemnet4'"
  238. class="desc-link" />
  239. <text v-t="'signup.agreemnet5'"></text>
  240. <cwg-link type="pdf" url='pdf/Privacy_Policy.pdf' target="_blank" :title="'signup.agreemnet6'"
  241. class="desc-link" />
  242. <text v-t="'signup.agreemnet7'"></text>
  243. </view>
  244. </view>
  245. <cwg-match-media :min-width="791">
  246. <!-- <view class="qr-container">
  247. <view class="qr-title">
  248. <view class="line"></view>
  249. <view class="qr-tit2">{{ t('newSignin.item2') }}</view>
  250. <view class="line"></view>
  251. </view>
  252. <QrCode width="200" height="200" text="cardGuide" :logo="logoImage"></QrCode>
  253. </view> -->
  254. </cwg-match-media>
  255. </view>
  256. </uni-col>
  257. </uni-row>
  258. </view>
  259. <view class="chat-icon cursor-pointer" :data-tooltip="t('Downloadpage.item16')" :class="{ 'chat-icon-expanded': isChatIconExpanded, 'chat-icon-hidden': type == 'chat' }"
  260. @click="handleChatIconClick">
  261. <cwg-icon name="chat" color="#fff" />
  262. </view>
  263. </view>
  264. <cwg-global-popup/>
  265. </template>
  266. <script setup>
  267. import { ref, watch, onMounted, computed } from 'vue'
  268. import { onLoad } from '@dcloudio/uni-app'
  269. import ls from "@/utils/store2";
  270. import QrCode from '@/components/QrCode.vue'
  271. import { post } from '@/utils/request'
  272. import { userToken } from '@/composables/config'
  273. import { userApi } from '@/api/user'
  274. import { ucardApi } from '@/api/ucard'
  275. import { customApi } from '@/service/custom'
  276. import { loginApi } from '@/api/login'
  277. import { countryApi } from '@/api/country'
  278. import Config from '@/config/index'
  279. import { showToast } from '@/utils/toast'
  280. import { useEmailCountdown } from '@/hooks/useEmailCountdown'
  281. import useGlobalStore from '@/stores/use-global-store'
  282. import useUserStore from '@/stores/use-user-store'
  283. import useRouter from '@/hooks/useRouter'
  284. import { useI18n } from 'vue-i18n'
  285. import companyLogo from '@/static/images/logo4.png'
  286. import loginBg from '@/static/images/login-bg.jpeg'
  287. import LoginHeaderGroup from './components/LoginHeaderGroup.vue'
  288. import LiveChatService from '@/utils/liveChat.js'
  289. import { useWindowWidth } from '@/composables/useWindowWidth'
  290. import { openLocalPdf } from '@/utils/pdf.js'
  291. import { usePopup } from '@/hooks/usePopup'
  292. const windowWidth = useWindowWidth(300)
  293. const isMobile = computed(() => windowWidth.value <= 991)
  294. const router = useRouter()
  295. const { t ,locale} = useI18n()
  296. const { Code } = Config
  297. const userStore = useUserStore()
  298. const globalStore = useGlobalStore()
  299. const modeStore = computed(() => globalStore.mode)
  300. const isDark = computed(() => globalStore.theme === 'dark')
  301. const tabs = computed(() => [
  302. { text: t('signin.tabs1'), value: 1, },
  303. { text: t('signin.tabs2'), value: 2, },
  304. ])
  305. const { confirm,toast } = usePopup()
  306. const activeTab = ref(1)
  307. // ========== 注册表单相关 ==========
  308. const {
  309. time,
  310. text: getCodeString,
  311. canSend,
  312. start,
  313. restore,
  314. } = useEmailCountdown()
  315. const isRouteHasId = ref(false)
  316. const formData = ref({
  317. country: 'CN',
  318. phone: '',
  319. birthDate: '',
  320. email: '',
  321. emailCode: '',
  322. password: '',
  323. linkValue: '',
  324. agree: 0,
  325. isSubscribeEmail: 0,
  326. sourceCode: null,
  327. w: '',
  328. subId: '',
  329. oc: '',
  330. agentId: null,
  331. ibInvalid: null,
  332. })
  333. const rules = computed(()=>({
  334. country: { rules: [{ required: true, errorMessage: t('vaildate.country.empty'), trigger: 'blur' }] },
  335. email: {
  336. rules: [
  337. { required: true, errorMessage: t('vaildate.email.empty'), trigger: 'blur' },
  338. { pattern: Config.Pattern.Email, errorMessage: t('vaildate.email.format'), trigger: 'blur' },
  339. ],
  340. },
  341. emailCode: { rules: [{ required: true, errorMessage: t('vaildate.code.empty'), trigger: 'blur' }] },
  342. password: {
  343. rules: [
  344. { required: true, errorMessage: t('vaildate.password.format'), trigger: 'blur' },
  345. { pattern: Config.Pattern.Password, errorMessage: t('vaildate.password.format'), trigger: 'blur' },
  346. ],
  347. },
  348. agree: {
  349. rules: [
  350. {
  351. validateFunction: (rule, value) => {
  352. if (value) return true
  353. return t('vaildate.agree.empty')
  354. },
  355. trigger: 'change',
  356. },
  357. ],
  358. },
  359. phone: {
  360. rules: [
  361. { required: true, errorMessage: t('vaildate.phone.format'), trigger: 'blur' },
  362. { pattern: Config.Pattern.NonNegInt, errorMessage: t('vaildate.phone.format'), trigger: 'blur' },
  363. ],
  364. },
  365. birthDate: { rules: [{ required: true, errorMessage: t('vaildate.birthDate.empty'), trigger: 'change' }] },
  366. }))
  367. const agreeGroup = ref([])
  368. const subscribeEmailGroup = ref([])
  369. const regForm = ref(null)
  370. const mock_options = ref([])
  371. const countryCode = ref('my')
  372. const countryOptions = computed(() => {
  373. return mock_options.value.map(item => ({
  374. text: item.enName,
  375. value: item.code,
  376. disable: (item.isOpenAccount == 0 || item.isOpenAccount === null) ? true : false,
  377. }))
  378. })
  379. watch(() => formData.value.agree, (val) => {
  380. agreeGroup.value = val === 1 ? ['agree'] : []
  381. }, { immediate: true })
  382. watch(() => formData.value.isSubscribeEmail, (val) => {
  383. subscribeEmailGroup.value = val === 1 ? ['subscribeEmail'] : []
  384. }, { immediate: true })
  385. watch(locale, () => {
  386. regForm.value?.clearValidate()
  387. })
  388. const onAgreeChange = (e) => {
  389. formData.value.agree = e && e.length ? 1 : 0
  390. }
  391. const onSubscribeEmailChange = (e) => {
  392. formData.value.isSubscribeEmail = e && e.length ? 1 : 0
  393. }
  394. const toggleAgree = () => {
  395. const next = agreeGroup.value.length ? [] : ['agree']
  396. agreeGroup.value = next
  397. onAgreeChange(next)
  398. }
  399. const toggleSubscribeEmail = () => {
  400. const next = subscribeEmailGroup.value.length ? [] : ['subscribeEmail']
  401. subscribeEmailGroup.value = next
  402. onSubscribeEmailChange(next)
  403. }
  404. const rule1 = computed(() => {
  405. if (!formData.value.password) return false
  406. return /^.{8,16}$/.test(formData.value.password)
  407. })
  408. const rule2 = computed(() => {
  409. return /^(?=.*?[a-z])(?=.*?[A-Z]).*$/.test(formData.value.password)
  410. })
  411. const rule3 = computed(() => {
  412. return /^(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*[~!@&%$^*./\\(\\)\\+\\=#_-])[A-Za-z0-9~!@&%$^*./\\(\\)\\+\\=#_-]{8,16}$/.test(
  413. formData.value.password,
  414. );
  415. });
  416. const isAgeValid = computed(() => {
  417. if (!formData.value.birthDate) {
  418. return false
  419. }
  420. const today = new Date()
  421. const birthDate = new Date(formData.value.birthDate)
  422. let age = today.getFullYear() - birthDate.getFullYear()
  423. const monthDiff = today.getMonth() - birthDate.getMonth()
  424. if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
  425. age--
  426. }
  427. return age >= 18
  428. })
  429. const checkAge = (value) => {
  430. if (value && !isAgeValid.value) {
  431. confirm({
  432. title: t('Msg.SystemPrompt'),
  433. content: t('signup.ageRestriction'),
  434. showCancel: false,
  435. confirmText: t('Btn.Confirm'),
  436. })
  437. }
  438. }
  439. const limitAgentIdLength = (val) => {
  440. if (val == null || val === '') return
  441. const filtered = val.toString().replace(/[^0-9a-zA-Z]/g, '').slice(0, 10)
  442. if (formData.value.linkValue !== filtered) {
  443. formData.value.linkValue = filtered
  444. }
  445. }
  446. onLoad((options) => {
  447. if (options) {
  448. // 处理 sysLoginToken 参数,自动登录
  449. if (options.sysLoginToken) {
  450. handleTokenLogin(options.sysLoginToken)
  451. return
  452. }
  453. // 处理 activeTab 参数,跳转到注册页面
  454. if (options.activeTab === '2' || options.tab === '2') {
  455. activeTab.value = 2
  456. }
  457. // 处理各种参数格式
  458. formData.value.sourceCode = options.ex || options.sourceCode || null
  459. formData.value.w = options.w || options.subId || ''
  460. formData.value.subId = options.SUBID || options.subId || options.w || ''
  461. formData.value.oc = options.oc || options.code || ''
  462. formData.value.email = options.emailAdvertisement || options.email || ''
  463. // 处理 agentId 参数
  464. const agentId = options.id || options.agentId || options.p1 || ''
  465. if (agentId) {
  466. isRouteHasId.value = true
  467. formData.value.agentId = Number(agentId)
  468. formData.value.linkValue = options.subId || options.linkValue || ''
  469. }
  470. // 处理 ibInvalid 参数 (如 B0, B1)
  471. const ibInvalid = options.ibInvalid || options.p3 || ''
  472. if (ibInvalid) {
  473. switch (ibInvalid) {
  474. case 'B0':
  475. formData.value.ibInvalid = 0
  476. break
  477. case 'B1':
  478. formData.value.ibInvalid = 1
  479. break
  480. }
  481. }
  482. // 兼容 signup 路径格式 signup/19628/RHOP4WVa/B0
  483. if (options.p2) {
  484. formData.value.subId = options.p2
  485. }
  486. console.log(formData.value, 1212);
  487. }
  488. })
  489. // 处理 token 自动登录
  490. const handleTokenLogin = async (token) => {
  491. try {
  492. console.log('自动登录,token:', token);
  493. // 存储 token
  494. userToken.value = atob(token)
  495. // 获取用户信息并跳转
  496. await getCustomLoginInfo()
  497. // 获取拒绝原因列表
  498. reasonsRefusalList()
  499. console.log('自动登录成功');
  500. } catch (error) {
  501. console.error('自动登录失败:', error);
  502. // 登录失败不做任何操作,停留在登录页面
  503. }
  504. }
  505. // 国家列表
  506. async function getCountry() {
  507. try {
  508. let res = await countryApi.Country({})
  509. if (res.code == 200) {
  510. mock_options.value = res.data
  511. } else {
  512. showToast(res.msg)
  513. }
  514. } catch (error) {
  515. console.error(error)
  516. }
  517. }
  518. const getCountryMsg = async () => {
  519. let res = await countryApi.CountryGet({})
  520. if (res.code == Code.StatusOK) {
  521. countryCode.value = res.msg
  522. } else {
  523. console.log(res)
  524. }
  525. }
  526. async function handleGetCode() {
  527. if (!formData.value.birthDate) {
  528. showToast(t('vaildate.birthDate.empty'))
  529. return
  530. }
  531. if (!isAgeValid.value) {
  532. showToast(t('signup.ageRestriction'))
  533. return
  534. }
  535. if (!formData.value.country) {
  536. showToast(t('vaildate.country.empty'))
  537. return
  538. }
  539. if (!formData.value.email) {
  540. showToast(t('vaildate.email.empty'))
  541. return
  542. }
  543. if (!Config.Pattern.Email.test(formData.value.email)) {
  544. showToast(t('vaildate.email.format'))
  545. return
  546. }
  547. if (!canSend.value) return
  548. await sendEmailCode()
  549. }
  550. async function sendEmailCode() {
  551. try {
  552. const res = await loginApi.Code({
  553. ...formData.value,
  554. })
  555. if (res.code === 200) {
  556. showToast(res.msg, 'success')
  557. start()
  558. return true
  559. } else {
  560. showToast(res.msg, 'error')
  561. return false
  562. }
  563. } catch (e) {
  564. showToast(e.msg, 'error')
  565. }
  566. }
  567. const register = async () => {
  568. if (countryCode.value == 'MY' || countryCode.value == 'ID') {
  569. toast('Registration not available for this region')
  570. return
  571. }
  572. const res = await regForm.value.validate()
  573. if (!res) return
  574. try {
  575. const chinaCountryCodes = ['CN']
  576. const isChina = chinaCountryCodes.includes(formData.value.country)
  577. const xSystemValue = isChina ? 'B' : 'A'
  578. let resData = await loginApi.Register(
  579. { ...formData.value,agree: formData.value.agree ==1 ? true : false },
  580. { headers: { 'X-System': xSystemValue } },
  581. )
  582. if (resData.code == 200) {
  583. showToast(t('Msg.registerSuc'),'success')
  584. registLogin()
  585. } else {
  586. confirm({
  587. title: t('Msg.SystemPrompt'),
  588. content: resData.msg,
  589. showCancel: false,
  590. confirmText: t('Btn.Confirm'),
  591. })
  592. }
  593. }catch (e) {
  594. confirm({
  595. title: t('Msg.SystemPrompt'),
  596. content: e.msg,
  597. showCancel: false,
  598. confirmText: t('Btn.Confirm'),
  599. })
  600. console.log(e,'err')
  601. }
  602. }
  603. const registLogin = async () => {
  604. try {
  605. let res = await userApi.login({
  606. loginName: formData.value.email,
  607. password: formData.value.password,
  608. })
  609. if (res.code == 200) {
  610. userToken.value = res.data
  611. getRegistLoginInfo()
  612. } else {
  613. showToast(res.msg)
  614. }
  615. } catch (error) {
  616. console.error(error)
  617. showToast(error.msg)
  618. }
  619. }
  620. const getRegistLoginInfo = async () => {
  621. try {
  622. let res = await userApi.getUserInfo()
  623. if (res.code == 200) {
  624. userStore.saveUserInfo(res.data)
  625. showToast(t('Msg.LoginSuccess'))
  626. setTimeout(() => {
  627. uni.reLaunch({
  628. url: '/pages/customer/dashboard',
  629. })
  630. }, 1000)
  631. } else {
  632. showToast(t('Msg.SystemError'))
  633. }
  634. } catch (error) {
  635. console.error(error)
  636. }
  637. }
  638. const openUrl = (url) => {
  639. openLocalPdf(url)
  640. }
  641. // ========== 注册表单相关结束 ==========
  642. // 响应式表单数据
  643. const form = ref({
  644. loginName: '',
  645. password: '',
  646. })
  647. const loginLoading = ref(false)
  648. function submit() {
  649. if (!form.value.loginName) {
  650. uni.$u.toast(t('signin.form.email'))
  651. return
  652. }
  653. if (!form.value.password) {
  654. uni.$u.toast(t('signin.form.password'))
  655. return
  656. }
  657. if (loginLoading.value) return
  658. loginLoading.value = true
  659. handleLogin()
  660. }
  661. const customStyle = {
  662. height: '48px',
  663. 'border-radius': '8px',
  664. background: 'transparent',
  665. padding: '0 20px !important',
  666. position: 'relative',
  667. }
  668. const remenber = ref([])
  669. const checkboxChange = (e) => {
  670. remenber.value = e
  671. }
  672. const fetchUserList = (params) => post('/Login/AcctLogin', params)
  673. const handleClick = (value) => {
  674. activeTab.value = value
  675. }
  676. async function handleLogin() {
  677. try {
  678. const res = await userApi.login({
  679. loginName: form.value.loginName,
  680. password: form.value.password,
  681. })
  682. if (res.code === 200) {
  683. userToken.value = res.data
  684. uni.showToast({ title: t('login.msg0_1'), icon: 'success' })
  685. getCustomLoginInfo()
  686. // getCardUserInfo();
  687. reasonsRefusalList()
  688. if (remenber.value.length) {
  689. userStore.saveAccountInfo({
  690. loginName: form.value.loginName,
  691. password: form.value.password,
  692. rememberPassword: true,
  693. })
  694. } else {
  695. userStore.saveAccountInfo({
  696. loginName: '',
  697. password: '',
  698. rememberPassword: false,
  699. })
  700. }
  701. // console.log(1111);
  702. } else {
  703. uni.showToast({ title: res.msg })
  704. // console.log(12112);
  705. }
  706. } catch (error) {
  707. loginLoading.value =false
  708. // console.log(error)
  709. // uni.showToast({ title: error.msg, icon: 'error' })
  710. toast(error.msg||t('common.error'))
  711. // console.log(error, 19089);
  712. }
  713. }
  714. async function getCustomLoginInfo() {
  715. try {
  716. const res = await userApi.getUserInfo()
  717. userStore.saveUserInfo(res.data)
  718. uni.removeStorageSync('systemListCache')
  719. // 登录更新金额
  720. uni.$emit('updatePayment')
  721. loginLoading.value =false
  722. // uni.$emit('updateSystemList', 'login')
  723. if (res.code === 200) {
  724. switch (modeStore.value) {
  725. case 'customer':
  726. router.reLaunch('/pages/customer/dashboard')
  727. // router.reLaunch('/pages/customer/index')
  728. break
  729. case 'ib':
  730. router.reLaunch('/pages/ib/index')
  731. break
  732. case 'follow':
  733. router.reLaunch('/pages/follow/index')
  734. break
  735. default:
  736. break
  737. }
  738. } else {
  739. uni.$u.toast(res.msg || t('login.msg0'))
  740. }
  741. } catch (error) {
  742. uni.$u.toast(error.msg || t('login.msg0'), 'error')
  743. // console.log(error, 111);
  744. }
  745. }
  746. async function getCardUserInfo() {
  747. try {
  748. const res = await ucardApi.getSingle()
  749. userStore.saveUserInfo(res.data)
  750. if (res.code === 200) {
  751. if (!res.data || res.data.approveStatus != 2) {
  752. router.push('/pages/mine/improve')
  753. } else {
  754. router.push('/pages/card/index')
  755. }
  756. } else {
  757. uni.$u.toast(res.msg || t('login.msg0'))
  758. }
  759. } catch (error) {
  760. // console.log(error, 111);
  761. }
  762. }
  763. async function reasonsRefusalList() {
  764. try {
  765. const res = await customApi.reasonsRefusalList()
  766. if (res.code === 200) {
  767. pickFields(res.data)
  768. } else {
  769. uni.$u.toast(res.msg || t('login.msg0'))
  770. }
  771. } catch (error) {
  772. // console.log(error, 111);
  773. }
  774. }
  775. function pickFields(source, fields = ['content', 'enContent']) {
  776. const result = {}
  777. Object.entries(source).forEach(([key, value]) => {
  778. result[key] = fields.reduce((acc, f) => {
  779. acc[f] = value[f] ?? null
  780. return acc
  781. }, {})
  782. })
  783. userStore.saveReasonsOptions(result)
  784. }
  785. onMounted(() => {
  786. if (uni.getStorageSync('logoutToSystem') == 1) {
  787. uni.removeStorageSync('logoutToSystem')
  788. uni.removeStorageSync('systemListCache')
  789. }
  790. uni.$emit('updateSystemList', 'login')
  791. uni.$on('updateAppSuccess',()=>{
  792. uni.showToast('')
  793. })
  794. const accountInfo = userStore.accountInfo
  795. if (accountInfo?.rememberPassword) {
  796. form.value.loginName = accountInfo?.loginName || ''
  797. form.value.password = accountInfo?.password || ''
  798. remenber.value = ['记住我']
  799. } else {
  800. form.value.loginName = ''
  801. form.value.password = ''
  802. remenber.value = []
  803. }
  804. // 注册表单初始化
  805. getCountry()
  806. getCountryMsg()
  807. globalStore.setMode(ls.get('mode') || 'customer');
  808. })
  809. const inputType = ref('password')
  810. const isChatIconExpanded = ref(false)
  811. // 处理聊天图标点击
  812. const handleChatIconClick = () => {
  813. // 如果还没显示 → 先滑出来
  814. if (!isChatIconExpanded.value) {
  815. isChatIconExpanded.value = true
  816. return
  817. }
  818. if (isMobile.value) {
  819. router.push('/pages/common/chat')
  820. } else {
  821. if (LiveChatService) {
  822. LiveChatService.showChat()
  823. }
  824. }
  825. setTimeout(() => {
  826. isChatIconExpanded.value = false
  827. }, 300)
  828. }
  829. </script>
  830. <style lang="scss" scoped>
  831. @import "@/uni.scss";
  832. :deep(uni-content) {
  833. padding-left: 0 !important;
  834. }
  835. .login-page {
  836. height: 100vh;
  837. border: none;
  838. padding: 0;
  839. position: relative;
  840. display: flex;
  841. flex-direction: column;
  842. }
  843. .chat-icon {
  844. width: px2rpx(50);
  845. height: px2rpx(50);
  846. border-radius: 50%;
  847. background-color: #cf1322;
  848. display: flex;
  849. align-items: center;
  850. justify-content: center;
  851. position: fixed;
  852. bottom: px2rpx(25);
  853. right: px2rpx(0);
  854. z-index: 999;
  855. cursor: pointer;
  856. transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  857. box-shadow: 0 px2rpx(8) px2rpx(20) rgba(0, 0, 0, 0.15);
  858. will-change: transform;
  859. }
  860. @media screen and (max-width: 991px) {
  861. .chat-icon {
  862. right: px2rpx(-25);
  863. }
  864. }
  865. .chat-icon:hover {
  866. transform: scale(1.1);
  867. }
  868. .chat-icon-expanded {
  869. bottom: px2rpx(20);
  870. right: px2rpx(20);
  871. transform: scale(1.1);
  872. box-shadow: 0 px2rpx(12) px2rpx(30) rgba(0, 0, 0, 0.2);
  873. }
  874. .chat-icon-hidden {
  875. display: none;
  876. }
  877. .fixed {
  878. width: 100%;
  879. height: var(--status-bar-height);
  880. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  881. z-index: 9;
  882. }
  883. .global-header-bar {
  884. width: 100%;
  885. height: px2rpx(60);
  886. display: flex;
  887. align-items: center;
  888. justify-content: center;
  889. flex-shrink: 0;
  890. z-index: 100;
  891. &.pc-header {
  892. background-color: transparent;
  893. }
  894. .header-inner {
  895. width: 100%;
  896. padding: 0 5%;
  897. display: flex;
  898. justify-content: space-between;
  899. /* 两端对齐,可放logo和组件 */
  900. align-items: center;
  901. }
  902. }
  903. .mobile-header-bar {
  904. //position: absolute;
  905. //top: px2rpx(20);
  906. //right: px2rpx(20);
  907. min-height: px2rpx(46);
  908. z-index: 10;
  909. width: 100%;
  910. display: flex;
  911. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  912. justify-content: flex-end;
  913. align-items: center;
  914. }
  915. .main-content {
  916. flex: 1;
  917. overflow: hidden;
  918. }
  919. .demo-uni-row {
  920. height: 100%;
  921. margin: 0 !important;
  922. .left-bg {
  923. height: 100%;
  924. min-height: calc(100vh - 120px);
  925. background-size: cover;
  926. background-position: center;
  927. display: flex;
  928. box-sizing: border-box;
  929. padding: px2rpx(50);
  930. //flex-direction: column;
  931. //align-items: center;
  932. justify-content: center;
  933. .left-box {
  934. display: flex;
  935. flex-direction: column;
  936. justify-content: center;
  937. align-items: flex-start;
  938. width: 60%;
  939. //margin-top: px2rpx(20);
  940. .inner {
  941. width: 100%;
  942. text-align: start;
  943. //margin-bottom: px2rpx(20);
  944. .section-title {
  945. //margin-top: px2rpx(10);
  946. //margin-bottom: px2rpx(10);
  947. }
  948. .title {
  949. margin: 0 0 0 px2rpx(10);
  950. font-size: px2rpx(56);
  951. line-height: 1.2;
  952. color: #fff;
  953. font-weight: 700;
  954. text-align: left;
  955. }
  956. .w-700 {
  957. font-weight: 700;
  958. }
  959. .subtitle {
  960. width: 45%;
  961. font-size: px2rpx(18);
  962. letter-spacing: px2rpx(1);
  963. display: block;
  964. margin-bottom: px2rpx(24);
  965. color: #ffffff;
  966. line-height: px2rpx(15);
  967. font-weight: 500;
  968. padding: px2rpx(10) px2rpx(20);
  969. border-radius: px2rpx(100);
  970. text-transform: uppercase;
  971. background-color: #e61f1e;
  972. text-align: center;
  973. }
  974. .w-40 {
  975. max-width: 40%;
  976. }
  977. .text-white {
  978. margin-top: px2rpx(10);
  979. font-size: px2rpx(18);
  980. margin-bottom: px2rpx(16);
  981. line-height: 1.6;
  982. color: var(--bs-emphasis-color);
  983. }
  984. }
  985. .img-fluid {
  986. width: 400px;
  987. height: 33px;
  988. }
  989. .mt--10 {
  990. margin-top: px2rpx(10);
  991. }
  992. .h1 {
  993. // text-align: center;
  994. color: var(--bs-emphasis-color);
  995. font-size: 30px;
  996. margin-top: 30px;
  997. line-height: 1.5;
  998. }
  999. .h6 {
  1000. text-align: start;
  1001. line-height: 20px;
  1002. color: var(--bs-emphasis-color);
  1003. font-size: 14px;
  1004. margin-top: 10px;
  1005. }
  1006. .company {
  1007. padding: px2rpx(10) 0;
  1008. position: relative;
  1009. align-items: flex-start !important;
  1010. width: 100%;
  1011. }
  1012. }
  1013. .left-content {
  1014. width: 100%;
  1015. .des {
  1016. text-align: start;
  1017. line-height: 24px;
  1018. color: var(--bs-emphasis-color);
  1019. font-size: 14px;
  1020. //margin-top: px2rpx(20);
  1021. :nth-child(n) {
  1022. display: inline;
  1023. word-break: break-all;
  1024. word-wrap: break-word;
  1025. }
  1026. .doc-link {
  1027. color: var(--color-error);
  1028. text-decoration: underline;
  1029. margin: 0 px2rpx(4);
  1030. }
  1031. }
  1032. }
  1033. }
  1034. .right-f {
  1035. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  1036. padding: 0 px2rpx(24);
  1037. height: 100%;
  1038. box-sizing: border-box;
  1039. .account {
  1040. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  1041. position: relative;
  1042. height: calc(100vh - 60px);
  1043. display: flex;
  1044. flex-direction: column;
  1045. //justify-content: center;
  1046. padding: 0 px2rpx(24);
  1047. .company {
  1048. padding: px2rpx(10) 0 px2rpx(10) 0;
  1049. position: relative;
  1050. align-items: center !important;
  1051. }
  1052. .company-icon {
  1053. width: px2rpx(234);
  1054. }
  1055. .company-icon-mini {
  1056. width: px2rpx(100);
  1057. }
  1058. }
  1059. }
  1060. }
  1061. .bottom-box {
  1062. width: 100%;
  1063. height: 60px;
  1064. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  1065. display: flex;
  1066. justify-content: center;
  1067. align-items: center;
  1068. color: #000;
  1069. .bottom-title {
  1070. text-align: center;
  1071. font-size: px2rpx(14);
  1072. font-weight: 500;
  1073. line-height: 1.5;
  1074. color: #666666;
  1075. }
  1076. .ellipsis {
  1077. width: px2rpx(200);
  1078. white-space: nowrap;
  1079. overflow: hidden;
  1080. text-overflow: ellipsis;
  1081. }
  1082. .cwg-button {
  1083. width: 120px !important;
  1084. padding: px2rpx(4) 0 !important;
  1085. }
  1086. }
  1087. button {
  1088. background-color: #ea002a;
  1089. font-size: px2rpx(14);
  1090. font-weight: normal;
  1091. height: px2rpx(44);
  1092. line-height: px2rpx(44);
  1093. }
  1094. .right-f .account .company {
  1095. padding: px2rpx(20) 0 px2rpx(200) 0;
  1096. position: relative;
  1097. align-items: flex-start !important;
  1098. }
  1099. .logo {
  1100. margin-left: px2rpx(48);
  1101. }
  1102. .left-bg .company-icon {
  1103. width: px2rpx(234);
  1104. }
  1105. .left-bg .left-content {
  1106. position: relative;
  1107. z-index: 1;
  1108. }
  1109. .title {
  1110. margin: px2rpx(10) 0;
  1111. font-size: px2rpx(24);
  1112. font-weight: bolder;
  1113. color: var(--bs-emphasis-color);
  1114. text-align: center;
  1115. i {
  1116. margin-right: px2rpx(10);
  1117. }
  1118. .tit1 {
  1119. font-size: px2rpx(34);
  1120. line-height: 1.2;
  1121. font-weight: bold;
  1122. color: var(--bs-emphasis-color);
  1123. }
  1124. .tit2 {
  1125. font-size: px2rpx(16);
  1126. line-height: 1.2;
  1127. color: #cecece;
  1128. font-weight: 500;
  1129. }
  1130. }
  1131. .qr-title {
  1132. font-size: px2rpx(16);
  1133. line-height: 1.5;
  1134. color: #cecece;
  1135. font-weight: 500;
  1136. text-align: center;
  1137. margin: px2rpx(40) 0;
  1138. display: flex;
  1139. align-items: center;
  1140. justify-content: center;
  1141. .line {
  1142. flex: 1;
  1143. height: 1px;
  1144. background-color: #e4e4e4;
  1145. }
  1146. .qr-tit2 {
  1147. margin: 0 px2rpx(12);
  1148. }
  1149. }
  1150. .input {
  1151. height: px2rpx(44);
  1152. border-radius: px2rpx(8);
  1153. background: #f7f8fa;
  1154. padding: 0 px2rpx(20) !important;
  1155. position: relative;
  1156. }
  1157. .account-icon {
  1158. width: px2rpx(12);
  1159. height: px2rpx(14) !important;
  1160. margin-right: px2rpx(5);
  1161. }
  1162. :deep(.u-input__content__prefix-icon) {
  1163. height: px2rpx(20);
  1164. }
  1165. .regiset-btn {
  1166. margin: px2rpx(20) 0;
  1167. border-radius: px2rpx(8);
  1168. }
  1169. .account-tip {
  1170. color: #666666;
  1171. font-size: px2rpx(16);
  1172. text-align: center;
  1173. text {
  1174. color: #ea002a;
  1175. }
  1176. }
  1177. :deep(.u-form-item__body) {
  1178. padding: 0 !important;
  1179. padding-bottom: px2rpx(24) !important;
  1180. }
  1181. :deep(.wcg-checkbox) {
  1182. padding: 0 !important;
  1183. }
  1184. .cwg-button {
  1185. margin: px2rpx(34) 0 !important;
  1186. uni-button {
  1187. border-radius: px2rpx(8)
  1188. }
  1189. }
  1190. .tab-list {
  1191. width: 100%;
  1192. display: flex;
  1193. align-items: center;
  1194. justify-content: center;
  1195. border-bottom: 1px solid var(--bs-border-color);
  1196. }
  1197. .tab-item {
  1198. width: 50%;
  1199. margin: 0 px2rpx(15);
  1200. padding-right: 0;
  1201. padding-left: 0;
  1202. padding-bottom: 8px;
  1203. text-align: center;
  1204. border-bottom: 2px solid transparent;
  1205. font-weight: 500;
  1206. color: var(--bs-emphasis-color);
  1207. cursor: pointer;
  1208. transition: all 0.3s ease;
  1209. .tab-label {
  1210. font-size: px2rpx(20);
  1211. }
  1212. &:hover,
  1213. &:focus {
  1214. font-weight: 700;
  1215. color: #e32326;
  1216. border-bottom-color: #e32326;
  1217. }
  1218. &.active {
  1219. font-weight: 700;
  1220. color: #e32326;
  1221. border-bottom-color: #e32326;
  1222. }
  1223. }
  1224. /* 注册表单样式 */
  1225. .pwd {
  1226. list-style: none;
  1227. padding-left: 0;
  1228. margin: 0;
  1229. li {
  1230. font-size: px2rpx(12);
  1231. color: var(--bs-heading-color);
  1232. line-height: px2rpx(20);
  1233. position: relative;
  1234. padding-left: px2rpx(16);
  1235. &::before {
  1236. content: '';
  1237. position: absolute;
  1238. left: 0;
  1239. top: 50%;
  1240. transform: translateY(-50%);
  1241. width: px2rpx(6);
  1242. height: px2rpx(6);
  1243. border-radius: 50%;
  1244. background-color: var(--bs-heading-color);
  1245. }
  1246. &.fit {
  1247. color: #67c23a;
  1248. &::before {
  1249. background-color: #67c23a;
  1250. }
  1251. }
  1252. }
  1253. }
  1254. :deep(.formContent) {
  1255. padding: 0 10px;
  1256. .uni-select,
  1257. .uni-combox,
  1258. .uni-easyinput__content,
  1259. //.cwg-combox,
  1260. .uni-date-editor--x {
  1261. padding: 0.5rem px2rpx(10);
  1262. height: 3rem !important;
  1263. //border: none !important;
  1264. border-radius: px2rpx(8);
  1265. }
  1266. .cwg-combox {
  1267. background-color: transparent !important;
  1268. }
  1269. .code {
  1270. .uni-easyinput__content {
  1271. border-radius: px2rpx(8) 0 0 px2rpx(8);
  1272. }
  1273. }
  1274. }
  1275. :deep(.uni-stat-box) {
  1276. height: 100%;
  1277. }
  1278. :deep(.uni-select) {
  1279. height: 100%;
  1280. }
  1281. :deep(.uni-easyinput__content) {
  1282. height: 100%;
  1283. }
  1284. :deep(.uni-date-editor) {
  1285. height: 100%;
  1286. }
  1287. :deep(.uni-date-editor--x) {
  1288. height: 100%;
  1289. }
  1290. .btn-code {
  1291. //margin-left: -10px;
  1292. width: auto;
  1293. min-width: px2rpx(80);
  1294. height: 3rem;
  1295. box-sizing: border-box;
  1296. padding: 0 px2rpx(10);
  1297. background-color: #102047;
  1298. //border: 1px solid rgb(229, 229, 229);
  1299. color: #fff;
  1300. text-align: center;
  1301. line-height: 3rem;
  1302. border-radius: 0 px2rpx(8) px2rpx(8) 0;
  1303. cursor: pointer;
  1304. font-size: 14px;
  1305. flex-shrink: 0;
  1306. }
  1307. .check-box {
  1308. padding: 0 px2rpx(10);
  1309. margin-bottom: px2rpx(10);
  1310. display: flex;
  1311. align-items: flex-start;
  1312. cursor: pointer;
  1313. .checkbox-label {
  1314. font-size: px2rpx(16);
  1315. color: #666666;
  1316. margin-left: px2rpx(8);
  1317. line-height: px2rpx(20);
  1318. user-select: none;
  1319. }
  1320. :deep(.u-checkbox) {
  1321. display: flex;
  1322. align-items: flex-start;
  1323. margin: 0;
  1324. }
  1325. }
  1326. .regiset-btn {
  1327. width: 100%;
  1328. height: px2rpx(40);
  1329. line-height: px2rpx(40);
  1330. border-radius: px2rpx(8);
  1331. background-color: var(--color-error);
  1332. color: #fff;
  1333. font-weight: bold;
  1334. }
  1335. .login-link {
  1336. width: 100%;
  1337. margin-top: px2rpx(20);
  1338. text-align: center;
  1339. display: flex;
  1340. align-items: center;
  1341. justify-content: center;
  1342. font-size: px2rpx(16);
  1343. line-height: 1.6;
  1344. }
  1345. .link {
  1346. margin-left: px2rpx(5);
  1347. color: #e61f1e;
  1348. padding-bottom: 2px;
  1349. cursor: pointer;
  1350. font-size: px2rpx(16);
  1351. }
  1352. .agreemnet9 {
  1353. text-align: initial;
  1354. color: #e61f1e;
  1355. }
  1356. .des-bottom {
  1357. margin-top: px2rpx(20);
  1358. margin-bottom: px2rpx(40);
  1359. line-height: 20px;
  1360. color: #000;
  1361. font-size: px2rpx(14);
  1362. :deep(.pdf-link) {
  1363. width: auto;
  1364. }
  1365. .desc-link {
  1366. display: inline-block !important;
  1367. color: #e61f1e;
  1368. text-decoration: underline;
  1369. }
  1370. }
  1371. </style>