regist.vue 30 KB

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