index.vue 19 KB

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