index.vue 41 KB

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