index.vue 41 KB

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