您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

recharge.vue 21KB

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