index.vue 18 KB

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