index.vue 41 KB

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