index.vue 45 KB

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