fix(merge): merge
merge Signed-off-by: liubaixun <liubaixun@yinxiang.com>mini-program
commit
3bbef18a2e
|
@ -49,7 +49,7 @@
|
|||
onLoad(option) {
|
||||
if(option.userid){
|
||||
this.userid = option.userid
|
||||
console.log(this.userid);
|
||||
// console.log(this.userid);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -70,7 +70,7 @@
|
|||
})
|
||||
}
|
||||
if (this.newPassword == this.confirmNewPassword) {
|
||||
console.log(this.userid,this.oldPassword,this.newPassword);
|
||||
// console.log(this.userid,this.oldPassword,this.newPassword);
|
||||
this.$http({
|
||||
url: this.api.user_update_pwd,
|
||||
method: 'put',
|
||||
|
@ -80,7 +80,7 @@
|
|||
"password": this.newPassword
|
||||
}
|
||||
}).then(res=>{
|
||||
console.log(res);
|
||||
// console.log(res);
|
||||
if(res.code == 200){
|
||||
uni.showToast({
|
||||
icon: 'success',
|
||||
|
|
|
@ -142,7 +142,7 @@
|
|||
</view>
|
||||
次施肥
|
||||
</view>
|
||||
<view class="changeMoreBtn" @click="toWebView">
|
||||
<view class="changeMoreBtn" @click="toWebView(indexs)">
|
||||
<image src="../../static/changeMore.png" mode=""></image>
|
||||
<text>修改更多参数</text>
|
||||
</view>
|
||||
|
@ -201,8 +201,8 @@
|
|||
signalCurrent: 0,
|
||||
|
||||
show: false,
|
||||
rightList2: ['外控信号2#',
|
||||
'外控信号1#',
|
||||
rightList2: ['外控信号1#',
|
||||
'外控信号2#',
|
||||
'外控信号3#',
|
||||
'外控信号4#',
|
||||
'高液位信号',
|
||||
|
@ -243,16 +243,16 @@
|
|||
// clearTimeout(this.timer)
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
})
|
||||
// uni.showLoading({
|
||||
// title: '加载中...'
|
||||
// })
|
||||
this.dataInit();
|
||||
this.getReg();
|
||||
},
|
||||
methods: {
|
||||
toWebView() {
|
||||
toWebView(id) {
|
||||
// console.log(id);
|
||||
uni.navigateTo({
|
||||
url: '/pages/web_view/web_view'
|
||||
url: '/pages/web_view/web_view?id=' + id
|
||||
})
|
||||
},
|
||||
countData10(data) {
|
||||
|
@ -263,9 +263,9 @@
|
|||
}
|
||||
},
|
||||
dataInit() {
|
||||
// uni.showLoading({
|
||||
// title: '加载中...'
|
||||
// })
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
})
|
||||
const that = this
|
||||
var deviceId = this.deviceId
|
||||
var data = {
|
||||
|
@ -296,9 +296,9 @@
|
|||
|
||||
},
|
||||
getReg() {
|
||||
// uni.showLoading({
|
||||
// title: '加载中...'
|
||||
// })
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
})
|
||||
const that = this
|
||||
var data = {
|
||||
equipmentId: this.deviceId,
|
||||
|
@ -310,15 +310,15 @@
|
|||
url: this.api.readFs_reg,
|
||||
data: data
|
||||
}).then((res) => {
|
||||
console.log(res, 11);
|
||||
// console.log(res, 11);
|
||||
if (res.code == 200) {
|
||||
uni.hideLoading()
|
||||
uni.stopPullDownRefresh();
|
||||
// uni.stopPullDownRefresh();
|
||||
this.inputData1 = res.data;
|
||||
this.getType00();
|
||||
this.inputData1[10 + (this.indexs - 1) + '01'] = this.countData10(this.inputData1[10 + (
|
||||
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 {
|
||||
that.$refs.uToast.show({
|
||||
title: res.msg,
|
||||
|
@ -332,7 +332,7 @@
|
|||
},
|
||||
getType00() {
|
||||
var number = this.padString(this.inputData1[10 + (this.indexs - 1) + "00"].toString(2), 3)
|
||||
console.log(number);
|
||||
// console.log(number);
|
||||
if (Number(number[0])) {
|
||||
this.topActive = 1
|
||||
} else if (Number(number[1])) {
|
||||
|
@ -396,7 +396,13 @@
|
|||
var statusIndex = 8
|
||||
for (var j = 0; j < statusIndex; j++) {
|
||||
if (Number(number[number.length - 1 - j])) {
|
||||
this.right2Index.push(j)
|
||||
if (j == 0) {
|
||||
this.right2Index.push(1)
|
||||
} else if (j == 1) {
|
||||
this.right2Index.push(0)
|
||||
} else {
|
||||
this.right2Index.push(j)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -326,7 +326,7 @@
|
|||
url: this.api.getFs_rtdata + "?equipmentId=" + i.deviceId,
|
||||
method: 'post',
|
||||
}).then(res => {
|
||||
console.log(res, '主页查看施肥机实时数据');
|
||||
// console.log(res, '主页查看施肥机实时数据');
|
||||
if(res.code == 200){
|
||||
uni.hideLoading({
|
||||
title: '完成'
|
||||
|
|
|
@ -110,7 +110,7 @@
|
|||
url: this.api.user_logout,
|
||||
method: 'GET'
|
||||
}).then(res => {
|
||||
console.log(res, '退出');
|
||||
// console.log(res, '退出');
|
||||
if (res.code == 200) {
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login'
|
||||
|
@ -168,7 +168,7 @@
|
|||
uni.getStorage({
|
||||
key: 'userid',
|
||||
success: function(res) {
|
||||
console.log(res);
|
||||
// console.log(res);
|
||||
that.$http({
|
||||
url: that.api.sel_user,
|
||||
method: 'GET',
|
||||
|
|
|
@ -1,14 +1,48 @@
|
|||
<template>
|
||||
<web-view src="https://portal.lihe-control.com/#/realTime"></web-view>
|
||||
<web-view v-if='src' :src="src"></web-view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
token:'',
|
||||
id:'',
|
||||
src:'',
|
||||
userid:''
|
||||
};
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
// console.log('options',options);
|
||||
if(options){
|
||||
this.id = options.id
|
||||
}
|
||||
let that = this
|
||||
uni.getStorage({
|
||||
key: 'token',
|
||||
success: function(res) {
|
||||
// console.log('res',res);
|
||||
that.token = res.data;
|
||||
uni.getStorage({
|
||||
key:'userid',
|
||||
success:function(res){
|
||||
that.userid = res.data
|
||||
that.src = `https://portal.lihe-control.com/#/irrigateSet?id=${that.id}&token=${that.token}&userid=${that.userid}`
|
||||
// console.log(that.src);
|
||||
}
|
||||
})
|
||||
},
|
||||
fail:function(err){
|
||||
uni.navigateTo({
|
||||
url:'/pages/fertilizer_machine/fertilizer_machine'
|
||||
});
|
||||
uni.showToast({
|
||||
title: "跳转失败!",
|
||||
icon: 'fail',
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
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
|
@ -214,9 +214,10 @@ var _default = {
|
|||
onLoad: function onLoad(option) {
|
||||
if (option.userid) {
|
||||
this.userid = option.userid;
|
||||
console.log(this.userid);
|
||||
// console.log(this.userid);
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 密码提交
|
||||
submit_pwd: function submit_pwd() {
|
||||
|
@ -235,7 +236,7 @@ var _default = {
|
|||
});
|
||||
}
|
||||
if (this.newPassword == this.confirmNewPassword) {
|
||||
console.log(this.userid, this.oldPassword, this.newPassword);
|
||||
// console.log(this.userid,this.oldPassword,this.newPassword);
|
||||
this.$http({
|
||||
url: this.api.user_update_pwd,
|
||||
method: 'put',
|
||||
|
@ -245,7 +246,7 @@ var _default = {
|
|||
"password": this.newPassword
|
||||
}
|
||||
}).then(function (res) {
|
||||
console.log(res);
|
||||
// console.log(res);
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
icon: 'success',
|
||||
|
|
|
@ -400,7 +400,7 @@ var _default = {
|
|||
}],
|
||||
signalCurrent: 0,
|
||||
show: false,
|
||||
rightList2: ['外控信号2#', '外控信号1#', '外控信号3#', '外控信号4#', '高液位信号', '中液位信号', '低液位信号', '电机信号'],
|
||||
rightList2: ['外控信号1#', '外控信号2#', '外控信号3#', '外控信号4#', '高液位信号', '中液位信号', '低液位信号', '电机信号'],
|
||||
irrigate_value1: 0,
|
||||
irrigate_value2: 0,
|
||||
irrigate_value3: 0,
|
||||
|
@ -432,16 +432,16 @@ var _default = {
|
|||
// clearTimeout(this.timer)
|
||||
},
|
||||
onPullDownRefresh: function onPullDownRefresh() {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
});
|
||||
// uni.showLoading({
|
||||
// title: '加载中...'
|
||||
// })
|
||||
this.dataInit();
|
||||
this.getReg();
|
||||
},
|
||||
methods: (_methods = {
|
||||
toWebView: function toWebView() {
|
||||
toWebView: function toWebView(id) {
|
||||
// console.log(id);
|
||||
uni.navigateTo({
|
||||
url: '/pages/web_view/web_view'
|
||||
url: '/pages/web_view/web_view?id=' + id
|
||||
});
|
||||
},
|
||||
countData10: function countData10(data) {
|
||||
|
@ -453,9 +453,9 @@ var _default = {
|
|||
},
|
||||
dataInit: function dataInit() {
|
||||
var _this = this;
|
||||
// uni.showLoading({
|
||||
// title: '加载中...'
|
||||
// })
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
});
|
||||
var that = this;
|
||||
var deviceId = this.deviceId;
|
||||
var data = {
|
||||
|
@ -486,9 +486,9 @@ var _default = {
|
|||
},
|
||||
getReg: function getReg() {
|
||||
var _this2 = this;
|
||||
// uni.showLoading({
|
||||
// title: '加载中...'
|
||||
// })
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
});
|
||||
var that = this;
|
||||
var data = {
|
||||
equipmentId: this.deviceId,
|
||||
|
@ -500,14 +500,14 @@ var _default = {
|
|||
url: this.api.readFs_reg,
|
||||
data: data
|
||||
}).then(function (res) {
|
||||
console.log(res, 11);
|
||||
// console.log(res, 11);
|
||||
if (res.code == 200) {
|
||||
uni.hideLoading();
|
||||
uni.stopPullDownRefresh();
|
||||
// uni.stopPullDownRefresh();
|
||||
_this2.inputData1 = res.data;
|
||||
_this2.getType00();
|
||||
_this2.inputData1[10 + (_this2.indexs - 1) + '01'] = _this2.countData10(_this2.inputData1[10 + (_this2.indexs - 1) + '01']);
|
||||
console.log(_this2.inputData1[10 + (_this2.indexs - 1) + '01'], 111);
|
||||
// console.log(this.inputData1[10 + (this.indexs - 1) + '01'], 111);
|
||||
} else {
|
||||
that.$refs.uToast.show({
|
||||
title: res.msg,
|
||||
|
@ -521,7 +521,7 @@ var _default = {
|
|||
},
|
||||
getType00: function getType00() {
|
||||
var number = this.padString(this.inputData1[10 + (this.indexs - 1) + "00"].toString(2), 3);
|
||||
console.log(number);
|
||||
// console.log(number);
|
||||
if (Number(number[0])) {
|
||||
this.topActive = 1;
|
||||
} else if (Number(number[1])) {
|
||||
|
@ -585,7 +585,13 @@ var _default = {
|
|||
var statusIndex = 8;
|
||||
for (var j = 0; j < statusIndex; j++) {
|
||||
if (Number(number[number.length - 1 - j])) {
|
||||
this.right2Index.push(j);
|
||||
if (j == 0) {
|
||||
this.right2Index.push(1);
|
||||
} else if (j == 1) {
|
||||
this.right2Index.push(0);
|
||||
} else {
|
||||
this.right2Index.push(j);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -772,7 +772,7 @@ var _default = {
|
|||
url: _this.api.getFs_rtdata + "?equipmentId=" + i.deviceId,
|
||||
method: 'post'
|
||||
}).then(function (res) {
|
||||
console.log(res, '主页查看施肥机实时数据');
|
||||
// console.log(res, '主页查看施肥机实时数据');
|
||||
if (res.code == 200) {
|
||||
uni.hideLoading({
|
||||
title: '完成'
|
||||
|
|
|
@ -138,7 +138,7 @@ var _default = {
|
|||
url: this.api.user_logout,
|
||||
method: 'GET'
|
||||
}).then(function (res) {
|
||||
console.log(res, '退出');
|
||||
// console.log(res, '退出');
|
||||
if (res.code == 200) {
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login'
|
||||
|
@ -193,7 +193,7 @@ var _default = {
|
|||
uni.getStorage({
|
||||
key: 'userid',
|
||||
success: function success(res) {
|
||||
console.log(res);
|
||||
// console.log(res);
|
||||
that.$http({
|
||||
url: that.api.sel_user,
|
||||
method: 'GET',
|
||||
|
|
|
@ -133,7 +133,7 @@ __webpack_require__.r(__webpack_exports__);
|
|||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
/* WEBPACK VAR INJECTION */(function(uni) {
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
|
@ -145,10 +145,48 @@ exports.default = void 0;
|
|||
//
|
||||
var _default = {
|
||||
data: function data() {
|
||||
return {};
|
||||
return {
|
||||
token: '',
|
||||
id: '',
|
||||
src: '',
|
||||
userid: ''
|
||||
};
|
||||
},
|
||||
onLoad: function onLoad(options) {
|
||||
// console.log('options',options);
|
||||
if (options) {
|
||||
this.id = options.id;
|
||||
}
|
||||
var that = this;
|
||||
uni.getStorage({
|
||||
key: 'token',
|
||||
success: function success(res) {
|
||||
// console.log('res',res);
|
||||
that.token = res.data;
|
||||
uni.getStorage({
|
||||
key: 'userid',
|
||||
success: function success(res) {
|
||||
that.userid = res.data;
|
||||
that.src = "https://portal.lihe-control.com/#/irrigateSet?id=".concat(that.id, "&token=").concat(that.token, "&userid=").concat(that.userid);
|
||||
// console.log(that.src);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
fail: function fail(err) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/fertilizer_machine/fertilizer_machine'
|
||||
});
|
||||
uni.showToast({
|
||||
title: "跳转失败!",
|
||||
icon: 'fail'
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
exports.default = _default;
|
||||
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
|
||||
|
||||
/***/ })
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
<web-view src="https://portal.lihe-control.com/#/realTime"></web-view>
|
||||
<block wx:if="{{src}}"><web-view src="{{src}}"></web-view></block>
|
|
@ -2,6 +2,7 @@
|
|||
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
||||
"projectname": "wszhyWx",
|
||||
"setting": {
|
||||
"compileHotReLoad": true
|
||||
"compileHotReLoad": true,
|
||||
"urlCheck": false
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue