1 |
- {"version":3,"sources":["uni-app:///main.js","webpack:////Users/yangxiaohai/Desktop/boyuan/iot-test-app/pages/lock-test/lock-test.vue?b6a3","webpack:////Users/yangxiaohai/Desktop/boyuan/iot-test-app/pages/lock-test/lock-test.vue?74d5","webpack:////Users/yangxiaohai/Desktop/boyuan/iot-test-app/pages/lock-test/lock-test.vue?5f68","webpack:////Users/yangxiaohai/Desktop/boyuan/iot-test-app/pages/lock-test/lock-test.vue?9013","uni-app:///pages/lock-test/lock-test.vue","webpack:////Users/yangxiaohai/Desktop/boyuan/iot-test-app/pages/lock-test/lock-test.vue?d5fd"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page","renderjs","component","options","__file","components","uNavbar","uSteps","uStepsItem","uButton","uPopup","uRadioGroup","uRadio","e","message","indexOf","console","error","render","_vm","this","_h","$createElement","_self","_c","recyclableRender","staticRenderFns","_withStripped","data","subType","signalNum","interrupt","powerNum","uploadBtn","uploadMsg","testProjectId","deviceId","type","radiolist1","value","disabled","powerRefs","show7","flag","timer","cardPass","room","hotelId","building","floor","gatewayDeviceId","show","current1","stepList","id","title","desc","methods","changeInput","leftClick","uni","content","success","delta","url","testGateway","icon","res","testSignal","updataTime","openDoor","swipe","radioChange","uploadTest","setTimeout","resetDevice","uploadTestMsg","doorCard","clearInterval","counter","onUnload","onLoad"],"mappings":"oJAAA,MAGA,aACA,YAFAA,EAAGC,kCAAoCC,EAGvCC,EAAWC,a,gFCLX,oIACIC,EADJ,QASIC,EAAY,qBACd,aACA,YACA,sBACA,EACA,KACA,KACA,MACA,EACA,gBACAD,GAGFC,EAAUC,QAAQC,OAAS,gCACZ,aAAAF,E,0CCvBf,uQ,iCCAA,IAAIG,EAAJ,0LACA,IACEA,EAAa,CACXC,QAAS,WACP,OAAO,qHAITC,OAAQ,WACN,OAAO,mHAITC,WAAY,WACV,OAAO,6HAITC,QAAS,WACP,OAAO,qHAITC,OAAQ,WACN,OAAO,mHAIT,UAAW,WACT,OAA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WACA,+DACA,yDACAjE,eACA,yBACAA,eACA,uBACA,2BACA,mCACA,2BACA,8BACA,OACAmB,gDACAC,qBAGA,oCACA,wBAGA,iCACA,wBAGA,8BACA,wBAGA,gCACA,wBAGA,2BAaA,c,6DC7fA,yHAAsjD,eAAG,G","file":"pages/lock-test/lock-test.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pages/lock-test/lock-test.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./lock-test.vue?vue&type=template&id=2f996fa0&\"\nvar renderjs\nimport script from \"./lock-test.vue?vue&type=script&lang=js&\"\nexport * from \"./lock-test.vue?vue&type=script&lang=js&\"\nimport style0 from \"./lock-test.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"pages/lock-test/lock-test.vue\"\nexport default component.exports","export * from \"-!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--17-0!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./lock-test.vue?vue&type=template&id=2f996fa0&\"","var components\ntry {\n components = {\n uNavbar: function () {\n return import(\n /* webpackChunkName: \"uni_modules/uview-ui/components/u-navbar/u-navbar\" */ \"@/uni_modules/uview-ui/components/u-navbar/u-navbar.vue\"\n )\n },\n uSteps: function () {\n return import(\n /* webpackChunkName: \"uni_modules/uview-ui/components/u-steps/u-steps\" */ \"@/uni_modules/uview-ui/components/u-steps/u-steps.vue\"\n )\n },\n uStepsItem: function () {\n return import(\n /* webpackChunkName: \"uni_modules/uview-ui/components/u-steps-item/u-steps-item\" */ \"@/uni_modules/uview-ui/components/u-steps-item/u-steps-item.vue\"\n )\n },\n uButton: function () {\n return import(\n /* webpackChunkName: \"uni_modules/uview-ui/components/u-button/u-button\" */ \"@/uni_modules/uview-ui/components/u-button/u-button.vue\"\n )\n },\n uPopup: function () {\n return import(\n /* webpackChunkName: \"uni_modules/uview-ui/components/u-popup/u-popup\" */ \"@/uni_modules/uview-ui/components/u-popup/u-popup.vue\"\n )\n },\n \"u-Input\": function () {\n return import(\n /* webpackChunkName: \"uni_modules/uview-ui/components/u--input/u--input\" */ \"@/uni_modules/uview-ui/components/u--input/u--input.vue\"\n )\n },\n uRadioGroup: function () {\n return import(\n /* webpackChunkName: \"uni_modules/uview-ui/components/u-radio-group/u-radio-group\" */ \"@/uni_modules/uview-ui/components/u-radio-group/u-radio-group.vue\"\n )\n },\n uRadio: function () {\n return import(\n /* webpackChunkName: \"uni_modules/uview-ui/components/u-radio/u-radio\" */ \"@/uni_modules/uview-ui/components/u-radio/u-radio.vue\"\n )\n },\n }\n} catch (e) {\n if (\n e.message.indexOf(\"Cannot find module\") !== -1 &&\n e.message.indexOf(\".vue\") !== -1\n ) {\n console.error(e.message)\n console.error(\"1. 排查组件名称拼写是否正确\")\n console.error(\n \"2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom\"\n )\n console.error(\n \"3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件\"\n )\n } else {\n throw e\n }\n}\nvar render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./lock-test.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./lock-test.vue?vue&type=script&lang=js&\"","<template>\n\t<view class=\"u-page\">\n\t\t<view class=\"\" style=\"height: 44px;margin-bottom: 88rpx;\">\n\t\t\t<u-navbar bgColor=\"#3c9cff\" title=\"门锁测试\" @leftClick=\"leftClick\">\n\t\t\t</u-navbar>\n\t\t</view>\n\t\t<view class=\"u-demo-block\">\n\t\t\t<view class=\"u-demo-block__content steps\">\n\t\t\t\t<u-steps :current=\"current1\" direction=\"column\">\n\t\t\t\t\t<u-steps-item class=\"steps-item\" v-for=\"item in stepList\" :key=\"item.id\" :error=\"item.error\"\n\t\t\t\t\t\t:title=\"item.title\" :desc=\"item.desc\">\n\t\t\t\t\t</u-steps-item>\n\t\t\t\t\t<!-- \t<u-steps-item title=\"测试开门\" desc=\"10:35\">\n\t\t\t\t\t</u-steps-item>\n\t\t\t\t\t<u-steps-item title=\"测试刷卡\" desc=\"11:40\">\n\t\t\t\t\t</u-steps-item>\n\t\t\t\t\t<u-steps-item title=\"输入功耗\" desc=\"11:40\">\n\t\t\t\t\t</u-steps-item> -->\n\t\t\t\t</u-steps>\n\t\t\t</view>\n\n\t\t</view>\n\t\t<view class=\"upload\">\n\t\t\t<u-button :disabled=\"uploadBtn\" type=\"primary\" size=\"large\" @click=\"uploadTestMsg\">完成测试并上传信息</u-button>\n\t\t</view>\n\t\t<u-popup customStyle=\"width: 70vw\" :round=\"10\" mode=\"center\" :show=\"show7\" @close=\"close\">\n\t\t\t<view class=\"popupView\" style=\"height: 150px;\">\n\t\t\t\t<view class=\"power\">\n\t\t\t\t\t功耗选择\n\t\t\t\t</view>\n\t\t\t\t<view class=\"inputNum\" style=\"\">\n\t\t\t\t\t<view class=\"\">\n\t\t\t\t\t\t功耗:\n\t\t\t\t\t</view>\n\t\t\t\t\t<u--input placeholder=\"请输入功耗\" border=\"surround\" v-model=\"powerNum\" @change=\"changeInput\"></u--input>\n\t\t\t\t</view>\n\t\t\t\t<u-radio-group placement=\"row\">\n\t\t\t\t\t<u-radio :customStyle=\"{margin: '15px 30px'}\" v-for=\"(item, index) in radiolist1\" :key=\"index\"\n\t\t\t\t\t\t:label=\"item.value\" :name=\"item.powerRefs\" @change=\"radioChange\" iconPlacement=\"right\">\n\t\t\t\t\t</u-radio>\n\t\t\t\t</u-radio-group>\n\n\t\t\t</view>\n\t\t</u-popup>\n\t</view>\n\n</template>\n\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tsubType: null,\n\t\t\t\tsignalNum: '',\n\t\t\t\tinterrupt: false,\n\t\t\t\tpowerNum: 160,\n\t\t\t\tuploadBtn: false,\n\t\t\t\tuploadMsg: {\n\t\t\t\t\ttestProjectId: null,\n\t\t\t\t\tdeviceId: \"\",\n\t\t\t\t\ttype: null,\n\n\t\t\t\t},\n\t\t\t\tradiolist1: [{\n\t\t\t\t\t\tvalue: '通过',\n\t\t\t\t\t\tdisabled: false,\n\t\t\t\t\t\tpowerRefs: true\n\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tvalue: '不通过',\n\t\t\t\t\t\tdisabled: false,\n\t\t\t\t\t\tpowerRefs: false\n\t\t\t\t\t}\n\n\t\t\t\t],\n\t\t\t\tshow7: false,\n\t\t\t\tflag: 0,\n\t\t\t\ttimer: null,\n\t\t\t\tcardPass: false,\n\t\t\t\troom: {\n\t\t\t\t\tdeviceId: \"\",\n\t\t\t\t\thotelId: 257,\n\t\t\t\t\tbuilding: 2,\n\t\t\t\t\tfloor: 7,\n\t\t\t\t\troom: \"7728\"\n\t\t\t\t},\n\t\t\t\tgatewayDeviceId:null ,\n\n\t\t\t\tshow: false,\n\t\t\t\tcurrent1: null,\n\t\t\t\tstepList: [{\n\t\t\t\t\t\tid: 0,\n\t\t\t\t\t\ttitle: '测试信号',\n\t\t\t\t\t\tdesc: '测试蓝牙设备信号值是否通过',\n\t\t\t\t\t\terror: false\n\t\t\t\t\t}, {\n\t\t\t\t\t\tid: 1,\n\t\t\t\t\t\ttitle: '蓝牙测试开门',\n\t\t\t\t\t\tdesc: '测试蓝牙进行门锁开门',\n\t\t\t\t\t\terror: false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 2,\n\t\t\t\t\t\ttitle: '测试刷卡',\n\t\t\t\t\t\tdesc: '房间信息已经植入,请进行刷卡验证',\n\t\t\t\t\t\terror: false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 3,\n\t\t\t\t\t\ttitle: '测试功率',\n\t\t\t\t\t\tdesc: '验证功耗是否通过',\n\t\t\t\t\t\terror: false\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tchangeInput(e) {\n\t\t\t\tconsole.log(e);\n\t\t\t},\n\t\t\tleftClick() {\n\t\t\t\tlet a = this.stepList.every((item) => {\n\t\t\t\t\treturn item.error == true\n\t\t\t\t})\n\t\t\t\tconsole.log(a);\n\t\t\t\tif (a) {\n\t\t\t\t\tconsole.log('模态框');\n\t\t\t\t\tuni.hideLoading()\n\t\t\t\t\tuni.showModal({\n\t\t\t\t\t\ttitle: '温馨提示',\n\t\t\t\t\t\tcontent: '确定取消上传本次测试信息吗?',\n\t\t\t\t\t\tsuccess: res => {\n\t\t\t\t\t\t\tif (res.confirm) {\n\t\t\t\t\t\t\t\t// this.show1 = false\n\t\t\t\t\t\t\t\tthis.$u.toast(`点击了确定`)\n\t\t\t\t\t\t\t\tthis.interrupt = true\n\n\t\t\t\t\t\t\t\t// console.log(this.flag);\n\t\t\t\t\t\t\t\tuni.navigateBack({\n\t\t\t\t\t\t\t\t\tdelta: 1\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// this.interrupt = true\n\t\t\t\t\t\t\t\t// this.$u.toast(`点击了取消`)\n\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t} else {\n\t\t\t\t\t// this.flag = 99\n\t\t\t\t\tuni.hideLoading()\n\t\t\t\t\tthis.interrupt = true\n\t\t\t\t\tuni.reLaunch({\n\t\t\t\t\t\turl: \"/pages/bluetooth/bluetooth\"\n\t\t\t\t\t})\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\t// 测试网关连接\n\t\t\tasync testGateway() {\n\t\t\t\tuni.showLoading({\n\n\t\t\t\t\ttitle: '正在测试网关连接',\n\t\t\t\t\ticon: 'none'\n\t\t\t\t})\n\t\t\t\tconst {\n\t\t\t\t\tdata: res\n\t\t\t\t} = await uni.$http.get(`/api/v1/test/gateway/connection/${this.gatewayDeviceId}`)\n\t\t\t\tuni.hideLoading()\n\t\t\t\tif (res.data.isConnect == true) {\n\t\t\t\t\tthis.flag = 1\n\t\t\t\t\tconsole.log('网关连接成功');\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log('网关连接失败');\n\t\t\t\t\tthis.$u.toast(`网关连接失败`)\n\t\t\t\t}\n\t\t\t},\n\t\t\t// 测试信号\n\t\t\tasync testSignal(obj) {\n\t\t\t\tuni.showLoading({\n\n\t\t\t\t\ttitle: '正在测试信号',\n\t\t\t\t\ticon: 'none'\n\t\t\t\t})\n\t\t\t\tconst {\n\t\t\t\t\tdata: res\n\t\t\t\t} = await uni.$http.post('/api/v1/test/bluetooth/checkSignal', obj)\n\t\t\t\tconsole.log(res);\n\t\t\t\tuni.hideLoading()\n\t\t\t\tif (res.data.isNormal == true) {\n\t\t\t\t\tthis.current1 = 1\n\t\t\t\t\tthis.flag = 2\n\t\t\t\t\tconsole.log('信号测试成功');\n\t\t\t\t} else {\n\t\t\t\t\tthis.stepList[0].error = true\n\t\t\t\t\tconsole.log('信号测试失败');\n\t\t\t\t\tthis.$u.toast(`信号测试失败`)\n\t\t\t\t}\n\t\t\t},\n\t\t\t// 下发房间号\n\t\t\tasync updataTime() {\n\t\t\t\tuni.showLoading({\n\n\t\t\t\t\ticon: 'none',\n\t\t\t\t\ttitle: \"正在下发房间号\"\n\t\t\t\t})\n\t\t\t\tconst {\n\t\t\t\t\tdata: res\n\t\t\t\t} = await uni.$http.post('/api/v1/test/bluetooth/setRoom', this.room)\n\t\t\t\tuni.hideLoading()\n\t\t\t\tif (res.code == 200) {\n\t\t\t\t\tthis.flag = 4\n\t\t\t\t\tconsole.log('时间更新成功');\n\t\t\t\t} else {\n\t\t\t\t\tthis.$u.toast(`时间更新失败`)\n\t\t\t\t\tconsole.log('时间更新失败');\n\t\t\t\t}\n\t\t\t},\n\t\t\t// 测试开门\n\t\t\tasync openDoor() {\n\t\t\t\tuni.showLoading({\n\n\t\t\t\t\ttitle: '蓝牙开门测试中',\n\t\t\t\t\ticon: 'none'\n\t\t\t\t})\n\t\t\t\tconst {\n\t\t\t\t\tdata: res\n\t\t\t\t} = await uni.$http.post('/api/v1/test/bluetooth/openDoor', {\n\t\t\t\t\tdeviceId: this.room.deviceId\n\t\t\t\t})\n\t\t\t\tuni.hideLoading()\n\t\t\t\tif (res.code == 200) {\n\t\t\t\t\tthis.current1 = 2\n\t\t\t\t\tthis.flag = 3\n\t\t\t\t\t// uni.$u.toast(`开门成功`)\n\t\t\t\t\tconsole.log('开门成功');\n\t\t\t\t} else {\n\t\t\t\t\tthis.stepList[1].error = true\n\t\t\t\t\tconsole.log('开门失败');\n\t\t\t\t\t// this.stepList[2].error = true\n\t\t\t\t}\n\t\t\t},\n\t\t\t// 测试刷卡\n\t\t\tasync swipe() {\n\t\t\t\tconst {\n\t\t\t\t\tdata: res\n\t\t\t\t} = await uni.$http.post('/api/v1/test/bluetooth/queryOpenDoorRes', {\n\t\t\t\t\tdeviceId: this.room.deviceId,\n\t\t\t\t\ttype: 5,\n\n\t\t\t\t})\n\t\t\t\t// console.log(res);\n\t\t\t\tif (res.data.cardOpenDoorRes === true) {\n\t\t\t\t\t// this.current1 = 3\n\t\t\t\t\tthis.cardPass = true\n\t\t\t\t\tthis.flag = 5\n\t\t\t\t\tconsole.log('开门记录');\n\t\t\t\t\t// uni.$u.toast(`刷卡开门成功`)\n\t\t\t\t} else {\n\t\t\t\t\t// this.stepList[2].error = true\n\t\t\t\t}\n\t\t\t},\n\t\t\tradioChange(n) {\n\t\t\t\tconsole.log(n);\n\t\t\t\tif (n) {\n\t\t\t\t\tthis.current1 = 4\n\t\t\t\t\tthis.show7 = false\n\t\t\t\t\tthis.flag = 6\n\t\t\t\t} else {\n\t\t\t\t\tthis.stepList[3].error = true\n\t\t\t\t\tthis.show7 = false\n\t\t\t\t}\n\t\t\t\t// this.show7 = false\n\n\t\t\t},\n\t\t\tasync uploadTest() {\n\t\t\t\tuni.showLoading({\n\n\t\t\t\t\ttitle: \"正在上传本次测试结果\",\n\t\t\t\t\ticon: 'none'\n\t\t\t\t})\n\t\t\t\tlet {\n\t\t\t\t\tdata: res\n\t\t\t\t} = await uni.$http.post('/api/v1/test/testResult', this.uploadMsg)\n\t\t\t\tuni.hideLoading()\n\t\t\t\tconsole.log(res);\n\t\t\t\tif (res.code == 200) {\n\t\t\t\t\t// uni.showToast({\n\t\t\t\t\t// \ticon: 'none',\n\t\t\t\t\t// \ttitle: '上传成功',\n\t\t\t\t\t// \tduration: 2000\n\t\t\t\t\t// })\n\t\t\t\t\tthis.$u.toast(`上传成功`)\n\t\t\t\t\t// this.uploadBtn = true\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tthis.resetDevice()\n\t\t\t\t\t}, 2000)\n\n\t\t\t\t\t// uni.switchTab({\n\t\t\t\t\t// \turl: \"/pages/bluetooth/bluetooth\"\n\t\t\t\t\t// })\n\t\t\t\t} else {\n\t\t\t\t\tuni.$showMsg('上传失败')\n\n\t\t\t\t}\n\t\t\t},\n\t\t\t// 重置设备\n\t\t\tasync resetDevice() {\n\t\t\t\tuni.showLoading({\n\n\t\t\t\t\ticon: 'none',\n\t\t\t\t\ttitle: '正在重置设备',\n\t\t\t\t})\n\t\t\t\tlet {\n\t\t\t\t\tdata: res\n\t\t\t\t} = await uni.$http.post('/api/v1/test/bluetooth/resetDevice', {\n\t\t\t\t\tdeviceId: this.uploadMsg.deviceId\n\t\t\t\t})\n\t\t\t\tconsole.log(res);\n\t\t\t\tuni.hideLoading()\n\t\t\t\tif (res.code == 200) {\n\t\t\t\t\tthis.$u.toast(`重置成功`)\n\t\t\t\t\tuni.switchTab({\n\t\t\t\t\t\turl:\"/pages/bluetooth/bluetooth\"\n\t\t\t\t\t})\n\t\t\t\t} else {\n\t\t\t\t\t// this.$u.toast(`重置失败`)\n\t\t\t\t\tthis.resetDevice()\n\t\t\t\t\t// uni.showModal({\n\t\t\t\t\t// \ttitle: '提示',\n\t\t\t\t\t// \tcontent: '设备重置失败,点击确定继续重置',\n\t\t\t\t\t// \tsuccess: function(res) {\n\t\t\t\t\t// \t\tif (res.confirm) {\n\t\t\t\t\t// \t\t\tthis.resetDevice()\n\t\t\t\t\t// \t\t} else if (res.cancel) {\n\t\t\t\t\t// \t\t\tconsole.log('用户点击取消');\n\t\t\t\t\t// \t\t}\n\t\t\t\t\t// \t}\n\t\t\t\t\t// });\n\t\t\t\t}\n\t\t\t},\n\t\t\tuploadTestMsg() {\n\n\t\t\t\tif (this.flag == 1 || this.flag == 0) {\n\t\t\t\t\tconsole.log('失败的案例');\n\t\t\t\t\tconsole.log(this.uploadMsg);\n\t\t\t\t\tif (this.subType == 0 || this.subType == null) {\n\t\t\t\t\t\tthis.$set(this.uploadMsg, 'subType', 0)\n\t\t\t\t\t}\n\t\t\t\t\tthis.$set(this.uploadMsg, 'status', 0)\n\t\t\t\t\tthis.$set(this.uploadMsg, 'signalRes', false)\n\t\t\t\t\tthis.$set(this.uploadMsg, 'doorOpenRes', false)\n\t\t\t\t\tthis.$set(this.uploadMsg, 'powerRes', false)\n\t\t\t\t\tthis.$set(this.uploadMsg, 'cardOpenRes', false)\n\t\t\t\t\tthis.$set(this.uploadMsg, 'signalNum', this.signalNum)\n\n\t\t\t\t\tthis.uploadTest()\n\n\t\t\t\t}\n\t\t\t\tif (this.flag == 2) {\n\t\t\t\t\tif (this.subType == 0 || this.subType == null) {\n\t\t\t\t\t\tthis.$set(this.uploadMsg, 'subType', 0)\n\t\t\t\t\t}\n\t\t\t\t\tthis.$set(this.uploadMsg, 'status', 0)\n\t\t\t\t\tthis.$set(this.uploadMsg, 'signalRes', true)\n\t\t\t\t\tthis.$set(this.uploadMsg, 'signalNum', this.signalNum)\n\t\t\t\t\tthis.$set(this.uploadMsg, 'doorOpenRes', false)\n\t\t\t\t\tthis.$set(this.uploadMsg, 'powerRes', false)\n\t\t\t\t\tthis.$set(this.uploadMsg, 'cardOpenRes', false)\n\t\t\t\t\tthis.uploadTest()\n\t\t\t\t}\n\t\t\t\tif (this.flag == 3 || this.flag == 4) {\n\t\t\t\t\tif (this.subType == 0 || this.subType == null) {\n\t\t\t\t\t\tthis.$set(this.uploadMsg, 'subType', 0)\n\t\t\t\t\t}\n\t\t\t\t\tthis.$set(this.uploadMsg, 'status', 0)\n\t\t\t\t\tthis.$set(this.uploadMsg, 'signalRes', true)\n\t\t\t\t\tthis.$set(this.uploadMsg, 'doorOpenRes', true)\n\t\t\t\t\tthis.$set(this.uploadMsg, 'signalNum', this.signalNum)\n\t\t\t\t\tthis.$set(this.uploadMsg, 'powerRes', false)\n\t\t\t\t\tthis.$set(this.uploadMsg, 'cardOpenRes', false)\n\t\t\t\t\tthis.uploadTest()\n\t\t\t\t}\n\t\t\t\tif (this.flag == 5) {\n\t\t\t\t\tif (this.subType == 0 || this.subType == null) {\n\t\t\t\t\t\tthis.$set(this.uploadMsg, 'subType', 0)\n\t\t\t\t\t}\n\t\t\t\t\tthis.$set(this.uploadMsg, 'signalNum', this.signalNum)\n\t\t\t\t\tthis.$set(this.uploadMsg, 'status', 0)\n\t\t\t\t\tthis.$set(this.uploadMsg, 'signalRes', true)\n\t\t\t\t\tthis.$set(this.uploadMsg, 'doorOpenRes', true)\n\t\t\t\t\tthis.$set(this.uploadMsg, 'powerRes', false)\n\t\t\t\t\tthis.$set(this.uploadMsg, 'cardOpenRes', true)\n\n\t\t\t\t\tconsole.log(this.uploadMsg);\n\t\t\t\t\tthis.uploadTest()\n\t\t\t\t}\n\t\t\t\tif (this.flag == 6) {\n\t\t\t\t\tif (this.subType == 0 || this.subType == null) {\n\t\t\t\t\t\tthis.$set(this.uploadMsg, 'subType', 0)\n\t\t\t\t\t}\n\t\t\t\t\tthis.$set(this.uploadMsg, 'status', 1)\n\t\t\t\t\tthis.$set(this.uploadMsg, 'signalRes', true)\n\t\t\t\t\tthis.$set(this.uploadMsg, 'doorOpenRes', true)\n\t\t\t\t\tthis.$set(this.uploadMsg, 'powerRes', true)\n\t\t\t\t\tthis.$set(this.uploadMsg, 'cardOpenRes', true)\n\t\t\t\t\tthis.$set(this.uploadMsg, 'powerNum', this.powerNum)\n\t\t\t\t\tconsole.log(this.uploadMsg);\n\t\t\t\t\tthis.uploadTest()\n\t\t\t\t}\n\t\t\t\t// else {\n\t\t\t\t// \tconsole.log('失败的案例');\n\t\t\t\t// \tconsole.log(this.uploadMsg);\n\t\t\t\t// \tthis.$set(this.uploadMsg, 'status', 0)\n\n\t\t\t\t// \tthis.uploadTest()\n\t\t\t\t// }\n\t\t\t},\n\t\t\tdoorCard() {\n\n\t\t\t\tuni.showLoading({\n\t\t\t\t\ttitle: \"请刷卡\",\n\t\t\t\t\ticon: \"none\"\n\t\t\t\t})\n\t\t\t\tthis.swipe()\n\t\t\t\tlet counter = 0\n\t\t\t\tthis.timer = setInterval(() => {\n\t\t\t\t\tif (this.interrupt) {\n\t\t\t\t\t\tclearInterval(this.timer)\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tconsole.log(counter);\n\t\t\t\t\t// 一分钟之后不再自动调取接口\n\t\t\t\t\tif (counter == 11) {\n\t\t\t\t\t\tuni.hideLoading()\n\t\t\t\t\t\tclearInterval(this.timer)\n\t\t\t\t\t\tthis.$u.toast(`检测到未刷卡`)\n\t\t\t\t\t\tthis.stepList[2].error = true\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tif (this.cardPass == true) {\n\t\t\t\t\t\tuni.hideLoading()\n\t\t\t\t\t\tthis.current1 = 3\n\t\t\t\t\t\tthis.show7 = true\n\n\n\t\t\t\t\t\tclearInterval(this.timer)\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tcounter++\n\t\t\t\t\tthis.swipe()\n\t\t\t\t}, 5000)\n\t\t\t}\n\n\n\t\t},\n\t\tonUnload() {\n\t\t\tconsole.log('我是页面卸载函数');\n\t\t\tthis.flag = 22\n\t\t},\n\t\tonLoad(option) {\n\t\t\tthis.uploadMsg.testProjectId=uni.getStorageSync('testProjectId')\n\t\t\tthis.gatewayDeviceId=uni.getStorageSync('gatewayDeviceId')\n\t\t\tconsole.log(option);\n\t\t\tlet item = JSON.parse(option.item)\n\t\t\tconsole.log(item);\n\t\t\tthis.subType = item.subType\n\t\t\tthis.signalNum = item.signalNum\n\t\t\tthis.uploadMsg.deviceId = item.deviceId\n\t\t\tthis.uploadMsg.type = item.type\n\t\t\tthis.room.deviceId = item.deviceId\n\t\t\tconst obj = {\n\t\t\t\ttestProjectId: uni.getStorageSync('testProjectId'),\n\t\t\t\tdeviceId: item.deviceId\n\t\t\t}\n\n\t\t\tthis.testGateway().then(() => {\n\t\t\t\tif (this.flag != 1 || this.interrupt) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tthis.testSignal(obj).then(() => {\n\t\t\t\t\tif (this.flag != 2 || this.interrupt) {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tthis.openDoor().then(() => {\n\t\t\t\t\t\tif (this.flag != 3 || this.interrupt) {\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.updataTime().then(() => {\n\t\t\t\t\t\t\tif (this.flag != 4 || this.interrupt) {\n\t\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthis.doorCard()\n\n\n\n\t\t\t\t\t\t})\n\t\t\t\t\t})\n\n\n\t\t\t\t})\n\t\t\t})\n\n\t\t},\n\n\t}\n</script>\n\n<style lang=\"scss\">\n\t.steps {\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\n\t\t.u-steps-item {\n\n\t\t\theight: 25vh;\n\t\t\twidth: calc(100vw - 20px);\n\t\t\tmargin: 30px 10px;\n\n\t\t\t// background-color: red;\n\t\t\t.u-steps-item__line {\n\t\t\t\theight: 100px !important;\n\t\t\t}\n\t\t}\n\n\t\t// .u-steps-item {\n\t\t// \twidth: 100vw;\n\t\t// \theight: 25vh;\n\t\t// \tbackground-color: blue;\n\t\t// }\n\n\t}\n\n\t.upload {\n\t\tposition: fixed;\n\t\tbottom: 0;\n\t\twidth: 100vw;\n\t}\n\n\t.power {\n\t\ttext-align: center;\n\t\tmargin: 13px 0 20px 0;\n\t}\n\n\t.inputNum {\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\tpadding: 0 20rpx;\n\t}\n\n\t.u-radio-group {\n\t\tmargin-top: 20rpx;\n\t}\n</style>\n<!-- \tthis.timer = setInterval(() => {\n\t\t\t\tthis.current1++\n\t\t\t\tconsole.log(this.current1);\n\t\t\t\tif (this.current1 === 2) {\n\t\t\t\t\tthis.btnShow = false\n\t\t\t\t}\n\t\t\t\tif (this.current1 === 3) {\n\t\t\t\t\tuni.showLoading({\n\t\t\t\t\t\ttitle: '加载中',\n\t\t\t\t\t\tmask: true\n\t\t\t\t\t});\n\t\t\t\t\tuni.hideLoading()\n\t\t\t\t\tthis.stepList[3].error = true\n\t\t\t\t\tclearInterval(this.timer)\n\t\t\t\t}\n\t\t\t}, 3000) -->","import mod from \"-!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-2!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-5!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./lock-test.vue?vue&type=style&index=0&lang=scss&\"; export default mod; export * from \"-!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-2!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-5!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./lock-test.vue?vue&type=style&index=0&lang=scss&\""],"sourceRoot":""}
|