regist.vue 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185
  1. <template>
  2. <view class="regist-page" :isHeaderFixed="true" :isLoginPage="true">
  3. <view class="fixed" />
  4. <view class="main-content">
  5. <!-- 全局顶部栏:占据一整行,带有占位和背景 -->
  6. <cwg-match-media :min-width="991">
  7. <view class="global-header-bar pc-header">
  8. <view class="header-inner">
  9. <view class="logo-placeholder"></view> <!-- 左侧可预留放logo或留空 -->
  10. <LoginHeaderGroup text-color="#fff" icon-color="#fff" />
  11. </view>
  12. </view>
  13. </cwg-match-media>
  14. <!-- 移动端顶部栏:悬浮在上方,深色文字 -->
  15. <cwg-match-media :max-width="991">
  16. <view class="mobile-header-bar">
  17. <LoginHeaderGroup text-color="#141d22" icon-color="#141d22" />
  18. </view>
  19. </cwg-match-media>
  20. <uni-row class="demo-uni-row">
  21. <cwg-match-media :min-width="991">
  22. <uni-col :xs="24" :sm="24" :md="12" :lg="14" :xl="16">
  23. <view class="left-bg">
  24. <view class="left-box">
  25. <view class="inner">
  26. <view class="section-title">
  27. <text class="bg-secondary-opacity subtitle w-40" v-t="'newLoop.item11'"></text>
  28. </view>
  29. <view class="title w-700">
  30. <text v-t="'newLoop.item12'"></text>
  31. <text>&nbsp;</text>
  32. <text class="color-white" v-t="'newLoop.item13'"></text>
  33. </view>
  34. <view class="text-white" v-t="'newLoop.item14'"></view>
  35. </view>
  36. <image src="/static/images/trust-pilot.png" class="img-fluid mt--10" mode="widthFix"></image>
  37. <view class="left-content">
  38. <view class="des text-white">
  39. <text v-html="t('newSignin.item12')"></text>
  40. <br />
  41. <text v-html="t('newSignin.item12_1')"></text>
  42. <br />
  43. <text v-html="t('newSignin.item10')"></text>
  44. <br />
  45. <text v-html="t('newSignin.item11')"></text>
  46. <br />
  47. <text v-t="'newSignin.item13'"></text>
  48. <cwg-link type="pdf" :title="'newSignin.item13_1'"
  49. :url="`pdf/Risk-Disclosures-and-Acknowledgements-2020-08.pdf`" target="_blank"
  50. v-t="'newSignin.item13_1'" class="doc-link" />
  51. <text v-t="'newSignin.item13_2'"></text>
  52. <!-- <view v-t="'newSignin.item13_3'"></view>
  53. <text v-t="'newSignin.item13_4'"></text> -->
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. </uni-col>
  59. </cwg-match-media>
  60. <uni-col :xs="24" :sm="24" :md="12" :lg="10" :xl="8" class="right-f">
  61. <view class="account">
  62. <cwg-match-media :max-width="991">
  63. <view class="company u-flex-y u-flex-y-center">
  64. <image src="/static/images/logo-full.svg" class="company-icon" mode="widthFix"></image>
  65. </view>
  66. </cwg-match-media>
  67. <view class="title">
  68. <view class="tit1">{{ t('newSignup.item1') }}</view>
  69. <view class="tit2">{{ t('newSignup.item2') }}</view>
  70. </view>
  71. <view>
  72. <uni-forms ref="form" :modelValue="formData" :rules="rules" validate-trigger="blur" label-position="top"
  73. label-width="120">
  74. <uni-row :gutter="20" class="formContent">
  75. <uni-col :xs="24" :md="12">
  76. <uni-forms-item name="country" :label="t('newSignup.item3')">
  77. <cwg-combox v-model:value="formData.country" :options="countryOptions" filterable>
  78. </cwg-combox>
  79. </uni-forms-item>
  80. </uni-col>
  81. <uni-col :xs="24" :md="12">
  82. <uni-forms-item name="phone" :label="t('newSignup.item5')">
  83. <uni-easyinput v-model="formData.phone"></uni-easyinput>
  84. </uni-forms-item>
  85. </uni-col>
  86. <uni-col :xs="24" :md="24">
  87. <cwg-match-media :max-width="991">
  88. <uni-forms-item name="birthDate" :label="t('newSignup.item18')">
  89. <uni-datetime-picker type="date" v-model="formData.birthDate"
  90. :placeholder="t('newSignup.item19')" @change="checkAge" />
  91. </uni-forms-item>
  92. </cwg-match-media>
  93. <cwg-match-media :min-width="992">
  94. <uni-forms-item name="birthDate" :label="t('newSignup.item18')">
  95. <uni-datetime-picker style="width: 50%;" type="date" v-model="formData.birthDate"
  96. :placeholder="t('newSignup.item19')" @change="checkAge" />
  97. </uni-forms-item>
  98. </cwg-match-media>
  99. </uni-col>
  100. <uni-col :xs="24" :md="12">
  101. <uni-forms-item name="email" :label="t('newSignup.item7')">
  102. <uni-easyinput v-model="formData.email" :placeholder="t('newSignup.item8')"
  103. :disabled="!isAgeValid || !formData.birthDate"></uni-easyinput>
  104. </uni-forms-item>
  105. </uni-col>
  106. <uni-col :xs="24" :md="12">
  107. <uni-forms-item name="emailCode" :label="t('newSignup.item9')">
  108. <view style="display: flex; gap: 8px;">
  109. <view style="flex: 1;">
  110. <uni-easyinput :disabled="!isAgeValid || !formData.birthDate" v-model="formData.emailCode"
  111. :placeholder="t('newSignup.item10')">
  112. </uni-easyinput>
  113. </view>
  114. <view class="btn-code" @click="(!isAgeValid || !formData.birthDate) ? '' : handleGetCode()">
  115. {{ getCodeString }}
  116. </view>
  117. </view>
  118. </uni-forms-item>
  119. </uni-col>
  120. <uni-col :xs="24" :md="24">
  121. <view class="agreemnet9">*{{ t('signup.agreemnet9') }}</view>
  122. </uni-col>
  123. <uni-col :xs="24" :md="12">
  124. <uni-forms-item name="password" :label="t('newSignup.item12')">
  125. <uni-easyinput v-model.trim="formData.password" :disabled="!isAgeValid || !formData.birthDate"
  126. :placeholder="t('newSignup.item13')" type="password"></uni-easyinput>
  127. </uni-forms-item>
  128. <uni-col :xs="24" :md="24">
  129. <uni-forms-item>
  130. <ul class="pwd">
  131. <li :class="{ fit: rule1 }" v-t="'signup.form.rules.1st'"></li>
  132. <li :class="{ fit: rule2 }" v-t="'signup.form.rules.2nd'"></li>
  133. <li :class="{ fit: rule3 }" v-t="'signup.form.rules.3rd'"></li>
  134. </ul>
  135. </uni-forms-item>
  136. </uni-col>
  137. </uni-col>
  138. <uni-col :xs="24" :md="12">
  139. <uni-forms-item v-if="!isRouteHasId" name="linkValue" :label="t('newSignup.item14')">
  140. <uni-easyinput v-model.trim="formData.linkValue" :disabled="!isAgeValid || !formData.birthDate"
  141. :placeholder="t('newSignup.item15')" @input="limitAgentIdLength"></uni-easyinput>
  142. </uni-forms-item>
  143. </uni-col>
  144. </uni-row>
  145. <uni-forms-item name="agree">
  146. <view class="check-box" @click="toggleAgree">
  147. <up-checkbox-group v-model="agreeGroup" @change="onAgreeChange">
  148. <up-checkbox size="14" labelSize="14" labelColor="#666666" activeColor="#ea002a" name="agree"
  149. class="wcg-checkbox"></up-checkbox>
  150. </up-checkbox-group>
  151. <text class="checkbox-label">{{ t('signup.agree') }}</text>
  152. </view>
  153. </uni-forms-item>
  154. <uni-forms-item name="isSubscribeEmail">
  155. <view class="check-box" @click="toggleSubscribeEmail">
  156. <up-checkbox-group v-model="subscribeEmailGroup" @change="onSubscribeEmailChange">
  157. <up-checkbox size="14" labelSize="14" labelColor="#666666" activeColor="#ea002a"
  158. name="subscribeEmail" class="wcg-checkbox"></up-checkbox>
  159. </up-checkbox-group>
  160. <text class="checkbox-label">{{ t('signup.agree1') }}</text>
  161. </view>
  162. </uni-forms-item>
  163. </uni-forms>
  164. </view>
  165. <view>
  166. <u-button class="regiset-btn" @click="register">
  167. {{ t('signup.button') }}
  168. </u-button>
  169. </view>
  170. <view class="login-link">
  171. <text>{{ t('newSignup.item16') }}</text>
  172. <navigator url="/pages/login/index" class="link" hover-class="none">{{ t('newSignup.item17') }}
  173. </navigator>
  174. </view>
  175. <view class="des-bottom">
  176. <text v-t="'signup.agreemnet1'"></text>
  177. <cwg-link type="pdf" url='pdf/Client_Agreement.pdf' target="_blank" :title="'signup.agreemnet2'"
  178. class="desc-link" />
  179. <text v-t="'signup.agreemnet3'"></text>
  180. <cwg-link type="pdf" url='pdf/Terms&Conditions.pdf' target="_blank" :title="'signup.agreemnet4'"
  181. class="desc-link" />
  182. <text v-t="'signup.agreemnet5'"></text>
  183. <cwg-link type="pdf" url='pdf/Privacy_Policy.pdf' target="_blank" :title="'signup.agreemnet6'"
  184. class="desc-link" />
  185. <text v-t="'signup.agreemnet7'"></text>
  186. </view>
  187. </view>
  188. </uni-col>
  189. </uni-row>
  190. </view>
  191. <view class="chat-icon" :class="{ 'chat-icon-expanded': isChatIconExpanded, 'chat-icon-hidden': type == 'chat' }"
  192. @click="handleChatIconClick">
  193. <cwg-icon name="chat" color="#fff" />
  194. </view>
  195. </view>
  196. </template>
  197. <script setup>
  198. import { ref, watch, onMounted, computed } from 'vue'
  199. import { useI18n } from 'vue-i18n'
  200. import { useEmailCountdown } from '@/hooks/useEmailCountdown'
  201. import { loginApi } from '@/api/login'
  202. import { countryApi } from '@/api/country'
  203. import Config from '@/config/index'
  204. import { showToast } from '@/utils/toast'
  205. import { onLoad } from '@dcloudio/uni-app'
  206. import useUserStore from '@/stores/use-user-store'
  207. import { userToken } from '@/composables/config'
  208. import { userApi } from '@/api/user'
  209. import { openLocalPdf } from '@/utils/pdf.js'
  210. import ImportModel from './components/ImportModel.vue'
  211. import logoImage from '@/static/images/logo3.png'
  212. import QrCode from '@/components/QrCode.vue'
  213. import LoginHeaderGroup from './components/LoginHeaderGroup.vue'
  214. import { useWindowWidth } from '@/composables/useWindowWidth'
  215. const windowWidth = useWindowWidth(300)
  216. const isMobile = computed(() => windowWidth.value <= 991)
  217. const { t } = useI18n()
  218. const { Code } = Config
  219. const userStore = useUserStore()
  220. import LiveChatService from '@/utils/liveChat.js'
  221. const {
  222. time,
  223. text: getCodeString,
  224. canSend,
  225. start,
  226. restore,
  227. } = useEmailCountdown()
  228. const status = ref(false)
  229. const isRouteHasId = ref(false)
  230. const formData = ref({
  231. country: 'CN',
  232. phone: '',
  233. birthDate: '',
  234. email: '',
  235. code: '',
  236. password: '',
  237. linkValue: '',
  238. agree: 0,
  239. isSubscribeEmail: 0,
  240. sourceCode: null,
  241. w: '',
  242. subId: '',
  243. oc: '',
  244. agentId: null,
  245. ibInvalid: null,
  246. })
  247. const rules = {
  248. country: { rules: [{ required: true, errorMessage: t('vaildate.country.empty'), trigger: 'blur' }] },
  249. email: {
  250. rules: [
  251. { required: true, errorMessage: t('vaildate.email.empty'), trigger: 'blur' },
  252. { pattern: Config.Pattern.Email, errorMessage: t('vaildate.email.format'), trigger: 'blur' },
  253. ],
  254. },
  255. emailCode: { rules: [{ required: true, errorMessage: t('vaildate.code.empty'), trigger: 'blur' }] },
  256. password: {
  257. rules: [
  258. { required: true, errorMessage: t('vaildate.password.format'), trigger: 'blur' },
  259. { pattern: Config.Pattern.Password, errorMessage: t('vaildate.password.format'), trigger: 'blur' },
  260. ],
  261. },
  262. agree: {
  263. rules: [
  264. {
  265. validateFunction: (rule, value) => {
  266. if (value) return true
  267. return t('vaildate.agree.empty')
  268. },
  269. trigger: 'change',
  270. },
  271. ],
  272. },
  273. phone: {
  274. rules: [
  275. { required: true, errorMessage: t('vaildate.phone.format'), trigger: 'blur' },
  276. { pattern: Config.Pattern.NonNegInt, errorMessage: t('vaildate.phone.format'), trigger: 'blur' },
  277. ],
  278. },
  279. birthDate: { rules: [{ required: true, errorMessage: t('vaildate.birthDate.empty'), trigger: 'change' }] },
  280. }
  281. const agreeGroup = ref([])
  282. const subscribeEmailGroup = ref([])
  283. watch(() => formData.value.agree, (val) => {
  284. agreeGroup.value = val === 1 ? ['agree'] : []
  285. }, { immediate: true })
  286. watch(() => formData.value.isSubscribeEmail, (val) => {
  287. subscribeEmailGroup.value = val === 1 ? ['subscribeEmail'] : []
  288. }, { immediate: true })
  289. const onAgreeChange = (e) => {
  290. formData.value.agree = e && e.length ? 1 : 0
  291. }
  292. const onSubscribeEmailChange = (e) => {
  293. formData.value.isSubscribeEmail = e && e.length ? 1 : 0
  294. }
  295. const toggleAgree = () => {
  296. const next = agreeGroup.value.length ? [] : ['agree']
  297. agreeGroup.value = next
  298. onAgreeChange(next)
  299. }
  300. const isChatIconExpanded = ref(false)
  301. // 处理聊天图标点击
  302. const handleChatIconClick = () => {
  303. // 如果还没显示 → 先滑出来
  304. if (!isChatIconExpanded.value) {
  305. isChatIconExpanded.value = true
  306. return
  307. }
  308. if (isMobile.value) {
  309. router.push('/pages/common/chat')
  310. } else {
  311. if (LiveChatService) {
  312. LiveChatService.showChat();
  313. }
  314. }
  315. setTimeout(() => {
  316. isChatIconExpanded.value = false
  317. }, 300)
  318. }
  319. const toggleSubscribeEmail = () => {
  320. const next = subscribeEmailGroup.value.length ? [] : ['subscribeEmail']
  321. subscribeEmailGroup.value = next
  322. onSubscribeEmailChange(next)
  323. }
  324. const rule1 = computed(() => {
  325. if (!formData.value.password) return false
  326. return /^.{8,16}$/.test(formData.value.password)
  327. })
  328. const rule2 = computed(() => {
  329. return /^(?=.*?[a-z])(?=.*?[A-Z]).*$/.test(formData.value.password)
  330. })
  331. const rule3 = computed(() => {
  332. return /^(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?!.*([~!@&%$^\(\)#_]).*\1.*\1)[A-Za-z0-9~!@&%$^\(\)#_]{8,16}$/.test(
  333. formData.value.password,
  334. )
  335. })
  336. const openUrl = (url) => {
  337. openLocalPdf(url)
  338. }
  339. // 检查是否满18周岁
  340. const isAgeValid = computed(() => {
  341. if (!formData.value.birthDate) {
  342. return false // 如果还没选择日期,不允许继续
  343. }
  344. const today = new Date()
  345. const birthDate = new Date(formData.value.birthDate)
  346. let age = today.getFullYear() - birthDate.getFullYear()
  347. const monthDiff = today.getMonth() - birthDate.getMonth()
  348. if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
  349. age--
  350. }
  351. return age >= 18
  352. })
  353. // 检查年龄并提示
  354. const checkAge = () => {
  355. if (formData.value.birthDate && !isAgeValid.value) {
  356. uni.showModal({
  357. title: t('Msg.SystemPrompt'),
  358. content: t('signup.ageRestriction'),
  359. showCancel: false,
  360. confirmText: t('Btn.Confirm'),
  361. success: function (res) {
  362. if (res.confirm) {
  363. // 用户点击确认后的操作
  364. }
  365. },
  366. })
  367. }
  368. }
  369. const limitAgentIdLength = (val) => {
  370. if (val == null || val === '') return
  371. // 推荐码只能输入数字和英文
  372. const filtered = val.toString().replace(/[^0-9a-zA-Z]/g, '').slice(0, 10)
  373. if (formData.value.linkValue !== filtered) {
  374. formData.value.linkValue = filtered
  375. }
  376. }
  377. onLoad((options) => {
  378. if (options) {
  379. formData.value.sourceCode = options.ex || null
  380. formData.value.w = options.w || ''
  381. formData.value.subId = options.SUBID || ''
  382. formData.value.oc = options.oc || ''
  383. formData.value.email = options.emailAdvertisement || ''
  384. console.log(options, '-----')
  385. if (options.id) {
  386. isRouteHasId.value = true
  387. formData.value.agentId = Number(options.id)
  388. formData.value.linkValue = options.commission || ''
  389. switch (options.ibInvalid) {
  390. case 'B0':
  391. formData.value.ibInvalid = 0
  392. break
  393. case 'B1':
  394. formData.value.ibInvalid = 1
  395. break
  396. }
  397. }
  398. }
  399. })
  400. const ho = ref('')
  401. const form = ref(null)
  402. const value = ref('')
  403. const mock_options = ref([])
  404. const countryCode = ref('my')
  405. const countryOptions = computed(() => {
  406. return mock_options.value.map(item => ({
  407. text: item.enName,
  408. value: item.code,
  409. disabled: item.isOpenAccount == 0 || item.isOpenAccount === null ? true : false,
  410. }))
  411. })
  412. // 国家列表
  413. async function getCountry() {
  414. try {
  415. let res = await countryApi.Country({})
  416. if (res.code == 200) { // Code.StatusOK
  417. mock_options.value = res.data
  418. } else {
  419. showToast(res.msg)
  420. }
  421. } catch (error) {
  422. console.error(error)
  423. }
  424. }
  425. //获取当前国家编码
  426. const getCountryMsg = async () => {
  427. let res = await countryApi.CountryGet({})
  428. if (res.code == Code.StatusOK) {
  429. countryCode.value = res.msg
  430. } else {
  431. console.log(res)
  432. }
  433. }
  434. // 获取验证码按钮点击
  435. async function handleGetCode() {
  436. if (!formData.value.birthDate) {
  437. showToast(t('vaildate.birthDate.empty'))
  438. return
  439. }
  440. if (!isAgeValid.value) {
  441. showToast(t('signup.ageRestriction'))
  442. return
  443. }
  444. if (!formData.value.country) {
  445. showToast(t('vaildate.country.empty'))
  446. return
  447. }
  448. if (!formData.value.email) {
  449. showToast(t('vaildate.email.empty'))
  450. return
  451. }
  452. if (!Config.Pattern.Email.test(formData.value.email)) {
  453. showToast(t('vaildate.email.format'))
  454. return
  455. }
  456. if (!canSend.value) return
  457. await sendEmailCode()
  458. }
  459. // 发送邮箱验证码
  460. async function sendEmailCode() {
  461. const res = await loginApi.Code({
  462. ...formData.value,
  463. })
  464. if (res.code === 200) {
  465. showToast(t('Msg.CodeSuccess'))
  466. start()
  467. return true
  468. } else {
  469. showToast(t('Msg.CodeFail'))
  470. return false
  471. }
  472. }
  473. const handleModelConfirm = () => {
  474. // 弹窗确认后的处理
  475. status.value = false
  476. }
  477. const register = async () => {
  478. if (countryCode.value == 'MY' || countryCode.value == 'ID') {
  479. status.value = true
  480. return
  481. }
  482. form.value.validate().then(async (res) => {
  483. // 中国(含港澳台)使用 X-System: B,非中国使用 X-System: A
  484. const chinaCountryCodes = ['CN']
  485. const isChina = chinaCountryCodes.includes(formData.value.country)
  486. const xSystemValue = isChina ? 'B' : 'A'
  487. let resData = await loginApi.Register(
  488. { ...formData.value },
  489. { headers: { 'X-System': xSystemValue } },
  490. )
  491. if (resData.code == 200) { // Code.StatusOK
  492. showToast(t('Msg.registerSuc'))
  493. login()
  494. } else {
  495. showToast(resData.msg)
  496. }
  497. }).catch(err => {
  498. console.log('表单错误信息:', err)
  499. showToast(err.msg)
  500. return false
  501. })
  502. }
  503. const login = async () => {
  504. try {
  505. let res = await userApi.login({
  506. loginName: formData.value.email,
  507. password: formData.value.password,
  508. })
  509. if (res.code == 200) { // Code.StatusOK
  510. userToken.value = res.data
  511. getLoginInfo()
  512. } else {
  513. showToast(res.msg)
  514. }
  515. } catch (error) {
  516. console.error(error)
  517. }
  518. }
  519. const getLoginInfo = async () => {
  520. try {
  521. let res = await userApi.getUserInfo()
  522. if (res.code == 200) { // Code.StatusOK
  523. userStore.saveUserInfo(res.data)
  524. showToast(t('Msg.LoginSuccess'))
  525. setTimeout(() => {
  526. uni.reLaunch({
  527. url: '/pages/customer/index',
  528. })
  529. // this.$store.commit("isActiveTab", "0"); (可能需要适配相应的逻辑)
  530. }, 1000)
  531. } else {
  532. showToast(t('Msg.SystemError'))
  533. }
  534. } catch (error) {
  535. console.error(error)
  536. }
  537. }
  538. onMounted(() => {
  539. getCountry()
  540. getCountryMsg()
  541. const hostParts = window.location.host.split('.')
  542. ho.value = hostParts.length > 1 ? hostParts[1] : ''
  543. })
  544. </script>
  545. <style lang="scss" scoped>
  546. .chat-icon {
  547. width: px2rpx(50);
  548. height: px2rpx(50);
  549. border-radius: 50%;
  550. background-color: #cf1322;
  551. display: flex;
  552. align-items: center;
  553. justify-content: center;
  554. position: fixed;
  555. bottom: px2rpx(25);
  556. right: px2rpx(-25);
  557. z-index: 999;
  558. cursor: pointer;
  559. transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  560. box-shadow: 0 px2rpx(8) px2rpx(20) rgba(0, 0, 0, 0.15);
  561. will-change: transform;
  562. }
  563. .chat-icon:hover {
  564. transform: scale(1.1);
  565. }
  566. .chat-icon-expanded {
  567. bottom: px2rpx(20);
  568. right: px2rpx(20);
  569. transform: scale(1.1);
  570. box-shadow: 0 px2rpx(12) px2rpx(30) rgba(0, 0, 0, 0.2);
  571. }
  572. .chat-icon-hidden {
  573. display: none;
  574. }
  575. .pwd {
  576. list-style: none;
  577. padding-left: 0;
  578. margin: 0;
  579. li {
  580. font-size: px2rpx(12);
  581. color: #999;
  582. line-height: px2rpx(20);
  583. position: relative;
  584. padding-left: px2rpx(16);
  585. &::before {
  586. content: '';
  587. position: absolute;
  588. left: 0;
  589. top: 50%;
  590. transform: translateY(-50%);
  591. width: px2rpx(6);
  592. height: px2rpx(6);
  593. border-radius: 50%;
  594. background-color: #999;
  595. }
  596. &.fit {
  597. color: #67c23a;
  598. &::before {
  599. background-color: #67c23a;
  600. }
  601. }
  602. }
  603. }
  604. </style>
  605. <style lang="scss" scoped>
  606. @import "@/uni.scss";
  607. :deep(uni-content) {
  608. padding-left: 0 !important;
  609. }
  610. .regist-page {
  611. height: 100vh;
  612. border: none;
  613. padding: 0;
  614. position: relative;
  615. display: flex;
  616. flex-direction: column;
  617. }
  618. .fixed {
  619. width: 100%;
  620. height: var(--status-bar-height);
  621. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  622. z-index: 9;
  623. }
  624. .global-header-bar {
  625. width: 100%;
  626. height: px2rpx(60);
  627. display: flex;
  628. align-items: center;
  629. justify-content: center;
  630. flex-shrink: 0;
  631. z-index: 100;
  632. &.pc-header {
  633. background-color: transparent;
  634. }
  635. .header-inner {
  636. width: 100%;
  637. padding: 0 5%;
  638. display: flex;
  639. justify-content: space-between;
  640. /* 两端对齐,可放logo和组件 */
  641. align-items: center;
  642. }
  643. }
  644. .mobile-header-bar {
  645. //position: absolute;
  646. //top: px2rpx(20);
  647. //right: px2rpx(20);
  648. z-index: 10;
  649. width: 100%;
  650. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  651. display: flex;
  652. justify-content: flex-end;
  653. }
  654. .main-content {
  655. flex: 1;
  656. overflow: hidden;
  657. background-image: url(/static/images/login-bg.gif);
  658. background-repeat: no-repeat;
  659. background-size: cover;
  660. background-position: center center;
  661. }
  662. .demo-uni-row {
  663. height: 100%;
  664. margin: 0 !important;
  665. .left-bg {
  666. height: 100%;
  667. min-height: calc(100vh - 120px);
  668. display: flex;
  669. flex-direction: column;
  670. align-items: center;
  671. justify-content: center;
  672. .left-box {
  673. display: flex;
  674. flex-direction: column;
  675. justify-content: center;
  676. align-items: flex-start;
  677. width: 60%;
  678. //margin-top: px2rpx(0);
  679. .inner {
  680. width: 100%;
  681. text-align: start;
  682. margin-bottom: px2rpx(20);
  683. .section-title {
  684. margin-top: px2rpx(10);
  685. margin-bottom: px2rpx(10);
  686. }
  687. .title {
  688. font-size: px2rpx(50);
  689. line-height: 1.3;
  690. color: #fff;
  691. font-weight: 700;
  692. text-align: left;
  693. }
  694. .w-700 {
  695. font-weight: 700;
  696. }
  697. .subtitle {
  698. width: 45%;
  699. font-size: px2rpx(18);
  700. letter-spacing: px2rpx(1);
  701. display: block;
  702. margin-bottom: px2rpx(24);
  703. color: #ffffff;
  704. line-height: px2rpx(15);
  705. font-weight: 500;
  706. padding: px2rpx(10) px2rpx(20);
  707. border-radius: px2rpx(100);
  708. text-transform: uppercase;
  709. background-color: #e61f1e;
  710. text-align: center;
  711. }
  712. .w-40 {
  713. max-width: 40%;
  714. }
  715. .text-white {
  716. margin-top: px2rpx(10);
  717. font-size: px2rpx(14);
  718. line-height: 1.6;
  719. color: #fff;
  720. }
  721. }
  722. .img-fluid {
  723. width: 100%;
  724. max-width: px2rpx(240);
  725. }
  726. .mt--10 {
  727. margin-top: px2rpx(10);
  728. }
  729. .h1 {
  730. // text-align: center;
  731. color: #fff;
  732. font-size: 30px;
  733. margin-top: 30px;
  734. line-height: 1.5;
  735. }
  736. .h6 {
  737. text-align: start;
  738. line-height: 20px;
  739. color: #fff;
  740. font-size: 14px;
  741. margin-top: 10px;
  742. }
  743. .company {
  744. padding: px2rpx(10) 0 px2rpx(10) 0;
  745. position: relative;
  746. align-items: flex-start !important;
  747. width: 100%;
  748. }
  749. }
  750. .left-content {
  751. width: 100%;
  752. .des {
  753. text-align: start;
  754. line-height: 24px;
  755. color: #fff;
  756. font-size: 14px;
  757. margin-top: px2rpx(20);
  758. padding: 0;
  759. :nth-child(n) {
  760. display: inline;
  761. word-break: break-all;
  762. word-wrap: break-word;
  763. }
  764. .doc-link {
  765. color: #e61f1e;
  766. text-decoration: underline;
  767. margin: 0 px2rpx(4);
  768. }
  769. }
  770. }
  771. }
  772. .right-f {
  773. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  774. padding: 0 px2rpx(24);
  775. height: 100%;
  776. box-sizing: border-box;
  777. .account {
  778. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  779. position: relative;
  780. height: calc(100vh - 120px);
  781. overflow-y: auto;
  782. display: flex;
  783. flex-direction: column;
  784. padding: px2rpx(32) 10%;
  785. .title {
  786. margin: px2rpx(32) 0;
  787. font-size: px2rpx(24);
  788. font-weight: bolder;
  789. color: #e4e4e4;
  790. text-align: center;
  791. i {
  792. margin-right: px2rpx(10);
  793. }
  794. .tit1 {
  795. font-size: px2rpx(34);
  796. line-height: 1.5;
  797. font-weight: bold;
  798. color: #000000;
  799. }
  800. .tit2 {
  801. font-size: px2rpx(16);
  802. line-height: 1.5;
  803. color: #cecece;
  804. font-weight: 500;
  805. }
  806. }
  807. .company {
  808. padding: px2rpx(50) 0 px2rpx(20) 0;
  809. position: relative;
  810. align-items: center !important;
  811. }
  812. .company-icon {
  813. width: px2rpx(234);
  814. }
  815. }
  816. }
  817. }
  818. .content-wrapper {
  819. max-width: px2rpx(1224);
  820. width: 100%;
  821. margin: 0 auto;
  822. padding-top: px2rpx(20);
  823. box-sizing: border-box;
  824. display: flex;
  825. flex-direction: column;
  826. justify-content: space-between;
  827. min-height: calc(100vh - 56px);
  828. }
  829. .regist-content {
  830. display: flex;
  831. align-items: center;
  832. justify-content: center;
  833. }
  834. .content {
  835. width: px2rpx(650);
  836. margin: 0 auto;
  837. }
  838. .regist-header {
  839. display: flex;
  840. justify-content: space-between;
  841. align-items: flex-end;
  842. margin: px2rpx(40) 0 px2rpx(20);
  843. padding-bottom: px2rpx(10);
  844. .title {
  845. font-size: px2rpx(28);
  846. font-weight: bold;
  847. color: #fff;
  848. line-height: 1;
  849. }
  850. .login-link {
  851. font-size: px2rpx(14);
  852. color: #fff;
  853. display: flex;
  854. align-items: center;
  855. line-height: 1;
  856. .text {
  857. margin-right: px2rpx(4);
  858. }
  859. }
  860. }
  861. .login-link {
  862. margin-top: px2rpx(20);
  863. text-align: start;
  864. display: flex;
  865. align-items: center;
  866. font-size: px2rpx(16);
  867. line-height: 1.6;
  868. }
  869. .link {
  870. color: #e61f1e;
  871. padding-bottom: 2px;
  872. cursor: pointer;
  873. font-size: px2rpx(14);
  874. }
  875. //display: flex;
  876. .logo {
  877. width: 100%;
  878. margin-top: px2rpx(40);
  879. display: flex;
  880. align-items: center;
  881. justify-content: center;
  882. }
  883. .agreemnet9 {
  884. text-align: initial;
  885. color: #e61f1e;
  886. }
  887. .company-icon {
  888. width: px2rpx(234);
  889. }
  890. .account-type {
  891. width: 100%;
  892. margin-top: px2rpx(20);
  893. padding: px2rpx(10);
  894. background-color: $uni-bg-color-hover;
  895. height: px2rpx(60);
  896. box-sizing: border-box;
  897. border-radius: px2rpx(20);
  898. display: flex;
  899. align-items: center;
  900. .type-btn {
  901. width: 50%;
  902. text-align: center;
  903. height: px2rpx(40);
  904. border-radius: px2rpx(20);
  905. line-height: px2rpx(40);
  906. font-size: px2rpx(18);
  907. cursor: pointer;
  908. &.active {
  909. background-color: var(--primary-color);
  910. }
  911. }
  912. }
  913. .formStyle {
  914. height: px2rpx(40);
  915. }
  916. .account-tip {
  917. width: 100%;
  918. text-align: center;
  919. margin: px2rpx(30) 0;
  920. .title {
  921. font-size: px2rpx(26);
  922. font-weight: bold;
  923. }
  924. .tip {
  925. margin-top: px2rpx(5);
  926. color: var(--gray);
  927. }
  928. }
  929. .formContent {
  930. padding: 0 10px;
  931. }
  932. // 修改表单组件高度。
  933. :deep(.uni-stat-box) {
  934. height: 100%;
  935. }
  936. :deep(.uni-select) {
  937. height: 100%;
  938. }
  939. :deep(.uni-easyinput__content) {
  940. height: 100%;
  941. }
  942. :deep(.uni-date-editor) {
  943. height: 100%;
  944. }
  945. :deep(.uni-date-editor--x) {
  946. height: 100%;
  947. }
  948. .btn-code {
  949. width: 120px;
  950. height: px2rpx(37);
  951. box-sizing: border-box;
  952. background-color: #102047;
  953. border: 1px solid rgb(229, 229, 229);
  954. color: #fff;
  955. text-align: center;
  956. line-height: px2rpx(35);
  957. border-radius: 4px;
  958. cursor: pointer;
  959. font-size: 14px;
  960. flex-shrink: 0;
  961. }
  962. .check-box {
  963. padding: 0 px2rpx(10);
  964. margin-bottom: px2rpx(10);
  965. display: flex;
  966. align-items: center;
  967. cursor: pointer;
  968. .checkbox-label {
  969. font-size: px2rpx(14);
  970. color: #666666;
  971. margin-left: px2rpx(8);
  972. user-select: none;
  973. }
  974. :deep(.u-checkbox) {
  975. display: flex;
  976. align-items: flex-start;
  977. }
  978. }
  979. .regiset-btn {
  980. width: 100%;
  981. height: px2rpx(40);
  982. border-radius: px2rpx(4);
  983. background-color: var(--color-error);
  984. color: #fff;
  985. font-weight: bold;
  986. }
  987. .or-title {
  988. font-size: px2rpx(16);
  989. line-height: 1.5;
  990. color: #333;
  991. font-weight: 500;
  992. text-align: center;
  993. margin: px2rpx(20) 0 px2rpx(18) 0;
  994. display: flex;
  995. align-items: center;
  996. justify-content: center;
  997. .line {
  998. flex: 1;
  999. height: 1px;
  1000. background-color: #e4e4e4;
  1001. }
  1002. .qr-tit2 {
  1003. margin: 0 px2rpx(12);
  1004. }
  1005. }
  1006. .login-btn {
  1007. width: 100%;
  1008. height: px2rpx(40);
  1009. border-radius: px2rpx(20);
  1010. background-color: #1EBF42;
  1011. color: #fff;
  1012. font-weight: bold;
  1013. margin-bottom: px2rpx(20);
  1014. }
  1015. .code-text {
  1016. padding-right: px2rpx(20);
  1017. }
  1018. .des-bottom {
  1019. margin-top: px2rpx(20);
  1020. line-height: 20px;
  1021. color: #000;
  1022. font-size: 12px;
  1023. .desc-link {
  1024. display: inline-block;
  1025. color: #e61f1e;
  1026. text-decoration: underline;
  1027. }
  1028. }
  1029. .des {
  1030. width: 100%;
  1031. box-sizing: border-box;
  1032. text-align: start;
  1033. line-height: 20px;
  1034. color: #000;
  1035. font-size: 12px;
  1036. padding: px2rpx(20) px2rpx(30);
  1037. //display: none;
  1038. :nth-child(n) {
  1039. display: inline;
  1040. word-break: break-all;
  1041. word-wrap: break-word;
  1042. }
  1043. a {
  1044. color: #e61f1e;
  1045. }
  1046. }
  1047. :deep(.u-text__value) {
  1048. color: #ea002a !important;
  1049. font-size: px2rpx(14) !important;
  1050. }
  1051. </style>