You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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