index.vue 41 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531
  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" :class="{ active: activeTab === tab.value }"
  66. @click="handleClick(tab.value)">
  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">
  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">
  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.3rd'"></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">
  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" :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])(?!.*([~!@&%$^\(\)#_]).*\1.*\1)[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/index',
  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. function submit() {
  645. if (!form.value.loginName) {
  646. uni.$u.toast(t('signin.form.email'))
  647. return
  648. }
  649. if (!form.value.password) {
  650. uni.$u.toast(t('signin.form.password'))
  651. return
  652. }
  653. handleLogin()
  654. }
  655. const customStyle = {
  656. height: '48px',
  657. 'border-radius': '8px',
  658. background: 'transparent',
  659. padding: '0 20px !important',
  660. position: 'relative',
  661. }
  662. const remenber = ref([])
  663. const checkboxChange = (e) => {
  664. remenber.value = e
  665. }
  666. const fetchUserList = (params) => post('/Login/AcctLogin', params)
  667. const handleClick = (value) => {
  668. activeTab.value = value
  669. }
  670. async function handleLogin() {
  671. try {
  672. const res = await userApi.login({
  673. loginName: form.value.loginName,
  674. password: form.value.password,
  675. })
  676. if (res.code === 200) {
  677. userToken.value = res.data
  678. uni.showToast({ title: t('login.msg0_1'), icon: 'success' })
  679. getCustomLoginInfo()
  680. // getCardUserInfo();
  681. reasonsRefusalList()
  682. if (remenber.value.length) {
  683. userStore.saveAccountInfo({
  684. loginName: form.value.loginName,
  685. password: form.value.password,
  686. rememberPassword: true,
  687. })
  688. } else {
  689. userStore.saveAccountInfo({
  690. loginName: '',
  691. password: '',
  692. rememberPassword: false,
  693. })
  694. }
  695. // console.log(1111);
  696. } else {
  697. uni.showToast({ title: res.msg })
  698. // console.log(12112);
  699. }
  700. } catch (error) {
  701. // console.log(error)
  702. // uni.showToast({ title: error.msg, icon: 'error' })
  703. toast(error.msg)
  704. // console.log(error, 19089);
  705. }
  706. }
  707. async function getCustomLoginInfo() {
  708. try {
  709. const res = await userApi.getUserInfo()
  710. userStore.saveUserInfo(res.data)
  711. uni.removeStorageSync('systemListCache')
  712. // 登录更新金额
  713. uni.$emit('updatePayment')
  714. // uni.$emit('updateSystemList', 'login')
  715. if (res.code === 200) {
  716. switch (modeStore.value) {
  717. case 'customer':
  718. router.reLaunch('/pages/customer/dashboard')
  719. // router.reLaunch('/pages/customer/index')
  720. break
  721. case 'ib':
  722. router.reLaunch('/pages/ib/index')
  723. break
  724. case 'follow':
  725. router.reLaunch('/pages/follow/index')
  726. break
  727. default:
  728. break
  729. }
  730. } else {
  731. uni.$u.toast(res.msg || t('login.msg0'))
  732. }
  733. } catch (error) {
  734. uni.$u.toast(error.msg || t('login.msg0'), 'error')
  735. // console.log(error, 111);
  736. }
  737. }
  738. async function getCardUserInfo() {
  739. try {
  740. const res = await ucardApi.getSingle()
  741. userStore.saveUserInfo(res.data)
  742. if (res.code === 200) {
  743. if (!res.data || res.data.approveStatus != 2) {
  744. router.push('/pages/mine/improve')
  745. } else {
  746. router.push('/pages/card/index')
  747. }
  748. } else {
  749. uni.$u.toast(res.msg || t('login.msg0'))
  750. }
  751. } catch (error) {
  752. // console.log(error, 111);
  753. }
  754. }
  755. async function reasonsRefusalList() {
  756. try {
  757. const res = await customApi.reasonsRefusalList()
  758. if (res.code === 200) {
  759. pickFields(res.data)
  760. } else {
  761. uni.$u.toast(res.msg || t('login.msg0'))
  762. }
  763. } catch (error) {
  764. // console.log(error, 111);
  765. }
  766. }
  767. function pickFields(source, fields = ['content', 'enContent']) {
  768. const result = {}
  769. Object.entries(source).forEach(([key, value]) => {
  770. result[key] = fields.reduce((acc, f) => {
  771. acc[f] = value[f] ?? null
  772. return acc
  773. }, {})
  774. })
  775. userStore.saveReasonsOptions(result)
  776. }
  777. onMounted(() => {
  778. if (uni.getStorageSync('logoutToSystem') == 1) {
  779. uni.removeStorageSync('logoutToSystem')
  780. uni.removeStorageSync('systemListCache')
  781. }
  782. uni.$emit('updateSystemList', 'login')
  783. const accountInfo = userStore.accountInfo
  784. if (accountInfo?.rememberPassword) {
  785. form.value.loginName = accountInfo?.loginName || ''
  786. form.value.password = accountInfo?.password || ''
  787. remenber.value = ['记住我']
  788. } else {
  789. form.value.loginName = ''
  790. form.value.password = ''
  791. remenber.value = []
  792. }
  793. // 注册表单初始化
  794. getCountry()
  795. getCountryMsg()
  796. const hostParts = window.location.host.split('.')
  797. ho.value = hostParts.length > 1 ? hostParts[1] : ''
  798. globalStore.setMode(ls.get('mode') || 'customer');
  799. })
  800. const inputType = ref('password')
  801. const isChatIconExpanded = ref(false)
  802. // 处理聊天图标点击
  803. const handleChatIconClick = () => {
  804. // 如果还没显示 → 先滑出来
  805. if (!isChatIconExpanded.value) {
  806. isChatIconExpanded.value = true
  807. return
  808. }
  809. if (isMobile.value) {
  810. // router.push('/pages/common/chat')
  811. } else {
  812. if (LiveChatService) {
  813. LiveChatService.showChat()
  814. }
  815. }
  816. setTimeout(() => {
  817. isChatIconExpanded.value = false
  818. }, 300)
  819. }
  820. </script>
  821. <style lang="scss" scoped>
  822. @import "@/uni.scss";
  823. :deep(uni-content) {
  824. padding-left: 0 !important;
  825. }
  826. .login-page {
  827. height: 100vh;
  828. border: none;
  829. padding: 0;
  830. position: relative;
  831. display: flex;
  832. flex-direction: column;
  833. }
  834. .chat-icon {
  835. width: px2rpx(50);
  836. height: px2rpx(50);
  837. border-radius: 50%;
  838. background-color: #cf1322;
  839. display: flex;
  840. align-items: center;
  841. justify-content: center;
  842. position: fixed;
  843. bottom: px2rpx(25);
  844. right: px2rpx(0);
  845. z-index: 999;
  846. cursor: pointer;
  847. transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  848. box-shadow: 0 px2rpx(8) px2rpx(20) rgba(0, 0, 0, 0.15);
  849. will-change: transform;
  850. }
  851. @media screen and (max-width: 991px) {
  852. .chat-icon {
  853. right: px2rpx(-25);
  854. }
  855. }
  856. .chat-icon:hover {
  857. transform: scale(1.1);
  858. }
  859. .chat-icon-expanded {
  860. bottom: px2rpx(20);
  861. right: px2rpx(20);
  862. transform: scale(1.1);
  863. box-shadow: 0 px2rpx(12) px2rpx(30) rgba(0, 0, 0, 0.2);
  864. }
  865. .chat-icon-hidden {
  866. display: none;
  867. }
  868. .fixed {
  869. width: 100%;
  870. height: var(--status-bar-height);
  871. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  872. z-index: 9;
  873. }
  874. .global-header-bar {
  875. width: 100%;
  876. height: px2rpx(60);
  877. display: flex;
  878. align-items: center;
  879. justify-content: center;
  880. flex-shrink: 0;
  881. z-index: 100;
  882. &.pc-header {
  883. background-color: transparent;
  884. }
  885. .header-inner {
  886. width: 100%;
  887. padding: 0 5%;
  888. display: flex;
  889. justify-content: space-between;
  890. /* 两端对齐,可放logo和组件 */
  891. align-items: center;
  892. }
  893. }
  894. .mobile-header-bar {
  895. //position: absolute;
  896. //top: px2rpx(20);
  897. //right: px2rpx(20);
  898. min-height: px2rpx(46);
  899. z-index: 10;
  900. width: 100%;
  901. display: flex;
  902. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  903. justify-content: flex-end;
  904. align-items: center;
  905. }
  906. .main-content {
  907. flex: 1;
  908. overflow: hidden;
  909. }
  910. .demo-uni-row {
  911. height: 100%;
  912. margin: 0 !important;
  913. .left-bg {
  914. height: 100%;
  915. min-height: calc(100vh - 120px);
  916. background-size: cover;
  917. background-position: center;
  918. display: flex;
  919. box-sizing: border-box;
  920. padding: px2rpx(50);
  921. //flex-direction: column;
  922. //align-items: center;
  923. justify-content: center;
  924. .left-box {
  925. display: flex;
  926. flex-direction: column;
  927. justify-content: center;
  928. align-items: flex-start;
  929. width: 60%;
  930. //margin-top: px2rpx(20);
  931. .inner {
  932. width: 100%;
  933. text-align: start;
  934. //margin-bottom: px2rpx(20);
  935. .section-title {
  936. //margin-top: px2rpx(10);
  937. //margin-bottom: px2rpx(10);
  938. }
  939. .title {
  940. margin: 0 0 0 px2rpx(10);
  941. font-size: px2rpx(56);
  942. line-height: 1.2;
  943. color: #fff;
  944. font-weight: 700;
  945. text-align: left;
  946. }
  947. .w-700 {
  948. font-weight: 700;
  949. }
  950. .subtitle {
  951. width: 45%;
  952. font-size: px2rpx(18);
  953. letter-spacing: px2rpx(1);
  954. display: block;
  955. margin-bottom: px2rpx(24);
  956. color: #ffffff;
  957. line-height: px2rpx(15);
  958. font-weight: 500;
  959. padding: px2rpx(10) px2rpx(20);
  960. border-radius: px2rpx(100);
  961. text-transform: uppercase;
  962. background-color: #e61f1e;
  963. text-align: center;
  964. }
  965. .w-40 {
  966. max-width: 40%;
  967. }
  968. .text-white {
  969. margin-top: px2rpx(10);
  970. font-size: px2rpx(18);
  971. margin-bottom: px2rpx(16);
  972. line-height: 1.6;
  973. color: var(--bs-emphasis-color);
  974. }
  975. }
  976. .img-fluid {
  977. width: 400px;
  978. height: 33px;
  979. }
  980. .mt--10 {
  981. margin-top: px2rpx(10);
  982. }
  983. .h1 {
  984. // text-align: center;
  985. color: var(--bs-emphasis-color);
  986. font-size: 30px;
  987. margin-top: 30px;
  988. line-height: 1.5;
  989. }
  990. .h6 {
  991. text-align: start;
  992. line-height: 20px;
  993. color: var(--bs-emphasis-color);
  994. font-size: 14px;
  995. margin-top: 10px;
  996. }
  997. .company {
  998. padding: px2rpx(10) 0 px2rpx(10) 0;
  999. position: relative;
  1000. align-items: flex-start !important;
  1001. width: 100%;
  1002. }
  1003. }
  1004. .left-content {
  1005. width: 100%;
  1006. .des {
  1007. text-align: start;
  1008. line-height: 24px;
  1009. color: var(--bs-emphasis-color);
  1010. font-size: 14px;
  1011. //margin-top: px2rpx(20);
  1012. :nth-child(n) {
  1013. display: inline;
  1014. word-break: break-all;
  1015. word-wrap: break-word;
  1016. }
  1017. .doc-link {
  1018. color: var(--color-error);
  1019. text-decoration: underline;
  1020. margin: 0 px2rpx(4);
  1021. }
  1022. }
  1023. }
  1024. }
  1025. .right-f {
  1026. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  1027. padding: 0 px2rpx(24);
  1028. height: 100%;
  1029. box-sizing: border-box;
  1030. .account {
  1031. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  1032. position: relative;
  1033. height: calc(100vh - 60px);
  1034. display: flex;
  1035. flex-direction: column;
  1036. //justify-content: center;
  1037. padding: 0 px2rpx(24);
  1038. .company {
  1039. padding: px2rpx(20) 0 px2rpx(30) 0;
  1040. position: relative;
  1041. align-items: center !important;
  1042. }
  1043. .company-icon {
  1044. width: px2rpx(234);
  1045. }
  1046. .company-icon-mini {
  1047. width: px2rpx(100);
  1048. }
  1049. }
  1050. }
  1051. }
  1052. .bottom-box {
  1053. width: 100%;
  1054. height: 60px;
  1055. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  1056. display: flex;
  1057. justify-content: center;
  1058. align-items: center;
  1059. color: #000;
  1060. .bottom-title {
  1061. text-align: center;
  1062. font-size: px2rpx(14);
  1063. font-weight: 500;
  1064. line-height: 1.5;
  1065. color: #666666;
  1066. }
  1067. .ellipsis {
  1068. width: px2rpx(200);
  1069. white-space: nowrap;
  1070. overflow: hidden;
  1071. text-overflow: ellipsis;
  1072. }
  1073. .cwg-button {
  1074. width: 120px !important;
  1075. padding: px2rpx(4) 0 !important;
  1076. }
  1077. }
  1078. button {
  1079. background-color: #ea002a;
  1080. font-size: px2rpx(14);
  1081. font-weight: normal;
  1082. height: px2rpx(44);
  1083. line-height: px2rpx(44);
  1084. }
  1085. .right-f .account .company {
  1086. padding: px2rpx(20) 0 px2rpx(200) 0;
  1087. position: relative;
  1088. align-items: flex-start !important;
  1089. }
  1090. .logo {
  1091. margin-left: px2rpx(48);
  1092. }
  1093. .left-bg .company-icon {
  1094. width: px2rpx(234);
  1095. }
  1096. .left-bg .left-content {
  1097. position: relative;
  1098. z-index: 1;
  1099. }
  1100. .title {
  1101. margin: px2rpx(15) 0;
  1102. font-size: px2rpx(24);
  1103. font-weight: bolder;
  1104. color: var(--bs-emphasis-color);
  1105. text-align: center;
  1106. i {
  1107. margin-right: px2rpx(10);
  1108. }
  1109. .tit1 {
  1110. font-size: px2rpx(34);
  1111. line-height: 1.5;
  1112. font-weight: bold;
  1113. color: var(--bs-emphasis-color);
  1114. }
  1115. .tit2 {
  1116. font-size: px2rpx(16);
  1117. line-height: 1.5;
  1118. color: #cecece;
  1119. font-weight: 500;
  1120. }
  1121. }
  1122. .qr-title {
  1123. font-size: px2rpx(16);
  1124. line-height: 1.5;
  1125. color: #cecece;
  1126. font-weight: 500;
  1127. text-align: center;
  1128. margin: px2rpx(40) 0;
  1129. display: flex;
  1130. align-items: center;
  1131. justify-content: center;
  1132. .line {
  1133. flex: 1;
  1134. height: 1px;
  1135. background-color: #e4e4e4;
  1136. }
  1137. .qr-tit2 {
  1138. margin: 0 px2rpx(12);
  1139. }
  1140. }
  1141. .input {
  1142. height: px2rpx(44);
  1143. border-radius: px2rpx(8);
  1144. background: #f7f8fa;
  1145. padding: 0 px2rpx(20) !important;
  1146. position: relative;
  1147. }
  1148. .account-icon {
  1149. width: px2rpx(12);
  1150. height: px2rpx(14) !important;
  1151. margin-right: px2rpx(5);
  1152. }
  1153. :deep(.u-input__content__prefix-icon) {
  1154. height: px2rpx(20);
  1155. }
  1156. .regiset-btn {
  1157. margin: px2rpx(20) 0;
  1158. border-radius: px2rpx(8);
  1159. }
  1160. .account-tip {
  1161. color: #666666;
  1162. font-size: px2rpx(16);
  1163. text-align: center;
  1164. cursor: pointer;
  1165. text {
  1166. color: #ea002a;
  1167. }
  1168. }
  1169. :deep(.u-form-item__body) {
  1170. padding: 0 !important;
  1171. padding-bottom: px2rpx(24) !important;
  1172. }
  1173. :deep(.wcg-checkbox) {
  1174. padding: 0 !important;
  1175. }
  1176. .cwg-button {
  1177. padding: px2rpx(34) 0 !important;
  1178. uni-button {
  1179. border-radius: px2rpx(8)
  1180. }
  1181. }
  1182. .tab-list {
  1183. width: 100%;
  1184. display: flex;
  1185. align-items: center;
  1186. justify-content: center;
  1187. border-bottom: 1px solid var(--bs-border-color);
  1188. }
  1189. .tab-item {
  1190. width: 50%;
  1191. margin: 0 px2rpx(15);
  1192. padding-right: 0;
  1193. padding-left: 0;
  1194. padding-bottom: 8px;
  1195. text-align: center;
  1196. border-bottom: 2px solid transparent;
  1197. font-weight: 500;
  1198. color: var(--bs-emphasis-color);
  1199. cursor: pointer;
  1200. transition: all 0.3s ease;
  1201. .tab-label {
  1202. font-size: px2rpx(20);
  1203. }
  1204. &:hover,
  1205. &:focus {
  1206. font-weight: 700;
  1207. color: #e32326;
  1208. border-bottom-color: #e32326;
  1209. }
  1210. &.active {
  1211. font-weight: 700;
  1212. color: #e32326;
  1213. border-bottom-color: #e32326;
  1214. }
  1215. }
  1216. /* 注册表单样式 */
  1217. .pwd {
  1218. list-style: none;
  1219. padding-left: 0;
  1220. margin: 0;
  1221. li {
  1222. font-size: px2rpx(12);
  1223. color: var(--bs-heading-color);
  1224. line-height: px2rpx(20);
  1225. position: relative;
  1226. padding-left: px2rpx(16);
  1227. &::before {
  1228. content: '';
  1229. position: absolute;
  1230. left: 0;
  1231. top: 50%;
  1232. transform: translateY(-50%);
  1233. width: px2rpx(6);
  1234. height: px2rpx(6);
  1235. border-radius: 50%;
  1236. background-color: var(--bs-heading-color);
  1237. }
  1238. &.fit {
  1239. color: #67c23a;
  1240. &::before {
  1241. background-color: #67c23a;
  1242. }
  1243. }
  1244. }
  1245. }
  1246. :deep(.formContent) {
  1247. padding: 0 10px;
  1248. .uni-select,
  1249. .uni-combox,
  1250. .uni-easyinput__content,
  1251. //.cwg-combox,
  1252. .uni-date-editor--x {
  1253. padding: 0.5rem px2rpx(10);
  1254. height: 3rem !important;
  1255. //border: none !important;
  1256. border-radius: px2rpx(8);
  1257. }
  1258. .cwg-combox {
  1259. background-color: transparent !important;
  1260. }
  1261. .code {
  1262. .uni-easyinput__content {
  1263. border-radius: px2rpx(8) 0 0 px2rpx(8);
  1264. }
  1265. }
  1266. }
  1267. :deep(.uni-stat-box) {
  1268. height: 100%;
  1269. }
  1270. :deep(.uni-select) {
  1271. height: 100%;
  1272. }
  1273. :deep(.uni-easyinput__content) {
  1274. height: 100%;
  1275. }
  1276. :deep(.uni-date-editor) {
  1277. height: 100%;
  1278. }
  1279. :deep(.uni-date-editor--x) {
  1280. height: 100%;
  1281. }
  1282. .btn-code {
  1283. //margin-left: -10px;
  1284. width: px2rpx(120);
  1285. height: 3rem;
  1286. box-sizing: border-box;
  1287. background-color: #102047;
  1288. //border: 1px solid rgb(229, 229, 229);
  1289. color: #fff;
  1290. text-align: center;
  1291. line-height: 3rem;
  1292. border-radius: 0 px2rpx(8) px2rpx(8) 0;
  1293. cursor: pointer;
  1294. font-size: 14px;
  1295. flex-shrink: 0;
  1296. }
  1297. .check-box {
  1298. padding: 0 px2rpx(10);
  1299. margin-bottom: px2rpx(10);
  1300. display: flex;
  1301. align-items: flex-start;
  1302. cursor: pointer;
  1303. .checkbox-label {
  1304. font-size: px2rpx(16);
  1305. color: #666666;
  1306. margin-left: px2rpx(8);
  1307. line-height: px2rpx(20);
  1308. user-select: none;
  1309. }
  1310. :deep(.u-checkbox) {
  1311. display: flex;
  1312. align-items: flex-start;
  1313. margin: 0;
  1314. }
  1315. }
  1316. .regiset-btn {
  1317. width: 100%;
  1318. height: px2rpx(40);
  1319. line-height: px2rpx(40);
  1320. border-radius: px2rpx(8);
  1321. background-color: var(--color-error);
  1322. color: #fff;
  1323. font-weight: bold;
  1324. }
  1325. .login-link {
  1326. width: 100%;
  1327. margin-top: px2rpx(20);
  1328. text-align: center;
  1329. display: flex;
  1330. align-items: center;
  1331. justify-content: center;
  1332. font-size: px2rpx(16);
  1333. line-height: 1.6;
  1334. }
  1335. .link {
  1336. margin-left: px2rpx(5);
  1337. color: #e61f1e;
  1338. padding-bottom: 2px;
  1339. cursor: pointer;
  1340. font-size: px2rpx(16);
  1341. }
  1342. .agreemnet9 {
  1343. text-align: initial;
  1344. color: #e61f1e;
  1345. }
  1346. .des-bottom {
  1347. margin-top: px2rpx(20);
  1348. margin-bottom: px2rpx(40);
  1349. line-height: 20px;
  1350. color: #000;
  1351. font-size: px2rpx(14);
  1352. :deep(.pdf-link) {
  1353. width: auto;
  1354. }
  1355. .desc-link {
  1356. display: inline-block !important;
  1357. color: #e61f1e;
  1358. text-decoration: underline;
  1359. }
  1360. }
  1361. </style>