index.vue 19 KB

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