login.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841
  1. <template>
  2. <view class="container">
  3. <!-- #ifdef MP-WEIXIN -->
  4. <image class="bg" src="@/static/image/bg_login.png" mode="widthFix"></image>
  5. <view class="force-login-wrap">
  6. <view :style="{height:menuButtonInfo.height,marginTop:menuButtonInfo.top}" class="backImg">
  7. <image @tap="goBack()" src="@/static/images/back.png"></image>
  8. </view>
  9. <view class="top-title">
  10. <view class="title-text">欢迎登录<text class="blue">小蜜蜂</text></view>
  11. <view class="login-notice">新用户首次登录即视为注册</view>
  12. </view>
  13. <view class="force-login__content">
  14. <!-- <image class="bg-type" :src="current==0?'/static/image/bg_tab_login.png':'/static/image/bg_tab_login2.png'" mode="widthFix"></image> -->
  15. <view class="logintype">
  16. <view :class="current==0 ? 'logintype-item active':'logintype-item'" @click="changeType(0)">验证码登录
  17. </view>
  18. <view class="line"></view>
  19. <view :class="current==1 ? 'logintype-item active':'logintype-item'" @click="changeType(1)">密码登录
  20. </view>
  21. </view>
  22. <view class="input-form">
  23. <view class="input-item">
  24. <input v-if="current == 0" class="input-field" type="number" v-model="phone" placeholder="请输入手机号" maxlength="11" />
  25. <input v-else class="input-field" v-model="account" placeholder="请输入账号" />
  26. </view>
  27. <view class="input-item code-input-item">
  28. <input v-if="current == 0" class="input-field code-input" type="number" v-model="verifyCode"
  29. placeholder="请输入验证码" maxlength="6" />
  30. <view v-else class="mima">
  31. <input class="input-field code-input" type="text" :password="showPassword"
  32. v-model="password" placeholder="请输入密码" />
  33. <image @click="closePwd"
  34. :src="showPassword?'/static/image/icon_invisible.png':'/static/image/icon_visible.png'"
  35. mode="aspectFill"></image>
  36. </view>
  37. <view v-if="current == 0" class="get-code-btn" @click="getVerifyCode">
  38. {{ codeText }}
  39. </view>
  40. </view>
  41. </view>
  42. <view class="forgot" v-if="current==1" @click="toForgetPassword">忘记密码?</view>
  43. <view class="encoding">企业编码:-</view>
  44. <view class="login-btn-wrap">
  45. <!-- <button class="login-btn" @click="handleLogin">{{ current == 0 ? '登录/注册用户' : '登录' }}</button> -->
  46. <button class="login-btn" @click="handleLogin">登录</button>
  47. </view>
  48. <view class="tips">
  49. <checkbox :checked="isAgreement" @click="handleAgreement()" />
  50. <view class="tips-text" @click="handleAgreement()">已阅读并接受</view>
  51. <view class="btn" @click="openH5('/web/userAgreement')">《用户注册协议》</view>
  52. <view class="btn" @click="openH5('/web/privacyPolicy')">《隐私保护政策》</view>
  53. </view>
  54. </view>
  55. </view>
  56. <!-- #endif -->
  57. </view>
  58. </template>
  59. <script>
  60. import {
  61. sendSmsCode,//发送短信验证码
  62. smsLogin, // 校验短信验证码
  63. login, // 密码登录
  64. } from '@/api/user'
  65. // import {
  66. // loginByMiniApp,
  67. // getUserInfo,
  68. // loginByMp
  69. // } from '@/api/user'
  70. export default {
  71. data() {
  72. return {
  73. account:null,
  74. code: null, // 微信登录code
  75. isAgreement: false,
  76. current: 0, // 0-验证码登录 1-密码登录
  77. menuButtonInfo: {},
  78. phone: '', // 手机号
  79. verifyCode: '', // 验证码
  80. password: '', // 密码
  81. codeText: '获取验证码', // 验证码按钮文字
  82. countdown: 0, // 倒计时
  83. countdownTimer: null, // 倒计时定时器
  84. showPassword: true // 是否显示密码
  85. }
  86. },
  87. computed: {},
  88. onLoad(option) {
  89. this.getMenuButtonInfo()
  90. // #ifdef MP-WEIXIN
  91. uni.$on('refreshLogin', () => {
  92. uni.navigateBack({
  93. delta: 1
  94. })
  95. })
  96. //选获取CODE,防止后请求的时候腾讯服务端未同步报错
  97. this.getCode();
  98. // #endif
  99. // #ifdef H5
  100. if (this.checkWeixin()) {
  101. this.getWxCode()
  102. } else {
  103. uni.showToast({
  104. icon: 'none',
  105. title: "请在微信中打开",
  106. });
  107. //跳转到手机号密码登录
  108. }
  109. // #endif
  110. },
  111. onUnload() {
  112. // 清除倒计时
  113. if (this.countdownTimer) {
  114. clearInterval(this.countdownTimer);
  115. this.countdownTimer = null;
  116. }
  117. },
  118. mounted() {
  119. },
  120. methods: {
  121. closePwd() {
  122. this.showPassword = !this.showPassword
  123. },
  124. // 获取胶囊按钮布局参数
  125. getMenuButtonInfo() {
  126. // 微信小程序API(Uniapp可直接用uni.getMenuButtonBoundingClientRect)
  127. const menuBtn = uni.getMenuButtonBoundingClientRect();
  128. if (menuBtn) {
  129. this.menuButtonInfo = {
  130. top: menuBtn.top + 'px', // 胶囊顶部距离
  131. height: menuBtn.height + 'px', // 胶囊高度
  132. centerY: (menuBtn.top + menuBtn.height / 2) + 'px', // 胶囊垂直居中Y坐标
  133. right: menuBtn.right + 'px' // 胶囊右侧距离
  134. };
  135. }
  136. },
  137. changeType(index) {
  138. this.current = index;
  139. // 切换时清空输入
  140. if (index == 0) {
  141. this.password = '';
  142. } else {
  143. this.verifyCode = '';
  144. }
  145. },
  146. // 返回主页
  147. goBack() {
  148. uni.navigateBack({
  149. delta: 1
  150. })
  151. },
  152. // 获取验证码
  153. getVerifyCode() {
  154. if (this.countdown > 0) {
  155. return;
  156. }
  157. if (!this.phone) {
  158. uni.showToast({
  159. icon: 'none',
  160. title: "请输入手机号",
  161. });
  162. return;
  163. }
  164. if (!/^1[3-9]\d{9}$/.test(this.phone)) {
  165. uni.showToast({
  166. icon: 'none',
  167. title: "请输入正确的手机号",
  168. });
  169. return;
  170. }
  171. // 调用发送验证码API
  172. uni.showLoading({
  173. title: "发送中..."
  174. });
  175. let params = {
  176. phone: this.phone,
  177. type: '0',
  178. }
  179. sendSmsCode(params)
  180. .then(res => {
  181. uni.hideLoading();
  182. if (res.code == 200) {
  183. uni.showToast({
  184. icon: 'success',
  185. title: "验证码已发送",
  186. });
  187. // 开始倒计时
  188. this.countdown = 60;
  189. this.countdownTimer = setInterval(() => {
  190. this.countdown--;
  191. this.codeText = this.countdown + '秒重新获取';
  192. if (this.countdown <= 0) {
  193. clearInterval(this.countdownTimer);
  194. this.countdownTimer = null;
  195. this.codeText = '获取验证码';
  196. }
  197. }, 1000);
  198. } else {
  199. uni.showToast({
  200. icon: 'none',
  201. title: res.message || "发送验证码失败",
  202. });
  203. }
  204. })
  205. .catch(err => {
  206. uni.hideLoading();
  207. uni.showToast({
  208. icon: 'none',
  209. title: "发送验证码接口调用失败",
  210. });
  211. });
  212. },
  213. // 登录
  214. handleLogin() {
  215. if (!this.isAgreement) {
  216. uni.showToast({
  217. icon: 'none',
  218. title: "请先同意协议后再登录",
  219. });
  220. return;
  221. }
  222. if (this.current == 0) {
  223. // 验证码登录
  224. if (!this.phone) {
  225. uni.showToast({
  226. icon: 'none',
  227. title: "请输入手机号",
  228. });
  229. return;
  230. }
  231. if (!/^1[3-9]\d{9}$/.test(this.phone)) {
  232. uni.showToast({
  233. icon: 'none',
  234. title: "请输入正确的手机号",
  235. });
  236. return;
  237. }
  238. if (!this.verifyCode) {
  239. uni.showToast({
  240. icon: 'none',
  241. title: "请输入验证码",
  242. });
  243. return;
  244. }
  245. this.loginByCode();
  246. } else {
  247. // 密码登录
  248. if (!this.account) {
  249. uni.showToast({
  250. icon: 'none',
  251. title: "请输入账号",
  252. });
  253. return;
  254. }
  255. if (!this.password) {
  256. uni.showToast({
  257. icon: 'none',
  258. title: "请输入密码",
  259. });
  260. return;
  261. }
  262. this.loginByPassword();
  263. }
  264. },
  265. // 验证码登录
  266. loginByCode() {
  267. uni.showLoading({
  268. title: "登录中..."
  269. });
  270. // 调用验证码登录接口
  271. const data = {
  272. phone: this.phone,
  273. code: this.verifyCode
  274. };
  275. smsLogin(data)
  276. .then(res => {
  277. uni.hideLoading();
  278. if (res.code == 200) {
  279. uni.showToast({
  280. icon: 'success',
  281. title: "登录成功",
  282. });
  283. uni.setStorageSync('AppToken', res.data.token);
  284. uni.setStorageSync('userInfo', JSON.stringify(res.data.user));
  285. uni.$emit('refreshLogin');
  286. uni.navigateBack({
  287. delta: 1
  288. });
  289. } else {
  290. uni.showToast({
  291. icon: 'none',
  292. title: res.message || "登录失败",
  293. });
  294. }
  295. })
  296. .catch(err => {
  297. uni.hideLoading();
  298. uni.showToast({
  299. icon: 'none',
  300. title: "登录接口调用失败",
  301. });
  302. });
  303. },
  304. // 密码登录
  305. loginByPassword() {
  306. uni.showLoading({
  307. title: "登录中..."
  308. });
  309. const data={
  310. account: this.account,
  311. password: this.password
  312. }
  313. // 调用密码登录接口
  314. login(data)
  315. .then(res => {
  316. uni.hideLoading();
  317. if (res.code == 200) {
  318. uni.showToast({
  319. icon: 'success',
  320. title: "登录成功",
  321. });
  322. uni.setStorageSync('AppToken', res.data.token);
  323. uni.setStorageSync('userInfo', JSON.stringify(res.data.user));
  324. uni.$emit('refreshLogin');
  325. uni.navigateBack({
  326. delta: 1
  327. });
  328. } else {
  329. uni.showToast({
  330. icon: 'none',
  331. title: res.message || "登录失败",
  332. });
  333. }
  334. })
  335. .catch(err => {
  336. uni.hideLoading();
  337. uni.showToast({
  338. icon: 'none',
  339. title: "登录接口调用失败",
  340. });
  341. });
  342. },
  343. checkWeixin() {
  344. var ua = window.navigator.userAgent.toLowerCase();
  345. if (ua.match(/micromessenger/i) == 'micromessenger') {
  346. return true;
  347. } else {
  348. return false;
  349. }
  350. },
  351. //URL地址是否存在CODE
  352. getUrlCode(name) {
  353. return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) ||
  354. [, ''
  355. ])[1]
  356. .replace(/\+/g, '%20')) || null
  357. },
  358. //获取微信CODE
  359. getWxCode() {
  360. //在微信公众号请求用户网页授权之前,开发者需要先到公众平台官网中的“开发 - 接口权限 - 网页服务 - 网页帐号 - 网页授权获取用户基本信息”的配置选项中,修改授权回调域名。请注意,这里填写的是域名(是一个字符串),而不是URL,因此请勿加 http:// 等协议头;
  361. //http://shequ.natapp1.cc/#/pages/index/index?deviceId=8
  362. var appId = "wx40593595e62f61ad";
  363. var url = "http://h5.yjf.runtzh.com";
  364. window.location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' + appId +
  365. '&redirect_uri=' + encodeURIComponent(url + "/#/pages/auth/wxLogin") +
  366. '&response_type=code&scope=snsapi_userinfo&state=JeffreySu-954&connect_redirect=1#wechat_redirect';
  367. //console.log('https://open.weixin.qq.com/connect/oauth2/authorize?appid='+appId+'&redirect_uri=' +encodeURIComponent("http://shequ.natapp1.cc/#/pages/index/index?deviceId="+this.deviceId) +'&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect')
  368. // redirect_uri是授权成功后,跳转的url地址,微信会帮我们跳转到该链接,并且通过?的形式拼接code
  369. },
  370. handleAgreement() {
  371. this.isAgreement = !this.isAgreement;
  372. },
  373. openH5(url) {
  374. var requestPath = uni.getStorageSync('requestPath');
  375. uni.setStorageSync('url', requestPath + url);
  376. uni.navigateTo({
  377. url: '../home/web'
  378. })
  379. },
  380. toForgetPassword(){
  381. uni.navigateTo({
  382. url: '/pages/auth/forgetPassword'
  383. })
  384. },
  385. getCode() {
  386. var that = this;
  387. this.utils.getProvider()
  388. .then(provider => {
  389. console.log('当前的环境商', provider)
  390. if (!provider) {
  391. reject()
  392. }
  393. // uni登录
  394. uni.login({
  395. provider: provider,
  396. success: async loginRes => {
  397. that.code = loginRes.code
  398. }
  399. })
  400. })
  401. .catch(err => {
  402. })
  403. },
  404. // 微信用户手机号登录
  405. phoneLogin(e) {
  406. var that = this;
  407. if (!this.isAgreement) {
  408. uni.showToast({
  409. icon: 'none',
  410. title: "请先同意协议后再登录",
  411. });
  412. return false;
  413. }
  414. uni.showLoading({
  415. title: "处理中..."
  416. })
  417. console.log(e, "e")
  418. if (e.mp.detail.errMsg == 'getPhoneNumber:ok') {
  419. this.utils.getProvider()
  420. .then(provider => {
  421. console.log('当前的环境商', provider)
  422. if (!provider) {
  423. reject()
  424. }
  425. // uni登录
  426. uni.login({
  427. provider: provider,
  428. success: async loginRes => {
  429. console.log(loginRes)
  430. let code = loginRes.code // 获取开发code
  431. var userCode = uni.getStorageSync('userCode');
  432. loginByMiniApp({
  433. encryptedData: e.mp.detail.encryptedData,
  434. iv: e.mp.detail.iv,
  435. code: code,
  436. userCode: userCode
  437. })
  438. .then(res => {
  439. if (res.code == 200) {
  440. uni.hideLoading();
  441. uni.showToast({
  442. icon: 'none',
  443. title: "登录成功",
  444. });
  445. uni.setStorageSync('AppToken', res.token);
  446. uni.setStorageSync('userInfo', JSON.stringify(res
  447. .user));
  448. uni.hideLoading()
  449. //that.getUserInfo()
  450. uni.$emit('refreshLogin');
  451. uni.navigateBack({
  452. delta: 1
  453. })
  454. } else {
  455. uni.hideLoading();
  456. uni.showToast({
  457. icon: 'none',
  458. title: "授权登录失败,请重新登录",
  459. });
  460. }
  461. })
  462. .catch(error => {
  463. console.log(error)
  464. uni.hideLoading();
  465. uni.showToast({
  466. icon: 'none',
  467. title: "登录接口调用失败",
  468. });
  469. })
  470. }
  471. })
  472. })
  473. .catch(err => {
  474. uni.showToast({
  475. icon: 'none',
  476. title: err,
  477. });
  478. })
  479. } else {
  480. uni.showToast({
  481. title: '已拒绝授权',
  482. icon: 'none',
  483. duration: 2000,
  484. })
  485. }
  486. },
  487. back() {
  488. uni.switchTab({
  489. url: '/pages/home/index'
  490. });
  491. // uni.navigateBack()
  492. }
  493. }
  494. }
  495. </script>
  496. <style lang="scss">
  497. .container {
  498. flex: 1;
  499. padding: 0 24rpx;
  500. display: flex;
  501. flex-direction: column;
  502. justify-content: flex-start;
  503. position: relative;
  504. .bg {
  505. width: 100%;
  506. position: absolute;
  507. top: 0;
  508. left: 0;
  509. }
  510. .backImg {
  511. display: flex;
  512. align-items: center;
  513. image {
  514. width: 40rpx;
  515. height: 40rpx;
  516. }
  517. margin-left: 32rpx;
  518. // position: absolute;
  519. // left: 30rpx;
  520. // z-index: 100;
  521. }
  522. }
  523. .force-login-wrap {
  524. width: 100%;
  525. height: 100vh;
  526. position: relative;
  527. .top-title {
  528. padding: 0 32rpx;
  529. text-align: left;
  530. margin-top: 20rpx;
  531. .title-text {
  532. font-weight: 600;
  533. font-size: 48rpx;
  534. color: #333333;
  535. margin-bottom: 20rpx;
  536. .blue {
  537. color: #157CF8;
  538. }
  539. }
  540. .login-notice {
  541. font-weight: 400;
  542. font-size: 32rpx;
  543. color: #666666;
  544. line-height: 40rpx;
  545. }
  546. }
  547. .force-login__content {
  548. margin-top: 54rpx;
  549. padding: 0 32rpx;
  550. position: relative;
  551. .bg-type {
  552. width: 100%;
  553. position: absolute;
  554. top: 0;
  555. left: 0;
  556. }
  557. .logintype {
  558. display: flex;
  559. align-items: center;
  560. margin-bottom: 66rpx;
  561. border-bottom: 2rpx solid #f0f0f0;
  562. .line {
  563. margin: 0 32rpx;
  564. width: 2rpx;
  565. height: 32rpx;
  566. background: #D7E1F0;
  567. border-radius: 0rpx 0rpx 0rpx 0rpx;
  568. }
  569. .logintype-item {
  570. // flex: 1;
  571. text-align: center;
  572. padding-top: 36rpx;
  573. padding-bottom: 48rpx;
  574. font-family: PingFang SC, PingFang SC;
  575. font-weight: 400;
  576. font-size: 32rpx;
  577. color: #666666;
  578. position: relative;
  579. &.active {
  580. font-size: 36rpx;
  581. color: #333333;
  582. font-weight: 600;
  583. &::after {
  584. content: '';
  585. position: absolute;
  586. bottom: 30rpx;
  587. left: 50%;
  588. transform: translateX(-50%);
  589. width: 52rpx;
  590. height: 6rpx;
  591. background: #157CF8;
  592. border-radius: 42rpx;
  593. }
  594. }
  595. }
  596. }
  597. .input-form {
  598. margin-bottom: 60rpx;
  599. .input-item {
  600. background: #FFFFFF;
  601. border-radius: 16rpx;
  602. padding: 30rpx 40rpx;
  603. margin-bottom: 48rpx;
  604. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
  605. &::last-child {
  606. margin-bottom: 0
  607. }
  608. .input-field {
  609. width: 100%;
  610. font-size: 30rpx;
  611. font-family: PingFang SC;
  612. color: #333333;
  613. &::placeholder {
  614. color: #CCCCCC;
  615. }
  616. }
  617. .mima {
  618. width: 100%;
  619. display: flex;
  620. align-items: center;
  621. justify-content: space-between;
  622. image {
  623. width: 32rpx;
  624. height: 32rpx;
  625. }
  626. }
  627. &.code-input-item {
  628. display: flex;
  629. align-items: center;
  630. .code-input {
  631. flex: 1;
  632. }
  633. .get-code-btn {
  634. font-size: 28rpx;
  635. font-family: PingFang SC;
  636. font-weight: 500;
  637. color: #157CF8;
  638. padding-left: 20rpx;
  639. white-space: nowrap;
  640. }
  641. }
  642. }
  643. }
  644. .forgot {
  645. font-weight: 400;
  646. font-size: 24rpx;
  647. color: #388BFF;
  648. line-height: 40rpx;
  649. display: flex;
  650. justify-content: flex-end;
  651. margin: -40rpx 0 24rpx;
  652. }
  653. .encoding {
  654. width: 100%;
  655. height: 104rpx;
  656. line-height: 104rpx;
  657. text-align: center;
  658. background: #EDEFF2;
  659. border-radius: 16rpx 16rpx 16rpx 16rpx;
  660. font-size: 32rpx;
  661. color: #999999;
  662. }
  663. .login-btn-wrap {
  664. margin-bottom: 40rpx;
  665. margin-top: 140rpx;
  666. .login-btn {
  667. width: 100%;
  668. height: 88rpx;
  669. background: rgba(56, 139, 255, 1);
  670. border-radius: 44rpx;
  671. font-size: 32rpx;
  672. font-family: PingFang SC;
  673. font-weight: 500;
  674. color: #FFFFFF;
  675. border: none;
  676. display: flex;
  677. align-items: center;
  678. justify-content: center;
  679. &::after {
  680. border: none;
  681. }
  682. }
  683. }
  684. }
  685. }
  686. .tips {
  687. display: flex;
  688. justify-content: center;
  689. align-items: center;
  690. font-size: 24rpx;
  691. color: #666666;
  692. flex-wrap: nowrap;
  693. padding: 0 60rpx;
  694. checkbox {
  695. margin-right: 10rpx;
  696. flex-shrink: 0;
  697. transform: scale(0.8);
  698. }
  699. .tips-text {
  700. margin-right: 4rpx;
  701. white-space: nowrap;
  702. }
  703. .btn {
  704. color: #157CF8;
  705. margin: 0 2rpx;
  706. white-space: nowrap;
  707. }
  708. }
  709. .wx-login {
  710. background: rgba(0, 0, 0, 0.7);
  711. z-index: 99999;
  712. position: fixed;
  713. top: 0;
  714. left: 0;
  715. height: 100%;
  716. width: 100%;
  717. display: flex;
  718. align-items: center;
  719. justify-content: center;
  720. .form {
  721. border-radius: 20rpx;
  722. padding: 60rpx 30rpx;
  723. width: 500upx;
  724. height: 300upx;
  725. background-color: #fff;
  726. .title {
  727. font-size: 32upx;
  728. font-family: PingFang SC;
  729. font-weight: bold;
  730. }
  731. .desc {
  732. font-size: 28upx;
  733. margin: 60upx 0upx 60upx 0upx;
  734. font-family: PingFang SC;
  735. font-weight: 500;
  736. }
  737. .btn-box {
  738. margin-top: 30rpx;
  739. width: 100%;
  740. display: flex;
  741. align-items: center;
  742. justify-content: center;
  743. .btn {
  744. display: flex;
  745. align-items: center;
  746. justify-content: center;
  747. margin-left: 10upx;
  748. width: 50%;
  749. height: 80rpx;
  750. border-radius: 5rpx;
  751. background-color: #0bb3f2;
  752. font-size: 30rpx;
  753. font-family: PingFang SC;
  754. font-weight: 500;
  755. color: #fff;
  756. position: relative;
  757. }
  758. .btn-close {
  759. margin-right: 10upx;
  760. width: 50%;
  761. height: 80rpx;
  762. border-radius: 5rpx;
  763. border: 2rpx solid #0bb3f2;
  764. background: none;
  765. font-size: 30rpx;
  766. font-family: PingFang SC;
  767. font-weight: 500;
  768. color: #0bb3f2;
  769. }
  770. }
  771. }
  772. }
  773. .auth_btn {
  774. width: 100%;
  775. height: 100%;
  776. top: 0upx;
  777. position: absolute;
  778. opacity: 0.0;
  779. }
  780. </style>