regist.vue 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116
  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. justify-content: center;
  610. .left-box {
  611. display: flex;
  612. flex-direction: column;
  613. justify-content: center;
  614. align-items: flex-start;
  615. width: 60%;
  616. //margin-top: px2rpx(0);
  617. .inner {
  618. width: 100%;
  619. text-align: start;
  620. margin-bottom: px2rpx(20);
  621. .section-title {
  622. margin-top: px2rpx(10);
  623. margin-bottom: px2rpx(10);
  624. }
  625. .title {
  626. font-size: px2rpx(50);
  627. line-height: 1.3;
  628. color: #fff;
  629. font-weight: 700;
  630. text-align: left;
  631. }
  632. .w-700 {
  633. font-weight: 700;
  634. }
  635. .subtitle {
  636. width: 45%;
  637. font-size: px2rpx(18);
  638. letter-spacing: px2rpx(1);
  639. display: block;
  640. margin-bottom: px2rpx(24);
  641. color: #ffffff;
  642. line-height: px2rpx(15);
  643. font-weight: 500;
  644. padding: px2rpx(10) px2rpx(20);
  645. border-radius: px2rpx(100);
  646. text-transform: uppercase;
  647. background-color: #e61f1e;
  648. text-align: center;
  649. }
  650. .w-40 {
  651. max-width: 40%;
  652. }
  653. .text-white {
  654. margin-top: px2rpx(10);
  655. font-size: px2rpx(14);
  656. line-height: 1.6;
  657. color: #fff;
  658. }
  659. }
  660. .img-fluid {
  661. width: 100%;
  662. max-width: px2rpx(240);
  663. }
  664. .mt--10 {
  665. margin-top: px2rpx(10);
  666. }
  667. .h1 {
  668. // text-align: center;
  669. color: #fff;
  670. font-size: 30px;
  671. margin-top: 30px;
  672. line-height: 1.5;
  673. }
  674. .h6 {
  675. text-align: start;
  676. line-height: 20px;
  677. color: #fff;
  678. font-size: 14px;
  679. margin-top: 10px;
  680. }
  681. .company {
  682. padding: px2rpx(10) 0 px2rpx(10) 0;
  683. position: relative;
  684. align-items: flex-start !important;
  685. width: 100%;
  686. }
  687. }
  688. .left-content {
  689. width: 100%;
  690. .des {
  691. text-align: start;
  692. line-height: 24px;
  693. color: #fff;
  694. font-size: 14px;
  695. margin-top: px2rpx(20);
  696. padding: 0;
  697. :nth-child(n) {
  698. display: inline;
  699. word-break: break-all;
  700. word-wrap: break-word;
  701. }
  702. .doc-link {
  703. color: var(--color-error);
  704. text-decoration: underline;
  705. margin: 0 px2rpx(4);
  706. }
  707. }
  708. }
  709. }
  710. .right-f {
  711. background-color: var(--color-white);
  712. padding: 0 px2rpx(24);
  713. height: 100%;
  714. box-sizing: border-box;
  715. .account {
  716. background-color: var(--color-white);
  717. position: relative;
  718. height: calc(100vh - 120px);
  719. overflow-y: auto;
  720. display: flex;
  721. flex-direction: column;
  722. padding: px2rpx(32) 10%;
  723. .title {
  724. margin: px2rpx(32) 0;
  725. font-size: px2rpx(24);
  726. font-weight: bolder;
  727. color: #e4e4e4;
  728. text-align: center;
  729. i {
  730. margin-right: px2rpx(10);
  731. }
  732. .tit1 {
  733. font-size: px2rpx(34);
  734. line-height: 1.5;
  735. font-weight: bold;
  736. color: #000000;
  737. }
  738. .tit2 {
  739. font-size: px2rpx(16);
  740. line-height: 1.5;
  741. color: #cecece;
  742. font-weight: 500;
  743. }
  744. }
  745. .company {
  746. padding: px2rpx(50) 0 px2rpx(20) 0;
  747. position: relative;
  748. align-items: center !important;
  749. }
  750. .company-icon {
  751. width: px2rpx(234);
  752. }
  753. }
  754. }
  755. }
  756. .content-wrapper {
  757. max-width: px2rpx(1224);
  758. width: 100%;
  759. margin: 0 auto;
  760. padding-top: px2rpx(20);
  761. box-sizing: border-box;
  762. display: flex;
  763. flex-direction: column;
  764. justify-content: space-between;
  765. min-height: calc(100vh - 56px);
  766. }
  767. .regist-content {
  768. display: flex;
  769. align-items: center;
  770. justify-content: center;
  771. }
  772. .content {
  773. width: px2rpx(650);
  774. margin: 0 auto;
  775. }
  776. .regist-header {
  777. display: flex;
  778. justify-content: space-between;
  779. align-items: flex-end;
  780. margin: px2rpx(40) 0 px2rpx(20);
  781. padding-bottom: px2rpx(10);
  782. .title {
  783. font-size: px2rpx(28);
  784. font-weight: bold;
  785. color: #141d22;
  786. line-height: 1;
  787. }
  788. .login-link {
  789. font-size: px2rpx(14);
  790. color: #141d22;
  791. display: flex;
  792. align-items: center;
  793. line-height: 1;
  794. .text {
  795. margin-right: px2rpx(4);
  796. }
  797. }
  798. }
  799. .login-link{
  800. margin-top: px2rpx(20);
  801. text-align: start;
  802. display: flex;
  803. align-items: center;
  804. font-size: px2rpx(16);
  805. line-height: 1.6;
  806. }
  807. .link {
  808. color: #e61f1e;
  809. padding-bottom: 2px;
  810. cursor: pointer;
  811. font-size: px2rpx(14);
  812. }
  813. //display: flex;
  814. .logo {
  815. width: 100%;
  816. margin-top: px2rpx(40);
  817. display: flex;
  818. align-items: center;
  819. justify-content: center;
  820. }
  821. .agreemnet9 {
  822. text-align: initial;
  823. color: #e61f1e;
  824. }
  825. .company-icon {
  826. width: px2rpx(234);
  827. }
  828. .account-type {
  829. width: 100%;
  830. margin-top: px2rpx(20);
  831. padding: px2rpx(10);
  832. background-color: $uni-bg-color-hover;
  833. height: px2rpx(60);
  834. box-sizing: border-box;
  835. border-radius: px2rpx(20);
  836. display: flex;
  837. align-items: center;
  838. .type-btn {
  839. width: 50%;
  840. text-align: center;
  841. height: px2rpx(40);
  842. border-radius: px2rpx(20);
  843. line-height: px2rpx(40);
  844. font-size: px2rpx(18);
  845. cursor: pointer;
  846. &.active {
  847. background-color: var(--primary-color);
  848. }
  849. }
  850. }
  851. .formStyle {
  852. height: px2rpx(40);
  853. }
  854. .account-tip {
  855. width: 100%;
  856. text-align: center;
  857. margin: px2rpx(30) 0;
  858. .title {
  859. font-size: px2rpx(26);
  860. font-weight: bold;
  861. }
  862. .tip {
  863. margin-top: px2rpx(5);
  864. color: var(--gray);
  865. }
  866. }
  867. .formContent {
  868. padding: 0 10px;
  869. }
  870. // 修改表单组件高度。
  871. :deep(.uni-stat-box) {
  872. height: 100%;
  873. }
  874. :deep(.uni-select) {
  875. height: 100%;
  876. }
  877. :deep(.uni-easyinput__content) {
  878. height: 100%;
  879. }
  880. :deep(.uni-date-editor) {
  881. height: 100%;
  882. }
  883. :deep(.uni-date-editor--x) {
  884. height: 100%;
  885. }
  886. .btn-code {
  887. width: 120px;
  888. height: px2rpx(37);
  889. box-sizing: border-box;
  890. background-color: #102047;
  891. border: 1px solid rgb(229, 229, 229);
  892. color: #fff;
  893. text-align: center;
  894. line-height: px2rpx(35);
  895. border-radius: 4px;
  896. cursor: pointer;
  897. font-size: 14px;
  898. flex-shrink: 0;
  899. }
  900. .check-box {
  901. padding: 0 px2rpx(10);
  902. margin-bottom: px2rpx(10);
  903. display: flex;
  904. align-items: center;
  905. cursor: pointer;
  906. .checkbox-label {
  907. font-size: px2rpx(14);
  908. color: #666666;
  909. margin-left: px2rpx(8);
  910. user-select: none;
  911. }
  912. :deep(.u-checkbox) {
  913. display: flex;
  914. align-items: flex-start;
  915. }
  916. }
  917. .regiset-btn {
  918. width: 100%;
  919. height: px2rpx(40);
  920. border-radius: px2rpx(4);
  921. background-color: var(--color-error);
  922. color: #fff;
  923. font-weight: bold;
  924. }
  925. .or-title {
  926. font-size: px2rpx(16);
  927. line-height: 1.5;
  928. color: #333;
  929. font-weight: 500;
  930. text-align: center;
  931. margin: px2rpx(20) 0 px2rpx(18) 0;
  932. display: flex;
  933. align-items: center;
  934. justify-content: center;
  935. .line {
  936. flex: 1;
  937. height: 1px;
  938. background-color: #e4e4e4;
  939. }
  940. .qr-tit2 {
  941. margin: 0 px2rpx(12);
  942. }
  943. }
  944. .login-btn {
  945. width: 100%;
  946. height: px2rpx(40);
  947. border-radius: px2rpx(20);
  948. background-color: #1EBF42;
  949. color: #fff;
  950. font-weight: bold;
  951. margin-bottom: px2rpx(20);
  952. }
  953. .code-text {
  954. padding-right: px2rpx(20);
  955. }
  956. .des-bottom {
  957. margin-top: px2rpx(20);
  958. line-height: 20px;
  959. color: #000;
  960. font-size: 12px;
  961. a {
  962. color: #e61f1e;
  963. }
  964. }
  965. .des {
  966. width: 100%;
  967. box-sizing: border-box;
  968. text-align: start;
  969. line-height: 20px;
  970. color: #000;
  971. font-size: 12px;
  972. padding: px2rpx(20) px2rpx(30);
  973. //display: none;
  974. :nth-child(n) {
  975. display: inline;
  976. word-break: break-all;
  977. word-wrap: break-word;
  978. }
  979. a {
  980. color: #e61f1e;
  981. }
  982. }
  983. :deep(.u-text__value) {
  984. color: #ea002a !important;
  985. font-size: px2rpx(14) !important;
  986. }
  987. </style>