index.vue 45 KB

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