index.vue 19 KB

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