index.vue 19 KB

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