index.vue 22 KB

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