1 |
- {"version":3,"sources":["uni-app:///main.js","webpack:////Users/yangxiaohai/Desktop/boyuan/iot-test-app/pages/door-lock-module/door-lock-module.vue?bac0","webpack:////Users/yangxiaohai/Desktop/boyuan/iot-test-app/pages/door-lock-module/door-lock-module.vue?0294","webpack:////Users/yangxiaohai/Desktop/boyuan/iot-test-app/pages/door-lock-module/door-lock-module.vue?4c8a","webpack:////Users/yangxiaohai/Desktop/boyuan/iot-test-app/pages/door-lock-module/door-lock-module.vue?e07c","uni-app:///pages/door-lock-module/door-lock-module.vue","webpack:////Users/yangxiaohai/Desktop/boyuan/iot-test-app/pages/door-lock-module/door-lock-module.vue?9d1a"],"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","powerNum","subType","uploadBtn","uploadMsg","testProjectId","deviceId","type","radiolist1","value","disabled","powerRefs","show7","flag","timer","signalNum","gatewayDeviceId","show","current1","stepList","id","title","desc","methods","changeInput","leftClick","uni","content","success","delta","testGateway","mask","icon","res","testSignal","openDoor","radioChange","uploadTest","setTimeout","uploadTestMsg","resetDevice","url","onLoad"],"mappings":"kKAAA,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,8CACZ,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,OAAO,qHAITC,YAAa,WACX,OAAO,+HAITC,OAAQ,WACN,OAAO,oHAKX,MAAOC,GACP,IAC+C,IAA7CA,EAAEC,QAAQC,QAAQ,wBACa,IAA/BF,EAAEC,QAAQC,QAAQ,QAWlB,MAAMF,EATNG,QAAQC,MAAMJ,EAAEC,SAChBE,QAAQC,MAAM,mBACdD,QAAQC,MACN,uFAEFD,QAAQC,MACN,mDAMN,IAAIC,EAAS,WACX,IAAIC,EAAMC,KACNC,EAAKF,EAAIG,eACJH,EAAII,MAAMC,IAEjBC,GAAmB,EACnBC,EAAkB,GACtBR,EAAOS,eAAgB,G,iCCpEvB,yHAA81B,eAAG,G,uJCkDj2B,CACAC,gBACA,OACAC,aACAC,aACAC,aACAC,WACAC,gDACAC,YACAC,WAGAC,aACAC,WACAC,YACAC,cAGA,CACAF,YACAC,YACAC,eAIAC,SACAC,OACAC,WACAC,aACAC,oDAEAC,QACAC,cACAC,WACAC,KACAC,aACAC,qBACAjC,UACA,CACA+B,KACAC,eACAC,kBACAjC,UAEA,CACA+B,KACAC,aACAC,gBACAjC,aAMAkC,SACAC,wBACApC,gBAGAqC,qBAAA,WACA,mCACA,qBAEArC,eACA,GACAA,mBACAsC,gBACAA,aACAL,aACAM,yBACAC,oBACA,YAEA,oBACA,UAEAF,gBACAG,eAUAH,gBACAG,WAQAC,uBAAA,4IAKA,OAJAJ,eACAK,QACAV,iBACAW,cACA,SAGAN,0EAAA,gBADAO,SAEAP,gBACA,qBACA,SACAtC,wBAEAA,sBACA,sBACA,0CAhBA,IAmBA8C,uBAAA,4IAKA,OAJAR,eACAK,QACAV,eACAW,cACA,SAGAN,qDAAA,gBADAO,SAEAP,gBACA,oBACA,aACA,SACAtC,wBAEA,uBACAA,sBACA,sBACA,0CAlBA,IAsBA+C,oBAAA,4IAKA,OAJAT,eACAK,QACAV,gBACAW,cACA,SAGAN,gDACApB,gCACA,gBAHA2B,SAIAP,gBACA,aACA,aACA,SAEA,WACAtC,sBAEA,uBACAA,qBACA,0CArBA,IAwBAgD,wBACAhD,eACA,GACA,gBACA,cACA,cAEA,0BACA,gBAKAiD,sBAAA,4IAKA,OAJAX,eACAK,QACAV,mBACAW,cACA,SAGAN,oDAAA,gBADAO,SAEAP,gBACAtC,eACA,aACAsC,mBAEAY,uBACA,kBACA,OAMAZ,mBACA,0CAvBA,IAyBAa,yBAEA,6BACAnD,qBACAA,4BACA,iBACA,iDAEA,qDACA,qCACA,yCACA,2CACA,wCAGA,mBAEA,eACA,iBACA,iDAEA,qDACA,qCACA,yCACA,2CACA,wCACA,mBAEA,eACA,iBACA,iDAEA,qDACA,qCACA,yCACA,2CACA,wCACA,mBAEA,eACA,iBACA,iDAEA,qDACA,qCACA,yCACA,2CACA,wCACA,mDACAA,4BACA,oBAWAoD,uBAAA,4IAKA,OAJAd,eAEAM,YACAX,iBACA,SAGAK,mDACApB,gCACA,gBAHA2B,SAIA7C,eACAsC,gBACA,aACA,mBACAA,aACAe,oCAGA,mBAGA,0CAtBA,KA0BAC,mBAAA,WACA,qBACAtD,eACA,uBACA,2BACA,mCACA,2BAEA,OACAiB,gDACAC,qBAGA,oCACA,WAGA,iCACA,WAGA,0CAaA,c,6DClXA,yHAA6jD,eAAG,G","file":"pages/door-lock-module/door-lock-module.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pages/door-lock-module/door-lock-module.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./door-lock-module.vue?vue&type=template&id=6eaf9d66&\"\nvar renderjs\nimport script from \"./door-lock-module.vue?vue&type=script&lang=js&\"\nexport * from \"./door-lock-module.vue?vue&type=script&lang=js&\"\nimport style0 from \"./door-lock-module.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/door-lock-module/door-lock-module.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!./door-lock-module.vue?vue&type=template&id=6eaf9d66&\"","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!./door-lock-module.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!./door-lock-module.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\"\n\t\t\t\t\t\t@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\t\tpowerNum: 160,\n\t\t\t\tsubType:null,\n\t\t\t\tuploadBtn: false,\n\t\t\t\tuploadMsg: {\n\t\t\t\t\ttestProjectId: uni.getStorageSync('testProjectId'),\n\t\t\t\t\tdeviceId: \"\",\n\t\t\t\t\ttype: null\n\t\t\t\t\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\tsignalNum: '',\n\t\t\t\tgatewayDeviceId: uni.getStorageSync('gatewayDeviceId'),\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]\n\t\t\t}\n\t\t},\n\n\t\tmethods: {\n\t\t\tchangeInput(e) {\n\t\t\t\tconsole.log(e);\n\t\t\t},\n\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.flag = 99\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.$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\tuni.navigateBack({\n\t\t\t\t\t\tdelta: 1\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\t\t\t\t\tmask: true,\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\t\t\t\t\tmask: true,\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\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\n\t\t\t// 测试开门\n\t\t\tasync openDoor() {\n\t\t\t\tuni.showLoading({\n\t\t\t\t\tmask: true,\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.uploadMsg.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\tthis.show7 = true\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}\n\t\t\t},\n\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 = 3\n\t\t\t\t\tthis.show7 = false\n\t\t\t\t\tthis.flag = 4\n\t\t\t\t} else {\n\t\t\t\t\tthis.stepList[2].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\t\t\t\t\tmask: true,\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\tuni.$showMsg('上传成功')\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}, 1500)\n\t\t\t\t\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\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==1){\n\t\t\t\t\t\tthis.$set(this.uploadMsg, 'subType', this.subType)\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', 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\t\n\t\t\t\t\t\n\t\t\t\t\tthis.uploadTest()\n\t\t\t\t}\n\t\t\t\tif (this.flag == 2) {\n\t\t\t\t\tif(this.subType==1){\n\t\t\t\t\t\tthis.$set(this.uploadMsg, 'subType', this.subType)\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', false)\n\t\t\t\t\tthis.$set(this.uploadMsg, 'powerRes', false)\n\t\t\t\t\tthis.uploadTest()\n\t\t\t\t}\n\t\t\t\tif (this.flag == 3) {\n\t\t\t\t\tif(this.subType==1){\n\t\t\t\t\t\tthis.$set(this.uploadMsg, 'subType', this.subType)\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.uploadTest()\n\t\t\t\t}\n\t\t\t\tif (this.flag == 4) {\n\t\t\t\t\tif(this.subType==1){\n\t\t\t\t\t\tthis.$set(this.uploadMsg, 'subType', this.subType)\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', 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\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\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\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\tthis.$u.toast(`重置失败`)\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t},\n\n\t\t},\n\t\tonLoad(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\t// this.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) {\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) {\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\t// if (this.flag != 3) {\n\t\t\t\t\t\t// \treturn\n\t\t\t\t\t\t// }\n\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!./door-lock-module.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!./door-lock-module.vue?vue&type=style&index=0&lang=scss&\""],"sourceRoot":""}
|