index.vue 23 KB

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