index.vue 19 KB

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