index.vue 40 KB

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