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

active-device-tools.js 19KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740
  1. import {
  2. configBlueStateMsg,
  3. decode,
  4. hex2int
  5. } from '../etc-sdk-tool/gbk-tool'
  6. import {
  7. jsonToString
  8. } from '../obj-tools'
  9. import {
  10. connectAndInit,
  11. disconnect,
  12. transCmd,
  13. getIccFile15,
  14. getObuSystemInfo,
  15. activeObu,
  16. getDeviceCustomizedInfo,
  17. } from '../etc-sdk-tool/etc-sdk-tool'
  18. import activeCode from './active-device-code'
  19. import {
  20. API
  21. } from '../../network/etcApi'
  22. const network = require('../../network/index')
  23. const DevResult = {
  24. code: 0,
  25. msg: '', //信息
  26. data: []
  27. }
  28. let issueResult = {
  29. cmd: '',
  30. cmdType: '',
  31. stepNo: '',
  32. transOrderId: '',
  33. OrderNo: '',
  34. isOnline: '',
  35. }
  36. let _checkStatusCallback = Function()
  37. let _isDeviceEnd = false
  38. let _disConnectCallback = Function()
  39. /// -------------------- 公开方法 ----------------------- ///
  40. // 激活设备
  41. export async function ActiveDevice({
  42. device,
  43. params,
  44. isNeedShowLoad = true,
  45. isNeedContect = true,
  46. disconnectCallback = Function(),
  47. } = {}) {
  48. _disConnectCallback = disconnectCallback
  49. activeCode.params = params
  50. activeCode.isNeedShowLoad = isNeedShowLoad || true
  51. if (isNeedContect) {
  52. _configNormalActiveCode()
  53. return await _connectDevice(device, 1)
  54. } else {
  55. return await _configIssueApply()
  56. }
  57. }
  58. // 重新激活
  59. export async function ActiveAgainDevice({
  60. device,
  61. params,
  62. isNeedShowLoad = true,
  63. disconnectCallback = Function(),
  64. } = {}) {
  65. activeCode.bussType = 4
  66. return await _againObuIssueCheck()
  67. }
  68. // 设备校验
  69. export async function EquipmentDetection({
  70. device,
  71. params,
  72. isNeedShowLoad = true,
  73. checkStatusCallback = Function(),
  74. } = {}) {
  75. _disConnectCallback = checkStatusCallback
  76. _configNormalActiveCode()
  77. activeCode.params = params
  78. activeCode.isNeedShowLoad = isNeedShowLoad || true
  79. return await _connectDevice(device, 11)
  80. }
  81. /**
  82. * 卡片检测
  83. *
  84. * @param device 设备对象
  85. * @param params 检测参数,默认为空对象,可包含 OrderId 和 PlateNumber 属性
  86. * @param isNeedShowLoad 是否需要显示加载动画,默认为 true
  87. * @param checkStatusCallback 检测状态回调函数,默认为 null
  88. * @returns 返回连接设备的 Promise 对象
  89. */
  90. export async function CardDetection({
  91. device,
  92. params,
  93. isNeedShowLoad = true,
  94. disconnectCallback = Function(),
  95. } = {}) {
  96. _disConnectCallback = disconnectCallback
  97. _configNormalActiveCode()
  98. activeCode.params = params
  99. activeCode.isNeedShowLoad = isNeedShowLoad || true
  100. return await _connectDevice(device, 2)
  101. }
  102. /**
  103. * 重新激活设备
  104. *
  105. * @async
  106. * @returns {Promise<any>} 返回一个Promise对象,表示设备连接的结果
  107. */
  108. export async function Reactivate() {
  109. const {
  110. device,
  111. params,
  112. isNeedShowLoad,
  113. disconnectCallback
  114. } = arguments[0]
  115. _disConnectCallback = disconnectCallback
  116. _configNormalActiveCode()
  117. activeCode.params = params
  118. activeCode.isNeedShowLoad = isNeedShowLoad || true
  119. return await _connectDevice(device, 4)
  120. }
  121. /**
  122. * 断开与设备的连接
  123. *
  124. * @returns 返回断开连接的结果
  125. */
  126. export async function DisConnectDevice() {
  127. _isDeviceEnd = true
  128. const res = await disconnect()
  129. console.log(jsonToString(res))
  130. return res
  131. }
  132. /**
  133. * 重新读取设备信息
  134. *
  135. * @param {*} device
  136. * @param {*} bussType
  137. */
  138. export async function ObuSystemInfo() {
  139. return await _obuSystemInfo()
  140. }
  141. /// -------------------- 私有方法 ----------------------- ///
  142. /// -------------------- 设备相关
  143. async function _connectDevice(device, bussType) {
  144. console.log('准备连接设备')
  145. const deviceName = device.name
  146. activeCode.deviceName = deviceName
  147. activeCode.bussType = bussType
  148. console.log('设备名称:' + deviceName)
  149. if (!device || !device.name) {
  150. return {
  151. code: 251,
  152. msg: "设备名称为空"
  153. }
  154. }
  155. _conFigCurrentCallBack(200, deviceName)
  156. const res = await connectAndInit(device, () => {
  157. if (!_isDeviceEnd) {
  158. if (activeCode.isNeedShowLoad) {
  159. console.log('连接断开隐藏加载框')
  160. wx.hideLoading()
  161. }
  162. console.log('设备连接断开')
  163. typeof _disConnectCallback === 'function' && _disConnectCallback()
  164. }
  165. })
  166. if (res.code == 0) {
  167. if (bussType == 1) {
  168. return await _configIssueApply()
  169. } else {
  170. return await _obuSystemInfo()
  171. }
  172. }
  173. _conFigCurrentCallBack(250, deviceName)
  174. res.code = 250
  175. return res
  176. }
  177. /// -------------------- OBU相关
  178. /// -------------------- OBU信息读取相关
  179. /**
  180. * 获取系统信息并进行处理
  181. *
  182. * @param type 类型,默认为0
  183. * @returns 返回处理结果
  184. */
  185. async function _obuSystemInfo(type = 0) {
  186. _conFigCurrentCallBack(300)
  187. const res = await getObuSystemInfo()
  188. console.log('获取系统信息结果:' + jsonToString(res))
  189. if (res.code == 0) {
  190. console.log('获取系统信息成功')
  191. const sytem = res.data
  192. if (sytem) {
  193. console.log('OBU系统信息:' + sytem)
  194. const contractType = sytem.substr(16, 2)
  195. const contractVersion = sytem.substr(18, 2)
  196. const serialNumber = sytem.substr(20, 16)
  197. const star = sytem.substr(36, 8)
  198. const end = sytem.substr(44, 8)
  199. const activeState = sytem.substr(52, 2)
  200. const lssuer = sytem.substr(8, 8)
  201. activeCode.contractType = contractType
  202. activeCode.contractVersion = contractVersion
  203. activeCode.serialNumber = serialNumber
  204. activeCode.startTime = star
  205. activeCode.expireTime = end
  206. activeCode.acState = activeState == '01' ? true : false
  207. activeCode.lssuer = lssuer
  208. console.log('协约类型' + contractType)
  209. console.log('合同版本' + contractVersion)
  210. console.log('合同序列号' + serialNumber)
  211. console.log('开始时间' + star)
  212. console.log('结束时间' + end)
  213. console.log('激活状态' + activeState)
  214. console.log('发行方' + lssuer)
  215. if (type == 0) {
  216. if (
  217. activeCode.bussType == 2 ||
  218. activeCode.bussType == 11 ||
  219. activeCode.bussType == 4 ||
  220. activeCode.bussType == 12
  221. ) {
  222. return _iccFile15Info()
  223. } else if (activeCode.bussType == 1) {
  224. return _configIssueApply()
  225. }
  226. } else {
  227. if (activeCode.bussType == 1) {
  228. if (activeCode.acState == true) {
  229. return _iccFile15Info(1)
  230. } else {
  231. return _configFailCallBack({
  232. msg: '标签位激活失败',
  233. })
  234. }
  235. } else if (activeCode.bussType == 4) {
  236. if (activeCode.acState == true) {
  237. activeCode.vehiclePlate = activeCode.cardPlateNumber
  238. activeCode.vehiclePlateColor = activeCode.cardPlateColor
  239. return _configSuccessCallBack("重新激活成功")
  240. } else {
  241. return {
  242. code: -1,
  243. msg: '重新激活失败',
  244. }
  245. }
  246. } else if (activeCode.bussType == 2) {
  247. return _configSuccessCallBack('卡签检测成功')
  248. }
  249. }
  250. }
  251. }
  252. _conFigCurrentCallBack(350)
  253. return res
  254. }
  255. /// -------------------- OBU信息写入相关
  256. /// -------------------- ICC相关
  257. async function _iccFile15Info(type = 0) {
  258. _conFigCurrentCallBack(304)
  259. const res = await getIccFile15()
  260. if (res.code == 0) {
  261. let data = res.data
  262. console.log('读取CPU 0015文件:' + data)
  263. let sytem = data
  264. /// 卡片类型
  265. let cardType = sytem.substr(16, 2)
  266. /// 卡片版本号
  267. let cardVersion = sytem.substr(18, 2)
  268. /// 卡片网络编号 + 用户卡片内部编号
  269. let cardNumber = sytem.substr(20, 20)
  270. activeCode.cardVersionHex = cardVersion;
  271. activeCode.cardVersion = hex2int(cardVersion)
  272. activeCode.cardType = hex2int(cardType)
  273. activeCode.faceCardNum = cardNumber
  274. /// 卡片内部编号
  275. activeCode.cardUid = sytem.substr(24, 16)
  276. console.log('卡片类型' + activeCode.cardType)
  277. console.log('卡号' + activeCode.faceCardNum)
  278. console.log('卡版本' + activeCode.cardVersion)
  279. if (sytem.length > 84) {
  280. /// 启用时间
  281. let cardStar = sytem.substring(40, 48)
  282. /// 到期时间
  283. let cardEnd = sytem.substring(48, 56)
  284. /// 车牌号码
  285. let plateNo = sytem.substring(56, 80)
  286. /// 车牌颜色
  287. let plateColor = hex2int(sytem.substring(82, 84))
  288. if (
  289. plateNo == '000000000000000000000000' ||
  290. plateNo == 'ffffffffffffffffffffffff' ||
  291. plateNo == 'FFFFFFFFFFFFFFFFFFFFFFFF'
  292. ) {
  293. console.log('车牌号为空')
  294. activeCode.cardPlateNumber = '未知车牌'
  295. activeCode.cardPlateColor = '-1'
  296. activeCode.vehiclePlate = '未知车牌'
  297. activeCode.vehiclePlateColor = '-1'
  298. } else {
  299. activeCode.cardPlateCode = plateNo
  300. activeCode.cardPlateColor = plateColor
  301. activeCode.cardPlateNumber = decode(plateNo)
  302. }
  303. activeCode.plateNumber = activeCode.cardPlateNumber
  304. activeCode.cardStar = cardStar
  305. activeCode.cardEnd = cardEnd
  306. activeCode.cardVehicleType = hex2int(sytem.substring(84, 86))
  307. console.log('卡开始时间' + cardStar)
  308. console.log('卡结束时间' + cardEnd)
  309. console.log('车牌号十六进制' + plateNo)
  310. console.log('车牌颜色' + plateColor)
  311. console.log('车型' + activeCode.cardVehicleType)
  312. }
  313. if (activeCode.bussType == 1) {
  314. if (type == 0) {
  315. return _cardIssueCheck()
  316. } else {
  317. return _configSuccessCallBack('激活成功')
  318. }
  319. } else if (activeCode.bussType == 2 || activeCode.bussType == 12) {
  320. if (activeCode.cardPlateNumber == '未知车牌' && activeCode.bussType == 12) {
  321. activeCode.plateNumber = '未知车牌'
  322. activeCode.vehiclePlate = '未知车牌'
  323. activeCode.vehiclePlateColor = '-1'
  324. activeCode.catInfo = {
  325. licensePlate: '未知车牌',
  326. }
  327. return _configSuccessCallBack('检测成功')
  328. } else {
  329. if (activeCode.bussType == 2) {
  330. if (activeCode.cardPlateNumber == '未知车牌') {
  331. return _configSuccessCallBack('检测成功')
  332. }
  333. return _obuVehicleInfo()
  334. } else if (activeCode.bussType == 12) {
  335. activeCode.vehiclePlate = activeCode.cardPlateNumber
  336. activeCode.vehiclePlateColor = activeCode.cardPlateColor
  337. return _configSuccessCallBack('检测成功')
  338. }
  339. }
  340. } else if (activeCode.bussType == 11) {
  341. return _getDeviceCustomizedInfo()
  342. } else if (activeCode.bussType == 4) {
  343. if (activeCode.cardPlateNumber == '未知车牌') {
  344. return _configFailCallBack({
  345. msg: '设备未激活,请先激活设备',
  346. })
  347. } else {
  348. return _againObuIssueCheck()
  349. }
  350. }
  351. } else {
  352. _conFigCurrentCallBack(354)
  353. }
  354. return res
  355. }
  356. async function _getDeviceCustomizedInfo() {
  357. console.log("获取设备定制化信息")
  358. const res = await getDeviceCustomizedInfo();
  359. console.log(res)
  360. if (res.code == 0) {
  361. activeCode.devInfoCustom.pillar = res.data
  362. if (res.data) {
  363. return _configSuccessCallBack('校验信息获取成功')
  364. } else {
  365. return _configFailCallBack({
  366. code: 257
  367. })
  368. }
  369. } else {
  370. activeCode.devInfoCustom.pillar = true
  371. }
  372. return _configSuccessCallBack('校验信息获取成功')
  373. }
  374. async function _againObuIssueCheck() {
  375. _conFigCurrentCallBack(402)
  376. const res = await activeObu(_getAgainObuMac)
  377. if (res.code == 0) {
  378. return _obuSystemInfo(1);
  379. } else {
  380. _conFigCurrentCallBack(352);
  381. }
  382. return res;
  383. }
  384. /// -------------------- 网络相关 ---------------------- ///
  385. // 重新激活
  386. async function _getAgainObuMac(randNum, callback) {
  387. console.log("获取随机数", randNum)
  388. let params = {
  389. // Flag: '0001',
  390. // ContractSN: activeCode.serialNumber,
  391. // Random: randNum
  392. cardId: activeCode.cardId,
  393. obuId: activeCode.obuId,
  394. vehiclePlate: activeCode.vehiclePlate,
  395. vehiclePlateColor: activeCode.vehiclePlateColor,
  396. vehicleType: activeCode.vehicleType,
  397. random: cmdRandNum
  398. }
  399. console.log(params)
  400. let resData = await API.ETC.getVFJObuActive(params)
  401. console.log(resData);
  402. const {
  403. code,
  404. data
  405. } = resData;
  406. if (code == 0) {
  407. DevResult.code = 0;
  408. DevResult.data = data.APDU;
  409. } else {
  410. DevResult.code = 3;
  411. }
  412. typeof callback === 'function' && callback(DevResult)
  413. }
  414. // 新版激活接口
  415. async function _instApply() {
  416. _conFigCurrentCallBack(750, "正在激活,请等待")
  417. let params = {}
  418. params.orderNo = activeCode.params.orderNo;
  419. params.cardId = activeCode.faceCardNum;
  420. params.obuId = activeCode.serialNumber;
  421. params.cardVersion = activeCode.cardVersionHex
  422. params.obuVersion = activeCode.contractVersion
  423. const res = await network.etc.instApply(
  424. params.orderNo,
  425. params.cardId,
  426. params.obuId,
  427. params.cardVersion,
  428. params.obuVersion,
  429. );
  430. console.log(res)
  431. if (res.code == 0) {
  432. return _configIssueNetWorkData(res.data)
  433. } else {
  434. return _configFailCallBack({
  435. msg: (res.message || '发行指令申请失败,请稍后重试') + res.code
  436. })
  437. }
  438. }
  439. async function _instCallBack(cmdResult) {
  440. const res = await network.etc.instCallBack(
  441. issueResult.transOrderId,
  442. issueResult.cmd,
  443. cmdResult,
  444. issueResult.stepNo,
  445. )
  446. if (res.code == 0) {
  447. return _configIssueNetWorkData(res.data)
  448. } else {
  449. return _configFailCallBack({
  450. msg: (res.message || '发行指令回传失败,请稍后重试') + res.code
  451. })
  452. }
  453. }
  454. // 老版本
  455. /// 配置发行指令申请
  456. /// issueType - 指令类型 1-卡 2-签
  457. async function _configIssueApply() {
  458. return await _instApply()
  459. // const params = {
  460. // ...activeCode.params,
  461. // };
  462. // _conFigCurrentCallBack(750, "正在激活,请等待")
  463. // const res = await apiIssueApply(params)
  464. // console.log(res)
  465. // if (res.code == 0) {
  466. // return _configIssueNetWorkData(res.data)
  467. // } else {
  468. // return _configFailCallBack({
  469. // msg: (res.message || '发行指令申请失败,请稍后重试') + res.code
  470. // })
  471. // }
  472. }
  473. /// 配置发行指令回传
  474. async function _configIssueCallback(cmdResult) {
  475. return await _instCallBack(cmdResult);
  476. // const params = {
  477. // openId: activeCode.params.openId,
  478. // transOrderId: issueResult.transOrderId,
  479. // cmd: issueResult.cmd,
  480. // cmdResult,
  481. // stepNo: issueResult.stepNo,
  482. // };
  483. // const res = await apiIssueCallback(params)
  484. // if (res.code == 0) {
  485. // return _configIssueNetWorkData(res.data)
  486. // } else {
  487. // return _configFailCallBack({
  488. // msg: (res.message || '发行指令回传失败,请稍后重试') + res.code
  489. // })
  490. // }
  491. }
  492. async function _configIssueNetWorkData(data) {
  493. issueResult = data;
  494. const cmdArr = data.cmd.split(',')
  495. const cmdType = data.cmdType == "CARD" ? '10' : '20'
  496. if (issueResult.stepNo == 100) {
  497. return _obuSystemInfo(1)
  498. } else {
  499. const res = await transCmd(cmdArr, cmdType)
  500. if (res.code == 0) {
  501. return await _configIssueCallback(res.cmdResult)
  502. } else {
  503. return _configFailCallBack({
  504. msg: res.msg || "激活失败"
  505. })
  506. }
  507. }
  508. }
  509. /**
  510. * 配置成功回调函数
  511. *
  512. * @param msg 成功消息内容
  513. * @returns 配置成功后的返回对象
  514. */
  515. function _configSuccessCallBack(msg) {
  516. _conFigCurrentCallBack(500)
  517. return {
  518. code: 0,
  519. data: activeCode,
  520. msg: msg,
  521. }
  522. }
  523. /**
  524. * 处理网络请求失败的情况
  525. *
  526. * @param data 任意类型的数据,表示请求返回的数据
  527. * @param msg 错误信息字符串
  528. * @returns 返回包含错误码、数据和错误信息的对象
  529. */
  530. function _configFailCallBack({
  531. data = activeCode,
  532. msg = '网络请求失败',
  533. code = -1
  534. } = {}) {
  535. _conFigCurrentCallBack(550, msg)
  536. return {
  537. code,
  538. data: data,
  539. msg: msg,
  540. }
  541. }
  542. /**
  543. * 回调方法
  544. */
  545. function _conFigCurrentCallBack(code, name) {
  546. const {
  547. type,
  548. msg
  549. } = configBlueStateMsg(code, name)
  550. if (type == 1) {
  551. typeof _checkStatusCallback === 'function' && _checkStatusCallback(msg)
  552. if (activeCode.isNeedShowLoad) {
  553. wx.showLoading({
  554. title: msg,
  555. })
  556. }
  557. } else {
  558. _isDeviceEnd = true
  559. if (activeCode.isNeedDisConnect) {
  560. console.log("_conFigCurrentCallBack")
  561. console.log("执行断开连接设备")
  562. DisConnectDevice()
  563. }
  564. if (activeCode.isNeedShowLoad && activeCode.isNeedDisConnect) {
  565. wx.hideLoading()
  566. }
  567. }
  568. return type
  569. }
  570. /**
  571. * 配置普通激活码的属性
  572. */
  573. function _configNormalActiveCode() {
  574. _isDeviceEnd = false
  575. activeCode.params = {
  576. OrderId: '',
  577. PlateNumber: '',
  578. }
  579. /// 卡片版本号
  580. activeCode.cardVersion = ''
  581. // 卡片类型
  582. activeCode.cardType = ''
  583. /// 卡片里 车型 1 客车、2 货车
  584. activeCode.cardVehicleType = '1'
  585. /// 合同类型
  586. activeCode.contractType = ''
  587. /// 合同版本
  588. activeCode.contractVersion = ''
  589. /// 卡表面号, 网络编号的20位表面号
  590. activeCode.faceCardNum = ''
  591. /// 卡表面号,不带网络编号的16位表面号
  592. activeCode.cardUid = ''
  593. /// 车牌号编码
  594. activeCode.vehiclePlateCode = ''
  595. /// 车牌号
  596. activeCode.vehiclePlate = ''
  597. /// 车牌号
  598. activeCode.plateNumber = ''
  599. /// OBU 车型 1 客车、2 货车
  600. activeCode.vehicleType = '1'
  601. /// 车牌颜色
  602. activeCode.vehiclePlateColor = '0'
  603. /// 卡片车牌号码
  604. activeCode.cardPlateNumber = ''
  605. /// 卡片车牌颜色
  606. activeCode.cardPlateColor = '-1'
  607. /// 办理状态
  608. /// 0、开始发行
  609. /// 10、上传图片成功、
  610. /// 20、写Obu成功
  611. /// 30、写卡成功
  612. /// 40、激活成功
  613. /// 50、二次已激活
  614. activeCode.issueState = 10
  615. /// OBU序列号,16位合同序列号
  616. activeCode.serialNumber = ''
  617. /// 服务供应商
  618. activeCode.supplier = '贵州'
  619. /// 订单号
  620. activeCode.OrderNo = ''
  621. /// 开始时间
  622. activeCode.startTime = ''
  623. /// 结束时间
  624. activeCode.expireTime = ''
  625. /// 业务类型 1 激活 4 二次激活 2 卡签检测
  626. activeCode.bussType = 1
  627. /// 激活状态
  628. activeCode.acState = false
  629. /// obu mac 地址
  630. activeCode.obuId = 'FFFFFFFF'
  631. /// 发行方标识
  632. activeCode.lssuer = ''
  633. /// 卡片激活开始时间
  634. activeCode.cardStar = ''
  635. /// 卡片激活结束时间
  636. activeCode.cardEnd = ''
  637. /// 电量
  638. activeCode.electricity = '40'
  639. /// true 天线关闭 false 天线打开
  640. activeCode.equipmentState = false
  641. /// 是否支持 打开 和 关闭 天线
  642. activeCode.isShowEquipment = false
  643. activeCode.content = ''
  644. /// 换卡换签 网络返回数据
  645. activeCode.netData = {}
  646. /// 车辆解密信息
  647. activeCode.catInfo = {
  648. licensePlate: '未知车牌',
  649. }
  650. /// 1 换卡 2 换签 3 全套
  651. activeCode.afterType = '1'
  652. /// 设备名字
  653. activeCode.deviceName = ''
  654. /// 0 支持 1 不支持
  655. activeCode.supportLock = '0'
  656. /// 回调
  657. activeCode.callBack = ''
  658. /// 是否显示默认加载 动画
  659. activeCode.isNeedShowLoad = true
  660. /// 是否需要校验设备名字
  661. activeCode.isNeedCheckName = true
  662. activeCode.isNeedDisConnect = false
  663. }