login.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837
  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. sendSmsCode(this.phone)
  176. .then(res => {
  177. uni.hideLoading();
  178. if (res.code == 200) {
  179. uni.showToast({
  180. icon: 'success',
  181. title: "验证码已发送",
  182. });
  183. // 开始倒计时
  184. this.countdown = 60;
  185. this.countdownTimer = setInterval(() => {
  186. this.countdown--;
  187. this.codeText = this.countdown + '秒重新获取';
  188. if (this.countdown <= 0) {
  189. clearInterval(this.countdownTimer);
  190. this.countdownTimer = null;
  191. this.codeText = '获取验证码';
  192. }
  193. }, 1000);
  194. } else {
  195. uni.showToast({
  196. icon: 'none',
  197. title: res.message || "发送验证码失败",
  198. });
  199. }
  200. })
  201. .catch(err => {
  202. uni.hideLoading();
  203. uni.showToast({
  204. icon: 'none',
  205. title: "发送验证码接口调用失败",
  206. });
  207. });
  208. },
  209. // 登录
  210. handleLogin() {
  211. if (!this.isAgreement) {
  212. uni.showToast({
  213. icon: 'none',
  214. title: "请先同意协议后再登录",
  215. });
  216. return;
  217. }
  218. if (this.current == 0) {
  219. // 验证码登录
  220. if (!this.phone) {
  221. uni.showToast({
  222. icon: 'none',
  223. title: "请输入手机号",
  224. });
  225. return;
  226. }
  227. if (!/^1[3-9]\d{9}$/.test(this.phone)) {
  228. uni.showToast({
  229. icon: 'none',
  230. title: "请输入正确的手机号",
  231. });
  232. return;
  233. }
  234. if (!this.verifyCode) {
  235. uni.showToast({
  236. icon: 'none',
  237. title: "请输入验证码",
  238. });
  239. return;
  240. }
  241. this.loginByCode();
  242. } else {
  243. // 密码登录
  244. if (!this.account) {
  245. uni.showToast({
  246. icon: 'none',
  247. title: "请输入账号",
  248. });
  249. return;
  250. }
  251. if (!this.password) {
  252. uni.showToast({
  253. icon: 'none',
  254. title: "请输入密码",
  255. });
  256. return;
  257. }
  258. this.loginByPassword();
  259. }
  260. },
  261. // 验证码登录
  262. loginByCode() {
  263. uni.showLoading({
  264. title: "登录中..."
  265. });
  266. // 调用验证码登录接口
  267. const data = {
  268. phone: this.phone,
  269. code: this.verifyCode
  270. };
  271. smsLogin(data)
  272. .then(res => {
  273. uni.hideLoading();
  274. if (res.code == 200) {
  275. uni.showToast({
  276. icon: 'success',
  277. title: "登录成功",
  278. });
  279. uni.setStorageSync('AppToken', res.data.token);
  280. uni.setStorageSync('userInfo', JSON.stringify(res.data.user));
  281. uni.$emit('refreshLogin');
  282. uni.navigateBack({
  283. delta: 1
  284. });
  285. } else {
  286. uni.showToast({
  287. icon: 'none',
  288. title: res.message || "登录失败",
  289. });
  290. }
  291. })
  292. .catch(err => {
  293. uni.hideLoading();
  294. uni.showToast({
  295. icon: 'none',
  296. title: "登录接口调用失败",
  297. });
  298. });
  299. },
  300. // 密码登录
  301. loginByPassword() {
  302. uni.showLoading({
  303. title: "登录中..."
  304. });
  305. const data={
  306. account: this.account,
  307. password: this.password
  308. }
  309. // 调用密码登录接口
  310. login(data)
  311. .then(res => {
  312. uni.hideLoading();
  313. if (res.code == 200) {
  314. uni.showToast({
  315. icon: 'success',
  316. title: "登录成功",
  317. });
  318. uni.setStorageSync('AppToken', res.data.token);
  319. uni.setStorageSync('userInfo', JSON.stringify(res.data.user));
  320. uni.$emit('refreshLogin');
  321. uni.navigateBack({
  322. delta: 1
  323. });
  324. } else {
  325. uni.showToast({
  326. icon: 'none',
  327. title: res.message || "登录失败",
  328. });
  329. }
  330. })
  331. .catch(err => {
  332. uni.hideLoading();
  333. uni.showToast({
  334. icon: 'none',
  335. title: "登录接口调用失败",
  336. });
  337. });
  338. },
  339. checkWeixin() {
  340. var ua = window.navigator.userAgent.toLowerCase();
  341. if (ua.match(/micromessenger/i) == 'micromessenger') {
  342. return true;
  343. } else {
  344. return false;
  345. }
  346. },
  347. //URL地址是否存在CODE
  348. getUrlCode(name) {
  349. return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) ||
  350. [, ''
  351. ])[1]
  352. .replace(/\+/g, '%20')) || null
  353. },
  354. //获取微信CODE
  355. getWxCode() {
  356. //在微信公众号请求用户网页授权之前,开发者需要先到公众平台官网中的“开发 - 接口权限 - 网页服务 - 网页帐号 - 网页授权获取用户基本信息”的配置选项中,修改授权回调域名。请注意,这里填写的是域名(是一个字符串),而不是URL,因此请勿加 http:// 等协议头;
  357. //http://shequ.natapp1.cc/#/pages/index/index?deviceId=8
  358. var appId = "wx40593595e62f61ad";
  359. var url = "http://h5.yjf.runtzh.com";
  360. window.location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' + appId +
  361. '&redirect_uri=' + encodeURIComponent(url + "/#/pages/auth/wxLogin") +
  362. '&response_type=code&scope=snsapi_userinfo&state=JeffreySu-954&connect_redirect=1#wechat_redirect';
  363. //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')
  364. // redirect_uri是授权成功后,跳转的url地址,微信会帮我们跳转到该链接,并且通过?的形式拼接code
  365. },
  366. handleAgreement() {
  367. this.isAgreement = !this.isAgreement;
  368. },
  369. openH5(url) {
  370. var requestPath = uni.getStorageSync('requestPath');
  371. uni.setStorageSync('url', requestPath + url);
  372. uni.navigateTo({
  373. url: '../home/web'
  374. })
  375. },
  376. toForgetPassword(){
  377. uni.navigateTo({
  378. url: '/pages/auth/forgetPassword'
  379. })
  380. },
  381. getCode() {
  382. var that = this;
  383. this.utils.getProvider()
  384. .then(provider => {
  385. console.log('当前的环境商', provider)
  386. if (!provider) {
  387. reject()
  388. }
  389. // uni登录
  390. uni.login({
  391. provider: provider,
  392. success: async loginRes => {
  393. that.code = loginRes.code
  394. }
  395. })
  396. })
  397. .catch(err => {
  398. })
  399. },
  400. // 微信用户手机号登录
  401. phoneLogin(e) {
  402. var that = this;
  403. if (!this.isAgreement) {
  404. uni.showToast({
  405. icon: 'none',
  406. title: "请先同意协议后再登录",
  407. });
  408. return false;
  409. }
  410. uni.showLoading({
  411. title: "处理中..."
  412. })
  413. console.log(e, "e")
  414. if (e.mp.detail.errMsg == 'getPhoneNumber:ok') {
  415. this.utils.getProvider()
  416. .then(provider => {
  417. console.log('当前的环境商', provider)
  418. if (!provider) {
  419. reject()
  420. }
  421. // uni登录
  422. uni.login({
  423. provider: provider,
  424. success: async loginRes => {
  425. console.log(loginRes)
  426. let code = loginRes.code // 获取开发code
  427. var userCode = uni.getStorageSync('userCode');
  428. loginByMiniApp({
  429. encryptedData: e.mp.detail.encryptedData,
  430. iv: e.mp.detail.iv,
  431. code: code,
  432. userCode: userCode
  433. })
  434. .then(res => {
  435. if (res.code == 200) {
  436. uni.hideLoading();
  437. uni.showToast({
  438. icon: 'none',
  439. title: "登录成功",
  440. });
  441. uni.setStorageSync('AppToken', res.token);
  442. uni.setStorageSync('userInfo', JSON.stringify(res
  443. .user));
  444. uni.hideLoading()
  445. //that.getUserInfo()
  446. uni.$emit('refreshLogin');
  447. uni.navigateBack({
  448. delta: 1
  449. })
  450. } else {
  451. uni.hideLoading();
  452. uni.showToast({
  453. icon: 'none',
  454. title: "授权登录失败,请重新登录",
  455. });
  456. }
  457. })
  458. .catch(error => {
  459. console.log(error)
  460. uni.hideLoading();
  461. uni.showToast({
  462. icon: 'none',
  463. title: "登录接口调用失败",
  464. });
  465. })
  466. }
  467. })
  468. })
  469. .catch(err => {
  470. uni.showToast({
  471. icon: 'none',
  472. title: err,
  473. });
  474. })
  475. } else {
  476. uni.showToast({
  477. title: '已拒绝授权',
  478. icon: 'none',
  479. duration: 2000,
  480. })
  481. }
  482. },
  483. back() {
  484. uni.switchTab({
  485. url: '/pages/home/index'
  486. });
  487. // uni.navigateBack()
  488. }
  489. }
  490. }
  491. </script>
  492. <style lang="scss">
  493. .container {
  494. flex: 1;
  495. padding: 0 24rpx;
  496. display: flex;
  497. flex-direction: column;
  498. justify-content: flex-start;
  499. position: relative;
  500. .bg {
  501. width: 100%;
  502. position: absolute;
  503. top: 0;
  504. left: 0;
  505. }
  506. .backImg {
  507. display: flex;
  508. align-items: center;
  509. image {
  510. width: 40rpx;
  511. height: 40rpx;
  512. }
  513. margin-left: 32rpx;
  514. // position: absolute;
  515. // left: 30rpx;
  516. // z-index: 100;
  517. }
  518. }
  519. .force-login-wrap {
  520. width: 100%;
  521. height: 100vh;
  522. position: relative;
  523. .top-title {
  524. padding: 0 32rpx;
  525. text-align: left;
  526. margin-top: 20rpx;
  527. .title-text {
  528. font-weight: 600;
  529. font-size: 48rpx;
  530. color: #333333;
  531. margin-bottom: 20rpx;
  532. .blue {
  533. color: #157CF8;
  534. }
  535. }
  536. .login-notice {
  537. font-weight: 400;
  538. font-size: 32rpx;
  539. color: #666666;
  540. line-height: 40rpx;
  541. }
  542. }
  543. .force-login__content {
  544. margin-top: 54rpx;
  545. padding: 0 32rpx;
  546. position: relative;
  547. .bg-type {
  548. width: 100%;
  549. position: absolute;
  550. top: 0;
  551. left: 0;
  552. }
  553. .logintype {
  554. display: flex;
  555. align-items: center;
  556. margin-bottom: 66rpx;
  557. border-bottom: 2rpx solid #f0f0f0;
  558. .line {
  559. margin: 0 32rpx;
  560. width: 2rpx;
  561. height: 32rpx;
  562. background: #D7E1F0;
  563. border-radius: 0rpx 0rpx 0rpx 0rpx;
  564. }
  565. .logintype-item {
  566. // flex: 1;
  567. text-align: center;
  568. padding-top: 36rpx;
  569. padding-bottom: 48rpx;
  570. font-family: PingFang SC, PingFang SC;
  571. font-weight: 400;
  572. font-size: 32rpx;
  573. color: #666666;
  574. position: relative;
  575. &.active {
  576. font-size: 36rpx;
  577. color: #333333;
  578. font-weight: 600;
  579. &::after {
  580. content: '';
  581. position: absolute;
  582. bottom: 30rpx;
  583. left: 50%;
  584. transform: translateX(-50%);
  585. width: 52rpx;
  586. height: 6rpx;
  587. background: #157CF8;
  588. border-radius: 42rpx;
  589. }
  590. }
  591. }
  592. }
  593. .input-form {
  594. margin-bottom: 60rpx;
  595. .input-item {
  596. background: #FFFFFF;
  597. border-radius: 16rpx;
  598. padding: 30rpx 40rpx;
  599. margin-bottom: 48rpx;
  600. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
  601. &::last-child {
  602. margin-bottom: 0
  603. }
  604. .input-field {
  605. width: 100%;
  606. font-size: 30rpx;
  607. font-family: PingFang SC;
  608. color: #333333;
  609. &::placeholder {
  610. color: #CCCCCC;
  611. }
  612. }
  613. .mima {
  614. width: 100%;
  615. display: flex;
  616. align-items: center;
  617. justify-content: space-between;
  618. image {
  619. width: 32rpx;
  620. height: 32rpx;
  621. }
  622. }
  623. &.code-input-item {
  624. display: flex;
  625. align-items: center;
  626. .code-input {
  627. flex: 1;
  628. }
  629. .get-code-btn {
  630. font-size: 28rpx;
  631. font-family: PingFang SC;
  632. font-weight: 500;
  633. color: #157CF8;
  634. padding-left: 20rpx;
  635. white-space: nowrap;
  636. }
  637. }
  638. }
  639. }
  640. .forgot {
  641. font-weight: 400;
  642. font-size: 24rpx;
  643. color: #388BFF;
  644. line-height: 40rpx;
  645. display: flex;
  646. justify-content: flex-end;
  647. margin: -40rpx 0 24rpx;
  648. }
  649. .encoding {
  650. width: 100%;
  651. height: 104rpx;
  652. line-height: 104rpx;
  653. text-align: center;
  654. background: #EDEFF2;
  655. border-radius: 16rpx 16rpx 16rpx 16rpx;
  656. font-size: 32rpx;
  657. color: #999999;
  658. }
  659. .login-btn-wrap {
  660. margin-bottom: 40rpx;
  661. margin-top: 140rpx;
  662. .login-btn {
  663. width: 100%;
  664. height: 88rpx;
  665. background: rgba(56, 139, 255, 1);
  666. border-radius: 44rpx;
  667. font-size: 32rpx;
  668. font-family: PingFang SC;
  669. font-weight: 500;
  670. color: #FFFFFF;
  671. border: none;
  672. display: flex;
  673. align-items: center;
  674. justify-content: center;
  675. &::after {
  676. border: none;
  677. }
  678. }
  679. }
  680. }
  681. }
  682. .tips {
  683. display: flex;
  684. justify-content: center;
  685. align-items: center;
  686. font-size: 24rpx;
  687. color: #666666;
  688. flex-wrap: nowrap;
  689. padding: 0 60rpx;
  690. checkbox {
  691. margin-right: 10rpx;
  692. flex-shrink: 0;
  693. transform: scale(0.8);
  694. }
  695. .tips-text {
  696. margin-right: 4rpx;
  697. white-space: nowrap;
  698. }
  699. .btn {
  700. color: #157CF8;
  701. margin: 0 2rpx;
  702. white-space: nowrap;
  703. }
  704. }
  705. .wx-login {
  706. background: rgba(0, 0, 0, 0.7);
  707. z-index: 99999;
  708. position: fixed;
  709. top: 0;
  710. left: 0;
  711. height: 100%;
  712. width: 100%;
  713. display: flex;
  714. align-items: center;
  715. justify-content: center;
  716. .form {
  717. border-radius: 20rpx;
  718. padding: 60rpx 30rpx;
  719. width: 500upx;
  720. height: 300upx;
  721. background-color: #fff;
  722. .title {
  723. font-size: 32upx;
  724. font-family: PingFang SC;
  725. font-weight: bold;
  726. }
  727. .desc {
  728. font-size: 28upx;
  729. margin: 60upx 0upx 60upx 0upx;
  730. font-family: PingFang SC;
  731. font-weight: 500;
  732. }
  733. .btn-box {
  734. margin-top: 30rpx;
  735. width: 100%;
  736. display: flex;
  737. align-items: center;
  738. justify-content: center;
  739. .btn {
  740. display: flex;
  741. align-items: center;
  742. justify-content: center;
  743. margin-left: 10upx;
  744. width: 50%;
  745. height: 80rpx;
  746. border-radius: 5rpx;
  747. background-color: #0bb3f2;
  748. font-size: 30rpx;
  749. font-family: PingFang SC;
  750. font-weight: 500;
  751. color: #fff;
  752. position: relative;
  753. }
  754. .btn-close {
  755. margin-right: 10upx;
  756. width: 50%;
  757. height: 80rpx;
  758. border-radius: 5rpx;
  759. border: 2rpx solid #0bb3f2;
  760. background: none;
  761. font-size: 30rpx;
  762. font-family: PingFang SC;
  763. font-weight: 500;
  764. color: #0bb3f2;
  765. }
  766. }
  767. }
  768. }
  769. .auth_btn {
  770. width: 100%;
  771. height: 100%;
  772. top: 0upx;
  773. position: absolute;
  774. opacity: 0.0;
  775. }
  776. </style>