index.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855
  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. let pages = getCurrentPages();
  444. let prePage = pages[pages.length - 2];
  445. if (prePage) {
  446. let url = `/${prePage.route}`;
  447. uni.reLaunch({
  448. url
  449. })
  450. }
  451. }
  452. });
  453. } else {
  454. if (res.errcode == '-5') {
  455. // 无账号,注册账号
  456. that.wxCreate();
  457. // uni.showModal({
  458. // title: '提示',
  459. // content: '用户不存在,是否注册新账号?',
  460. // success: function(res) {
  461. // if (res.confirm) {
  462. // // 无账号,注册账号
  463. // that.wxCreate();
  464. // }
  465. // }
  466. // });
  467. } else {
  468. uni.showToast({
  469. title: res.errmsg || '信息错误',
  470. icon: 'none'
  471. })
  472. }
  473. }
  474. } else {
  475. uni.showToast({
  476. title: '系统更新中,请稍后再试!',
  477. icon: 'none'
  478. })
  479. }
  480. }
  481. }
  482. } else {
  483. uni.showToast({
  484. title: '请阅读并同意用户协议和隐私政策',
  485. icon: 'none'
  486. })
  487. }
  488. },
  489. // wx,注册账号
  490. wxCreate() {
  491. const that = this;
  492. uni.getUserProfile({
  493. desc: '用于展示',
  494. success: async function(res) {
  495. let parmas = {
  496. openid: that.openid,
  497. icon: [{
  498. url: res.userInfo.avatarUrl
  499. }],
  500. name: res.userInfo.nickName,
  501. }
  502. const arr = await that.$api(`/user`, 'POST', parmas);
  503. if (arr.errcode == '0') {
  504. that.$set(that, `user`, arr.data);
  505. // 打开弹框
  506. that.diaShow();
  507. } else {
  508. uni.showToast({
  509. title: arr.errmsg,
  510. icon: 'none'
  511. });
  512. }
  513. },
  514. fail: function(err) {
  515. console.log(err);
  516. }
  517. })
  518. },
  519. // 打开弹框,绑定手机号
  520. diaShow() {
  521. const that = this;
  522. that.$refs.dialogShow.open();
  523. },
  524. // 获取手机号
  525. async getUserPhone(e) {
  526. const that = this;
  527. let user = that.user;
  528. let detail = e.detail;
  529. let res = await that.$api(`/wechat/api/login/getPhone`, 'GET', {
  530. config: that.$config.wx_projectkey,
  531. code: detail.code
  532. })
  533. if (res.errcode == '0') {
  534. let phone = res.data && res.data.phone_info && res.data.phone_info.purePhoneNumber || '';
  535. that.updatePhone(phone, 'wx')
  536. } else {
  537. uni.showToast({
  538. title: res.errmsg,
  539. icon: 'none'
  540. })
  541. }
  542. },
  543. // 弹框关闭
  544. diaClose() {
  545. const that = this;
  546. that.$refs.dialogShow.close();
  547. that.otherLogin('wx');
  548. },
  549. async twoSms() {
  550. const that = this;
  551. let user = this.user;
  552. let form = that.phoneForm;
  553. if (form && form.phone) {
  554. let res = await that.$api(`/user/toBindPhone`, 'POST', {
  555. id: user._id,
  556. phone: form.phone
  557. })
  558. if (res.errcode == '0') {
  559. uni.showToast({
  560. title: '发送成功',
  561. icon: 'none'
  562. })
  563. that.$set(that, `sms_1`, 60);
  564. that.timeDown();
  565. } else {
  566. uni.showToast({
  567. title: res.errmsg,
  568. icon: 'none'
  569. })
  570. }
  571. } else {
  572. uni.showToast({
  573. title: '请输入手机号!',
  574. icon: 'none'
  575. })
  576. }
  577. },
  578. // 弹框确定
  579. async diaSubmit(e) {
  580. const that = this;
  581. let user = this.user;
  582. let form = that.phoneForm;
  583. if (e.type == '1') {
  584. if (form.type == 0) {
  585. if (form && form.phone) that.updatePhone(form.phone, 'wx');
  586. } else if (form.type == 1) {
  587. const res = await that.$api(`/user/checkBindPhone`, 'POST', {
  588. id: user._id,
  589. code: form.code,
  590. phone: form.phone
  591. });
  592. if (res.errcode == '0') {
  593. that.updatePhone(form.phone, 'wx');
  594. } else {
  595. uni.showToast({
  596. title: arr.errmsg,
  597. icon: 'none'
  598. })
  599. }
  600. } else {
  601. uni.showToast({
  602. title: res.errmsg,
  603. icon: 'none'
  604. })
  605. }
  606. }
  607. },
  608. // 弹框取消(关闭)
  609. diaReset(e) {
  610. const that = this;
  611. if (e.type == '1') {
  612. that.otherLogin('wx');
  613. }
  614. },
  615. async updatePhone(e, type) {
  616. const that = this;
  617. let user = that.user;
  618. let arr = await that.$api(`/user/${user._id}`, 'POST', {
  619. phone: e
  620. })
  621. if (arr.errcode == '0') {
  622. that.otherLogin(type);
  623. } else {
  624. uni.showToast({
  625. title: res.errmsg,
  626. icon: 'none'
  627. })
  628. }
  629. },
  630. // 倒计时
  631. timeDown() {
  632. const that = this;
  633. var times = setInterval(() => {
  634. that.sms_1--;
  635. if (that.sms_1 <= 0) {
  636. clearInterval(times);
  637. }
  638. }, 1000);
  639. },
  640. // 同意隐私协议
  641. changeAgree() {
  642. const that = this;
  643. let agree = true;
  644. if (that.agree) agree = false;
  645. that.$set(that, `agree`, agree);
  646. },
  647. // 查看隐私协议
  648. toAgree() {
  649. const that = this;
  650. uni.navigateTo({
  651. url: `/pages/other/agree`
  652. })
  653. },
  654. },
  655. }
  656. </script>
  657. <style lang="scss">
  658. .main {
  659. display: flex;
  660. flex-direction: column;
  661. width: 100vw;
  662. height: 100vh;
  663. .one {
  664. position: relative;
  665. flex-grow: 0.01;
  666. padding: 0 5vw;
  667. margin: 10vw 0;
  668. text {
  669. font-size: 30px;
  670. font-family: cursive;
  671. font-weight: bold;
  672. }
  673. }
  674. .two {
  675. position: relative;
  676. flex-grow: 0.3;
  677. padding: 0 5vw;
  678. .type {
  679. text-align: center;
  680. margin: 0 0 2vw 0;
  681. }
  682. .agree {
  683. text-align: center;
  684. font-size: 12px;
  685. margin: 0 0 2vw 0;
  686. }
  687. .btn {
  688. text-align: center;
  689. button {
  690. width: 80%;
  691. border-radius: 25px;
  692. font-size: 16px;
  693. color: #fff;
  694. background-color: green;
  695. }
  696. }
  697. }
  698. .thr {
  699. padding: 0 2vw;
  700. text-align: center;
  701. .thr_1 {
  702. font-size: 14px;
  703. margin: 0 0 2vw 0;
  704. color: #858585;
  705. }
  706. .thr_2 {
  707. display: flex;
  708. justify-content: center;
  709. .thr_2_1 {
  710. margin: 0 2vw;
  711. text {
  712. font-size: 40px;
  713. }
  714. }
  715. }
  716. }
  717. .wx {
  718. text-align: center;
  719. margin: 25vw 0 0 0;
  720. .wx_1 {
  721. margin: 0 0 5vw 0;
  722. text {
  723. font-size: 50px;
  724. }
  725. }
  726. .wx_2 {
  727. button {
  728. background: var(--f35BColor);
  729. color: var(--fffColor);
  730. font-size: var(--font16Size);
  731. }
  732. }
  733. .wx_3 {
  734. position: absolute;
  735. bottom: 10vw;
  736. width: 100vw;
  737. text-align: center;
  738. font-size: 12px;
  739. }
  740. }
  741. }
  742. .yzm {
  743. display: flex;
  744. flex-direction: row;
  745. justify-content: space-between;
  746. .l {
  747. flex-grow: 1;
  748. }
  749. .r {
  750. width: 18vw;
  751. button {
  752. width: 100%;
  753. line-height: 2.8;
  754. padding: 0 1vw;
  755. }
  756. }
  757. }
  758. .dialog {
  759. width: 100vw;
  760. }
  761. .dialog_1 {
  762. .uni-forms {
  763. display: flex;
  764. form {
  765. width: 100%;
  766. }
  767. }
  768. .uni-data-checklist {
  769. border: 1px solid #E5E5E5;
  770. padding: 1vw;
  771. border-radius: 5px;
  772. }
  773. .uni-forms-item {
  774. margin-bottom: 2vw !important;
  775. }
  776. }
  777. .uni-popup__wrapper {
  778. border-radius: 5px;
  779. }
  780. .popup {
  781. width: 86vw;
  782. padding: 2vw;
  783. .title {
  784. text-align: center;
  785. margin: 0 0 2vw 0;
  786. text {
  787. color: var(--ff0Color);
  788. font-size: var(--font16Size);
  789. }
  790. }
  791. .wx_1 {
  792. text-align: center;
  793. margin: 9vw 0;
  794. text {
  795. font-size: var(--font18Size);
  796. }
  797. }
  798. .wx_2 {
  799. text-align: center;
  800. button {
  801. margin: 0 2vw;
  802. font-size: var(--font16Size);
  803. padding: 0 10vw;
  804. color: var(--fffColor);
  805. background-color: var(--f35BColor);
  806. }
  807. button:nth-child(1) {
  808. background-color: var(--ff0Color);
  809. }
  810. }
  811. }
  812. </style>