index.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858
  1. <template>
  2. <view class="login-wrapper" :style="colorStyle">
  3. <view class="shading">
  4. <image :src="logoUrl" />
  5. <view v-if="configData && configData.site_name" class="name">
  6. {{ configData.site_name }}
  7. </view>
  8. </view>
  9. <view class="whiteBg" v-if="formItem === 1">
  10. <view class="list" v-if="current !== 1">
  11. <form @submit.prevent="submit">
  12. <view class="item">
  13. <view class="acea-row row-middle">
  14. <image src="../static/phone_1.png" style="width: 24rpx; height: 34rpx"></image>
  15. <input type="text" :placeholder="$t(`输入手机号码`)" v-model="account" maxlength="11" required />
  16. </view>
  17. </view>
  18. <view class="item">
  19. <view class="acea-row row-middle">
  20. <image src="../static/code_1.png" style="width: 28rpx; height: 32rpx"></image>
  21. <input type="password" :placeholder="$t(`填写登录密码`)" v-model="password" required />
  22. </view>
  23. </view>
  24. </form>
  25. <!-- <navigator class="forgetPwd" hover-class="none" url="/pages/users/retrievePassword/index">
  26. <span class="iconfont icon-wenti"></span>忘记密码
  27. </navigator> -->
  28. </view>
  29. <view class="list" v-if="current !== 0 || appLoginStatus || appleLoginStatus">
  30. <view class="item">
  31. <view class="acea-row row-middle">
  32. <image src="../static/phone_1.png" style="width: 24rpx; height: 34rpx"></image>
  33. <input type="text" :placeholder="$t(`输入手机号码`)" v-model="account" :maxlength="11" />
  34. </view>
  35. </view>
  36. <view class="item">
  37. <view class="acea-row row-middle">
  38. <image src="../static/code_2.png" style="width: 28rpx; height: 32rpx"></image>
  39. <input type="text" :placeholder="$t(`填写验证码`)" :maxlength="6" class="codeIput" v-model="captcha" />
  40. <button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" @click="code">
  41. {{ text }}
  42. </button>
  43. </view>
  44. </view>
  45. <!-- <view class="item" v-if="isShowCode">
  46. <view class="acea-row row-middle">
  47. <image src="../static/code_2.png" style="width: 28rpx; height: 32rpx;"></image>
  48. <input type="text" :placeholder="$t(`填写验证码`)" class="codeIput" v-model="codeVal" />
  49. <view class="code" @click="again"><img :src="codeUrl" /></view>
  50. </view>
  51. </view> -->
  52. </view>
  53. <view class="logon" @click="loginMobile" v-if="current !== 0">{{ $t(`登录`) }}</view>
  54. <view class="logon" @click="submit" v-if="current === 0">{{ $t(`登录`) }}</view>
  55. <!-- #ifndef APP-PLUS -->
  56. <view class="tips">
  57. <view v-if="current == 0" @click="current = 1">{{ $t(`快速登录`) }}</view>
  58. <view v-if="current == 1" @click="current = 0">{{ $t(`账号登录`) }}</view>
  59. </view>
  60. <!-- #endif -->
  61. <!-- #ifdef APP-PLUS -->
  62. <view class="appLogin" v-if="!appLoginStatus && !appleLoginStatus">
  63. <view class="hds">
  64. <span class="line"></span>
  65. <p>{{ $t(`其他方式登录`) }}</p>
  66. <span class="line"></span>
  67. </view>
  68. <view class="btn-wrapper">
  69. <view class="btn wx" @click="wxLogin">
  70. <span class="iconfont icon-s-weixindenglu1"></span>
  71. </view>
  72. <view class="btn mima" v-if="current == 1" @click="current = 0">
  73. <span class="iconfont icon-s-mimadenglu1"></span>
  74. </view>
  75. <view class="btn yanzheng" v-if="current == 0" @click="current = 1">
  76. <span class="iconfont icon-s-yanzhengmadenglu1"></span>
  77. </view>
  78. <view class="apple-btn" @click="appleLogin" v-if="appleShow">
  79. <view class="iconfont icon-s-pingguo"></view>
  80. </view>
  81. </view>
  82. </view>
  83. <!-- #endif -->
  84. <view class="protocol">
  85. <checkbox-group @change="ChangeIsDefault">
  86. <checkbox :class="inAnimation ? 'trembling' : ''" @animationend="inAnimation = false" :checked="protocol ? true : false" />
  87. {{ $t(`已阅读并同意`) }}
  88. <text class="main-color" @click="privacy(4)">{{ $t(`《用户协议》`) }}</text>
  89. {{ $t(`与`) }}
  90. <text class="main-color" @click="privacy(3)">{{ $t(`《隐私协议》`) }}</text>
  91. </checkbox-group>
  92. </view>
  93. </view>
  94. <view class="bottom">
  95. <view class="ver" v-if="copyRight">{{ copyRight }}</view>
  96. <view v-else class="ver">
  97. <a href="https://www.crmeb.com">Copyright ©2024 CRMEB. All Rights</a>
  98. </view>
  99. </view>
  100. <Verify @success="success" :captchaType="captchaType" :imgSize="{ width: '330px', height: '155px' }" ref="verify"></Verify>
  101. </view>
  102. </template>
  103. <script>
  104. import dayjs from '@/plugin/dayjs/dayjs.min.js';
  105. import sendVerifyCode from '@/mixins/SendVerifyCode';
  106. import { loginH5, loginMobile, registerVerify, register, getCodeApi, getUserInfo, appleLogin } from '@/api/user';
  107. import attrs, { required, alpha_num, chs_phone } from '@/utils/validate';
  108. import { getLogo } from '@/api/public';
  109. // import cookie from "@/utils/store/cookie";
  110. import { VUE_APP_API_URL } from '@/utils';
  111. // #ifdef APP-PLUS
  112. import { wechatAppAuth } from '@/api/api.js';
  113. // #endif
  114. const BACK_URL = 'login_back_url';
  115. import colors from '@/mixins/color.js';
  116. import Verify from '../components/verify/index.vue';
  117. import Cache from '@/utils/cache';
  118. export default {
  119. name: 'Login',
  120. components: {
  121. Verify
  122. },
  123. mixins: [sendVerifyCode, colors],
  124. data: function () {
  125. return {
  126. copyRight: '',
  127. inAnimation: false,
  128. protocol: false,
  129. navList: [this.$t(`快速登录`), this.$t(`账号登录`)],
  130. current: 1,
  131. account: '',
  132. password: '',
  133. captcha: '',
  134. formItem: 1,
  135. type: 'login',
  136. logoUrl: '',
  137. keyCode: '',
  138. codeUrl: '',
  139. codeVal: '',
  140. isShowCode: false,
  141. appLoginStatus: false, // 微信登录强制绑定手机号码状态
  142. appUserInfo: null, // 微信登录保存的用户信息
  143. appleLoginStatus: false, // 苹果登录强制绑定手机号码状态
  144. appleUserInfo: null,
  145. appleShow: false, // 苹果登录版本必须要求ios13以上的
  146. keyLock: true,
  147. captchaType: 'clickWord',
  148. configData: Cache.get('BASIC_CONFIG')
  149. };
  150. },
  151. watch: {
  152. formItem: function (nval, oVal) {
  153. if (nval == 1) {
  154. this.type = 'login';
  155. } else {
  156. this.type = 'register';
  157. }
  158. }
  159. },
  160. onLoad() {
  161. let self = this;
  162. uni.getSystemInfo({
  163. success: (res) => {
  164. if (res.platform.toLowerCase() == 'ios' && this.getSystem(res.system)) {
  165. self.appleShow = true;
  166. }
  167. }
  168. });
  169. if (uni.getStorageSync('copyRight').copyrightContext) {
  170. this.copyRight = uni.getStorageSync('copyRight').copyrightContext;
  171. }
  172. },
  173. mounted() {
  174. // this.getCode();
  175. this.getLogoImage();
  176. },
  177. methods: {
  178. ChangeIsDefault(e) {
  179. this.$set(this, 'protocol', !this.protocol);
  180. },
  181. privacy(type) {
  182. uni.navigateTo({
  183. url: '/pages/users/privacy/index?type=' + type
  184. });
  185. },
  186. // IOS 版本号判断
  187. getSystem(system) {
  188. let str;
  189. system.toLowerCase().indexOf('ios') === -1 ? (str = system) : (str = system.split(' ')[1]);
  190. if (str.indexOf('.')) return str.split('.')[0] >= 13;
  191. return str >= 13;
  192. },
  193. // 苹果登录
  194. appleLogin() {
  195. let self = this;
  196. this.account = '';
  197. this.captcha = '';
  198. if (!self.protocol) {
  199. this.inAnimation = true;
  200. return self.$util.Tips({
  201. title: '请先阅读并同意协议'
  202. });
  203. }
  204. uni.showLoading({
  205. title: this.$t(`登录中`)
  206. });
  207. uni.login({
  208. provider: 'apple',
  209. timeout: 10000,
  210. success(loginRes) {
  211. uni.getUserInfo({
  212. provider: 'apple',
  213. success: function (infoRes) {
  214. self.appleUserInfo = infoRes.userInfo;
  215. self.appleLoginApi();
  216. },
  217. fail() {
  218. uni.showToast({
  219. title: self.$t(`获取用户信息失败`),
  220. icon: 'none',
  221. duration: 2000
  222. });
  223. },
  224. complete() {
  225. uni.hideLoading();
  226. }
  227. });
  228. },
  229. fail(error) {
  230. console.log(error);
  231. }
  232. });
  233. },
  234. // 苹果登录Api
  235. appleLoginApi() {
  236. let self = this;
  237. appleLogin({
  238. openId: self.appleUserInfo.openId,
  239. email: self.appleUserInfo.email || '',
  240. phone: this.account,
  241. captcha: this.captcha
  242. })
  243. .then(({ data }) => {
  244. if (data.isbind) {
  245. uni.showModal({
  246. title: self.$t(`提示`),
  247. content: self.$t(`请绑定手机号后,继续操作`),
  248. showCancel: false,
  249. success: function (res) {
  250. if (res.confirm) {
  251. self.current = 1;
  252. self.appleLoginStatus = true;
  253. }
  254. }
  255. });
  256. } else {
  257. self.$store.commit('LOGIN', {
  258. token: data.token,
  259. time: data.expires_time - self.$Cache.time()
  260. });
  261. let backUrl = self.$Cache.get(BACK_URL) || '/pages/index/index';
  262. self.$Cache.clear(BACK_URL);
  263. self.$store.commit('SETUID', data.userInfo.uid);
  264. uni.reLaunch({
  265. url: backUrl
  266. });
  267. }
  268. })
  269. .catch((error) => {
  270. uni.showModal({
  271. title: self.$t(`提示`),
  272. content: self.$t(`错误信息`) + `${error}`,
  273. success: function (res) {
  274. if (res.confirm) {
  275. console.log(self.$t(`用户点击确定`));
  276. } else if (res.cancel) {
  277. console.log(self.$t(`用户点击取消`));
  278. }
  279. }
  280. });
  281. });
  282. },
  283. // App微信登录
  284. wxLogin() {
  285. let self = this;
  286. this.account = '';
  287. this.captcha = '';
  288. if (!self.protocol) {
  289. this.inAnimation = true;
  290. return self.$util.Tips({
  291. title: '请先阅读并同意协议'
  292. });
  293. }
  294. uni.showLoading({
  295. title: self.$t(`登录中`)
  296. });
  297. uni.login({
  298. provider: 'weixin',
  299. success: function (loginRes) {
  300. // 获取用户信息
  301. uni.getUserInfo({
  302. provider: 'weixin',
  303. success: function (infoRes) {
  304. self.appUserInfo = infoRes.userInfo;
  305. self.wxLoginApi();
  306. },
  307. fail() {
  308. uni.showToast({
  309. title: self.$t(`获取用户信息失败`),
  310. icon: 'none',
  311. duration: 2000
  312. });
  313. },
  314. complete() {
  315. uni.hideLoading();
  316. }
  317. });
  318. },
  319. fail() {
  320. uni.showToast({
  321. title: self.$t(`登录失败`),
  322. icon: 'none',
  323. duration: 2000
  324. });
  325. }
  326. });
  327. },
  328. wxLoginApi() {
  329. let self = this;
  330. wechatAppAuth({
  331. userInfo: self.appUserInfo,
  332. phone: this.account,
  333. code: this.captcha
  334. })
  335. .then(({ data }) => {
  336. if (data.isbind) {
  337. uni.showModal({
  338. title: self.$t(`提示`),
  339. content: self.$t(`请绑定手机号后,继续操作`),
  340. showCancel: false,
  341. success: function (res) {
  342. if (res.confirm) {
  343. self.current = 1;
  344. self.appLoginStatus = true;
  345. }
  346. }
  347. });
  348. } else {
  349. self.$store.commit('LOGIN', {
  350. token: data.token,
  351. time: data.expires_time - self.$Cache.time()
  352. });
  353. let backUrl = self.$Cache.get(BACK_URL) || '/pages/index/index';
  354. self.$Cache.clear(BACK_URL);
  355. self.$store.commit('SETUID', data.userInfo.uid);
  356. uni.reLaunch({
  357. url: backUrl
  358. });
  359. }
  360. })
  361. .catch((error) => {
  362. uni.showModal({
  363. title: self.$t(`提示`),
  364. content: self.$t(`错误信息`) + `${error}`,
  365. success: function (res) {
  366. if (res.confirm) {
  367. console.log(self.$t(`用户点击确定`));
  368. } else if (res.cancel) {
  369. console.log(self.$t(`用户点击取消`));
  370. }
  371. }
  372. });
  373. });
  374. },
  375. again() {
  376. this.codeUrl = VUE_APP_API_URL + '/sms_captcha?' + 'key=' + this.keyCode + Date.parse(new Date());
  377. },
  378. success(data) {
  379. this.$refs.verify.hide();
  380. getCodeApi()
  381. .then((res) => {
  382. this.keyCode = res.data.key;
  383. this.getCode(data);
  384. })
  385. .catch((res) => {
  386. this.$util.Tips({
  387. title: res
  388. });
  389. });
  390. },
  391. code() {
  392. let that = this;
  393. if (!that.protocol) {
  394. this.inAnimation = true;
  395. return that.$util.Tips({
  396. title: '请先阅读并同意协议'
  397. });
  398. }
  399. if (!that.account)
  400. return that.$util.Tips({
  401. title: that.$t(`请填写手机号码`)
  402. });
  403. if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account))
  404. return that.$util.Tips({
  405. title: that.$t(`请输入正确的手机号码`)
  406. });
  407. this.$refs.verify.show();
  408. },
  409. async getLogoImage() {
  410. let that = this;
  411. getLogo(2).then((res) => {
  412. that.logoUrl = res.data.logo_url;
  413. });
  414. },
  415. async loginMobile() {
  416. let that = this;
  417. if (!that.protocol) {
  418. this.inAnimation = true;
  419. return that.$util.Tips({
  420. title: '请先阅读并同意协议'
  421. });
  422. }
  423. if (!that.account)
  424. return that.$util.Tips({
  425. title: that.$t(`请填写手机号码`)
  426. });
  427. if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account))
  428. return that.$util.Tips({
  429. title: that.$t(`请输入正确的手机号码`)
  430. });
  431. if (!that.captcha)
  432. return that.$util.Tips({
  433. title: that.$t(`请填写验证码`)
  434. });
  435. if (!/^[\w\d]+$/i.test(that.captcha))
  436. return that.$util.Tips({
  437. title: that.$t(`请输入正确的验证码`)
  438. });
  439. if (that.appLoginStatus) {
  440. that.wxLoginApi();
  441. } else if (that.appleLoginStatus) {
  442. that.appleLoginApi();
  443. } else {
  444. if (this.keyLock) {
  445. this.keyLock = !this.keyLock;
  446. } else {
  447. return that.$util.Tips({
  448. title: that.$t(`请勿重复点击`)
  449. });
  450. }
  451. loginMobile({
  452. phone: that.account,
  453. captcha: that.captcha,
  454. spread: that.$Cache.get('spread'),
  455. agent_id: that.$Cache.get('agent_id') || 0
  456. })
  457. .then((res) => {
  458. let data = res.data;
  459. that.$store.commit('LOGIN', {
  460. token: data.token,
  461. time: data.expires_time - this.$Cache.time()
  462. });
  463. let backUrl = that.$Cache.get(BACK_URL) || '/pages/index/index';
  464. that.$Cache.clear(BACK_URL);
  465. getUserInfo().then((res) => {
  466. this.keyLock = true;
  467. that.$store.commit('SETUID', res.data.uid);
  468. if (backUrl.indexOf('/pages/users/login/index') !== -1) {
  469. backUrl = '/pages/index/index';
  470. }
  471. uni.reLaunch({
  472. url: backUrl
  473. });
  474. });
  475. })
  476. .catch((res) => {
  477. this.keyLock = true;
  478. that.$util.Tips({
  479. title: res
  480. });
  481. });
  482. }
  483. },
  484. async register() {
  485. let that = this;
  486. if (!that.protocol) {
  487. this.inAnimation = true;
  488. return that.$util.Tips({
  489. title: '请先阅读并同意协议'
  490. });
  491. }
  492. if (!that.account)
  493. return that.$util.Tips({
  494. title: that.$t(`请填写手机号码`)
  495. });
  496. if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account))
  497. return that.$util.Tips({
  498. title: that.$t(`请输入正确的手机号码`)
  499. });
  500. if (!that.captcha)
  501. return that.$util.Tips({
  502. title: that.$t(`请填写验证码`)
  503. });
  504. if (!/^[\w\d]+$/i.test(that.captcha))
  505. return that.$util.Tips({
  506. title: that.$t(`请输入正确的验证码`)
  507. });
  508. if (!that.password)
  509. return that.$util.Tips({
  510. title: that.$t(`请填写密码`)
  511. });
  512. if (/^([0-9]|[a-z]|[A-Z]){0,6}$/i.test(that.password))
  513. return that.$util.Tips({
  514. title: that.$t(`您输入的密码过于简单`)
  515. });
  516. register({
  517. account: that.account,
  518. captcha: that.captcha,
  519. password: that.password,
  520. spread: that.$Cache.get('spread')
  521. })
  522. .then((res) => {
  523. that.$util.Tips({
  524. title: res
  525. });
  526. that.formItem = 1;
  527. })
  528. .catch((res) => {
  529. that.$util.Tips({
  530. title: res
  531. });
  532. });
  533. },
  534. async getCode(data) {
  535. let that = this;
  536. if (!that.protocol) {
  537. this.inAnimation = true;
  538. return that.$util.Tips({
  539. title: '请先阅读并同意协议'
  540. });
  541. }
  542. if (!that.account)
  543. return that.$util.Tips({
  544. title: that.$t(`请填写手机号码`)
  545. });
  546. if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account))
  547. return that.$util.Tips({
  548. title: that.$t(`请输入正确的手机号码`)
  549. });
  550. if (that.formItem == 2) that.type = 'register';
  551. await registerVerify({
  552. phone: that.account,
  553. type: that.type,
  554. key: that.keyCode,
  555. captchaType: this.captchaType,
  556. captchaVerification: data.captchaVerification
  557. })
  558. .then((res) => {
  559. this.sendCode();
  560. that.$util.Tips({
  561. title: res.msg
  562. });
  563. })
  564. .catch((res) => {
  565. that.$util.Tips({
  566. title: res
  567. });
  568. });
  569. },
  570. navTap: function (index) {
  571. this.current = index;
  572. },
  573. async submit() {
  574. let that = this;
  575. if (!that.protocol) {
  576. this.inAnimation = true;
  577. return that.$util.Tips({
  578. title: '请先阅读并同意协议'
  579. });
  580. }
  581. if (!that.account)
  582. return that.$util.Tips({
  583. title: that.$t(`请填写账号`)
  584. });
  585. if (!/^[\w\d]{5,16}$/i.test(that.account))
  586. return that.$util.Tips({
  587. title: that.$t(`请输入正确的账号`)
  588. });
  589. if (!that.password)
  590. return that.$util.Tips({
  591. title: that.$t(`请填写密码`)
  592. });
  593. if (this.keyLock) {
  594. this.keyLock = !this.keyLock;
  595. } else {
  596. return that.$util.Tips({
  597. title: that.$t(`请勿重复点击`)
  598. });
  599. }
  600. loginH5({
  601. account: that.account,
  602. password: that.password,
  603. spread: that.$Cache.get('spread'),
  604. agent_id: that.$Cache.get('agent_id') || 0
  605. })
  606. .then(({ data }) => {
  607. that.$store.commit('LOGIN', {
  608. token: data.token,
  609. time: data.expires_time - this.$Cache.time()
  610. });
  611. let backUrl = that.$Cache.get(BACK_URL) || '/pages/index/index';
  612. that.$Cache.clear(BACK_URL);
  613. getUserInfo()
  614. .then((res) => {
  615. this.keyLock = true;
  616. that.$store.commit('SETUID', res.data.uid);
  617. uni.reLaunch({
  618. url: backUrl
  619. });
  620. })
  621. .catch((error) => {
  622. this.keyLock = true;
  623. });
  624. })
  625. .catch((e) => {
  626. this.keyLock = true;
  627. that.$util.Tips({
  628. title: e
  629. });
  630. });
  631. }
  632. }
  633. };
  634. </script>
  635. <style>
  636. page {
  637. background: #fff;
  638. }
  639. </style>
  640. <style lang="scss">
  641. .appLogin {
  642. margin-top: 60rpx;
  643. .hds {
  644. display: flex;
  645. justify-content: center;
  646. align-items: center;
  647. font-size: 24rpx;
  648. color: #b4b4b4;
  649. .line {
  650. width: 68rpx;
  651. height: 1rpx;
  652. background: #cccccc;
  653. }
  654. p {
  655. margin: 0 20rpx;
  656. }
  657. }
  658. .btn-wrapper {
  659. display: flex;
  660. align-items: center;
  661. justify-content: center;
  662. margin-top: 30rpx;
  663. .btn {
  664. display: flex;
  665. align-items: center;
  666. justify-content: center;
  667. width: 68rpx;
  668. height: 68rpx;
  669. border-radius: 50%;
  670. }
  671. .apple-btn {
  672. display: flex;
  673. align-items: center;
  674. justify-content: center;
  675. width: 68rpx;
  676. height: 68rpx;
  677. border-radius: 50%;
  678. background: #000;
  679. .icon-s-pingguo {
  680. color: #fff;
  681. font-size: 44rpx;
  682. }
  683. }
  684. .iconfont {
  685. font-size: 40rpx;
  686. color: #fff;
  687. }
  688. .wx {
  689. margin-right: 30rpx;
  690. background-color: #61c64f;
  691. }
  692. .mima {
  693. margin-right: 30rpx;
  694. background-color: #28b3e9;
  695. }
  696. .yanzheng {
  697. margin-right: 30rpx;
  698. background-color: #f89c23;
  699. }
  700. }
  701. }
  702. .code img {
  703. width: 100%;
  704. height: 100%;
  705. }
  706. .acea-row.row-middle {
  707. input {
  708. margin-left: 20rpx;
  709. display: block;
  710. }
  711. }
  712. .login-wrapper {
  713. padding: 30rpx;
  714. .shading {
  715. display: flex;
  716. align-items: center;
  717. justify-content: center;
  718. flex-direction: column;
  719. width: 100%;
  720. /* #ifdef APP-VUE */
  721. margin-top: 50rpx;
  722. /* #endif */
  723. /* #ifndef APP-VUE */
  724. margin-top: 200rpx;
  725. /* #endif */
  726. image {
  727. width: 240rpx;
  728. height: 240rpx;
  729. }
  730. .name {
  731. font-size: 40rpx;
  732. font-weight: 500;
  733. color: #333333;
  734. margin-top: 22rpx;
  735. }
  736. }
  737. .whiteBg {
  738. margin-top: 100rpx;
  739. .list {
  740. border-radius: 16rpx;
  741. overflow: hidden;
  742. .item {
  743. border-bottom: 1px solid #f0f0f0;
  744. background: #fff;
  745. .row-middle {
  746. position: relative;
  747. padding: 16rpx 45rpx;
  748. input {
  749. flex: 1;
  750. font-size: 28rpx;
  751. height: 80rpx;
  752. }
  753. .code {
  754. position: absolute;
  755. right: 30rpx;
  756. top: 50%;
  757. color: var(--view-theme);
  758. font-size: 26rpx;
  759. transform: translateY(-50%);
  760. }
  761. }
  762. }
  763. }
  764. .logon {
  765. display: flex;
  766. align-items: center;
  767. justify-content: center;
  768. width: 100%;
  769. height: 86rpx;
  770. margin-top: 80rpx;
  771. background-color: var(--view-theme);
  772. border-radius: 120rpx;
  773. color: #ffffff;
  774. font-size: 30rpx;
  775. }
  776. .tips {
  777. margin: 30rpx;
  778. text-align: center;
  779. color: #999;
  780. }
  781. }
  782. }
  783. .protocol {
  784. margin-top: 40rpx;
  785. color: #999999;
  786. font-size: 24rpx;
  787. text-align: center;
  788. bottom: 20rpx;
  789. }
  790. /* #ifdef H5 */
  791. @media (min-aspect-ratio: 13/20) {
  792. .bottom {
  793. display: none !important;
  794. }
  795. }
  796. /* #endif */
  797. .bottom {
  798. position: fixed;
  799. bottom: 30rpx;
  800. left: 0;
  801. display: flex;
  802. width: 100%;
  803. justify-content: center;
  804. color: #999999;
  805. .ver {
  806. font-size: 20rpx;
  807. }
  808. .ver-msg {
  809. margin-left: 10rpx;
  810. }
  811. a {
  812. color: #999999;
  813. margin-left: 10rpx;
  814. text-decoration: none;
  815. }
  816. }
  817. .trembling {
  818. animation: shake 0.6s;
  819. }
  820. .main-color {
  821. color: var(--view-theme);
  822. }
  823. </style>