index.vue 40 KB

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