index.vue 40 KB

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