index.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801
  1. <template>
  2. <view class="login-wrapper" :style="colorStyle">
  3. <view class="shading">
  4. <image :src="logoUrl" v-if="logoUrl" />
  5. <!-- <image src="../static/logo2.png" v-else /> -->
  6. </view>
  7. <view class="whiteBg" v-if="formItem === 1">
  8. <view class="list" v-if="current !== 1">
  9. <form @submit.prevent="submit">
  10. <view class="item">
  11. <view class="acea-row row-middle">
  12. <image src="../static/phone_1.png" style="width: 24rpx; height: 34rpx;"></image>
  13. <input type="text" :placeholder="$t(`输入手机号码`)" v-model="account" maxlength="11" required />
  14. </view>
  15. </view>
  16. <view class="item">
  17. <view class="acea-row row-middle">
  18. <image src="../static/code_1.png" style="width: 28rpx; height: 32rpx;"></image>
  19. <input type="password" :placeholder="$t(`填写登录密码`)" v-model="password" required />
  20. </view>
  21. </view>
  22. </form>
  23. <!-- <navigator class="forgetPwd" hover-class="none" url="/pages/users/retrievePassword/index">
  24. <span class="iconfont icon-wenti"></span>忘记密码
  25. </navigator> -->
  26. </view>
  27. <view class="list" v-if="current !== 0 || appLoginStatus || appleLoginStatus">
  28. <view class="item">
  29. <view class="acea-row row-middle">
  30. <image src="../static/phone_1.png" style="width: 24rpx; height: 34rpx;"></image>
  31. <input type="text" :placeholder="$t(`输入手机号码`)" v-model="account" maxlength="11" />
  32. </view>
  33. </view>
  34. <view class="item">
  35. <view class="acea-row row-middle">
  36. <image src="../static/code_2.png" style="width: 28rpx; height: 32rpx;"></image>
  37. <input type="text" :placeholder="$t(`填写验证码`)" maxlength="6" class="codeIput"
  38. v-model="captcha" />
  39. <button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" @click="code">
  40. {{ text }}
  41. </button>
  42. </view>
  43. </view>
  44. <view class="item" v-if="isShowCode">
  45. <view class="acea-row row-middle">
  46. <image src="../static/code_2.png" style="width: 28rpx; height: 32rpx;"></image>
  47. <input type="text" :placeholder="$t(`填写验证码`)" class="codeIput" v-model="codeVal" />
  48. <view class="code" @click="again"><img :src="codeUrl" /></view>
  49. </view>
  50. </view>
  51. </view>
  52. <view class="logon" @click="loginMobile" v-if="current !== 0">{{ $t(`登录`) }}</view>
  53. <view class="logon" @click="submit" v-if="current === 0">{{ $t(`登录`) }}</view>
  54. <!-- #ifndef APP-PLUS -->
  55. <view class="tips">
  56. <view v-if="current == 0" @click="current = 1">{{ $t(`快速登录`) }}</view>
  57. <view v-if="current == 1" @click="current = 0">{{ $t(`账号登录`) }}</view>
  58. </view>
  59. <!-- #endif -->
  60. <!-- #ifdef APP-PLUS -->
  61. <view class="appLogin" v-if="!appLoginStatus && !appleLoginStatus">
  62. <view class="hds">
  63. <span class="line"></span>
  64. <p>{{ $t(`其他方式登录`) }}</p>
  65. <span class="line"></span>
  66. </view>
  67. <view class="btn-wrapper">
  68. <view class="btn wx" @click="wxLogin">
  69. <span class="iconfont icon-s-weixindenglu1"></span>
  70. </view>
  71. <view class="btn mima" v-if="current == 1" @click="current = 0">
  72. <span class="iconfont icon-s-mimadenglu1"></span>
  73. </view>
  74. <view class="btn yanzheng" v-if="current == 0" @click="current = 1">
  75. <span class="iconfont icon-s-yanzhengmadenglu1"></span>
  76. </view>
  77. <view class="apple-btn" @click="appleLogin" v-if="appleShow">
  78. <view class="iconfont icon-s-pingguo"></view>
  79. </view>
  80. </view>
  81. </view>
  82. <!-- #endif -->
  83. <view class="protocol">
  84. <checkbox-group @change='ChangeIsDefault'>
  85. <checkbox :class="inAnimation ? 'trembling' : ''" @animationend='inAnimation = false'
  86. :checked="protocol ? true : false" />{{ $t(`已阅读并同意`) }} <text class="main-color"
  87. @click="privacy(4)">{{ $t(`《用户协议》`) }}</text>
  88. {{ $t(`与`) }}<text class="main-color" @click="privacy(3)">{{ $t(`《隐私协议》`) }}</text>
  89. </checkbox-group>
  90. </view>
  91. </view>
  92. <view class="bottom"></view>
  93. </view>
  94. </template>
  95. <script>
  96. import dayjs from "@/plugin/dayjs/dayjs.min.js";
  97. import sendVerifyCode from "@/mixins/SendVerifyCode";
  98. import {
  99. loginH5,
  100. loginMobile,
  101. registerVerify,
  102. register,
  103. getCodeApi,
  104. getUserInfo,
  105. appleLogin
  106. } from "@/api/user";
  107. import attrs, {
  108. required,
  109. alpha_num,
  110. chs_phone
  111. } from "@/utils/validate";
  112. import {
  113. getLogo
  114. } from "@/api/public";
  115. // import cookie from "@/utils/store/cookie";
  116. import {
  117. VUE_APP_API_URL
  118. } from "@/utils";
  119. // #ifdef APP-PLUS
  120. import {
  121. wechatAppAuth
  122. } from '@/api/api.js'
  123. // #endif
  124. const BACK_URL = "login_back_url";
  125. import colors from '@/mixins/color.js';
  126. export default {
  127. name: "Login",
  128. mixins: [sendVerifyCode, colors],
  129. data: function () {
  130. return {
  131. inAnimation: false,
  132. protocol: false,
  133. navList: [this.$t(`快速登录`), this.$t(`账号登录`)],
  134. current: 1,
  135. account: "",
  136. password: "",
  137. captcha: "",
  138. formItem: 1,
  139. type: "login",
  140. logoUrl: "",
  141. keyCode: "",
  142. codeUrl: "",
  143. codeVal: "",
  144. isShowCode: false,
  145. appLoginStatus: false, // 微信登录强制绑定手机号码状态
  146. appUserInfo: null, // 微信登录保存的用户信息
  147. appleLoginStatus: false, // 苹果登录强制绑定手机号码状态
  148. appleUserInfo: null,
  149. appleShow: false, // 苹果登录版本必须要求ios13以上的
  150. keyLock: true
  151. };
  152. },
  153. watch: {
  154. formItem: function (nval, oVal) {
  155. if (nval == 1) {
  156. this.type = 'login'
  157. } else {
  158. this.type = 'register'
  159. }
  160. }
  161. },
  162. onLoad() {
  163. let self = this
  164. uni.getSystemInfo({
  165. success: (res) => {
  166. if (res.platform.toLowerCase() == 'ios' && this.getSystem(res.system)) {
  167. self.appleShow = true
  168. }
  169. }
  170. });
  171. },
  172. mounted: function () {
  173. // this.getCode();
  174. this.getLogoImage();
  175. },
  176. methods: {
  177. ChangeIsDefault(e) {
  178. this.$set(this, 'protocol', !this.protocol);
  179. },
  180. privacy(type) {
  181. uni.navigateTo({
  182. url: "/pages/users/privacy/index?type=" + type
  183. })
  184. },
  185. // IOS 版本号判断
  186. getSystem(system) {
  187. let str
  188. system.toLowerCase().indexOf('ios') === -1 ? str = system : str = system.split(' ')[1]
  189. if (str.indexOf('.'))
  190. 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. }).then(({
  243. data
  244. }) => {
  245. if (data.isbind) {
  246. uni.showModal({
  247. title: self.$t(`提示`),
  248. content: self.$t(`请绑定手机号后,继续操作`),
  249. showCancel: false,
  250. success: function (res) {
  251. if (res.confirm) {
  252. self.current = 1
  253. self.appleLoginStatus = true
  254. }
  255. }
  256. });
  257. } else {
  258. self.$store.commit("LOGIN", {
  259. 'token': data.token,
  260. 'time': data.expires_time - self.$Cache.time()
  261. });
  262. let backUrl = self.$Cache.get(BACK_URL) || "/pages/index/index";
  263. self.$Cache.clear(BACK_URL);
  264. self.$store.commit("SETUID", data.userInfo.userId);
  265. uni.reLaunch({
  266. url: backUrl
  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. }).then(({
  335. data
  336. }) => {
  337. if (data.isbind) {
  338. uni.showModal({
  339. title: self.$t(`提示`),
  340. content: self.$t(`请绑定手机号后,继续操作`),
  341. showCancel: false,
  342. success: function (res) {
  343. if (res.confirm) {
  344. self.current = 1
  345. self.appLoginStatus = true
  346. }
  347. }
  348. });
  349. } else {
  350. self.$store.commit("LOGIN", {
  351. 'token': data.token,
  352. 'time': data.expires_time - self.$Cache.time()
  353. });
  354. let backUrl = self.$Cache.get(BACK_URL) || "/pages/index/index";
  355. self.$Cache.clear(BACK_URL);
  356. self.$store.commit("SETUID", data.userInfo.userId);
  357. uni.reLaunch({
  358. url: backUrl
  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 =
  377. VUE_APP_API_URL +
  378. "/sms_captcha?" +
  379. "key=" +
  380. this.keyCode +
  381. Date.parse(new Date());
  382. },
  383. code() {
  384. let that = this
  385. if (!that.protocol) {
  386. this.inAnimation = true
  387. return that.$util.Tips({
  388. title: '请先阅读并同意协议'
  389. });
  390. }
  391. getCodeApi()
  392. .then(res => {
  393. that.keyCode = res.data.key;
  394. that.getCode();
  395. })
  396. .catch(res => {
  397. that.$util.Tips({
  398. title: res
  399. });
  400. });
  401. },
  402. async getLogoImage() {
  403. let that = this;
  404. let logoUrl = "https://demo26.crmeb.net/statics/system_images/login_logo.jpeg"
  405. that.logoUrl = logoUrl;
  406. getLogo(2).then(res => {
  407. that.logoUrl = res.data.logo_url;
  408. });
  409. },
  410. async loginMobile() {
  411. let that = this;
  412. if (!that.protocol) {
  413. this.inAnimation = true
  414. return that.$util.Tips({
  415. title: '请先阅读并同意协议'
  416. });
  417. }
  418. if (!that.account) return that.$util.Tips({
  419. title: that.$t(`请填写手机号码`)
  420. });
  421. if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({
  422. title: that.$t(`请输入正确的手机号码`)
  423. });
  424. if (!that.captcha) return that.$util.Tips({
  425. title: that.$t(`请填写验证码`)
  426. });
  427. if (!/^[\w\d]+$/i.test(that.captcha)) return that.$util.Tips({
  428. title: that.$t(`请输入正确的验证码`)
  429. });
  430. if (that.appLoginStatus) {
  431. that.wxLoginApi()
  432. } else if (that.appleLoginStatus) {
  433. that.appleLoginApi()
  434. } else {
  435. if (this.keyLock) {
  436. this.keyLock = !this.keyLock
  437. } else {
  438. return that.$util.Tips({
  439. title: that.$t(`请勿重复点击`)
  440. });
  441. }
  442. loginMobile({
  443. phone: that.account,
  444. captcha: that.captcha,
  445. spread: that.$Cache.get("spread")
  446. })
  447. .then(res => {
  448. let data = res.data;
  449. that.$store.commit("LOGIN", {
  450. 'token': data.token,
  451. 'time': data.expires_time - this.$Cache.time()
  452. });
  453. let backUrl = that.$Cache.get(BACK_URL) || "/pages/index/index";
  454. that.$Cache.clear(BACK_URL);
  455. getUserInfo().then(res => {
  456. this.keyLock = true
  457. that.$store.commit("SETUID", res.data.userId);
  458. if (backUrl.indexOf('/pages/users/login/index') !== -1) {
  459. backUrl = '/pages/index/index';
  460. }
  461. uni.reLaunch({
  462. url: backUrl
  463. });
  464. })
  465. })
  466. .catch(res => {
  467. this.keyLock = true
  468. that.$util.Tips({
  469. title: res
  470. });
  471. });
  472. }
  473. },
  474. async register() {
  475. let that = this;
  476. if (!that.protocol) {
  477. this.inAnimation = true
  478. return that.$util.Tips({
  479. title: '请先阅读并同意协议'
  480. });
  481. }
  482. if (!that.account) return that.$util.Tips({
  483. title: that.$t(`请填写手机号码`)
  484. });
  485. if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({
  486. title: that.$t(`请输入正确的手机号码`)
  487. });
  488. if (!that.captcha) return that.$util.Tips({
  489. title: that.$t(`请填写验证码`)
  490. });
  491. if (!/^[\w\d]+$/i.test(that.captcha)) return that.$util.Tips({
  492. title: that.$t(`请输入正确的验证码`)
  493. });
  494. if (!that.password) return that.$util.Tips({
  495. title: that.$t(`请填写密码`)
  496. });
  497. if (/^([0-9]|[a-z]|[A-Z]){0,6}$/i.test(that.password)) return that.$util.Tips({
  498. title: that.$t(`您输入的密码过于简单`)
  499. });
  500. register({
  501. account: that.account,
  502. captcha: that.captcha,
  503. password: that.password,
  504. spread: that.$Cache.get("spread")
  505. })
  506. .then(res => {
  507. that.$util.Tips({
  508. title: res
  509. });
  510. that.formItem = 1;
  511. })
  512. .catch(res => {
  513. that.$util.Tips({
  514. title: res
  515. });
  516. });
  517. },
  518. async getCode() {
  519. let that = this;
  520. if (!that.protocol) {
  521. this.inAnimation = true
  522. return that.$util.Tips({
  523. title: '请先阅读并同意协议'
  524. });
  525. }
  526. if (!that.account) return that.$util.Tips({
  527. title: that.$t(`请填写手机号码`)
  528. });
  529. if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({
  530. title: that.$t(`请输入正确的手机号码`)
  531. });
  532. if (that.formItem == 2) that.type = "register";
  533. await registerVerify({
  534. phone: that.account,
  535. type: that.type,
  536. key: that.keyCode,
  537. code: that.codeVal
  538. })
  539. .then(res => {
  540. that.$util.Tips({
  541. title: res.msg
  542. });
  543. that.sendCode();
  544. })
  545. .catch(res => {
  546. that.$util.Tips({
  547. title: res
  548. });
  549. });
  550. },
  551. navTap: function (index) {
  552. this.current = index;
  553. },
  554. async submit() {
  555. let that = this;
  556. if (!that.protocol) {
  557. this.inAnimation = true
  558. return that.$util.Tips({
  559. title: '请先阅读并同意协议'
  560. });
  561. }
  562. if (!that.account) return that.$util.Tips({
  563. title: that.$t(`请填写账号`)
  564. });
  565. if (!/^[\w\d]{5,16}$/i.test(that.account)) return that.$util.Tips({
  566. title: that.$t(`请输入正确的账号`)
  567. });
  568. if (!that.password) return that.$util.Tips({
  569. title: that.$t(`请填写密码`)
  570. });
  571. if (this.keyLock) {
  572. this.keyLock = !this.keyLock
  573. } else {
  574. return that.$util.Tips({
  575. title: that.$t(`请勿重复点击`)
  576. });
  577. }
  578. loginH5({
  579. account: that.account,
  580. password: that.password,
  581. spread: that.$Cache.get("spread")
  582. })
  583. .then(({
  584. data
  585. }) => {
  586. that.$store.commit("LOGIN", {
  587. 'token': data.token,
  588. 'time': data.expires_time - this.$Cache.time()
  589. });
  590. let backUrl = that.$Cache.get(BACK_URL) || "/pages/index/index";
  591. that.$Cache.clear(BACK_URL);
  592. getUserInfo().then(res => {
  593. this.keyLock = true
  594. that.$store.commit("SETUID", res.data.userId);
  595. uni.reLaunch({
  596. url: backUrl
  597. });
  598. }).catch(error => {
  599. this.keyLock = true
  600. })
  601. })
  602. .catch(e => {
  603. this.keyLock = true
  604. that.$util.Tips({
  605. title: e
  606. });
  607. });
  608. }
  609. }
  610. };
  611. </script>
  612. <style>
  613. page {
  614. background: #fff;
  615. }
  616. </style>
  617. <style lang="scss">
  618. .appLogin {
  619. margin-top: 60rpx;
  620. .hds {
  621. display: flex;
  622. justify-content: center;
  623. align-items: center;
  624. font-size: 24rpx;
  625. color: #B4B4B4;
  626. .line {
  627. width: 68rpx;
  628. height: 1rpx;
  629. background: #CCCCCC;
  630. }
  631. p {
  632. margin: 0 20rpx;
  633. }
  634. }
  635. .btn-wrapper {
  636. display: flex;
  637. align-items: center;
  638. justify-content: center;
  639. margin-top: 30rpx;
  640. .btn {
  641. display: flex;
  642. align-items: center;
  643. justify-content: center;
  644. width: 68rpx;
  645. height: 68rpx;
  646. border-radius: 50%;
  647. }
  648. .apple-btn {
  649. display: flex;
  650. align-items: center;
  651. justify-content: center;
  652. width: 68rpx;
  653. height: 68rpx;
  654. border-radius: 50%;
  655. background: #000;
  656. .icon-s-pingguo {
  657. color: #fff;
  658. font-size: 44rpx;
  659. }
  660. }
  661. .iconfont {
  662. font-size: 40rpx;
  663. color: #fff;
  664. }
  665. .wx {
  666. margin-right: 30rpx;
  667. background-color: #61C64F;
  668. }
  669. .mima {
  670. margin-right: 30rpx;
  671. background-color: #28B3E9;
  672. }
  673. .yanzheng {
  674. margin-right: 30rpx;
  675. background-color: #F89C23;
  676. }
  677. }
  678. }
  679. .code img {
  680. width: 100%;
  681. height: 100%;
  682. }
  683. .acea-row.row-middle {
  684. input {
  685. margin-left: 20rpx;
  686. display: block;
  687. }
  688. }
  689. .login-wrapper {
  690. padding: 30rpx;
  691. .shading {
  692. display: flex;
  693. align-items: center;
  694. justify-content: center;
  695. width: 100%;
  696. /* #ifdef APP-VUE */
  697. margin-top: 50rpx;
  698. /* #endif */
  699. /* #ifndef APP-VUE */
  700. margin-top: 200rpx;
  701. /* #endif */
  702. image {
  703. width: 240rpx;
  704. height: 240rpx;
  705. }
  706. }
  707. .whiteBg {
  708. margin-top: 100rpx;
  709. .list {
  710. border-radius: 16rpx;
  711. overflow: hidden;
  712. .item {
  713. border-bottom: 1px solid #F0F0F0;
  714. background: #fff;
  715. .row-middle {
  716. position: relative;
  717. padding: 16rpx 45rpx;
  718. input {
  719. flex: 1;
  720. font-size: 28rpx;
  721. height: 80rpx;
  722. }
  723. .code {
  724. position: absolute;
  725. right: 30rpx;
  726. top: 50%;
  727. color: var(--view-theme);
  728. font-size: 26rpx;
  729. transform: translateY(-50%);
  730. }
  731. }
  732. }
  733. }
  734. .logon {
  735. display: flex;
  736. align-items: center;
  737. justify-content: center;
  738. width: 100%;
  739. height: 86rpx;
  740. margin-top: 80rpx;
  741. background-color: var(--view-theme);
  742. border-radius: 120rpx;
  743. color: #FFFFFF;
  744. font-size: 30rpx;
  745. }
  746. .tips {
  747. margin: 30rpx;
  748. text-align: center;
  749. color: #999;
  750. }
  751. }
  752. }
  753. .protocol {
  754. margin-top: 40rpx;
  755. color: #999999;
  756. font-size: 24rpx;
  757. text-align: center;
  758. bottom: 20rpx;
  759. }
  760. .trembling {
  761. animation: shake 0.6s;
  762. }
  763. .main-color {
  764. color: var(--view-theme);
  765. }
  766. </style>