index.vue 41 KB

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