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