Compare commits
No commits in common. "cc701a4366f65274e5d3116676c5f3f213a1f64b" and "92175700a3cc5520c0f44903d702f21c912fc12e" have entirely different histories.
cc701a4366
...
92175700a3
@ -14,10 +14,8 @@ export const myRequest = (options) => {
|
|||||||
data: options.data || {},
|
data: options.data || {},
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
resolve(res.data)
|
resolve(res.data)
|
||||||
if(res.data.code==200){
|
|
||||||
|
|
||||||
}
|
if (res.data.code == 401) {
|
||||||
else if (res.data.code == 401) {
|
|
||||||
|
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/login/login'
|
url: '/pages/login/login'
|
||||||
@ -34,14 +32,6 @@ export const myRequest = (options) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}else{
|
|
||||||
uni.hideLoading()
|
|
||||||
uni.stopPullDownRefresh();
|
|
||||||
uni.showToast({
|
|
||||||
icon:'none',
|
|
||||||
title: res.data.msg,
|
|
||||||
duration: 2000,
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
// 接口成功可以在此写成功需要的步骤
|
// 接口成功可以在此写成功需要的步骤
|
||||||
if (res.data.code != 1) {
|
if (res.data.code != 1) {
|
||||||
|
@ -7,8 +7,7 @@
|
|||||||
"path": "pages/timeEnvironment/timeEnvironment",
|
"path": "pages/timeEnvironment/timeEnvironment",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "",
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom"
|
||||||
"enablePullDownRefresh": true
|
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/timeVideo/timeVideo",
|
"path": "pages/timeVideo/timeVideo",
|
||||||
|
@ -59,14 +59,12 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="bottom">
|
<view class="bottom">
|
||||||
<view class="btn-1" :class="inputData['30'] == 1 || inputData['30'] == 3 ? 'in' : 'out'">
|
<view class="btn-1" :class="inputData['30'] == 1 || inputData['30'] == 3 ? 'in' : 'out'">
|
||||||
<image v-if="inputData['30'] == 1 || inputData['30'] == 3" src="../../static/in-sel.png"
|
<image v-if="inputData['30'] == 1 || inputData['30'] == 3" src="../../static/in-sel.png" mode=""></image>
|
||||||
mode=""></image>
|
|
||||||
<image v-else src="../../static/in.png" mode=""></image>
|
<image v-else src="../../static/in.png" mode=""></image>
|
||||||
<text>进水泵</text>
|
<text>进水泵</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn-2" :class="inputData['30'] == 2 || inputData['30'] == 3 ? 'in' : 'out'">
|
<view class="btn-2" :class="inputData['30'] == 2 || inputData['30'] == 3 ? 'in' : 'out'">
|
||||||
<image v-if="inputData['30'] == 2 || inputData['30'] == 3" src="../../static/out-sel.png"
|
<image v-if="inputData['30'] == 2 || inputData['30'] == 3" src="../../static/out-sel.png" mode=""></image>
|
||||||
mode=""></image>
|
|
||||||
<image v-else src="../../static/out.png" mode=""></image>
|
<image v-else src="../../static/out.png" mode=""></image>
|
||||||
<text>配肥泵</text>
|
<text>配肥泵</text>
|
||||||
</view>
|
</view>
|
||||||
@ -92,8 +90,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<u-popup v-model="show" mode="center" :mask-close-able='false' width="640rpx" height="880rpx"
|
<u-popup v-model="show" mode="center" :mask-close-able='false' width="640rpx" height="880rpx" :closeable='false'>
|
||||||
:closeable='false'>
|
|
||||||
<view class="contentPop">
|
<view class="contentPop">
|
||||||
<view class="contentPop_box">
|
<view class="contentPop_box">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
@ -115,8 +112,7 @@
|
|||||||
手动启动时间
|
手动启动时间
|
||||||
<view class="irrigate_input">
|
<view class="irrigate_input">
|
||||||
<input v-model="inputData1[10 + (indexs - 1) + '01']"
|
<input v-model="inputData1[10 + (indexs - 1) + '01']"
|
||||||
@blur="changeData10(10 + (indexs - 1) + '01', $event)" type="digit" placeholder="0"
|
@blur="changeData10(10 + (indexs - 1) + '01', $event)" type="digit" placeholder="0" step="0.1" />
|
||||||
step="0.1" />
|
|
||||||
<!-- <u-input v-model="inputData[10 + (indexs - 1) + '01']" type="text" :border="false" input-align='center'
|
<!-- <u-input v-model="inputData[10 + (indexs - 1) + '01']" type="text" :border="false" input-align='center'
|
||||||
height='66' :clearable='false' /> -->
|
height='66' :clearable='false' /> -->
|
||||||
</view>
|
</view>
|
||||||
@ -222,9 +218,7 @@
|
|||||||
|
|
||||||
topActive: 0,
|
topActive: 0,
|
||||||
indexs: 1,
|
indexs: 1,
|
||||||
inputData1: [],
|
inputData1: []
|
||||||
|
|
||||||
// timer: null
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -234,13 +228,10 @@
|
|||||||
this.deviceId = option.id
|
this.deviceId = option.id
|
||||||
this.dataInit()
|
this.dataInit()
|
||||||
let that = this
|
let that = this
|
||||||
// this.timer = setInterval(function() {
|
setInterval(function() {
|
||||||
// that.dataInit();
|
that.dataInit();
|
||||||
// that.getReg();
|
that.getReg();
|
||||||
// }, 3000);
|
}, 3000);
|
||||||
},
|
|
||||||
onUnload() {
|
|
||||||
// clearTimeout(this.timer)
|
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
@ -250,15 +241,15 @@
|
|||||||
this.getReg();
|
this.getReg();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toWebView() {
|
toWebView(){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/web_view/web_view'
|
url:'/pages/web_view/web_view'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
countData10(data) {
|
countData10(data){
|
||||||
if (data) {
|
if(data){
|
||||||
return data / 10
|
return data/10
|
||||||
} else {
|
}else{
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -266,7 +257,7 @@
|
|||||||
// uni.showLoading({
|
// uni.showLoading({
|
||||||
// title: '加载中...'
|
// title: '加载中...'
|
||||||
// })
|
// })
|
||||||
const that = this
|
const that= this
|
||||||
var deviceId = this.deviceId
|
var deviceId = this.deviceId
|
||||||
var data = {
|
var data = {
|
||||||
"equipmentId": deviceId,
|
"equipmentId": deviceId,
|
||||||
@ -299,7 +290,7 @@
|
|||||||
// uni.showLoading({
|
// uni.showLoading({
|
||||||
// title: '加载中...'
|
// title: '加载中...'
|
||||||
// })
|
// })
|
||||||
const that = this
|
const that= this
|
||||||
var data = {
|
var data = {
|
||||||
equipmentId: this.deviceId,
|
equipmentId: this.deviceId,
|
||||||
pattern: 10 + (this.indexs - 1) + "00", //需要根据文档填写 //6目标ph-数值
|
pattern: 10 + (this.indexs - 1) + "00", //需要根据文档填写 //6目标ph-数值
|
||||||
@ -316,9 +307,8 @@
|
|||||||
uni.stopPullDownRefresh();
|
uni.stopPullDownRefresh();
|
||||||
this.inputData1 = res.data;
|
this.inputData1 = res.data;
|
||||||
this.getType00();
|
this.getType00();
|
||||||
this.inputData1[10 + (this.indexs - 1) + '01'] = this.countData10(this.inputData1[10 + (
|
this.inputData1[10 + (this.indexs - 1) + '01']=this.countData10(this.inputData1[10 + (this.indexs - 1) + '01'])
|
||||||
this.indexs - 1) + '01'])
|
console.log(this.inputData1[10 + (this.indexs - 1) + '01'],111);
|
||||||
console.log(this.inputData1[10 + (this.indexs - 1) + '01'], 111);
|
|
||||||
} else {
|
} else {
|
||||||
that.$refs.uToast.show({
|
that.$refs.uToast.show({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
@ -412,14 +402,14 @@
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
},
|
},
|
||||||
changeData10(code, el) {
|
changeData10(code,el){
|
||||||
var data = el.target.value * 10
|
var data=el.target.value*10
|
||||||
var sendData = {
|
var sendData={
|
||||||
target: {
|
target:{
|
||||||
value: data
|
value:data
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.change(code, sendData)
|
this.change(code,sendData)
|
||||||
},
|
},
|
||||||
//间隔灌溉天数
|
//间隔灌溉天数
|
||||||
change(code, el) {
|
change(code, el) {
|
||||||
@ -447,7 +437,7 @@
|
|||||||
}, 100);
|
}, 100);
|
||||||
},
|
},
|
||||||
changeData(data) {
|
changeData(data) {
|
||||||
const that = this
|
const that= this
|
||||||
this.$http({
|
this.$http({
|
||||||
url: this.api.writeFs,
|
url: this.api.writeFs,
|
||||||
data: data
|
data: data
|
||||||
@ -1033,8 +1023,7 @@
|
|||||||
border: 2px solid #E1E2E6;
|
border: 2px solid #E1E2E6;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
margin: 0 15rpx;
|
margin: 0 15rpx;
|
||||||
|
>input{
|
||||||
>input {
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -85,15 +85,7 @@
|
|||||||
success: (res) => {
|
success: (res) => {
|
||||||
// console.log(res,'removeStorage');
|
// console.log(res,'removeStorage');
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
|
|
||||||
let HBusername = uni.getStorageSync('HBusername');
|
|
||||||
let HBpassword = uni.getStorageSync('HBpassword');
|
|
||||||
if (HBusername && HBpassword) {
|
|
||||||
this.form.name = HBusername;
|
|
||||||
this.form.password = HBpassword;
|
|
||||||
this.checked = true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
submit() {
|
submit() {
|
||||||
@ -116,14 +108,6 @@
|
|||||||
key: 'userid',
|
key: 'userid',
|
||||||
data: res.data.userid
|
data: res.data.userid
|
||||||
});
|
});
|
||||||
uni.setStorage({
|
|
||||||
key: 'HBusername',
|
|
||||||
data: this.form.name
|
|
||||||
});
|
|
||||||
uni.setStorage({
|
|
||||||
key: 'HBpassword',
|
|
||||||
data: this.form.password
|
|
||||||
});
|
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'success',
|
icon: 'success',
|
||||||
title: '登录成功!',
|
title: '登录成功!',
|
||||||
|
@ -234,7 +234,7 @@
|
|||||||
{ label: '土壤氮含量', value: 41, countType: 0,unit: 'mg/kg' },
|
{ label: '土壤氮含量', value: 41, countType: 0,unit: 'mg/kg' },
|
||||||
{ label: '土壤磷含量', value: 42, countType: 0,unit: 'mg/kg' },
|
{ label: '土壤磷含量', value: 42, countType: 0,unit: 'mg/kg' },
|
||||||
{ label: '土壤钾含量', value: 43, countType: 0,unit: 'mg/kg' },
|
{ label: '土壤钾含量', value: 43, countType: 0,unit: 'mg/kg' },
|
||||||
{ label: '管道压力', value: 44, countType: 0,unit: 'Kpa' },
|
{ label: '臭氧', value: 44, countType: 0,unit: 'ppm' },
|
||||||
{ label: '一氧化碳', value: 45, countType: 0,unit: 'ppm' },
|
{ label: '一氧化碳', value: 45, countType: 0,unit: 'ppm' },
|
||||||
{ label: '氨气', value: 46, countType: 0,unit: 'ppm' },
|
{ label: '氨气', value: 46, countType: 0,unit: 'ppm' },
|
||||||
{ label: '硫化氢', value: 47, countType: 0,unit: 'ppm' },
|
{ label: '硫化氢', value: 47, countType: 0,unit: 'ppm' },
|
||||||
@ -250,42 +250,10 @@
|
|||||||
{ label: '无线传感器无线信号强度', value: 57, countType: 1,unit: 'dBm' },
|
{ label: '无线传感器无线信号强度', value: 57, countType: 1,unit: 'dBm' },
|
||||||
{ label: '无线传感器信噪比(SNR)', value: 58, countType: 1,unit: 'dB' },
|
{ label: '无线传感器信噪比(SNR)', value: 58, countType: 1,unit: 'dB' },
|
||||||
],
|
],
|
||||||
|
|
||||||
timer:null
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onShow() {
|
||||||
let that = this
|
|
||||||
this.timer = setInterval(function() {
|
|
||||||
uni.getStorage({
|
|
||||||
key: 'token',
|
|
||||||
success: function(res) {
|
|
||||||
that.getEquipmentInfo(uni.getStorageSync('userid'))
|
|
||||||
},
|
|
||||||
// fail:function(err){
|
|
||||||
// uni.reLaunch({
|
|
||||||
// url:'/pages/login/login'
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
})
|
|
||||||
}, 60000);
|
|
||||||
},
|
|
||||||
onUnload() {
|
|
||||||
clearTimeout(this.timer)
|
|
||||||
},
|
|
||||||
onPullDownRefresh() {
|
|
||||||
let that = this
|
|
||||||
uni.getStorage({
|
|
||||||
key: 'token',
|
|
||||||
success: function(res) {
|
|
||||||
that.getEquipmentInfo(uni.getStorageSync('userid'))
|
|
||||||
},
|
|
||||||
// fail:function(err){
|
|
||||||
// uni.reLaunch({
|
|
||||||
// url:'/pages/login/login'
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let that = this
|
let that = this
|
||||||
@ -312,7 +280,7 @@
|
|||||||
url: this.api.sel_eqbyid + userid,
|
url: this.api.sel_eqbyid + userid,
|
||||||
method: 'GET'
|
method: 'GET'
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
// console.log(res, '根据用户id查询对应的设备数据');
|
console.log(res, '根据用户id查询对应的设备数据');
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
|
|
||||||
this.waterAndFertilizerParamsList = res.data.map((item,index)=>{
|
this.waterAndFertilizerParamsList = res.data.map((item,index)=>{
|
||||||
@ -331,14 +299,9 @@
|
|||||||
uni.hideLoading({
|
uni.hideLoading({
|
||||||
title: '完成'
|
title: '完成'
|
||||||
});
|
});
|
||||||
uni.stopPullDownRefresh();
|
|
||||||
i.childList= res.data;
|
i.childList= res.data;
|
||||||
// console.log(this.waterAndFertilizerParamsList);
|
console.log(this.waterAndFertilizerParamsList);
|
||||||
}else{
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}).catch(err=>{
|
|
||||||
console.log('接口失败');
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res, '退出');
|
console.log(res, '退出');
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
uni.reLaunch({
|
uni.navigateTo({
|
||||||
url: '/pages/login/login'
|
url: '/pages/login/login'
|
||||||
});
|
});
|
||||||
uni.removeStorage({
|
uni.removeStorage({
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
||||||
"projectname": "wszhyWx",
|
"projectname": "greenhouse-wisdom-applet",
|
||||||
"setting": {
|
"setting": {
|
||||||
"compileHotReLoad": true
|
"compileHotReLoad": true
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
13
unpackage/dist/dev/mp-weixin/common/vendor.js
vendored
13
unpackage/dist/dev/mp-weixin/common/vendor.js
vendored
@ -12029,7 +12029,7 @@ var myRequest = function myRequest(options) {
|
|||||||
data: options.data || {},
|
data: options.data || {},
|
||||||
success: function success(res) {
|
success: function success(res) {
|
||||||
resolve(res.data);
|
resolve(res.data);
|
||||||
if (res.data.code == 200) {} else if (res.data.code == 401) {
|
if (res.data.code == 401) {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/login/login'
|
url: '/pages/login/login'
|
||||||
});
|
});
|
||||||
@ -12042,14 +12042,6 @@ var myRequest = function myRequest(options) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
uni.hideLoading();
|
|
||||||
uni.stopPullDownRefresh();
|
|
||||||
uni.showToast({
|
|
||||||
icon: 'none',
|
|
||||||
title: res.data.msg,
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
// 接口成功可以在此写成功需要的步骤
|
// 接口成功可以在此写成功需要的步骤
|
||||||
if (res.data.code != 1) {
|
if (res.data.code != 1) {
|
||||||
@ -21369,8 +21361,7 @@ var _default = {
|
|||||||
"path": "pages/timeEnvironment/timeEnvironment",
|
"path": "pages/timeEnvironment/timeEnvironment",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "",
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom"
|
||||||
"enablePullDownRefresh": true
|
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/timeVideo/timeVideo",
|
"path": "pages/timeVideo/timeVideo",
|
||||||
|
@ -360,10 +360,6 @@ var _methods;
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
var _default = {
|
var _default = {
|
||||||
data: function data() {
|
data: function data() {
|
||||||
return {
|
return {
|
||||||
@ -413,23 +409,17 @@ var _default = {
|
|||||||
topActive: 0,
|
topActive: 0,
|
||||||
indexs: 1,
|
indexs: 1,
|
||||||
inputData1: []
|
inputData1: []
|
||||||
|
|
||||||
// timer: null
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {},
|
watch: {},
|
||||||
onLoad: function onLoad(option) {
|
onLoad: function onLoad(option) {
|
||||||
this.deviceId = option.id;
|
this.deviceId = option.id;
|
||||||
this.dataInit();
|
this.dataInit();
|
||||||
var that = this;
|
var that = this;
|
||||||
// this.timer = setInterval(function() {
|
setInterval(function () {
|
||||||
// that.dataInit();
|
that.dataInit();
|
||||||
// that.getReg();
|
that.getReg();
|
||||||
// }, 3000);
|
}, 3000);
|
||||||
},
|
|
||||||
onUnload: function onUnload() {
|
|
||||||
// clearTimeout(this.timer)
|
|
||||||
},
|
},
|
||||||
onPullDownRefresh: function onPullDownRefresh() {
|
onPullDownRefresh: function onPullDownRefresh() {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
|
@ -263,13 +263,6 @@ var _default = {
|
|||||||
// console.log(res,'removeStorage');
|
// console.log(res,'removeStorage');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
var HBusername = uni.getStorageSync('HBusername');
|
|
||||||
var HBpassword = uni.getStorageSync('HBpassword');
|
|
||||||
if (HBusername && HBpassword) {
|
|
||||||
this.form.name = HBusername;
|
|
||||||
this.form.password = HBpassword;
|
|
||||||
this.checked = true;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
submit: function submit() {
|
submit: function submit() {
|
||||||
@ -293,14 +286,6 @@ var _default = {
|
|||||||
key: 'userid',
|
key: 'userid',
|
||||||
data: res.data.userid
|
data: res.data.userid
|
||||||
});
|
});
|
||||||
uni.setStorage({
|
|
||||||
key: 'HBusername',
|
|
||||||
data: _this.form.name
|
|
||||||
});
|
|
||||||
uni.setStorage({
|
|
||||||
key: 'HBpassword',
|
|
||||||
data: _this.form.password
|
|
||||||
});
|
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'success',
|
icon: 'success',
|
||||||
title: '登录成功!',
|
title: '登录成功!',
|
||||||
|
@ -623,10 +623,10 @@ var _default = {
|
|||||||
countType: 0,
|
countType: 0,
|
||||||
unit: 'mg/kg'
|
unit: 'mg/kg'
|
||||||
}, {
|
}, {
|
||||||
label: '管道压力',
|
label: '臭氧',
|
||||||
value: 44,
|
value: 44,
|
||||||
countType: 0,
|
countType: 0,
|
||||||
unit: 'Kpa'
|
unit: 'ppm'
|
||||||
}, {
|
}, {
|
||||||
label: '一氧化碳',
|
label: '一氧化碳',
|
||||||
value: 45,
|
value: 45,
|
||||||
@ -697,43 +697,10 @@ var _default = {
|
|||||||
value: 58,
|
value: 58,
|
||||||
countType: 1,
|
countType: 1,
|
||||||
unit: 'dB'
|
unit: 'dB'
|
||||||
}],
|
}]
|
||||||
timer: null
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad: function onLoad() {
|
onShow: function onShow() {},
|
||||||
var that = this;
|
|
||||||
this.timer = setInterval(function () {
|
|
||||||
uni.getStorage({
|
|
||||||
key: 'token',
|
|
||||||
success: function success(res) {
|
|
||||||
that.getEquipmentInfo(uni.getStorageSync('userid'));
|
|
||||||
}
|
|
||||||
// fail:function(err){
|
|
||||||
// uni.reLaunch({
|
|
||||||
// url:'/pages/login/login'
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
});
|
|
||||||
}, 60000);
|
|
||||||
},
|
|
||||||
onUnload: function onUnload() {
|
|
||||||
clearTimeout(this.timer);
|
|
||||||
},
|
|
||||||
onPullDownRefresh: function onPullDownRefresh() {
|
|
||||||
var that = this;
|
|
||||||
uni.getStorage({
|
|
||||||
key: 'token',
|
|
||||||
success: function success(res) {
|
|
||||||
that.getEquipmentInfo(uni.getStorageSync('userid'));
|
|
||||||
}
|
|
||||||
// fail:function(err){
|
|
||||||
// uni.reLaunch({
|
|
||||||
// url:'/pages/login/login'
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
});
|
|
||||||
},
|
|
||||||
mounted: function mounted() {
|
mounted: function mounted() {
|
||||||
var that = this;
|
var that = this;
|
||||||
uni.getStorage({
|
uni.getStorage({
|
||||||
@ -760,7 +727,7 @@ var _default = {
|
|||||||
url: this.api.sel_eqbyid + userid,
|
url: this.api.sel_eqbyid + userid,
|
||||||
method: 'GET'
|
method: 'GET'
|
||||||
}).then(function (res) {
|
}).then(function (res) {
|
||||||
// console.log(res, '根据用户id查询对应的设备数据');
|
console.log(res, '根据用户id查询对应的设备数据');
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
_this.waterAndFertilizerParamsList = res.data.map(function (item, index) {
|
_this.waterAndFertilizerParamsList = res.data.map(function (item, index) {
|
||||||
return _objectSpread(_objectSpread({}, item), {}, {
|
return _objectSpread(_objectSpread({}, item), {}, {
|
||||||
@ -777,12 +744,9 @@ var _default = {
|
|||||||
uni.hideLoading({
|
uni.hideLoading({
|
||||||
title: '完成'
|
title: '完成'
|
||||||
});
|
});
|
||||||
uni.stopPullDownRefresh();
|
|
||||||
i.childList = res.data;
|
i.childList = res.data;
|
||||||
// console.log(this.waterAndFertilizerParamsList);
|
console.log(_this.waterAndFertilizerParamsList);
|
||||||
} else {}
|
}
|
||||||
}).catch(function (err) {
|
|
||||||
console.log('接口失败');
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
{
|
{
|
||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "",
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"enablePullDownRefresh": true,
|
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"u-navbar": "/node-modules/uview-ui/components/u-navbar/u-navbar"
|
"u-navbar": "/node-modules/uview-ui/components/u-navbar/u-navbar"
|
||||||
}
|
}
|
||||||
|
@ -140,7 +140,7 @@ var _default = {
|
|||||||
}).then(function (res) {
|
}).then(function (res) {
|
||||||
console.log(res, '退出');
|
console.log(res, '退出');
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
uni.reLaunch({
|
uni.navigateTo({
|
||||||
url: '/pages/login/login'
|
url: '/pages/login/login'
|
||||||
});
|
});
|
||||||
uni.removeStorage({
|
uni.removeStorage({
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
||||||
"projectname": "wszhyWx",
|
"projectname": "greenhouse-wisdom-applet",
|
||||||
"setting": {
|
"setting": {
|
||||||
"compileHotReLoad": true
|
"compileHotReLoad": true
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user