index.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858
  1. <template>
  2. <mobile-frame>
  3. <view class="main">
  4. <!-- <view class="one">
  5. <text>{{type==0?'短信验证码登录':'手机号密码登录'}}</text>
  6. </view>
  7. <view class="two">
  8. <uni-forms ref="form" :model="form" :rules="rules" label-width="auto">
  9. <uni-forms-item label="手机号" name="phone">
  10. <uni-easyinput type="number" v-model="form.phone" />
  11. </uni-forms-item>
  12. <uni-forms-item label="验证码" name="code" v-if="type==0">
  13. <view class="yzm">
  14. <view class="l">
  15. <uni-easyinput type="number" v-model="form.code" placeholder="请输入验证码" />
  16. </view>
  17. <view class="r">
  18. <button type="default" size="mini" @tap="oneSms">{{sms_1==0?'验证码':sms_1}}</button>
  19. </view>
  20. </view>
  21. </uni-forms-item>
  22. <uni-forms-item label="登录密码" name="password" v-if="type==1">
  23. <uni-easyinput type="text" v-model="form.password" placeholder="请输入登录密码" />
  24. </uni-forms-item>
  25. <view class="type">
  26. <button type="default" size="mini" @tap="passLogin">{{type==0?'密码登录':'短信登录'}}</button>
  27. </view>
  28. <view class="agree">
  29. <checkbox-group @change="changeAgree">
  30. <label>
  31. <checkbox :checked="agree" />
  32. <text @tap.stop="toAgree()">我已阅读并同意“用户协议”和“隐私政策”</text>
  33. </label>
  34. </checkbox-group>
  35. </view>
  36. <view class="btn">
  37. <button type="default" size="mini" @click="onSubmit('form')">登录</button>
  38. </view>
  39. </uni-forms>
  40. </view>
  41. <view class="thr">
  42. <view class="thr_1">
  43. <text>其他登录方式</text>
  44. </view>
  45. <view class="thr_2">
  46. <view class="thr_2_1" @tap="otherLogin('wx')">
  47. <text class="iconfont icon-weixin"></text>
  48. </view>
  49. </view>
  50. </view> -->
  51. <view class="wx">
  52. <view class="wx_1">
  53. <text class="iconfont icon-weixin"></text>
  54. </view>
  55. <view class="wx_2">
  56. <button size="mini" @tap="otherLogin('wx')">微信信任登录</button>
  57. </view>
  58. <view class="wx_3">
  59. <checkbox-group @change="changeAgree">
  60. <label>
  61. <checkbox :checked="agree" />
  62. <text @tap.stop="toAgree()">我已阅读并同意“用户协议”和“隐私政策”</text>
  63. </label>
  64. </checkbox-group>
  65. </view>
  66. </view>
  67. </view>
  68. <uni-popup ref="dialogShow" type="center" :mask-click="false" background-color="#ffffff">
  69. <view class="popup">
  70. <view class="title">
  71. <text>绑定手机号</text>
  72. </view>
  73. <view class="wx_1">
  74. <text>确定获取微信绑定手机号吗?</text>
  75. </view>
  76. <view class="wx_2">
  77. <button size="mini" @tap="diaClose">取消</button>
  78. <button size="mini" open-type="getPhoneNumber" @getphonenumber="getUserPhone">确定</button>
  79. </view>
  80. </view>
  81. </uni-popup>
  82. <!-- <uni-popup ref="dialogShow" type="dialog">
  83. <uni-popup-dialog :title="dialog.title" mode="base" :before-close="true" @confirm="diaSubmit(dialog)" @close="diaReset(dialog)">
  84. <view class="dialog dialog_1" v-if="dialog.type=='1'">
  85. <uni-forms ref="phoneForm" :model="phoneForm" label-width="auto">
  86. <uni-forms-item label="方式">
  87. <uni-data-checkbox v-model="phoneForm.type" :localdata="typeList" />
  88. </uni-forms-item>
  89. <uni-forms-item label="微信" v-if="phoneForm.type==0">
  90. <button type="default" size="mini" open-type="getPhoneNumber" @getphonenumber="getUserPhone">获取微信绑定手机</button>
  91. </uni-forms-item>
  92. <uni-forms-item label="手机号" v-if="phoneForm.type==0">
  93. <uni-easyinput type="number" v-model="phoneForm.phone" disabled />
  94. </uni-forms-item>
  95. <uni-forms-item label="手机号" v-if="phoneForm.type==1">
  96. <view class="yzm">
  97. <view class="l">
  98. <uni-easyinput type="number" v-model="phoneForm.phone" placeholder="请输入手机号" />
  99. </view>
  100. <view class="r">
  101. <button type="default" size="mini" @tap="twoSms">{{sms_1==0?'验证码':sms_1}}</button>
  102. </view>
  103. </view>
  104. </uni-forms-item>
  105. <uni-forms-item label="验证码" v-if="phoneForm.type==1">
  106. <uni-easyinput type="number" v-model="phoneForm.code" placeholder="请输入验证码" />
  107. </uni-forms-item>
  108. </uni-forms>
  109. </view>
  110. </uni-popup-dialog>
  111. </uni-popup> -->
  112. </mobile-frame>
  113. </template>
  114. <script>
  115. export default {
  116. data() {
  117. return {
  118. // 平台信息
  119. system: {},
  120. openid: '',
  121. // 登录类型
  122. type: 0,
  123. form: {},
  124. rules: {
  125. phone: {
  126. rules: [ //
  127. {
  128. required: true,
  129. errorMessage: '请输入手机号',
  130. },
  131. {
  132. minLength: 11,
  133. maxLength: 11,
  134. errorMessage: '账号长度在{maxLength}个字符',
  135. }
  136. ]
  137. }
  138. },
  139. sms_1: 0,
  140. // 用戶协议
  141. agree: true,
  142. // 注册账号信息
  143. user: {},
  144. // 弹框
  145. dialog: {
  146. title: '绑定手机号',
  147. type: '1'
  148. },
  149. // 绑定手机号
  150. phoneForm: {
  151. type: 0,
  152. },
  153. typeList: [ //
  154. {
  155. limit: 10,
  156. text: '微信',
  157. value: 0
  158. },
  159. {
  160. text: '短信验证',
  161. value: 1
  162. }
  163. ],
  164. };
  165. },
  166. onShow: function() {
  167. const that = this;
  168. // 查询平台信息
  169. that.searchSystem();
  170. },
  171. methods: {
  172. // 查询平台信息
  173. searchSystem() {
  174. const that = this;
  175. let system = that.$config.system;
  176. if (system) {
  177. that.$set(that, `system`, system);
  178. that.searchOpenid();
  179. }
  180. },
  181. // 查询openid
  182. searchOpenid() {
  183. const that = this;
  184. let system = that.system;
  185. if (system.uniPlatform == "mp-weixin") {
  186. uni.login({
  187. provider: 'weixin',
  188. success: async function(res) {
  189. const aee = await that.$api(`/wechat/api/login/app`, 'GET', {
  190. config: that.$config.wx_projectkey,
  191. js_code: res.code
  192. })
  193. if (aee.errcode == '0') {
  194. that.$set(that, `openid`, aee.data.openid);
  195. }
  196. }
  197. })
  198. } else if (system.uniPlatform == "app") {
  199. console.log('app');
  200. }
  201. },
  202. // 选择登录类型
  203. typeChange(e) {
  204. const that = this;
  205. that.$set(that, `type`, e.detail.value);
  206. },
  207. // 短信登录/密码登录
  208. passLogin() {
  209. const that = this;
  210. let type = 0;
  211. if (that.type == 0) type = 1;
  212. that.$set(that, `type`, type)
  213. },
  214. // 短信登录-发送验证码
  215. async oneSms() {
  216. const that = this;
  217. let form = that.form;
  218. if (form && form.phone) {
  219. let res = await that.$api(`/user/toLoginByCode`, 'POST', {
  220. phone: form.phone
  221. })
  222. if (res.errcode == '0') {
  223. uni.showToast({
  224. title: '发送成功',
  225. icon: 'none'
  226. })
  227. that.$set(that, `sms_1`, 60);
  228. that.timeDown();
  229. } else {
  230. uni.showToast({
  231. title: res.errmsg,
  232. icon: 'none'
  233. })
  234. }
  235. } else {
  236. uni.showToast({
  237. title: '输入错误,请重新输入!',
  238. icon: 'none'
  239. })
  240. }
  241. },
  242. // 登录
  243. onSubmit(ref) {
  244. const that = this;
  245. let agree = that.agree;
  246. let system = that.system;
  247. let type = that.type;
  248. that.$refs[ref].validate().then(async params => {
  249. if (agree) {
  250. if (type == 0 && system.uniPlatform == 'app') {
  251. // app,短信验证码登录
  252. that.appSmsLogin(params);
  253. } else if (type == 1 && system.uniPlatform == 'app') {
  254. // app,密码登录
  255. that.appPassLogin(params);
  256. } else if (type == 0 && system.uniPlatform == 'mp-weixin') {
  257. // wx,短信验证码登录
  258. that.wxSmsLogin(params)
  259. } else if (type == 1 && system.uniPlatform == 'mp-weixin') {
  260. // wx,密码登录
  261. that.wxPassLogin(params)
  262. }
  263. } else {
  264. uni.showToast({
  265. title: '请阅读并同意用户协议和隐私政策',
  266. icon: 'none'
  267. })
  268. }
  269. }).catch(err => {
  270. console.log(err);
  271. })
  272. },
  273. // app,短信验证码登录
  274. async appSmsLogin(e) {
  275. const that = this;
  276. if (e.code) {
  277. const res = await that.$api(`/user/checkLoginCode`, 'POST', e);
  278. if (res.errcode == '0') {
  279. uni.setStorage({
  280. key: 'token',
  281. data: res.data,
  282. success: function() {
  283. uni.navigateBack({
  284. delta: 1
  285. })
  286. }
  287. });
  288. } else {
  289. if (res.errcode == '-5') {
  290. uni.showToast({
  291. title: '用户不存在',
  292. icon: 'none'
  293. })
  294. // todo:验证码登录用户不存在可自动注册账号,并跳转
  295. } else {
  296. uni.showToast({
  297. title: res.errmsg || '信息错误',
  298. icon: 'none'
  299. })
  300. }
  301. }
  302. } else {
  303. uni.showToast({
  304. title: '请输入验证码',
  305. icon: 'none'
  306. })
  307. }
  308. },
  309. // app,密码登录
  310. async appPassLogin(e) {
  311. const that = this;
  312. if (e.password) {
  313. const res = await that.$api(`/user/login`, 'POST', e);
  314. if (res.errcode == '0') {
  315. uni.setStorage({
  316. key: 'token',
  317. data: res.data,
  318. success: function() {
  319. uni.navigateBack({
  320. delta: 1
  321. })
  322. }
  323. });
  324. } else {
  325. uni.showToast({
  326. title: res.errmsg || '信息错误',
  327. icon: 'none'
  328. })
  329. }
  330. } else {
  331. uni.showToast({
  332. title: '请输入登录密码',
  333. icon: 'none'
  334. })
  335. }
  336. },
  337. // wx,短信验证码登录
  338. async wxSmsLogin(e) {
  339. const that = this;
  340. if (e.code) {
  341. const res = await that.$api(`/user/checkLoginCode`, 'POST', e);
  342. if (res.errcode == '0') {
  343. uni.setStorage({
  344. key: 'token',
  345. data: res.data,
  346. success: function() {
  347. uni.navigateBack({
  348. delta: 1
  349. })
  350. }
  351. });
  352. } else {
  353. if (res.errcode == '-5') {
  354. uni.showModal({
  355. title: '提示',
  356. content: '用户不存在,是否注册新账号?',
  357. success: function(res) {
  358. if (res.confirm) {
  359. // 无账号,注册账号
  360. that.wxCreate();
  361. }
  362. }
  363. });
  364. } else {
  365. uni.showToast({
  366. title: res.errmsg || '信息错误',
  367. icon: 'none'
  368. })
  369. }
  370. }
  371. } else {
  372. uni.showToast({
  373. title: '请输入验证码',
  374. icon: 'none'
  375. })
  376. }
  377. },
  378. // wx,密码登录
  379. async wxPassLogin(e) {
  380. const that = this;
  381. if (e.password) {
  382. const res = await that.$api(`/user/login`, 'POST', e);
  383. if (res.errcode == '0') {
  384. uni.setStorage({
  385. key: 'token',
  386. data: res.data,
  387. success: function() {
  388. uni.navigateBack({
  389. delta: 1
  390. })
  391. }
  392. });
  393. } else {
  394. if (res.errcode == '-5') {
  395. uni.showModal({
  396. title: '提示',
  397. content: '用户不存在,是否注册新账号?',
  398. success: function(res) {
  399. if (res.confirm) {
  400. // 无账号,注册账号
  401. that.wxCreate();
  402. }
  403. }
  404. });
  405. } else {
  406. uni.showToast({
  407. title: res.errmsg || '信息错误',
  408. icon: 'none'
  409. })
  410. }
  411. }
  412. } else {
  413. uni.showToast({
  414. title: '请输入登录密码',
  415. icon: 'none'
  416. })
  417. }
  418. },
  419. // 其他登录方式
  420. async otherLogin(e) {
  421. const that = this;
  422. let system = that.system;
  423. let agree = that.agree;
  424. let openid = that.openid;
  425. if (agree) {
  426. if (system.uniPlatform == 'app') {
  427. uni.showToast({
  428. title: '暂无开通',
  429. icon: 'none'
  430. })
  431. // todo:app端,微信一键登录
  432. } else if (system.uniPlatform == 'mp-weixin') {
  433. if (e == 'wx') {
  434. if (openid) {
  435. const res = await that.$api(`/user/wxLogin`, 'POST', {
  436. openid: openid
  437. })
  438. if (res.errcode == '0') {
  439. uni.setStorage({
  440. key: 'token',
  441. data: res.data,
  442. success: function() {
  443. uni.navigateBack({
  444. delta: 1
  445. })
  446. // let pages = getCurrentPages();
  447. // let prePage = pages[pages.length - 2];
  448. // if (prePage) {
  449. // let url = `/${prePage.route}`;
  450. // uni.reLaunch({
  451. // url
  452. // })
  453. // }
  454. }
  455. });
  456. } else {
  457. if (res.errcode == '-5') {
  458. // 无账号,注册账号
  459. that.wxCreate();
  460. // uni.showModal({
  461. // title: '提示',
  462. // content: '用户不存在,是否注册新账号?',
  463. // success: function(res) {
  464. // if (res.confirm) {
  465. // // 无账号,注册账号
  466. // that.wxCreate();
  467. // }
  468. // }
  469. // });
  470. } else {
  471. uni.showToast({
  472. title: res.errmsg || '信息错误',
  473. icon: 'none'
  474. })
  475. }
  476. }
  477. } else {
  478. uni.showToast({
  479. title: '系统更新中,请稍后再试!',
  480. icon: 'none'
  481. })
  482. }
  483. }
  484. }
  485. } else {
  486. uni.showToast({
  487. title: '请阅读并同意用户协议和隐私政策',
  488. icon: 'none'
  489. })
  490. }
  491. },
  492. // wx,注册账号
  493. wxCreate() {
  494. const that = this;
  495. uni.getUserProfile({
  496. desc: '用于展示',
  497. success: async function(res) {
  498. let parmas = {
  499. openid: that.openid,
  500. icon: [{
  501. url: res.userInfo.avatarUrl
  502. }],
  503. name: res.userInfo.nickName,
  504. }
  505. const arr = await that.$api(`/user`, 'POST', parmas);
  506. if (arr.errcode == '0') {
  507. that.$set(that, `user`, arr.data);
  508. // 打开弹框
  509. that.diaShow();
  510. } else {
  511. uni.showToast({
  512. title: arr.errmsg,
  513. icon: 'none'
  514. });
  515. }
  516. },
  517. fail: function(err) {
  518. console.log(err);
  519. }
  520. })
  521. },
  522. // 打开弹框,绑定手机号
  523. diaShow() {
  524. const that = this;
  525. that.$refs.dialogShow.open();
  526. },
  527. // 获取手机号
  528. async getUserPhone(e) {
  529. const that = this;
  530. let user = that.user;
  531. let detail = e.detail;
  532. let res = await that.$api(`/wechat/api/login/getPhone`, 'GET', {
  533. config: that.$config.wx_projectkey,
  534. code: detail.code
  535. })
  536. if (res.errcode == '0') {
  537. let phone = res.data && res.data.phone_info && res.data.phone_info.purePhoneNumber || '';
  538. that.updatePhone(phone, 'wx')
  539. } else {
  540. uni.showToast({
  541. title: res.errmsg,
  542. icon: 'none'
  543. })
  544. }
  545. },
  546. // 弹框关闭
  547. diaClose() {
  548. const that = this;
  549. that.$refs.dialogShow.close();
  550. that.otherLogin('wx');
  551. },
  552. async twoSms() {
  553. const that = this;
  554. let user = this.user;
  555. let form = that.phoneForm;
  556. if (form && form.phone) {
  557. let res = await that.$api(`/user/toBindPhone`, 'POST', {
  558. id: user._id,
  559. phone: form.phone
  560. })
  561. if (res.errcode == '0') {
  562. uni.showToast({
  563. title: '发送成功',
  564. icon: 'none'
  565. })
  566. that.$set(that, `sms_1`, 60);
  567. that.timeDown();
  568. } else {
  569. uni.showToast({
  570. title: res.errmsg,
  571. icon: 'none'
  572. })
  573. }
  574. } else {
  575. uni.showToast({
  576. title: '请输入手机号!',
  577. icon: 'none'
  578. })
  579. }
  580. },
  581. // 弹框确定
  582. async diaSubmit(e) {
  583. const that = this;
  584. let user = this.user;
  585. let form = that.phoneForm;
  586. if (e.type == '1') {
  587. if (form.type == 0) {
  588. if (form && form.phone) that.updatePhone(form.phone, 'wx');
  589. } else if (form.type == 1) {
  590. const res = await that.$api(`/user/checkBindPhone`, 'POST', {
  591. id: user._id,
  592. code: form.code,
  593. phone: form.phone
  594. });
  595. if (res.errcode == '0') {
  596. that.updatePhone(form.phone, 'wx');
  597. } else {
  598. uni.showToast({
  599. title: arr.errmsg,
  600. icon: 'none'
  601. })
  602. }
  603. } else {
  604. uni.showToast({
  605. title: res.errmsg,
  606. icon: 'none'
  607. })
  608. }
  609. }
  610. },
  611. // 弹框取消(关闭)
  612. diaReset(e) {
  613. const that = this;
  614. if (e.type == '1') {
  615. that.otherLogin('wx');
  616. }
  617. },
  618. async updatePhone(e, type) {
  619. const that = this;
  620. let user = that.user;
  621. let arr = await that.$api(`/user/${user._id}`, 'POST', {
  622. phone: e
  623. })
  624. if (arr.errcode == '0') {
  625. that.otherLogin(type);
  626. } else {
  627. uni.showToast({
  628. title: res.errmsg,
  629. icon: 'none'
  630. })
  631. }
  632. },
  633. // 倒计时
  634. timeDown() {
  635. const that = this;
  636. var times = setInterval(() => {
  637. that.sms_1--;
  638. if (that.sms_1 <= 0) {
  639. clearInterval(times);
  640. }
  641. }, 1000);
  642. },
  643. // 同意隐私协议
  644. changeAgree() {
  645. const that = this;
  646. let agree = true;
  647. if (that.agree) agree = false;
  648. that.$set(that, `agree`, agree);
  649. },
  650. // 查看隐私协议
  651. toAgree() {
  652. const that = this;
  653. uni.navigateTo({
  654. url: `/pages/other/agree`
  655. })
  656. },
  657. },
  658. }
  659. </script>
  660. <style lang="scss">
  661. .main {
  662. display: flex;
  663. flex-direction: column;
  664. width: 100vw;
  665. height: 100vh;
  666. .one {
  667. position: relative;
  668. flex-grow: 0.01;
  669. padding: 0 5vw;
  670. margin: 10vw 0;
  671. text {
  672. font-size: 30px;
  673. font-family: cursive;
  674. font-weight: bold;
  675. }
  676. }
  677. .two {
  678. position: relative;
  679. flex-grow: 0.3;
  680. padding: 0 5vw;
  681. .type {
  682. text-align: center;
  683. margin: 0 0 2vw 0;
  684. }
  685. .agree {
  686. text-align: center;
  687. font-size: 12px;
  688. margin: 0 0 2vw 0;
  689. }
  690. .btn {
  691. text-align: center;
  692. button {
  693. width: 80%;
  694. border-radius: 25px;
  695. font-size: 16px;
  696. color: #fff;
  697. background-color: green;
  698. }
  699. }
  700. }
  701. .thr {
  702. padding: 0 2vw;
  703. text-align: center;
  704. .thr_1 {
  705. font-size: 14px;
  706. margin: 0 0 2vw 0;
  707. color: #858585;
  708. }
  709. .thr_2 {
  710. display: flex;
  711. justify-content: center;
  712. .thr_2_1 {
  713. margin: 0 2vw;
  714. text {
  715. font-size: 40px;
  716. }
  717. }
  718. }
  719. }
  720. .wx {
  721. text-align: center;
  722. margin: 25vw 0 0 0;
  723. .wx_1 {
  724. margin: 0 0 5vw 0;
  725. text {
  726. font-size: 50px;
  727. }
  728. }
  729. .wx_2 {
  730. button {
  731. background: var(--f35BColor);
  732. color: var(--fffColor);
  733. font-size: var(--font16Size);
  734. }
  735. }
  736. .wx_3 {
  737. position: absolute;
  738. bottom: 10vw;
  739. width: 100vw;
  740. text-align: center;
  741. font-size: 12px;
  742. }
  743. }
  744. }
  745. .yzm {
  746. display: flex;
  747. flex-direction: row;
  748. justify-content: space-between;
  749. .l {
  750. flex-grow: 1;
  751. }
  752. .r {
  753. width: 18vw;
  754. button {
  755. width: 100%;
  756. line-height: 2.8;
  757. padding: 0 1vw;
  758. }
  759. }
  760. }
  761. .dialog {
  762. width: 100vw;
  763. }
  764. .dialog_1 {
  765. .uni-forms {
  766. display: flex;
  767. form {
  768. width: 100%;
  769. }
  770. }
  771. .uni-data-checklist {
  772. border: 1px solid #E5E5E5;
  773. padding: 1vw;
  774. border-radius: 5px;
  775. }
  776. .uni-forms-item {
  777. margin-bottom: 2vw !important;
  778. }
  779. }
  780. .uni-popup__wrapper {
  781. border-radius: 5px;
  782. }
  783. .popup {
  784. width: 86vw;
  785. padding: 2vw;
  786. .title {
  787. text-align: center;
  788. margin: 0 0 2vw 0;
  789. text {
  790. color: var(--ff0Color);
  791. font-size: var(--font16Size);
  792. }
  793. }
  794. .wx_1 {
  795. text-align: center;
  796. margin: 9vw 0;
  797. text {
  798. font-size: var(--font18Size);
  799. }
  800. }
  801. .wx_2 {
  802. text-align: center;
  803. button {
  804. margin: 0 2vw;
  805. font-size: var(--font16Size);
  806. padding: 0 10vw;
  807. color: var(--fffColor);
  808. background-color: var(--f35BColor);
  809. }
  810. button:nth-child(1) {
  811. background-color: var(--ff0Color);
  812. }
  813. }
  814. }
  815. </style>