index.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794
  1. <template>
  2. <view :style="colorStyle" class="wrapper">
  3. <view class="bag">
  4. <img :src="loginBg" alt="" srcset="">
  5. </view>
  6. <view class="system-height" :style="{ height: statusBarHeight }"></view>
  7. <!-- #ifdef MP -->
  8. <view class="title-bar height-add" >
  9. <view class="icon" @click="back" v-if="!isHome">
  10. <image src="../static/left.png"></image>
  11. </view>
  12. <view class="icon" @click="home" v-else>
  13. <image src="../static/home.png"></image>
  14. </view>
  15. 账户登录
  16. </view>
  17. <!-- #endif -->
  18. <view class="merchant-msg">
  19. <img :src="configData.logo_url" />
  20. <view class="name">
  21. <!-- {{configData.site_name}} -->
  22. 君子堂
  23. </view>
  24. </view>
  25. <view class="wechat-login">
  26. <view class="btn-wrapper">
  27. <!-- #ifdef H5 -->
  28. <button hover-class="none" @click="wechatLogin" class="bg-color btn1">授权登录</button>
  29. <!-- #endif -->
  30. <!-- #ifdef MP -->
  31. <!-- <template v-if="configData.wechat_auth_switch"> -->
  32. <template>
  33. <button hover-class="none" open-type="getPhoneNumber" @getphonenumber="getphonenumber"
  34. class="bg-color btn1">授权登录</button>
  35. <!-- <button hover-class="none" @tap="getAuthLogin"
  36. class="bg-color btn1">授权登录</button>
  37. <button hover-class="none" @tap="userLogin"
  38. class="bg-color btn1">授权登录</button>
  39. <button hover-class="none" @tap="getUserProfile"
  40. class="bg-color btn1">授权登录</button>
  41. <button open-type="getUserInfo" @getuserinfo="setUserInfo"
  42. class="bg-color btn1">授权登录</button> -->
  43. </template>
  44. <button v-if="configData.phone_auth_switch" hover-class="none" @click="phoneLogin" class="btn2">手机号登录</button>
  45. <!-- #endif -->
  46. </view>
  47. </view>
  48. <view class="protocol" v-if="!canGetPrivacySetting">
  49. <checkbox-group @change='changeIsDefault' v-if="configData.store_user_agreement">
  50. <checkbox :checked="protocol ? true : false" />已阅读并同意<text class="font-num"
  51. @click="privacy('user')">《用户协议》</text>
  52. 与<text class="font-num" @click="privacy('privacy')">《隐私协议》</text>
  53. </checkbox-group>
  54. <view v-else>
  55. 登录注册即同意商城
  56. <text class="font-num" @tap="privacy('user')">《用户协议》</text>与<text class="font-num" @click="privacy('privacy')">《隐私协议》</text>
  57. </view>
  58. </view>
  59. <!-- <block v-if="isUp">
  60. <mobileLogin :isUp="isUp" @close="maskClose" :authKey="authKey" @wechatPhone="wechatPhone"></mobileLogin>
  61. </block> -->
  62. <!-- <block v-if="isPhoneBox">
  63. <routinePhone :logoUrl="logoUrl" :isPhoneBox="isPhoneBox" @close="bindPhoneClose" :authKey="authKey">
  64. </routinePhone>
  65. </block> -->
  66. <block>
  67. <editUserModal :isShow="isShow" @closeEdit="closeEdit" @editSuccess="editSuccess">
  68. </editUserModal>
  69. </block>
  70. <!-- #ifdef MP -->
  71. <privacyAgreementPopup v-if="canGetPrivacySetting" @onReject="onReject" @onAgree="onAgree">
  72. </privacyAgreementPopup>
  73. <!-- #endif -->
  74. </view>
  75. </template>
  76. <script>
  77. const app = getApp();
  78. let statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
  79. import { HTTP_REQUEST_URL } from '@/config/app';
  80. // import mobileLogin from '../components/loginMobile/index.vue';
  81. // import routinePhone from '../components/loginMobile/routine_phone.vue';
  82. import editUserModal from '@/components/eidtUserModal/index.vue'
  83. import privacyAgreementPopup from '@/components/privacyAgreementPopup/index.vue'
  84. import {
  85. getLogo,
  86. silenceAuth,
  87. routineBindingPhone,
  88. wechatAuthV2,
  89. authLogin,
  90. authType,
  91. wechatAuthLogin
  92. } from '@/api/public';
  93. import {
  94. LOGO_URL,
  95. EXPIRES_TIME,
  96. USER_INFO,
  97. STATE_R_KEY,
  98. WX_AUTH,
  99. STATE_KEY
  100. } from '@/config/cache';
  101. import {
  102. getUserInfo
  103. } from '@/api/user.js';
  104. import Routine from '@/libs/routine';
  105. import wechat from '@/libs/wechat';
  106. import colors from '@/mixins/color.js';
  107. export default {
  108. mixins:[colors],
  109. data() {
  110. return {
  111. isUp: false,
  112. phone: '',
  113. statusBarHeight: statusBarHeight,
  114. isHome: false,
  115. isPhoneBox: false,
  116. code: '',
  117. authKey: '',
  118. options: '',
  119. userInfo: {},
  120. codeNum: 0,
  121. canUseGetUserProfile: false,
  122. canGetPrivacySetting: false,
  123. mp_is_new: this.$Cache.get('MP_VERSION_ISNEW') || false,
  124. configData: this.$Cache.get('BASIC_CONFIG'),
  125. imgHost: HTTP_REQUEST_URL,
  126. loginBg:'',
  127. protocol: false,
  128. bindPhone: false,
  129. isShow: false,
  130. };
  131. },
  132. components: {
  133. // mobileLogin,
  134. // routinePhone,
  135. editUserModal,
  136. privacyAgreementPopup
  137. },
  138. onLoad(options) {
  139. // this.colorData();
  140. let loginBg = [
  141. this.imgHost+'/statics/images/login-bg-1.jpg',
  142. this.imgHost+'/statics/images/login-bg-2.jpg',
  143. this.imgHost+'/statics/images/login-bg-3.jpg',
  144. this.imgHost+'/statics/images/login-bg-4.jpg',
  145. this.imgHost+'/statics/images/login-bg-5.jpg',
  146. this.imgHost + '/statics/images/login-bg-6.jpg'
  147. ];
  148. setTimeout(()=>{
  149. switch(this.colorNum){
  150. case 1:
  151. this.loginBg = loginBg[0];
  152. break;
  153. case 2:
  154. this.loginBg = loginBg[1];
  155. break;
  156. case 3:
  157. this.loginBg = loginBg[2];
  158. break;
  159. case 4:
  160. this.loginBg = loginBg[3];
  161. break;
  162. case 5:
  163. this.loginBg = loginBg[4];
  164. break;
  165. case 6:
  166. this.loginBg = loginBg[5];
  167. break;
  168. default:
  169. this.loginBg = loginBg[2];
  170. break
  171. }
  172. },1)
  173. if (uni.getUserProfile) {
  174. this.canUseGetUserProfile = true
  175. }
  176. // getLogo().then(res => {
  177. // this.logoUrl = res.data.logo_url;
  178. // this.siteName = res.data.site_name;
  179. // this.agreement = res.data.store_user_agreement;
  180. // this.routineAuthType = res.data.routine_auth_type;
  181. // });
  182. let that = this;
  183. // #ifdef MP
  184. if (wx.getPrivacySetting) {
  185. this.canGetPrivacySetting = true
  186. }
  187. // Routine.getCode()
  188. // .then(code => {
  189. // this.code = code
  190. // })
  191. // this.userLogin();
  192. // #endif
  193. // #ifdef H5
  194. const {
  195. code,
  196. state
  197. } = options;
  198. this.options = options;
  199. // 获取确认授权code
  200. this.code = code || '';
  201. if (code) {
  202. let spread = this.$Cache.get("spread") || '';
  203. let backUrl = options.back_url;
  204. this.wechatAuthLogin({
  205. code,
  206. spread
  207. }, backUrl)
  208. }
  209. // #endif
  210. let pages = getCurrentPages();
  211. let prePage = pages[pages.length - 2];
  212. if (prePage && prePage.route == 'pages/order_addcart/order_addcart') {
  213. this.isHome = true;
  214. } else {
  215. this.isHome = false;
  216. }
  217. },
  218. onShow() {
  219. uni.removeStorageSync('form_type_cart');
  220. },
  221. methods: {
  222. wechatAuthLogin(d, back_url) {
  223. uni.showLoading({
  224. title: '正在登录中'
  225. });
  226. wechatAuthLogin(d).then(res => {
  227. uni.hideLoading();
  228. this.$Cache.set(WX_AUTH, d.code);
  229. this.$Cache.clear(STATE_KEY);
  230. if (res.data.bindPhone) {
  231. this.authKey = res.data.key
  232. uni.navigateTo({
  233. url: `/pages/users/binding_phone/index?authKey=${this.authKey}&backUrl=${back_url}`
  234. })
  235. } else {
  236. let time = res.data.expires_time - this.$Cache.time();
  237. this.$store.commit('LOGIN', {
  238. token: res.data.token,
  239. time: time
  240. });
  241. this.getUserInfo(0, back_url)
  242. }
  243. }).catch(err => {
  244. uni.hideLoading();
  245. uni.showToast({
  246. title: err,
  247. icon: 'none',
  248. duration: 2000
  249. });
  250. });
  251. },
  252. // 小程序 22.11.8日删除getUserProfile 接口获取用户昵称头像
  253. userLogin() {
  254. Routine.getCode()
  255. .then(code => {
  256. this.code = code
  257. // uni.showLoading({
  258. // title: '正在登录中'
  259. // });
  260. authType({
  261. code,
  262. spread_spid: app.globalData.spid,
  263. spread_code: app.globalData.code
  264. }).then(res => {
  265. this.authKey = res.data.key;
  266. this.bindPhone = res.data.bindPhone
  267. // if (res.data.key !== undefined && res.data.key) {
  268. // uni.hideLoading();
  269. // this.authKey = res.data.key;
  270. // this.isPhoneBox = true;
  271. // } else {
  272. // uni.hideLoading();
  273. // let time = res.data.expires_time - this.$Cache.time();
  274. // this.$store.commit('LOGIN', {
  275. // token: res.data.token,
  276. // time: time
  277. // });
  278. // this.getUserInfo()
  279. // }
  280. }).catch(err => {
  281. uni.hideLoading();
  282. uni.showToast({
  283. title: err,
  284. icon: 'none',
  285. duration: 2000
  286. });
  287. })
  288. })
  289. .catch(err => {
  290. console.log(err)
  291. });
  292. },
  293. // 授权登录
  294. getAuthLogin() {
  295. if (!this.protocol) {
  296. return this.$util.Tips({
  297. title: '请先阅读并同意协议'
  298. });
  299. }
  300. uni.showLoading({
  301. title: '正在登录中'
  302. });
  303. authLogin({
  304. key: this.authKey
  305. }).then(res => {
  306. let time = res.data.expires_time - this.$Cache.time();
  307. this.$store.commit('LOGIN', {
  308. token: res.data.token,
  309. time: time
  310. });
  311. this.getUserInfo(res.data.store_user_avatar)
  312. }).catch(err => {
  313. uni.hideLoading();
  314. uni.showToast({
  315. title: err,
  316. icon: 'none',
  317. duration: 2000
  318. });
  319. });
  320. },
  321. changeIsDefault(e) {
  322. this.$set(this, 'protocol', !this.protocol);
  323. },
  324. editSuccess() {
  325. this.isShow = false
  326. },
  327. closeEdit() {
  328. this.isShow = false
  329. this.$util.Tips({
  330. title: '登录成功',
  331. icon: 'success'
  332. }, {
  333. tab: 3
  334. });
  335. },
  336. phoneLogin(){
  337. uni.navigateTo({
  338. url: `/pages/users/binding_phone/index?authKey=${this.authKey}&pageType=0`
  339. })
  340. },
  341. onAgree() {
  342. this.protocol = true
  343. },
  344. onReject() {
  345. uni.navigateBack();
  346. },
  347. back() {
  348. uni.navigateBack();
  349. },
  350. home() {
  351. uni.switchTab({
  352. url: '/pages/index/index'
  353. })
  354. },
  355. // 弹窗关闭
  356. maskClose() {
  357. this.isUp = false;
  358. },
  359. bindPhoneClose(data) {
  360. if (data.isStatus) {
  361. this.isPhoneBox = false;
  362. this.$util.Tips({
  363. title: '登录成功',
  364. icon: 'success'
  365. }, {
  366. tab: 3
  367. });
  368. } else {
  369. this.isPhoneBox = false;
  370. }
  371. },
  372. privacy(type) {
  373. uni.navigateTo({
  374. url: "/pages/users/privacy/index?type=" + type
  375. })
  376. },
  377. // #ifdef MP
  378. // 小程序获取手机号码
  379. getphonenumber(e) {
  380. if(e.detail.errMsg == 'getPhoneNumber:fail user deny'){
  381. return false
  382. }
  383. if (!this.protocol) {
  384. return this.$util.Tips({
  385. title: '请先阅读并同意协议'
  386. });
  387. }
  388. uni.showLoading({
  389. title: '正在登录中'
  390. });
  391. Routine.getCode()
  392. .then(code => {
  393. this.getUserPhoneNumber(e.detail.encryptedData, e.detail.iv, code);
  394. })
  395. .catch(error => {
  396. uni.$emit('closePage', false);
  397. uni.hideLoading();
  398. });
  399. },
  400. // 小程序获取手机号码回调
  401. getUserPhoneNumber(encryptedData, iv, code) {
  402. routineBindingPhone({
  403. encryptedData: encryptedData,
  404. iv: iv,
  405. code: code,
  406. spread_spid: app.globalData.spid,
  407. spread_code: app.globalData.code,
  408. key: this.authKey
  409. })
  410. .then(res => {
  411. let time = res.data.expires_time - this.$Cache.time();
  412. this.$store.commit('LOGIN', {
  413. token: res.data.token,
  414. time: time
  415. });
  416. // this.userInfo = res.data.userInfo;
  417. // this.$store.commit('SETUID', res.data.userInfo.uid);
  418. // this.$store.commit('UPDATE_USERINFO', res.data.userInfo);
  419. this.$Cache.clear('snsapiKey');
  420. this.getUserInfo(res.data.store_user_avatar)
  421. // this.$util.Tips({
  422. // title: '登录成功',
  423. // icon: 'success'
  424. // }, {
  425. // tab: 3
  426. // });
  427. })
  428. .catch(res => {
  429. this.$util.Tips({
  430. title: res
  431. });
  432. uni.hideLoading();
  433. });
  434. },
  435. /**
  436. * 获取个人用户信息
  437. */
  438. getUserInfo: function(new_user, back_url) {
  439. let that = this;
  440. getUserInfo().then(res => {
  441. uni.hideLoading();
  442. that.userInfo = res.data;
  443. that.$store.commit('SETUID', res.data.uid);
  444. that.$store.commit('UPDATE_USERINFO', res.data);
  445. if (new_user) {
  446. this.isShow = true
  447. } else {
  448. // #ifdef MP
  449. that.$util.Tips({
  450. title: '登录成功',
  451. icon: 'success'
  452. }, {
  453. tab: 3
  454. });
  455. // #endif
  456. // #ifndef MP
  457. that.$util.Tips({
  458. title: '登录成功',
  459. icon: 'success'
  460. }, {
  461. tab: 4,
  462. url: back_url || '/pages/user/index'
  463. });
  464. // #endif
  465. }
  466. }).catch(err => {
  467. uni.hideLoading();
  468. uni.showToast({
  469. title: err.msg,
  470. icon: 'none',
  471. duration: 2000
  472. });
  473. });
  474. },
  475. setUserInfo(e) {
  476. uni.showLoading({
  477. title: '正在登录中'
  478. });
  479. Routine.getCode()
  480. .then(code => {
  481. this.getWxUser(code);
  482. })
  483. .catch(res => {
  484. uni.hideLoading();
  485. });
  486. },
  487. //小程序授权api替换 getUserInfo
  488. getUserProfile() {
  489. uni.showLoading({
  490. title: '正在登录中'
  491. });
  492. let self = this;
  493. Routine.getUserProfile()
  494. .then(res => {
  495. let userInfo = res.userInfo;
  496. userInfo.code = this.code;
  497. userInfo.spread_spid = app.globalData.spid || this.$Cache.get('spid'); //获取推广人ID
  498. userInfo.spread_code = app.globalData.code; //获取推广人分享二维码ID
  499. Routine.authUserInfo(userInfo)
  500. .then(res => {
  501. if (res.data.key !== undefined && res.data.key) {
  502. uni.hideLoading();
  503. self.authKey = res.data.key;
  504. self.isPhoneBox = true;
  505. } else {
  506. uni.hideLoading();
  507. let time = res.data.expires_time - self.$Cache.time();
  508. self.$store.commit('LOGIN', {
  509. token: res.data.token,
  510. time: time
  511. });
  512. this.getUserInfo()
  513. }
  514. })
  515. .catch(res => {
  516. uni.hideLoading();
  517. uni.showToast({
  518. title: res.msg,
  519. icon: 'none',
  520. duration: 2000
  521. });
  522. });
  523. })
  524. .catch(res => {
  525. uni.hideLoading();
  526. });
  527. },
  528. getWxUser(code) {
  529. let self = this;
  530. Routine.getUserInfo()
  531. .then(res => {
  532. let userInfo = res.userInfo;
  533. userInfo.code = code;
  534. userInfo.spread_spid = app.globalData.spid; //获取推广人ID
  535. userInfo.spread_code = app.globalData.code; //获取推广人分享二维码ID
  536. Routine.authUserInfo(userInfo)
  537. .then(res => {
  538. if (res.data.key !== undefined && res.data.key) {
  539. uni.hideLoading();
  540. self.authKey = res.data.key;
  541. self.isPhoneBox = true;
  542. } else {
  543. uni.hideLoading();
  544. let time = res.data.expires_time - self.$Cache.time();
  545. self.$store.commit('LOGIN', {
  546. token: res.data.token,
  547. time: time
  548. });
  549. self.$util.Tips({
  550. title: res.msg,
  551. icon: 'success'
  552. }, {
  553. tab: 3
  554. });
  555. }
  556. })
  557. .catch(res => {
  558. uni.hideLoading();
  559. uni.showToast({
  560. title: res.msg,
  561. icon: 'none',
  562. duration: 2000
  563. });
  564. });
  565. })
  566. .catch(res => {
  567. uni.hideLoading();
  568. });
  569. },
  570. // #endif
  571. // #ifdef H5
  572. // 获取url后面的参数
  573. getQueryString(name) {
  574. var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
  575. var reg_rewrite = new RegExp('(^|/)' + name + '/([^/]*)(/|$)', 'i');
  576. var r = window.location.search.substr(1).match(reg);
  577. var q = window.location.pathname.substr(1).match(reg_rewrite);
  578. if (r != null) {
  579. return unescape(r[2]);
  580. } else if (q != null) {
  581. return unescape(q[2]);
  582. } else {
  583. return null;
  584. }
  585. },
  586. // 公众号登录
  587. wechatLogin() {
  588. if (!this.protocol && this.configData.store_user_agreement) {
  589. return this.$util.Tips({
  590. title: '请先阅读并同意协议'
  591. });
  592. }
  593. if ((!this.code && !this.authKey) || (this.options.scope != 'snsapi_base' && this.options.scope != 'snsapi_userinfo')) {
  594. this.$wechat.oAuth('snsapi_userinfo', '/pages/users/wechat_login/index');
  595. // this.$wechat.oAuth('snsapi_userinfo', location.href);
  596. }else{
  597. if (this.authKey) {
  598. uni.navigateTo({
  599. url: `/pages/users/binding_phone/index?authKey=${this.authKey}`
  600. })
  601. }
  602. }
  603. },
  604. // 输入手机号后的回调
  605. wechatPhone() {
  606. this.$Cache.clear('snsapiKey');
  607. if (this.options.back_url) {
  608. let url = uni.getStorageSync('snRouter');
  609. url = url.indexOf('/pages/index/index') != -1 ? '/' : url;
  610. if (url.indexOf('/pages/users/wechat_login/index') !== -1) {
  611. url = '/';
  612. }
  613. if (!url) {
  614. url = '/pages/index/index';
  615. }
  616. let self = this;
  617. this.isUp = false;
  618. uni.showToast({
  619. title: '登录成功',
  620. icon: 'none'
  621. });
  622. setTimeout(res => {
  623. location.href = url;
  624. }, 800);
  625. } else {
  626. uni.navigateBack();
  627. }
  628. }
  629. // #endif
  630. }
  631. };
  632. </script>
  633. <style lang="scss">
  634. page {
  635. background: #fff;
  636. }
  637. .wrapper {
  638. position: relative;
  639. height: 100vh;
  640. .bag {
  641. position: absolute;
  642. top: 0;
  643. left: 0;
  644. width: 100%;
  645. opacity: .8;
  646. z-index: -1;
  647. /* #ifdef H5 */
  648. z-index: 0;
  649. /* #endif */
  650. img {
  651. width: 100%;
  652. height: 838rpx;
  653. }
  654. }
  655. .merchant-msg {
  656. padding-top: 252rpx;
  657. display: flex;
  658. justify-content: center;
  659. align-items: center;
  660. flex-direction: column;
  661. z-index: 2;
  662. /* #ifdef H5 */
  663. position: relative;
  664. /* #endif */
  665. img {
  666. width: 152rpx;
  667. height: 152rpx;
  668. border-radius: 50%;
  669. }
  670. .name {
  671. font-size: 40rpx;
  672. font-weight: 500;
  673. color: #333333;
  674. line-height: 56rpx;
  675. margin-top: 32rpx;
  676. }
  677. }
  678. }
  679. .protocol{
  680. position: fixed;
  681. bottom: 52rpx;
  682. left: 0;
  683. width: 100%;
  684. margin: 0 auto;
  685. color: #999999;
  686. font-size: 24rpx;
  687. line-height: 22rpx;
  688. text-align: center;
  689. bottom: calc(52rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
  690. bottom: calc(52rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
  691. /deep/uni-checkbox .uni-checkbox-input {
  692. width: 32rpx !important;
  693. height: 32rpx !important;
  694. }
  695. /deep/uni-checkbox .uni-checkbox-input.uni-checkbox-input-checked::before {
  696. font-size: 24rpx
  697. }
  698. /*checkbox 选项框大小 */
  699. /deep/checkbox .wx-checkbox-input {
  700. width: 32rpx;
  701. height: 32rpx;
  702. margin-bottom: 4rpx;
  703. }
  704. /*checkbox选中后样式 */
  705. /deep/checkbox .wx-checkbox-input.wx-checkbox-input-checked {
  706. background: white;
  707. }
  708. /*checkbox选中后图标样式 */
  709. /deep/checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
  710. width: 32rpx;
  711. height: 32rpx;
  712. line-height: 32rpx;
  713. text-align: center;
  714. font-size: 22rpx;
  715. background: transparent;
  716. transform: translate(-50%, -50%) scale(1);
  717. -webkit-transform: translate(-50%, -50%) scale(1);
  718. }
  719. }
  720. .height-add {
  721. height: 43px;
  722. }
  723. .wechat-login {
  724. padding: 72rpx 34rpx;
  725. .img image {
  726. width: 100%;
  727. }
  728. .btn-wrapper {
  729. margin-top: 86rpx;
  730. padding: 0 66rpx;
  731. button {
  732. width: 100%;
  733. height: 86rpx;
  734. line-height: 86rpx;
  735. margin-bottom: 40rpx;
  736. border-radius: 120rpx;
  737. font-size: 30rpx;
  738. // background-color: var(--view-theme);
  739. // border:1px solid var(--view-theme);
  740. &.btn1 {
  741. color: #fff;
  742. }
  743. &.btn2 {
  744. color: #666666;
  745. border: 1px solid #E4E4E4;
  746. }
  747. }
  748. }
  749. }
  750. .title-bar {
  751. position: relative;
  752. display: flex;
  753. align-items: center;
  754. justify-content: center;
  755. font-size: 36rpx;
  756. }
  757. .icon {
  758. position: absolute;
  759. left: 30rpx;
  760. top: 0;
  761. display: flex;
  762. align-items: center;
  763. justify-content: center;
  764. width: 86rpx;
  765. height: 86rpx;
  766. image {
  767. width: 50rpx;
  768. height: 50rpx;
  769. }
  770. }
  771. </style>