Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

activate.vue 37KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327
  1. <template>
  2. <view class="containers">
  3. <view class="sec_info">
  4. <view class="info_txt">信息确认</view>
  5. <view class="info_plate">
  6. <text>车牌号码</text>
  7. <text>{{ fileDataStrings.vehiclePlate }}</text>
  8. </view>
  9. <view class="info_plate">
  10. <text>车牌颜色</text>
  11. <text>{{ fileDataStrings.vehiclePlateColorStr }}</text>
  12. </view>
  13. <view class="info_plate">
  14. <text>手机号码</text>
  15. <text>{{ fileDataStrings.customerTel }}</text>
  16. </view>
  17. <view class="info_plate" style="border: none">
  18. <text>卡号</text>
  19. <text>{{ fileDataStrings.cardId }}</text>
  20. </view>
  21. <view class="info_plate">
  22. <text>OBU号</text>
  23. <text>{{ fileDataStrings.obuId }}</text>
  24. </view>
  25. <view class="info_plate">
  26. <text>收费车型</text>
  27. <text>{{ fileDataStrings.vehicleClassStr }}</text>
  28. </view>
  29. </view>
  30. <view class="up_btn" v-if="state.showBtn">
  31. <button aria-disabled="true" @click="btn" v-if="!state.isSuccess"
  32. :class="state.disabled?'button':'hui'">
  33. 点击开始激活
  34. </button>
  35. <button aria-disabled="true" @click="back" v-else>
  36. 点击返回首页
  37. </button>
  38. </view>
  39. </view>
  40. <!-- 激活成功popup -->
  41. <u-popup v-model="state.showPopup" mode="center">
  42. <active-success @cancel="state.showPopup = false"></active-success>
  43. </u-popup>
  44. </template>
  45. <script setup>
  46. import {
  47. reactive,
  48. ref
  49. } from "vue";
  50. import {
  51. formatTime,
  52. formatTime2,
  53. expireDate,
  54. expireDate2,
  55. getFormatDate,
  56. msg
  57. } from "@/utils/utils";
  58. import {
  59. onLoad
  60. } from '@dcloudio/uni-app'
  61. import {
  62. getItem
  63. } from "@/utils/storage";
  64. import {
  65. request
  66. } from "@/utils/network/request.js";
  67. import {
  68. IntegerToHexString,
  69. AsciToHexString,
  70. } from "@/utils/util/fileData.js";
  71. import {
  72. stringToJson
  73. } from "@/utils/network/encryption.js";
  74. import * as IFCODE from "@/utils/network/api.js";
  75. import {
  76. agentId
  77. } from "@/utils/network/difference";
  78. const cmd = require("../../../static/etcUtil/cmdConfig.js");
  79. const tools = require("../../../static/etcUtil/tools.js");
  80. const bluetoothUtil = require("../../../static/etcUtil/index.js");
  81. import activeSuccess from "./components/popup-device-active-success";
  82. import {
  83. getVehiclePlateColor
  84. } from "@/datas/vehiclePlateColor";
  85. import {
  86. searchVehicleInfoQuery
  87. } from "@/subpackage/after-sale/js/publicRequest";
  88. import {
  89. channelId
  90. } from "@/utils/network/difference";
  91. const state = reactive({
  92. orderId: "",
  93. id: "",
  94. cardStatus: "",
  95. obuStatus: "",
  96. isSuccess: false, //是否激活成功
  97. showPopup: false,
  98. transfer: 0, //0 是原来的激活 1 是过户激活
  99. showBtn: true,
  100. disabled: true
  101. })
  102. let snums = 0
  103. onLoad((option) => {
  104. //读取传入 存储的数据orderInfo
  105. let orderData = getItem("orderInfo");
  106. state.id = orderData.id;
  107. state.orderId = orderData.orderId;
  108. console.log(state);
  109. state.transfer = Number(option.transfer)
  110. //获取订单详情
  111. getOrderDetails(state.id);
  112. console.log("state.transfer", state.transfer, state.transfer == 0, state.transfer == 1)
  113. })
  114. const card = reactive({
  115. cardId: "",
  116. netId: "",
  117. cardType: "",
  118. startTime: "",
  119. endTime: "",
  120. userName: "",
  121. idNum: "",
  122. vehiclePlate: "",
  123. vehiclePlateColor: "",
  124. color: "",
  125. version: "",
  126. type: "",
  127. favourable: "",
  128. money: "",
  129. v_userType: "",
  130. });
  131. const obu = reactive({
  132. obuId: "",
  133. startTime: "",
  134. endTime: "",
  135. version: "",
  136. approvedCount: "",
  137. axleCount: "",
  138. axleDistance: "",
  139. engineNum: "",
  140. type: "",
  141. userType: "",
  142. contractNo: "",
  143. vehiclePlate: "",
  144. vehiclePlateColor: "",
  145. vin: "",
  146. wheelCount: 0,
  147. isJH: ""
  148. });
  149. let cmdRandNum = '';
  150. let orderInfo = {};
  151. const fileDataStrings = reactive({
  152. approvedCount: 0, //核载人数
  153. cardId: "", //卡号
  154. obuId: "", //obu号
  155. obuId: "", //obu号
  156. packageNum: "", //套餐编号
  157. axleCount: 0, //轴数
  158. axleDistance: "", //轴距
  159. engineNum: "", //发动机
  160. vehicleVin: "",
  161. vehicleEngineNum: "",
  162. cardStatus: "",
  163. obuStatus: "",
  164. type: 0, //类型
  165. userType: 0, //用户类型
  166. vehiclePlate: "", //车牌
  167. vehiclePlateColor: 0, //车牌颜色
  168. vehicleDimensions: "",
  169. wheelCount: 0, //车轮数
  170. vehicleIdNo: "", //车牌号
  171. vehiclePlateColorStr: "",
  172. customerTel: "",
  173. customerId: "",
  174. orderId: "",
  175. vehicleClassStr:""
  176. });
  177. function cmdResult() {
  178. uni.showLoading({
  179. title: '执行指令',
  180. mask: true
  181. });
  182. const options = {
  183. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  184. data: {
  185. orderId: orderInfo.orderId,
  186. issueType: state.transfer?2:1 //1正常激活 2 过户激活
  187. }, //请求参数
  188. method: "POST", //提交方式(默认POST)
  189. };
  190. console.log("options==",options)
  191. //BDS-二发指令申请
  192. request('4b001421f5354c248a7759971881b52f', options)
  193. .then((res) => {
  194. console.log("在线激活 请求");
  195. console.log(stringToJson(res.bizContent));
  196. const datas = stringToJson(res.bizContent).data;
  197. console.log("datas===",datas)
  198. uni.showLoading({
  199. title: '执行指令',
  200. mask: true
  201. });
  202. bluetoothUtil.transCmd(datas.cmd.split(','), datas.cmdType=='CARD'?'10':'20', function(res) {
  203. console.log("res申请",res)
  204. implementCmd(datas.transOrderId,datas.cmd,res.toString(),datas.stepNo)
  205. }, () => {
  206. showModals('在线激活异常')
  207. });
  208. })
  209. .catch((err) => {
  210. console.log(err);
  211. });
  212. }
  213. function implementCmd(transOrderId, cmd, cmdResult, stepNo) {
  214. uni.showLoading({
  215. title: '执行指令',
  216. mask: true
  217. });
  218. const options = {
  219. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  220. data: {
  221. transOrderId, //步骤号
  222. cmd,
  223. cmdResult,
  224. stepNo
  225. }, //请求参数
  226. method: "POST", //提交方式(默认POST)
  227. };
  228. console.log("options2222",options)
  229. //BDS-二发指令回传
  230. request('88d98f2db7df4f06b22d58b507db7854', options)
  231. .then((res) => {
  232. console.log(stringToJson(res.bizContent));
  233. const datas = stringToJson(res.bizContent).data;
  234. console.log("在线激活 请求",datas);
  235. // tools.showLoadingAlert("执行指令");
  236. if (datas.stepNo == 100) {
  237. state.disabled = true
  238. tools.hideLoadingAlert();
  239. msg("激活成功",{'icon':'success','duration':3000})
  240. setTimeout(() => {
  241. uni.navigateTo({
  242. url: "/subpackage/after-sale/deviceInfo/deviceInfo",
  243. });
  244. }, 2000)
  245. } else {
  246. console.log("datas.stepNo",datas.stepNo)
  247. bluetoothUtil.transCmd(datas.cmd.split(','), datas.cmdType=='CARD'?'10':'20', function(res) {
  248. implementCmd(transOrderId,datas.cmd,res.toString(),datas.stepNo)
  249. }, () => {
  250. showModals('在线激活异常')
  251. });
  252. }
  253. })
  254. .catch((err) => {
  255. console.log(err);
  256. });
  257. }
  258. //开始激活 按钮事件
  259. const btn = () => {
  260. state.disabled = false
  261. console.log('orderInfo参数', orderInfo, state.disabled)
  262. cmdResult()
  263. // //0 是原来的激活 1 是过户激活
  264. // if (state.transfer) {
  265. // // 获取cardId
  266. // getCardId()
  267. // // 过户激活 1
  268. // // 1. 过户激活申请 2.设备升级 3.过户升级(跟过户升级一样) 4.79(BDS-安装申请)(后台数据)-
  269. // // >76(VFJ-OBU在线激活)(指令接口)->80(BDS-安装确认)->73(BDS-卡签绑定)(指令接口)->51(BDS-写卡指令返回)(指令接口)
  270. // } else {
  271. // console.log("=================================")
  272. // if (orderInfo) {
  273. // //根据订单详情走相应的断步功能
  274. // const cardId = orderInfo.cardId;
  275. // const cardStatus = orderInfo.cardStatus != null ? orderInfo.cardStatus : '0'
  276. // const obuId = orderInfo.obuId;
  277. // const obuStatus = orderInfo.obuStatus != null ? orderInfo.obuStatus : '9'
  278. // console.log('当前卡签状态', cardId, obuId, cardStatus, obuStatus)
  279. // console.log('输出内容', obu.obuId, '=======', fileDataStrings.obuId, obu.obuId != fileDataStrings.obuId)
  280. // if (fileDataStrings.obuId) {
  281. // if (obu.obuId + '' != fileDataStrings.obuId + '') {
  282. // tools.showModalAlert("订单设备号信息与当前设备号信息不符!");
  283. // return
  284. // }
  285. // }
  286. // if (!cardId) { //卡发行
  287. // getCardId()
  288. // } else if (cardId && cardStatus == '0') { //卡发行
  289. // getCardId()
  290. // } else if (!obuId) { //OBU发行
  291. // getObuApply();
  292. // } else if (obuId && obuStatus == '9') { //OBU发行
  293. // getObuApply();
  294. // } else if (cardId && obuId && (obuStatus == '1' || obuStatus == '11' || obuStatus == '0')) {
  295. // getInstallApply(); //激活
  296. // } else {
  297. // getCardId()
  298. // }
  299. // }
  300. // }
  301. };
  302. //获取订单详情
  303. const getOrderDetails = (id) => {
  304. console.log('======获取订单信息======')
  305. const options = {
  306. type: 2,
  307. data: {
  308. id: id,
  309. },
  310. method: "POST",
  311. showLoading: true,
  312. };
  313. state.disabled = false
  314. request(IFCODE.orderDetail, options).then((res) => {
  315. orderInfo = JSON.parse(res.bizContent);
  316. console.log("orderInfo", orderInfo);
  317. console.log("orderInfores", res);
  318. if (orderInfo) {
  319. fileDataStrings.userType = orderInfo.userType; //用户类型
  320. fileDataStrings.cardId = orderInfo.cardId;
  321. fileDataStrings.packageNum = orderInfo.packageNum;
  322. fileDataStrings.obuId = orderInfo.obuId;
  323. fileDataStrings.customerTel = orderInfo.customerTel;
  324. fileDataStrings.customerId = orderInfo.customerId;
  325. fileDataStrings.orderId = orderInfo.orderId;
  326. fileDataStrings.vehiclePlateColorStr = getVehiclePlateColor(orderInfo
  327. .vehiclePlateColor);
  328. fileDataStrings.vehiclePlate = orderInfo.vehiclePlate; //车牌
  329. fileDataStrings.vehicleClassStr = orderInfo.vehicleClassStr;
  330. // let vehicleId = orderInfo.vehiclePlate + "_" + orderInfo.vehiclePlateColor
  331. // searchVehicleInfoQuery(vehicleId).then((orderInfo) => {
  332. // console.log("orderInfo1111", orderInfo)
  333. // fileDataStrings.approvedCount = parseInt(orderInfo.approvedCount); //核载人数
  334. // fileDataStrings.vehicleVin = orderInfo.vin;
  335. // fileDataStrings.vehicleEngineNum = orderInfo.engineNum;
  336. // fileDataStrings.axleCount = parseInt(orderInfo.axleCount); //轴数
  337. // fileDataStrings.engineNum = orderInfo.engineNum; //发动机
  338. // fileDataStrings.type = parseInt(orderInfo.type); //类型
  339. // fileDataStrings.vehiclePlate = orderInfo.vehiclePlate; //车牌
  340. // fileDataStrings.vehiclePlateColor = orderInfo.vehiclePlateColor; //车牌颜色
  341. // console.log("车辆信息", orderInfo)
  342. // fileDataStrings.vehicleDimensions = orderInfo.vehicleDimensions;
  343. // fileDataStrings.vehicleIdNo = orderInfo.vehicleEngineNum; //车编号
  344. // fileDataStrings.vehiclePlateColorStr = getVehiclePlateColor(orderInfo
  345. // .vehiclePlateColor);
  346. // console.log("fileDataStrings", fileDataStrings);
  347. // })
  348. cancelOrderRequest(orderInfo.orderId)
  349. }
  350. });
  351. getObuId();
  352. };
  353. //更换设备 去注销前订单的 卡签
  354. const cancelOrderRequest = (orderId) => {
  355. console.log('======更换设备 去注销前订单的 卡签 ======')
  356. const options = {
  357. type: 2,
  358. data: {
  359. orderId: orderId,
  360. },
  361. method: "POST",
  362. showLoading: true,
  363. };
  364. request(IFCODE.cancelOrderApi, options).then((res) => {
  365. })
  366. }
  367. /**
  368. * 获取OBU号 读OBU
  369. */
  370. const getObuId = () => {
  371. console.log('======获取OBU号======')
  372. let cmdArray = [cmd.HOME_DIRECTORY, cmd.OBU_SYSTEM_FILE, cmd.RANDOM_NUMBER];
  373. tools.showLoadingAlert("正在执行指令");
  374. bluetoothUtil.transCmd(cmdArray, "20", function(res) {
  375. tools.hideLoadingAlert();
  376. var status = res[1].substring(res[1].length - 4, res[1].length);
  377. console.log('获取OBU号执行结果' + status, res)
  378. //第一次获取随机数
  379. if (status == "9000") {
  380. state.disabled = true
  381. obu.obuId = res[1].substring(20, 36);
  382. console.log(containsEnglishCharacters(card.obuId), '获取OBU号执行结果=========' + obu.obuId)
  383. obu.vin = res[1].substring(18, 20);
  384. obu.version = res[1].substring(18, 19) >= 4 ? "4x" : "2x";
  385. cmdRandNum = res[2].substring(0, res[2].length - 4);
  386. state.showBtn = true
  387. } else {
  388. showModals('获取设备信息错误!')
  389. }
  390. }, () => {
  391. showModals('获取设备信息错误')
  392. });
  393. };
  394. //获取fileData
  395. const getFileData = (fun) => {
  396. searchVehicleInfoQuery(orderInfo.vehiclePlate + "_" + orderInfo.vehiclePlateColor, cmdRandNum).then((
  397. orderInfo) => {
  398. console.log("orderInfo==", orderInfo, orderInfo.fileData)
  399. fun(orderInfo.fileData);
  400. })
  401. };
  402. function containsEnglishCharacters(str) {
  403. // // 使用正则表达式匹配英文字母
  404. // const regex = /[a-zA-Z]/;
  405. // return regex.test(str);
  406. // 使用正则表达式匹配纯数字
  407. const regex = /^\d+$/;
  408. return regex.test(str);
  409. }
  410. /**
  411. * 获取卡号 读卡
  412. */
  413. const getCardId = () => {
  414. console.log('======获取卡信息======')
  415. let cmdArr = [
  416. cmd.HOME_DIRECTORY,
  417. //选择主目
  418. cmd.APPLICATION_DIRECTORY,
  419. //选择文件1001--DF01联网收费应用目录
  420. cmd.CMD_READBINARY,
  421. //15文件--卡片发行基本数据文件
  422. cmd.CMD_GETBALANCE
  423. //钱包
  424. ];
  425. tools.showLoadingAlert("正在执行指令");
  426. bluetoothUtil.transCmd(cmdArr, "10", function(res) {
  427. tools.hideLoadingAlert();
  428. //10:写卡 20:写OBU
  429. let str = res[2].substring(res[2].length - 4, res[2].length);
  430. let str3 = res[3].substring(res[3].length - 4, res[3].length);
  431. if (str == "9000" || str3 == "9000") {
  432. if (res[2].length > 86 || res[3] >= 12) {
  433. card.cardId = res[2].substring(20, 40); //卡号
  434. if (!containsEnglishCharacters(card.cardId)) {
  435. if (snums > 2) {
  436. showModals('获取卡信息错误')
  437. return
  438. }
  439. snums++
  440. getCardId()
  441. return
  442. }
  443. card.startTime = res[2].substring(40, 48); //启用
  444. card.endTime = res[2].substring(48, 56);
  445. card.version = res[2].substring(18, 19) >= 4 ? "4x" : "2x";
  446. card.netId = res[2].substring(20, 24);
  447. card.cardType = res[2].substring(28, 30) == 23 ? 1 : 2; //23记账卡 非 23储值卡 1:记账卡 2:储值卡
  448. card.vehiclePlateColor = parseInt(res[2].substring(82, 84), 16);
  449. console.log('======卡信息======', card.cardId, fileDataStrings.cardId)
  450. if (fileDataStrings.cardId) {
  451. if (card.cardId != fileDataStrings.cardId) {
  452. tools.showModalAlert("订单卡号与当前设备卡号信息不符!");
  453. return
  454. }
  455. }
  456. if (!state.transfer) {
  457. console.log("正常", state.transfer)
  458. getCardApply()
  459. } else {
  460. console.log("过户", !state.transfer, state.transfer)
  461. transferApplyRequest()
  462. }
  463. } else {
  464. console.error("CMD_READBINARY指令长度不符" + res[2])
  465. tools.hideLoadingAlert();
  466. }
  467. } else {
  468. showModals('获取卡信息错误!')
  469. }
  470. console.error("CMD_READBINARY指令长度不符" + res[2])
  471. tools.hideLoadingAlert();
  472. }, () => {
  473. showModals('获取卡信息错误')
  474. });
  475. };
  476. function showModals(msg) {
  477. uni.showModal({
  478. title: '提示',
  479. content: msg,
  480. showCancel: false,
  481. success: function(res) {
  482. if (res.confirm) {
  483. uni.navigateBack()
  484. console.log('用户点击确定1');
  485. } else if (res.cancel) {
  486. console.log('用户点击取消1');
  487. }
  488. }
  489. });
  490. }
  491. // *------------------------------------*
  492. // OBU开卡模块
  493. // *------------------------------------*
  494. /**
  495. * 写卡指令申请 请求
  496. */
  497. const getCardApply = () => {
  498. console.log('======写卡指令申请======')
  499. tools.showLoadingAlert("加载中");
  500. let options = {
  501. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  502. data: {
  503. cardId: card.cardId,
  504. orderId: fileDataStrings.orderId,
  505. cardType: card.cardType,
  506. userId: fileDataStrings.customerId,
  507. vehicleId: fileDataStrings.vehiclePlate + "_" + fileDataStrings.vehiclePlateColor,
  508. cosProvider: "1",
  509. enableTime: getFormatDate(new Date(), "yyyyMMdd"),
  510. expireTime: expireDate2(new Date())
  511. }, //请求参数
  512. method: "POST", //提交方式(默认POST)
  513. showLoading: true, //是否显示加载中(默认显示)
  514. };
  515. //调用方式
  516. request(IFCODE.writeCardApply, options)
  517. .then((res) => {
  518. tools.hideLoadingAlert();
  519. let result = stringToJson(res.bizContent);
  520. tools.showLoadingAlert("执行指令中");
  521. console.log('写卡指令', result.command)
  522. bluetoothUtil.transCmd(result.command.split(","), "10", function(res) {
  523. tools.hideLoadingAlert();
  524. getCommandBack(result.command, result.cosRecordId, res.toString());
  525. }, () => {
  526. showModals('写卡指令信息错误!')
  527. });
  528. })
  529. };
  530. /**
  531. * 写卡指令返回 请求
  532. */
  533. const getCommandBack = (command, cosRecordId, response) => {
  534. console.log('======循环写卡指令中======')
  535. tools.showLoadingAlert("加载中");
  536. let options = {
  537. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  538. data: {
  539. cardId: card.cardId,
  540. orderId: fileDataStrings.orderId,
  541. command: command,
  542. response: response,
  543. cosRecordId: cosRecordId,
  544. cosType: "1"
  545. }, //请求参数
  546. method: "POST", //提交方式(默认POST)
  547. showLoading: true, //是否显示加载中(默认显示)
  548. };
  549. //调用方式
  550. request(IFCODE.writeCardBack, options)
  551. .then((res) => {
  552. tools.hideLoadingAlert();
  553. let result = JSON.parse(res.bizContent);
  554. console.log("写卡指令============", result)
  555. if (result.orderStatus == 1 || result.orderStatus == "1") {
  556. tools.showLoadingAlert("执行指令中");
  557. bluetoothUtil.transCmd(result.command.split(","), "10", function(res) {
  558. tools.hideLoadingAlert();
  559. let response = res.toString();
  560. getCommandBack(result.command, cosRecordId, response);
  561. }, () => {
  562. showModals('写卡指令返回错误!')
  563. })
  564. } else {
  565. getWriteCard();
  566. }
  567. })
  568. };
  569. /**
  570. * 写卡确认 请求
  571. */
  572. const getWriteCard = () => {
  573. tools.showLoadingAlert("请求中");
  574. console.log('======写卡确认======')
  575. let options = {
  576. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  577. data: {
  578. cardId: card.cardId,
  579. orderId: fileDataStrings.orderId,
  580. netId: card.netId,
  581. packageNum: fileDataStrings.packageNum,
  582. cardType: card.cardType == 1 ? "111" : "211",
  583. brand: "3",
  584. model: "0",
  585. enableTime: formatTime(new Date()),
  586. expireTime: formatTime2(new Date()),
  587. accountOrganization: "",
  588. accountCardNo: "",
  589. cosRecordId: "",
  590. openId: getItem('openId')
  591. }, //请求参数
  592. method: "POST", //提交方式(默认POST)
  593. showLoading: true, //是否显示加载中(默认显示)
  594. };
  595. //调用方式
  596. request(IFCODE.writeCardConfirm, options)
  597. .then((res) => {
  598. tools.hideLoadingAlert();
  599. console.log(stringToJson(res.bizContent));
  600. //OBU发行申请 请求
  601. // getObuApply()
  602. const cardId = orderInfo.cardId;
  603. const cardStatus = orderInfo.cardStatus != null ? orderInfo.cardStatus : '0'
  604. const obuId = orderInfo.obuId;
  605. const obuStatus = orderInfo.obuStatus != null ? orderInfo.obuStatus : '9'
  606. if (!obuId) { //OBU发行
  607. getObuApply();
  608. } else if (obuId && obuStatus == '9') { //OBU发行
  609. getObuApply();
  610. } else if (cardId && obuId && (obuStatus == '1' || obuStatus == '11' || obuStatus ==
  611. '0')) {
  612. getInstallApply(); //激活
  613. }
  614. })
  615. .catch((err) => {
  616. console.log(err);
  617. });
  618. };
  619. // *------------------------------------*
  620. // OBU 发行模块
  621. // *------------------------------------*
  622. /**
  623. * OBU发行申请 请求
  624. */
  625. const getObuApply = () => {
  626. console.log('======OBU发行申请======')
  627. tools.showLoadingAlert("加载中");
  628. console.log('获取OBU号执行结果=========' + obu.obuId)
  629. let options = {
  630. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  631. data: {
  632. obuId: obu.obuId,
  633. userId: fileDataStrings.customerId,
  634. vehicleId: fileDataStrings.vehiclePlate + "_" + fileDataStrings.vehiclePlateColor
  635. }, //请求参数
  636. method: "POST", //提交方式(默认POST)
  637. showLoading: true, //是否显示加载中(默认显示)
  638. };
  639. //调用方式
  640. request(IFCODE.writeObuApply, options)
  641. .then(() => {
  642. tools.hideLoadingAlert();
  643. modifyFileInfo()
  644. })
  645. };
  646. /**
  647. * 修改系统信息 请求
  648. */
  649. const modifyFileInfo = () => {
  650. console.log('======修改系统信息请求======')
  651. var datetime = new Date();
  652. var year = datetime.getFullYear();
  653. var year1 = datetime.getFullYear() + 10;
  654. var month = datetime.getMonth() + 1 < 10 ? "0" + (datetime.getMonth() + 1) : datetime.getMonth() + 1;
  655. var date = datetime.getDate() < 10 ? "0" + datetime.getDate() : datetime.getDate();
  656. tools.showLoadingAlert("加载中");
  657. let options = {
  658. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  659. data: {
  660. obuSerailNo: obu.obuId, //OBU号
  661. obuVersion: obu.vin, //OBU版本号
  662. effTime: year + "" + month + "" + date, //启用时间
  663. expIime: year1 + "" + month + "" + date, //结束时间
  664. plateNo: fileDataStrings.vehiclePlate,
  665. pColor: fileDataStrings.vehiclePlateColor,
  666. random: cmdRandNum
  667. }, //请求参数
  668. method: "POST", //提交方式(默认POST)
  669. showLoading: true, //是否显示加载中(默认显示)
  670. };
  671. //调用方式
  672. request(IFCODE.modifyObuSysInfo, options)
  673. .then((res) => {
  674. tools.hideLoadingAlert();
  675. const datas = stringToJson(res.bizContent);
  676. tools.showLoadingAlert("执行指令");
  677. //如果存在APDU->穿透指令
  678. if (datas.data.APDU) {
  679. bluetoothUtil.transCmd([datas.data.APDU], "20", function(res) {
  680. tools.hideLoadingAlert();
  681. if (res[0] == "9000") {
  682. tools.showLoadingAlert("执行指令");
  683. //再次获取随机数
  684. let cmdArr = [cmd.HOME_DIRECTORY, cmd.OBU_DF01, cmd.OBU_EF01, cmd
  685. .RANDOM_NUMBER
  686. ];
  687. bluetoothUtil.transCmd(cmdArr, '20', function(res) {
  688. var str = res[3].substring(res[3].length - 4, res[3].length);
  689. if (str == "9000") {
  690. cmdRandNum = res[3].substring(0, res[3].length - 4);
  691. getFileData((demos) => {
  692. modifyVehicle(demos);
  693. })
  694. } else {
  695. tools.alertF("RANDOM_NUMBER指令长度不符" + res[1]);
  696. }
  697. }, () => {
  698. showModals('修改系统信息错误')
  699. })
  700. }
  701. }, () => {
  702. showModals('修改系统信息错误!')
  703. });
  704. }
  705. })
  706. .catch((err) => {
  707. console.log(err);
  708. });
  709. };
  710. /**
  711. * 修改车辆信息 请求
  712. */
  713. const modifyVehicle = (ites) => {
  714. tools.showLoadingAlert("加载中");
  715. console.log('======修改车辆信息======', ites)
  716. let options = {
  717. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  718. data: {
  719. Status: "0",
  720. random: cmdRandNum,
  721. obuSerailNo: obu.obuId,
  722. fileData: ites,
  723. orderId: fileDataStrings.orderId,
  724. }, //请求参数
  725. method: "POST", //提交方式(默认POST)
  726. showLoading: true, //是否显示加载中(默认显示)
  727. };
  728. //调用方式
  729. request(IFCODE.modifyObuVehicleInfo, options)
  730. .then((res) => {
  731. tools.hideLoadingAlert();
  732. const datas = stringToJson(res.bizContent);
  733. tools.showLoadingAlert("正在执行指令");
  734. if (datas.data.APDU) {
  735. bluetoothUtil.transCmd([datas.data.APDU], "20", function(res) {
  736. console.log('执行指令结果', res)
  737. tools.hideLoadingAlert();
  738. if (res[0] == "9000") {
  739. if (!state.transfer) {
  740. // 正常激活 走obu发行
  741. getObuConfirm();
  742. } else {
  743. transferSureRequest();
  744. }
  745. }
  746. }, () => {
  747. showModals('修改车辆信息错误')
  748. });
  749. }
  750. })
  751. };
  752. /**
  753. * OBU确认发行 请求
  754. */
  755. const getObuConfirm = () => {
  756. console.log('======OBU确认发行======')
  757. tools.showLoadingAlert("加载中");
  758. let options = {
  759. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  760. data: {
  761. obuId: obu.obuId,
  762. orderId: fileDataStrings.orderId,
  763. netId: obu.obuId.substring(0, 4),
  764. brand: obu.brand,
  765. model: obu.version,
  766. enableTime: formatTime(new Date()),
  767. expireTime: expireDate(new Date())
  768. }, //请求参数
  769. method: "POST", //提交方式(默认POST)
  770. showLoading: true, //是否显示加载中(默认显示)
  771. };
  772. //调用方式
  773. request(IFCODE.obuConfirm, options)
  774. .then((res) => {
  775. tools.hideLoadingAlert();
  776. let datas = stringToJson(res.bizContent);
  777. if (datas.obuId) {
  778. getInstallApply()
  779. }
  780. })
  781. .catch((err) => {
  782. console.log(err);
  783. });
  784. };
  785. // *------------------------------------*
  786. // 设备发行模块
  787. // *------------------------------------*
  788. /**
  789. * BDS-安装申请 请求
  790. */
  791. const getInstallApply = () => {
  792. console.log('======安装申请======')
  793. tools.showLoadingAlert("加载中");
  794. let options = {
  795. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  796. data: {
  797. obuId: obu.obuId,
  798. vehicleId: fileDataStrings.vehiclePlate + "_" + fileDataStrings.vehiclePlateColor,
  799. orderId: fileDataStrings.orderId,
  800. agentId: agentId,
  801. channelId: channelId,
  802. channelType: "1",
  803. staffId: "opId",
  804. terminalId: "999999999",
  805. }, //请求参数
  806. method: "POST", //提交方式(默认POST)
  807. showLoading: true, //是否显示加载中(默认显示)
  808. };
  809. //调用方式
  810. request(IFCODE.installApply, options)
  811. .then(() => {
  812. tools.hideLoadingAlert();
  813. //再次获取随机数
  814. let cmdArr = [cmd.HOME_DIRECTORY, cmd.RANDOM_NUMBER];
  815. bluetoothUtil.transCmd(cmdArr, '20', function(res) {
  816. var str = res[1].substring(res[1].length - 4, res[1].length);
  817. if (str == "9000") {
  818. cmdRandNum = res[1].substring(0, res[1].length - 4);
  819. getObuActivation();
  820. } else {
  821. tools.alertF("RANDOM_NUMBER指令长度不符" + res[1]);
  822. }
  823. }, () => {
  824. showModals('安装申请异常')
  825. })
  826. })
  827. };
  828. /**
  829. * VFJ-OBU在线激活 请求
  830. */
  831. const getObuActivation = () => {
  832. console.log('======VFJ-OBU在线激活======')
  833. tools.showLoadingAlert("加载中");
  834. let options = {
  835. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  836. data: {
  837. random: cmdRandNum,
  838. obuSerailNo: obu.obuId,
  839. orderId: fileDataStrings.orderId,
  840. }, //请求参数
  841. method: "POST", //提交方式(默认POST)
  842. showLoading: true, //是否显示加载中(默认显示)
  843. };
  844. //调用方式
  845. request(IFCODE.obuActivation, options)
  846. .then((res) => {
  847. tools.hideLoadingAlert();
  848. console.log("在线激活 请求");
  849. console.log(stringToJson(res.bizContent));
  850. const datas = stringToJson(res.bizContent);
  851. tools.showLoadingAlert("执行指令");
  852. bluetoothUtil.transCmd([datas.data.APDU], "20", function(res) {
  853. tools.hideLoadingAlert();
  854. console.log(res);
  855. if (res[0] == "9000") {
  856. console.log("在线激活执行指令88888 请求", res);
  857. getObuInstall(0, ""); //status 0 - 安装成功 || 1 - 安装失败
  858. }
  859. }, () => {
  860. showModals('在线激活异常')
  861. });
  862. })
  863. .catch((err) => {
  864. console.log(err);
  865. });
  866. };
  867. /**
  868. * BDS-安装确认 请求
  869. */
  870. const getObuInstall = (status, reason) => {
  871. console.log('======OBU安装确认======')
  872. tools.showLoadingAlert("加载中");
  873. let options = {
  874. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  875. data: {
  876. installStatus: status,
  877. failReason: reason,
  878. installType: "1",
  879. installChannelId: channelId,
  880. obuId: obu.obuId,
  881. orderId: fileDataStrings.orderId,
  882. openId: getItem('openId')
  883. }, //请求参数
  884. method: "POST", //提交方式(默认POST)
  885. showLoading: true, //是否显示加载中(默认显示)
  886. };
  887. //调用方式
  888. request(IFCODE.obuInstall, options)
  889. .then(() => {
  890. tools.hideLoadingAlert();
  891. bindCardAndObu();
  892. });
  893. };
  894. /**
  895. * 卡签绑定 请求
  896. */
  897. const bindCardAndObu = () => {
  898. console.log('======卡签绑定======')
  899. tools.showLoadingAlert("加载中");
  900. let options = {
  901. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  902. data: {
  903. obuId: obu.obuId,
  904. cardId: card.cardId ? card.cardId : fileDataStrings.cardId,
  905. }, //请求参数
  906. method: "POST", //提交方式(默认POST)
  907. showLoading: true, //是否显示加载中(默认显示)
  908. };
  909. //调用方式
  910. request(IFCODE.bindCardAndObu, options)
  911. .then((res) => {
  912. tools.hideLoadingAlert();
  913. let result = JSON.parse(res.bizContent);
  914. console.log("写卡指令============", result)
  915. tools.showLoadingAlert("执行指令中");
  916. bluetoothUtil.transCmd(result.command.split(","), "10", function(res) {
  917. tools.hideLoadingAlert();
  918. let response = res.toString();
  919. getCommandBackEnd(result.command, result.cosRecordId, response);
  920. }, () => {
  921. showModals('卡签绑定异常!')
  922. });
  923. })
  924. .catch((err) => {
  925. console.log(err);
  926. });
  927. };
  928. /**
  929. * 卡签绑定写卡指令返回 请求
  930. */
  931. const getCommandBackEnd = (command, cosRecordId, response) => {
  932. console.log('======卡签绑定循环写卡指令中======')
  933. tools.showLoadingAlert("加载中");
  934. let options = {
  935. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  936. data: {
  937. cardId: card.cardId ? card.cardId : fileDataStrings.cardId,
  938. orderId: fileDataStrings.orderId,
  939. command: command,
  940. response: response,
  941. cosRecordId: cosRecordId,
  942. cosType: "4"
  943. }, //请求参数
  944. method: "POST", //提交方式(默认POST)
  945. showLoading: true, //是否显示加载中(默认显示)
  946. };
  947. //调用方式
  948. request(IFCODE.writeCardBack, options)
  949. .then((res) => {
  950. tools.hideLoadingAlert();
  951. let result = JSON.parse(res.bizContent);
  952. console.log("写卡指令============", result)
  953. if (result.orderStatus == 1 || result.orderStatus == "1") {
  954. tools.showLoadingAlert("执行指令中");
  955. bluetoothUtil.transCmd(result.command.split(","), "10", function(res) {
  956. tools.hideLoadingAlert();
  957. let response = res.toString();
  958. getCommandBackEnd(result.command, cosRecordId, response);
  959. }, () => {
  960. showModals('卡签绑定返回异常!')
  961. });
  962. } else {
  963. state.disabled = true
  964. // #ifdef MP-ALIPAY
  965. uni.closeBluetoothAdapter({
  966. success(res) {
  967. }
  968. })
  969. msg("激活成功")
  970. state.showPopup = true
  971. state.isSuccess = true
  972. // #endif
  973. DataSynchronizationRequest();
  974. // #ifdef MP-WEIXIN
  975. msg("激活成功",{'icon':'success','duration':2000})
  976. setTimeout(() => {
  977. uni.navigateTo({
  978. url: "/subpackage/after-sale/deviceInfo/deviceInfo",
  979. });
  980. }, 2000)
  981. // #endif
  982. }
  983. })
  984. };
  985. const DataSynchronizationRequest = () => {
  986. const options = {
  987. type: 2,
  988. data: {
  989. orderId: fileDataStrings.orderId
  990. },
  991. method: "POST",
  992. showLoading: false,
  993. };
  994. request(IFCODE.DataSynchronizationApi, options).then((res) => {
  995. })
  996. }
  997. const back = () => {
  998. uni.switchTab({
  999. url: "/pages/index/index"
  1000. });
  1001. }
  1002. // 过户激活申请
  1003. const transferApplyRequest = () => {
  1004. const options = {
  1005. type: 2,
  1006. data: {
  1007. orderId: fileDataStrings.orderId
  1008. },
  1009. method: "POST",
  1010. showLoading: false,
  1011. };
  1012. request(IFCODE.transferApply, options).then((res) => {
  1013. // 设备升级
  1014. getDeviceUpgrade()
  1015. })
  1016. }
  1017. // 过户激活确认
  1018. const transferSureRequest = () => {
  1019. const options = {
  1020. type: 2,
  1021. data: {
  1022. orderId: fileDataStrings.orderId
  1023. },
  1024. method: "POST",
  1025. showLoading: false,
  1026. };
  1027. request(IFCODE.transferSure, options).then((res) => {
  1028. // 设备升级
  1029. getInstallApply()
  1030. })
  1031. }
  1032. //设备升级 请求
  1033. const getDeviceUpgrade = () => {
  1034. const options = {
  1035. type: 2,
  1036. data: {
  1037. cardId: fileDataStrings.cardId,
  1038. orderId: fileDataStrings.orderId,
  1039. isTransfer: state.transfer
  1040. },
  1041. method: "POST",
  1042. showLoading: true,
  1043. };
  1044. request(IFCODE.deviceUpgrade, options).then((res) => {
  1045. tools.hideLoadingAlert();
  1046. let result = stringToJson(res.bizContent);
  1047. console.log("&&&&&&&&&&&&", result);
  1048. let cmdArray = result.command ? result.command.split(",") : "";
  1049. if (cmdArray.length > 0) {
  1050. tools.showLoadingAlert("正在执行指令");
  1051. bluetoothUtil.transCmd(cmdArray, "10", function(res) {
  1052. tools.hideLoadingAlert();
  1053. let status = res[cmdArray.length - 1].substring(res[cmdArray.length - 1].length -
  1054. 4, res[cmdArray.length - 1].length);
  1055. if (status == "9000") {
  1056. getCommandBackUp(result.command, result.cosRecordId, res.toString());
  1057. }
  1058. }, () => {
  1059. showModals('设备升级异常!')
  1060. })
  1061. }
  1062. })
  1063. };
  1064. /**
  1065. * 写卡指令返回 请求
  1066. */
  1067. const getCommandBackUp = (command, cosRecordId, response) => {
  1068. console.log('======循环写卡指令中======')
  1069. tools.showLoadingAlert("加载中");
  1070. let options = {
  1071. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  1072. data: {
  1073. cardId: fileDataStrings.cardId,
  1074. orderId: fileDataStrings.orderId,
  1075. command: command,
  1076. response: response,
  1077. cosRecordId: cosRecordId,
  1078. cosType: 2
  1079. }, //请求参数
  1080. method: "POST", //提交方式(默认POST)
  1081. showLoading: true, //是否显示加载中(默认显示)
  1082. };
  1083. //调用方式
  1084. request(IFCODE.writeCardBack, options)
  1085. .then((res) => {
  1086. tools.hideLoadingAlert();
  1087. let result = JSON.parse(res.bizContent);
  1088. if (result.orderStatus == 1 || result.orderStatus == "1") {
  1089. tools.showLoadingAlert("执行指令中");
  1090. bluetoothUtil.transCmd(result.command.split(","), "10", function(res) {
  1091. tools.hideLoadingAlert();
  1092. let response = res.toString();
  1093. getCommandBackUp(result.command, cosRecordId, response);
  1094. }, () => {
  1095. showModals('写卡异常!')
  1096. });
  1097. } else {
  1098. obuWriteAgainRequest();
  1099. }
  1100. })
  1101. };
  1102. /**
  1103. * 修改系统信息 请求
  1104. */
  1105. const obuWriteAgainRequest = () => {
  1106. let cmdArray1 = [cmd.HOME_DIRECTORY, cmd.OBU_SYSTEM_FILE, cmd.RANDOM_NUMBER];
  1107. tools.showLoadingAlert("正在执行指令");
  1108. bluetoothUtil.transCmd(cmdArray1, "20", function(res) {
  1109. tools.hideLoadingAlert();
  1110. var str = res[2].substring(res[2].length - 4, res[2].length);
  1111. if (str == "9000") {
  1112. cmdRandNum = res[2].substring(0, res[2].length - 4);
  1113. const options = {
  1114. type: 2,
  1115. data: {
  1116. obuId: fileDataStrings.obuId,
  1117. random: cmdRandNum
  1118. },
  1119. method: "POST",
  1120. showLoading: true,
  1121. };
  1122. request(IFCODE.obuWriteAgain, options).then((res) => {
  1123. let datas = stringToJson(res.bizContent);
  1124. console.log("899", datas, datas.data.APDU);
  1125. if (datas.data.APDU) {
  1126. tools.showLoadingAlert("正在执行指令");
  1127. bluetoothUtil.transCmd([datas.data.APDU], "20", function(res) {
  1128. tools.hideLoadingAlert();
  1129. console.log("res=====", res, res[0])
  1130. let cmdArr = [cmd.HOME_DIRECTORY, cmd.OBU_DF01, cmd.OBU_EF01, cmd
  1131. .RANDOM_NUMBER
  1132. ];
  1133. bluetoothUtil.transCmd(cmdArr, "20", function(res) {
  1134. console.log("chelaing======", res)
  1135. var str = res[3].substring(res[3].length - 4, res[3]
  1136. .length);
  1137. if (str == "9000") {
  1138. cmdRandNum = res[3].substring(0, res[3].length -
  1139. 4);
  1140. console.log("0000000000000000000000000")
  1141. getFileData((demos) => {
  1142. modifyVehicle(demos);
  1143. })
  1144. } else {
  1145. tools.alertF("RANDOM_NUMBER指令长度不符" + res[1]);
  1146. }
  1147. })
  1148. })
  1149. }
  1150. })
  1151. } else {
  1152. tools.alertF("RANDOM_NUMBER指令长度不符" + res[1]);
  1153. }
  1154. })
  1155. };
  1156. </script>
  1157. <style>
  1158. .containers {
  1159. height: 100%;
  1160. display: flex;
  1161. flex-direction: column;
  1162. align-items: center;
  1163. justify-content: space-between;
  1164. box-sizing: border-box;
  1165. }
  1166. .sec_info {
  1167. width: 90%;
  1168. height: auto;
  1169. margin: 0 auto;
  1170. box-shadow: 0rpx 6rpx 25rpx 0rpx rgba(0, 0, 0, 0.2);
  1171. margin-top: 50rpx;
  1172. border-radius: 20rpx;
  1173. }
  1174. .info_txt {
  1175. width: 100%;
  1176. height: 120rpx;
  1177. line-height: 120rpx;
  1178. text-align: center;
  1179. color: #000;
  1180. font-size: 36rpx;
  1181. margin-bottom: 20rpx;
  1182. }
  1183. .info_plate {
  1184. display: flex;
  1185. flex-direction: row;
  1186. width: 94%;
  1187. height: 100rpx;
  1188. margin: 0 auto;
  1189. border-bottom: 2rpx solid #f2f2f2;
  1190. }
  1191. .info_plate text:nth-child(1) {
  1192. height: 100rpx;
  1193. text-align: left;
  1194. line-height: 100rpx;
  1195. font-size: 32rpx;
  1196. color: #999;
  1197. }
  1198. .info_plate text:nth-child(2) {
  1199. flex: 1;
  1200. height: 100rpx;
  1201. line-height: 100rpx;
  1202. font-size: 32rpx;
  1203. color: #333;
  1204. margin-left: 50rpx;
  1205. text-align: right;
  1206. }
  1207. /*提交按钮样式*/
  1208. .up_btn {
  1209. width: 85%;
  1210. height: 100rpx;
  1211. margin: 0 auto;
  1212. margin-top: 50rpx;
  1213. margin-bottom: 100rpx;
  1214. }
  1215. .up_btn button {
  1216. width: 100%;
  1217. height: 80rpx;
  1218. line-height: 80rpx;
  1219. color: white;
  1220. font-size: 32rpx;
  1221. text-align: center;
  1222. background: linear-gradient(to left, #43a1e0 0%, #13e7c1 100%);
  1223. border-radius: 40rpx;
  1224. outline: none;
  1225. border: #4cd95f;
  1226. }
  1227. .button {
  1228. width: 100%;
  1229. height: 80rpx;
  1230. line-height: 80rpx;
  1231. color: white;
  1232. font-size: 32rpx;
  1233. text-align: center;
  1234. background: linear-gradient(to left, #43a1e0 0%, #13e7c1 100%);
  1235. border-radius: 40rpx;
  1236. outline: none;
  1237. border: #4cd95f;
  1238. }
  1239. .hui {
  1240. width: 100%;
  1241. height: 80rpx;
  1242. line-height: 80rpx;
  1243. color: white;
  1244. font-size: 32rpx;
  1245. text-align: center;
  1246. background: linear-gradient(to left, #b9b9b9 0%, #e7e7e7 100%) !important;
  1247. border-radius: 40rpx;
  1248. outline: none;
  1249. border: #4cd95f;
  1250. }
  1251. .up_btn button[disabled] {
  1252. background-color: rgba(0, 191, 112, 0.5);
  1253. color: white;
  1254. font-size: 34rpx;
  1255. border-radius: 20rpx;
  1256. }
  1257. </style>