wszhyWx/unpackage/dist/build/mp-weixin/pages/timeEnvironment/timeEnvironment.js

1 line
4.3 KiB
JavaScript

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/timeEnvironment/timeEnvironment"],{"271a":function(e,t,n){"use strict";(function(e){var a=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n("9523"));function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var c={data:function(){return{background:{backgroundColor:"transparent"},waterAndFertilizerParamsList:[],testBaseList:[{img:"/static/base1.png",name:"空气温度",value:"38.8klux"},{img:"/static/base2.png",name:"光亮度",value:"38.8klux"},{img:"/static/base3.png",name:"二氧化碳",value:"二氧化碳"},{img:"/static/base3.png",name:"二氧化碳",value:"678PPM"},{img:"/static/base4.png",name:"土壤温度",value:"20℃"},{img:"/static/base4.png",name:"土壤温度",value:"30.1℃"},{img:"/static/base5.png",name:"土壤湿度",value:"18.5%"},{img:"/static/base5.png",name:"土壤湿度",value:"18.5%"},{img:"/static/base6.png",name:"水肥PH",value:"0"},{img:"/static/base6.png",name:"水肥EC",value:"0.2mS/cm"},{img:"/static/base7.png",name:"3#空气温度",value:"29.8C"},{img:"/static/base8.png",name:"3#空气湿度",value:"80.6%"},{img:"/static/base2.png",name:"3#光亮度",value:"34.6 klux"},{img:"/static/base3.png",name:"3#二氧化碳",value:"29.8C"},{img:"/static/base5.png",name:"3#土壤温度",value:"31℃"}],testBaseList1:[{img:"/static/1.png",name:"4#光亮度",value:"43 klux"},{img:"/static/2.png",name:"4#二氧化碳",value:"742 PPM"},{img:"/static/3.png",name:"4#土壤温度",value:"29.3C"},{img:"/static/4.png",name:"4#土壤湿度",value:"4%"}]}},onShow:function(){},mounted:function(){var t=this;e.getStorage({key:"token",success:function(n){t.getEquipmentInfo(e.getStorageSync("userid"))},fail:function(t){e.reLaunch({url:"/pages/login/login"})}})},methods:{getEquipmentInfo:function(t){var n=this;e.showLoading({title:"加载中..."}),this.$http({url:this.api.sel_eqbyid+t,method:"GET"}).then((function(t){console.log(t,"根据用户id查询对应的设备数据"),200==t.code&&(n.waterAndFertilizerParamsList=t.data.map((function(e,t){return u(u({},e),{},{childList:[]})})),n.waterAndFertilizerParamsList.forEach((function(t,a){n.$http({url:n.api.getFs_rtdata+"?equipmentId="+t.deviceId,method:"post"}).then((function(a){console.log(a,"主页查看施肥机实时数据"),200==a.code&&(e.hideLoading({title:"完成"}),t.childList=a.data,console.log(n.waterAndFertilizerParamsList))}))})))}))},toTarget_water_fertilizer_PH:function(t,n){e.navigateTo({url:"/pages/target_water_fertilizer_PH/target_water_fertilizer_PH?id="+t+"&data="+n})},getIconNum:function(e){return"8"==e?"1":"9"==e?"2":void 0}}};t.default=c}).call(this,n("543d")["default"])},"2ad4":function(e,t,n){"use strict";n.r(t);var a=n("271a"),i=n.n(a);for(var r in a)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(r);t["default"]=i.a},4453:function(e,t,n){},"58c1":function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return a}));var a={uNavbar:function(){return n.e("node-modules/uview-ui/components/u-navbar/u-navbar").then(n.bind(null,"ce19"))}},i=function(){var e=this.$createElement;this._self._c},r=[]},6233:function(e,t,n){"use strict";(function(e,t){var a=n("4ea4");n("d913");a(n("66fd"));var i=a(n("8836"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(i.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},8836:function(e,t,n){"use strict";n.r(t);var a=n("58c1"),i=n("2ad4");for(var r in i)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(r);n("f14f");var u=n("f0c5"),c=Object(u["a"])(i["default"],a["b"],a["c"],!1,null,"6d2c1adb",null,!1,a["a"],void 0);t["default"]=c.exports},f14f:function(e,t,n){"use strict";var a=n("4453"),i=n.n(a);i.a}},[["6233","common/runtime","common/vendor"]]]);