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.

activate.vue 36KB

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