Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

recharge.vue 19KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787
  1. <template>
  2. <view class="wrapper">
  3. <view class="account">
  4. <image :src="`${$imgUrl}common/bg-recharge.png`" class="head-bg"></image>
  5. <view class="account-text">
  6. <view class="balance">
  7. <text class="balance-tit">账户余额</text>
  8. <text class="balance-val">0元</text>
  9. </view>
  10. <view class="right-box">
  11. <view class="no">账户编号:000100</view>
  12. <view class="btn btn-record">账户充值记录</view>
  13. </view>
  14. </view>
  15. </view>
  16. <view class="input-box">
  17. <input v-model="state.money" placeholder="请输入金额" class="input" />
  18. <view class="tips">最低充值金额不小于10元</view>
  19. </view>
  20. <view class="tabs">
  21. <view class="tab-tit">在线充值</view>
  22. <view class="tab">
  23. <view v-for="(item,index) in state.moneryArray" @click="tableIndexAction(index)" :key="index"
  24. :class="{'item':state.moneryArray,'active':state.tableIndex===index}">{{item.name}}</view>
  25. </view>
  26. </view>
  27. <view class="btn btn-primary" @click="rechargeAction">立即充值</view>
  28. </view>
  29. </template>
  30. <script setup lang="ts">
  31. import {
  32. stringToJson
  33. } from "@/utils/network/encryption";
  34. import {
  35. onLoad,
  36. onShow
  37. } from "@dcloudio/uni-app";
  38. import {
  39. quanCheck,
  40. quanApply,
  41. quanXf,
  42. cardCzPayResultCheck,
  43. cardCzApply,
  44. cardCzPay,
  45. cardCzPayResult,
  46. cardCzXFCheck,
  47. quanConfirm,
  48. wechatAppID,
  49. wechatPayConfigId,
  50. wechatSecret,
  51. } from "@/utils/network/api.js";
  52. import {
  53. request
  54. } from "@/utils/network/request.js";
  55. import {
  56. reactive
  57. } from "vue";
  58. import {
  59. navTo
  60. } from "@/utils/utils"
  61. import {
  62. msg
  63. } from "@/utils/utils";
  64. import {
  65. getItem,
  66. StorageKeys,
  67. setItem
  68. } from "@/utils/storage";
  69. const datas = require("../../static/etcUtil/datas.js");
  70. const bluetoothUtil = require("../../static/etcUtil/index.js");
  71. const cmd = require("../../static/etcUtil/cmdConfig.js");
  72. const tools = require("../../static/etcUtil/tools.js");
  73. const state = reactive({
  74. moneryArray: [{
  75. name: '50元',
  76. value: 50
  77. }, {
  78. name: '100元',
  79. value: 100
  80. }, {
  81. name: '200元',
  82. value: 200
  83. }, {
  84. name: '300元',
  85. value: 300
  86. }, {
  87. name: '500元',
  88. value: 500
  89. }, {
  90. name: '1000元',
  91. value: 1000
  92. }],
  93. tableIndex: 0,
  94. openid: "",
  95. connectSuccess: undefined,
  96. fee: 5000,
  97. money: 50,
  98. orderNum: "",
  99. cardId: "", //卡号 需要传参
  100. mockpreBalance: 2000, //fix:模拟余额 目前没有检测状态接口,第一次会模拟圈层检测来检测状态
  101. });
  102. //读卡信息
  103. const card = reactive({
  104. cardId: "",
  105. netId: "",
  106. cardType: "",
  107. startTime: "",
  108. endTime: "",
  109. userName: "",
  110. idNum: "",
  111. vehiclePlate: "",
  112. vehiclePlateColor: "",
  113. color: "",
  114. version: "",
  115. type: "",
  116. favourable: "",
  117. money: undefined,
  118. v_userType: "",
  119. });
  120. onLoad((option) => {
  121. /*获取openId 用途:(用户支付)*/
  122. getOpenID();
  123. /*传参*/
  124. state.cardId = option.cardId;
  125. state.connectSuccess = option.connectSuccess;
  126. state.orderNum = getItem("orderNum");
  127. if (state.connectSuccess === "1") {
  128. /*读卡*/
  129. getCardId();
  130. }
  131. });
  132. const tableIndexAction = (val: any) => {
  133. state.tableIndex = val
  134. state.money = state.moneryArray[val].value
  135. }
  136. /*点击充值按钮*/
  137. const rechargeAction = () => {
  138. state.fee = state.money * 100; //元换成分
  139. wx.showModal({
  140. title: '圈存确认',
  141. content: '您确定要充值圈存吗',
  142. success: function(res) {
  143. if (res.confirm) {
  144. /*进行圈层检测,此处检测仅为校验圈层状态来决定去哪里*/
  145. console.log("进行圈层检测");
  146. quanCheckAction().then((val: any) => {
  147. //如果 圈层检测正常
  148. if (val.chargeStatus === 1) {
  149. console.log(`进行充值检测`);
  150. czCheckAction().then((checkResult: any) => {
  151. //判断订单逻辑如果有订单充值 则直接拿到订单去链接蓝牙
  152. if (checkResult.orders && checkResult.orders.length > 0) {
  153. //拿到订单,存起来
  154. state.orderNum = checkResult.orders[0].orderNum;
  155. setItem("orderNum", state.orderNum);
  156. //链接蓝牙
  157. uni.navigateTo({
  158. url: `/pages/bluetooth/bluetooth?routeType=2&&cardId=${state.cardId}`,
  159. });
  160. } else {
  161. console.log(`进行充值申请`);
  162. cardCzApplyAction().then((applyResult: any) => {
  163. //拿到订单 存起来
  164. state.orderNum = applyResult.orderNum;
  165. setItem("orderNum", state.orderNum);
  166. //如果订单没有支付 走支付
  167. if (applyResult.orderStatus === "ORDER_NOT_PAY") {
  168. //走支付
  169. console.log("走支付");
  170. wxPayment();
  171. }
  172. });
  173. }
  174. });
  175. } else {
  176. //走蓝牙进行修复
  177. uni.navigateTo({
  178. url: `/pages/bluetooth/bluetooth?routeType=2&&cardId=${state.cardId}`,
  179. });
  180. }
  181. });
  182. }
  183. }
  184. });
  185. };
  186. /*读卡*/
  187. const getCardId = () => {
  188. console.log("======获取卡信息======");
  189. let cmdArr = [
  190. cmd.HOME_DIRECTORY,
  191. //选择主目
  192. cmd.APPLICATION_DIRECTORY,
  193. //选择文件1001--DF01联网收费应用目录
  194. cmd.CMD_READBINARY,
  195. //15文件--卡片发行基本数据文件
  196. cmd.CMD_GETBALANCE,
  197. //钱包
  198. ];
  199. tools.showLoadingAlert("正在执行指令");
  200. bluetoothUtil.transCmd(cmdArr, "10", function(res) {
  201. tools.hideLoadingAlert();
  202. //10:写卡 20:写OBU
  203. let str = res[2].substring(res[2].length - 4, res[2].length);
  204. let str3 = res[3].substring(res[3].length - 4, res[3].length);
  205. if (str == "9000" || str3 == "9000") {
  206. if (res[2].length > 86 || res[3] >= 12) {
  207. card.cardId = res[2].substring(20, 40); //卡号
  208. card.startTime = res[2].substring(40, 48);
  209. card.endTime = res[2].substring(48, 56);
  210. card.version = res[2].substring(18, 19) >= 4 ? "4x" : "2x";
  211. card.netId = res[2].substring(20, 24);
  212. card.cardType = res[2].substring(28, 29) == 23 ? 1 : 2;
  213. card.vehiclePlateColor = parseInt(res[2].substring(82, 84), 16);
  214. (card.money = parseInt(parseInt(res[3].substring(0, 8), 16), 10)),
  215. console.log("======卡信息======", card);
  216. if (card.cardId !== state.cardId) {
  217. msg("设备卡信息与当前充值卡号不匹配,请核对卡号");
  218. return;
  219. }
  220. quanCheckActionTrue().then((val) => {
  221. checkQuanCengEvent(val);
  222. });
  223. } else {
  224. console.error("CMD_READBINARY指令长度不符" + res[2]);
  225. tools.hideLoadingAlert();
  226. }
  227. }
  228. console.error("CMD_READBINARY指令长度不符" + res[2]);
  229. tools.hideLoadingAlert();
  230. });
  231. };
  232. const checkQuanCengEvent = (val: any) => {
  233. if (val.chargeStatus === 1) {
  234. let cmdArr = val.command.split(",");
  235. uni.showLoading({
  236. title: "写入中",
  237. });
  238. bluetoothUtil.transCmd(cmdArr, "10", function(res) {
  239. let response = res.toString();
  240. var dic = {
  241. command: val.command,
  242. cosResponse: response,
  243. };
  244. uni.hideLoading();
  245. cardCzXFCheckAction().then((xfRes) => {
  246. quanApplyAction(dic).then((value) => {
  247. console.log("圈层申请完后的结果");
  248. console.log(value);
  249. //圈存初始化验证通过 , 进行圈存
  250. if (value.commandType === 2) {
  251. uanConfirmAction(value).then((confirmResult) => {
  252. navTo(
  253. `/pages/recharge/result`)
  254. });
  255. } else {
  256. msg("圈存初始化指令验证失败, 重新初始化");
  257. }
  258. });
  259. });
  260. });
  261. } else {
  262. let cmdArr = val.command.split(",");
  263. uni.showLoading({
  264. title: "写入中",
  265. });
  266. bluetoothUtil.transCmd(cmdArr, "10", function(res) {
  267. var status = res[1].substring(res[1].length - 4, res[1].length);
  268. console.log("打印状态");
  269. console.log(status);
  270. if (status === "9000") {
  271. console.log("修复指令入参");
  272. let response = res.toString();
  273. var dic = {
  274. command: val.command,
  275. cosResponse: response,
  276. rechargeId: val.rechargeId,
  277. };
  278. quanFixAction(dic).then((value) => {
  279. console.log(value);
  280. console.log("修复结果返回");
  281. var fixStatus = value.fixStatus;
  282. //圈存修复COS指令Response信息不足,重新进行修复初始化
  283. if (fixStatus === 3) {
  284. let xfcmdArr = value.command.split(",");
  285. bluetoothUtil.transCmd(xfcmdArr, "10", function(resValueData) {
  286. var status = resValueData[1].substring(
  287. resValueData[1].length - 4,
  288. resValueData[1].length
  289. );
  290. console.log("打印状态");
  291. console.log(status);
  292. if (status === "9000") {
  293. console.log(resValueData);
  294. var valueResponse = resValueData.toString();
  295. console.log(response);
  296. var applyDic = {
  297. command: value.command,
  298. cosResponse: valueResponse,
  299. rechargeId: value.rechargeId,
  300. };
  301. console.log("消费成功");
  302. quanApplyAction(applyDic).then((applyValue) => {
  303. uanConfirmAction(applyValue).then((
  304. confirmResult) => {
  305. msg("充值成功");
  306. navTo(
  307. `/pages/recharge/result`)
  308. });
  309. });
  310. }
  311. });
  312. } else if (fixStatus === 2) {
  313. uanConfirmSucessAction(value).then((confirmResult) => {
  314. msg("充值成功");
  315. navTo(`/pages/recharge/result`)
  316. });
  317. } else if (fixStatus === 1) {
  318. quanCheckActionTrue().then((val) => {
  319. checkQuanCengEvent(val);
  320. });
  321. }
  322. });
  323. uni.hideLoading();
  324. }
  325. });
  326. }
  327. };
  328. /*透传*/
  329. const transCmd = (cmd) => {
  330. bluetoothUtil.transCmd(cmd, "10", function(res) {
  331. var status = res[1].substring(res[1].length - 4, res[1].length);
  332. if (status === "9000") {
  333. return res.toString();
  334. }
  335. });
  336. };
  337. /*圈层检测 -假数据校验*/
  338. const quanCheckAction = () => {
  339. var data = {
  340. cardId: state.cardId, //卡号
  341. fee: state.fee,
  342. preBalance: state.mockpreBalance, //假余额
  343. tradeType: 14,
  344. };
  345. const options = {
  346. type: 2,
  347. data: data,
  348. method: "POST",
  349. showLoading: true,
  350. };
  351. return new Promise(async (resolve, reject) => {
  352. const res = await request(quanCheck, options);
  353. const data = stringToJson(res.bizContent);
  354. resolve(data);
  355. }).catch((error) => {
  356. reject(error);
  357. });
  358. };
  359. const quanCheckActionTrue = () => {
  360. console.log("进行真实圈层检测");
  361. var data = {
  362. cardId: card.cardId,
  363. fee: state.fee,
  364. preBalance: card.money,
  365. tradeType: 14,
  366. };
  367. const options = {
  368. type: 2,
  369. data: data,
  370. method: "POST",
  371. showLoading: true,
  372. };
  373. return new Promise(async (resolve, reject) => {
  374. const res = await request(quanCheck, options);
  375. const data = stringToJson(res.bizContent);
  376. resolve(data);
  377. }).catch((error) => {
  378. reject(error);
  379. });
  380. };
  381. /*充值消费*/
  382. const cardCzXFCheckAction = () => {
  383. var data = {
  384. cardId: card.cardId, //修复初始化的指令
  385. openId: getItem(StorageKeys.OpenId), //修复初始化结果
  386. orderNum: state.orderNum, //充值流水号
  387. };
  388. const options = {
  389. type: 2,
  390. data: data,
  391. method: "POST",
  392. showLoading: true,
  393. };
  394. return new Promise(async (resolve, reject) => {
  395. const res = await request(cardCzXFCheck, options);
  396. const data = stringToJson(res.bizContent);
  397. resolve(data);
  398. }).catch((error) => {
  399. reject(error);
  400. });
  401. };
  402. /*圈存修复*/
  403. const quanFixAction = (val) => {
  404. var data = {
  405. command: val.command, //修复初始化的指令
  406. cosResponse: val.cosResponse, //修复初始化结果
  407. rechargeId: val.rechargeId, //充值流水号
  408. };
  409. const options = {
  410. type: 2,
  411. data: data,
  412. method: "POST",
  413. showLoading: true,
  414. };
  415. return new Promise(async (resolve, reject) => {
  416. const res = await request(quanXf, options);
  417. const data = stringToJson(res.bizContent);
  418. resolve(data);
  419. }).catch((error) => {
  420. reject(error);
  421. });
  422. };
  423. /*圈层申请*/
  424. const quanApplyAction = (data) => {
  425. var form = {
  426. cardId: card.cardId,
  427. fee: state.fee,
  428. preBalance: card.money,
  429. tradeType: 14,
  430. command: data.command,
  431. cosResponse: data.cosResponse,
  432. orderId: state.orderNum,
  433. rechargeId: data.rechargeId,
  434. };
  435. const options = {
  436. type: 2,
  437. data: form,
  438. method: "POST",
  439. showLoading: true,
  440. };
  441. return new Promise(async (resolve, reject) => {
  442. const res = await request(quanApply, options);
  443. const data = stringToJson(res.bizContent);
  444. resolve(data);
  445. }).catch((error) => {
  446. reject(error);
  447. });
  448. };
  449. /*圈层确认*/
  450. const uanConfirmAction = (data) => {
  451. console.log("圈层确认进入");
  452. let cmdArr = data.command.split(",");
  453. console.log(cmdArr);
  454. bluetoothUtil.transCmd(cmdArr, "10", function(res) {
  455. console.log("圈层透传");
  456. console.log(res);
  457. var arraylenth = res.length;
  458. var status = res[arraylenth - 1].substring(
  459. res[arraylenth - 1].length - 4,
  460. res[arraylenth - 1].length
  461. );
  462. console.log("打印圈层确认指令状态");
  463. console.log(status);
  464. if (status === "9000") {
  465. var form = {
  466. command: data.command,
  467. cosResponse: res.toString(),
  468. rechargeId: data.rechargeId,
  469. paidAmount: state.fee,
  470. giftAmount: 0,
  471. };
  472. const options = {
  473. type: 2,
  474. data: form,
  475. method: "POST",
  476. showLoading: true,
  477. };
  478. return new Promise(async (resolve, reject) => {
  479. const res = await request(quanConfirm, options);
  480. const data = stringToJson(res.bizContent);
  481. resolve(data);
  482. }).catch((error) => {
  483. reject(error);
  484. });
  485. }
  486. });
  487. };
  488. const uanConfirmSucessAction = (data) => {
  489. var form = {
  490. command: data.command,
  491. cosResponse: "9000",
  492. rechargeId: data.rechargeId,
  493. paidAmount: state.fee,
  494. giftAmount: 0,
  495. };
  496. const options = {
  497. type: 2,
  498. data: form,
  499. method: "POST",
  500. showLoading: true,
  501. };
  502. return new Promise(async (resolve, reject) => {
  503. const res = await request(quanConfirm, options);
  504. const data = stringToJson(res.bizContent);
  505. resolve(data);
  506. }).catch((error) => {
  507. reject(error);
  508. });
  509. };
  510. /*充值检测*/
  511. const czCheckAction = () => {
  512. var form = {
  513. cardId: state.cardId,
  514. openId: getItem(StorageKeys.OpenId),
  515. };
  516. const options = {
  517. type: 2,
  518. data: form,
  519. method: "POST",
  520. showLoading: true,
  521. };
  522. return new Promise(async (resolve, reject) => {
  523. const res = await request(cardCzPayResultCheck, options);
  524. const data = stringToJson(res.bizContent);
  525. resolve(data);
  526. }).catch((error) => {
  527. reject(error);
  528. });
  529. };
  530. /*充值申请*/
  531. const cardCzApplyAction = () => {
  532. var data = {
  533. cardId: state.cardId,
  534. openId: getItem(StorageKeys.OpenId),
  535. rechargeMoney: state.fee,
  536. };
  537. const options = {
  538. type: 2,
  539. data: data,
  540. method: "POST",
  541. showLoading: true,
  542. };
  543. return new Promise(async (resolve, reject) => {
  544. const res = await request(cardCzApply, options);
  545. const data = stringToJson(res.bizContent);
  546. resolve(data);
  547. }).catch((error) => {
  548. reject(error);
  549. });
  550. };
  551. //获取微信小程序openid
  552. const getOpenID = () => {
  553. uni.login({
  554. provider: "weixin",
  555. success: function(e) {
  556. wx.request({
  557. url: `https://api.weixin.qq.com/sns/jscode2session?appid=${wechatAppID}&secret=${wechatSecret}&js_code=${e.code}&grant_type=authorization_code`,
  558. success: (res: any) => {
  559. state.openid = res.data.openid;
  560. },
  561. });
  562. },
  563. fail: function() {
  564. msg("获取不到oppenId,请检查AppID和Secret是否争取");
  565. },
  566. });
  567. };
  568. //掉起微信支付
  569. const wxPayment = () => {
  570. // #ifdef MP-WEIXIN
  571. const options = {
  572. type: 2,
  573. data: {
  574. openId: getItem(StorageKeys.OpenId),
  575. wxOpenId: state.openid,
  576. cardId: state.cardId,
  577. orderNum: state.orderNum,
  578. payConfigId: wechatPayConfigId,
  579. body: "储值卡充值",
  580. },
  581. method: "POST",
  582. showLoading: true,
  583. };
  584. request(cardCzPay, options).then((res) => {
  585. const data = stringToJson(res.bizContent);
  586. uni.requestPayment({
  587. provider: "wxpay",
  588. orderInfo: "",
  589. timeStamp: data.timestamp,
  590. nonceStr: data.noncestr,
  591. package: data.wxPackage ?? "",
  592. signType: data.signType,
  593. paySign: data.sign,
  594. success: function() {
  595. //回调订单状态
  596. console.log("回调订单状态");
  597. checkOrder();
  598. },
  599. fail: function(err) {
  600. confirm(err, () => {}, "支付失败", false);
  601. },
  602. });
  603. });
  604. // #endif
  605. };
  606. //支付成功改变订单状态
  607. const checkOrder = () => {
  608. const options = {
  609. type: 2,
  610. data: {
  611. cardId: state.cardId,
  612. openId: getItem(StorageKeys.OpenId),
  613. orderNum: state.orderNum,
  614. },
  615. method: "POST",
  616. showLoading: true,
  617. };
  618. request(cardCzPayResult, options).then((res) => {
  619. const data = stringToJson(res.bizContent);
  620. if (data.tradeState === "SUCCESS")
  621. uni.navigateTo({
  622. url: `/pages/bluetooth/bluetooth?routeType=2&&cardId=${state.cardId}`,
  623. });
  624. console.log(data);
  625. });
  626. };
  627. </script>
  628. <style>
  629. .account {
  630. height: 224rpx;
  631. width: 690rpx;
  632. margin: 30rpx;
  633. position: relative;
  634. }
  635. .account .account-text {
  636. display: flex;
  637. justify-content: space-between;
  638. padding: 20rpx 50rpx;
  639. height: 100%;
  640. }
  641. .account .balance {
  642. display: flex;
  643. flex-direction: column;
  644. justify-content: center;
  645. align-items: flex-start;
  646. color: #ffffff;
  647. }
  648. .account .balance-tit {
  649. font-size: 26rpx;
  650. margin-bottom: 10rpx;
  651. }
  652. .account .balance-val {
  653. font-size: 56rpx;
  654. }
  655. .account .right-box {
  656. display: flex;
  657. flex-direction: column;
  658. justify-content: flex-start;
  659. align-items: flex-end;
  660. }
  661. .account .right-box .no {
  662. font-size: 26rpx;
  663. color: #ffffff;
  664. }
  665. .account .right-box .btn {
  666. font-size: 26rpx;
  667. padding: 0 20rpx;
  668. box-sizing: border-box;
  669. height: 42rpx;
  670. line-height: 42rpx;
  671. color: #28d20f;
  672. background: #ffffff;
  673. border-radius: 21rpx;
  674. display: inline-block;
  675. margin-top: 18rpx;
  676. }
  677. .account .head-bg {
  678. width: 690rpx;
  679. height: 224rpx;
  680. position: absolute;
  681. left: 0;
  682. top: 0;
  683. z-index: -99;
  684. }
  685. .input-box {
  686. display: flex;
  687. flex-direction: column;
  688. justify-content: center;
  689. align-items: center;
  690. padding: 20rpx 0;
  691. }
  692. .input-box .input {
  693. width: 430rpx;
  694. height: 98rpx;
  695. line-height: 98rpx;
  696. background: #f8f8f8;
  697. border: 1px solid #999999;
  698. border-radius: 6rpx;
  699. font-size: 30rpx;
  700. text-align: center;
  701. }
  702. .input-box .tips {
  703. color: #666666;
  704. font-size: 26rpx;
  705. margin-top: 18rpx;
  706. }
  707. .tabs {}
  708. .tabs .tab-tit {
  709. font-size: 30rpx;
  710. color: #333;
  711. padding: 45rpx 0 22rpx 30rpx;
  712. }
  713. .tabs .tab {
  714. display: flex;
  715. flex-wrap: wrap;
  716. justify-content: space-evenly;
  717. }
  718. .tabs .tab .item {
  719. width: 210rpx;
  720. height: 100rpx;
  721. background: #f6fff7;
  722. border: 1px solid #dcdde1;
  723. box-sizing: border-box;
  724. line-height: 100rpx;
  725. border-radius: 6rpx;
  726. text-align: center;
  727. margin-bottom: 24rpx;
  728. color: #333333;
  729. font-size: 32rpx;
  730. }
  731. .tabs .tab .item.active {
  732. border: 1px solid #24cc49;
  733. color: #24cc49;
  734. }
  735. .btn-primary {
  736. width: 670rpx;
  737. height: 80rpx;
  738. line-height: 80rpx;
  739. background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%);
  740. border-radius: 40rpx;
  741. font-size: 32rpx;
  742. color: #ffffff;
  743. margin: 200rpx 40rpx 0;
  744. text-align: center;
  745. }
  746. </style>