fix(merge): merge

merge

Signed-off-by: liubaixun <liubaixun@yinxiang.com>
mini-program
liubaixun 2023-10-08 19:07:55 +08:00
commit 3bbef18a2e
46 changed files with 309 additions and 91 deletions

View File

@ -49,7 +49,7 @@
onLoad(option) { onLoad(option) {
if(option.userid){ if(option.userid){
this.userid = option.userid this.userid = option.userid
console.log(this.userid); // console.log(this.userid);
} }
}, },
methods: { methods: {
@ -70,7 +70,7 @@
}) })
} }
if (this.newPassword == this.confirmNewPassword) { if (this.newPassword == this.confirmNewPassword) {
console.log(this.userid,this.oldPassword,this.newPassword); // console.log(this.userid,this.oldPassword,this.newPassword);
this.$http({ this.$http({
url: this.api.user_update_pwd, url: this.api.user_update_pwd,
method: 'put', method: 'put',
@ -80,7 +80,7 @@
"password": this.newPassword "password": this.newPassword
} }
}).then(res=>{ }).then(res=>{
console.log(res); // console.log(res);
if(res.code == 200){ if(res.code == 200){
uni.showToast({ uni.showToast({
icon: 'success', icon: 'success',

View File

@ -142,7 +142,7 @@
</view> </view>
次施肥 次施肥
</view> </view>
<view class="changeMoreBtn" @click="toWebView"> <view class="changeMoreBtn" @click="toWebView(indexs)">
<image src="../../static/changeMore.png" mode=""></image> <image src="../../static/changeMore.png" mode=""></image>
<text>修改更多参数</text> <text>修改更多参数</text>
</view> </view>
@ -201,8 +201,8 @@
signalCurrent: 0, signalCurrent: 0,
show: false, show: false,
rightList2: ['外控信号2#', rightList2: ['外控信号1#',
'外控信号1#', '外控信号2#',
'外控信号3#', '外控信号3#',
'外控信号4#', '外控信号4#',
'高液位信号', '高液位信号',
@ -243,16 +243,16 @@
// clearTimeout(this.timer) // clearTimeout(this.timer)
}, },
onPullDownRefresh() { onPullDownRefresh() {
uni.showLoading({ // uni.showLoading({
title: '加载中...' // title: '...'
}) // })
this.dataInit(); this.dataInit();
this.getReg();
}, },
methods: { methods: {
toWebView() { toWebView(id) {
// console.log(id);
uni.navigateTo({ uni.navigateTo({
url: '/pages/web_view/web_view' url: '/pages/web_view/web_view?id=' + id
}) })
}, },
countData10(data) { countData10(data) {
@ -263,9 +263,9 @@
} }
}, },
dataInit() { dataInit() {
// uni.showLoading({ uni.showLoading({
// title: '...' title: '加载中...'
// }) })
const that = this const that = this
var deviceId = this.deviceId var deviceId = this.deviceId
var data = { var data = {
@ -296,9 +296,9 @@
}, },
getReg() { getReg() {
// uni.showLoading({ uni.showLoading({
// title: '...' title: '加载中...'
// }) })
const that = this const that = this
var data = { var data = {
equipmentId: this.deviceId, equipmentId: this.deviceId,
@ -310,15 +310,15 @@
url: this.api.readFs_reg, url: this.api.readFs_reg,
data: data data: data
}).then((res) => { }).then((res) => {
console.log(res, 11); // console.log(res, 11);
if (res.code == 200) { if (res.code == 200) {
uni.hideLoading() uni.hideLoading()
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,
@ -332,7 +332,7 @@
}, },
getType00() { getType00() {
var number = this.padString(this.inputData1[10 + (this.indexs - 1) + "00"].toString(2), 3) var number = this.padString(this.inputData1[10 + (this.indexs - 1) + "00"].toString(2), 3)
console.log(number); // console.log(number);
if (Number(number[0])) { if (Number(number[0])) {
this.topActive = 1 this.topActive = 1
} else if (Number(number[1])) { } else if (Number(number[1])) {
@ -396,7 +396,13 @@
var statusIndex = 8 var statusIndex = 8
for (var j = 0; j < statusIndex; j++) { for (var j = 0; j < statusIndex; j++) {
if (Number(number[number.length - 1 - 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)
}
} }
} }
}, },

View File

@ -326,7 +326,7 @@
url: this.api.getFs_rtdata + "?equipmentId=" + i.deviceId, url: this.api.getFs_rtdata + "?equipmentId=" + i.deviceId,
method: 'post', method: 'post',
}).then(res => { }).then(res => {
console.log(res, '主页查看施肥机实时数据'); // console.log(res, '');
if(res.code == 200){ if(res.code == 200){
uni.hideLoading({ uni.hideLoading({
title: '完成' title: '完成'

View File

@ -110,7 +110,7 @@
url: this.api.user_logout, url: this.api.user_logout,
method: 'GET' method: 'GET'
}).then(res => { }).then(res => {
console.log(res, '退出'); // console.log(res, '退');
if (res.code == 200) { if (res.code == 200) {
uni.reLaunch({ uni.reLaunch({
url: '/pages/login/login' url: '/pages/login/login'
@ -168,7 +168,7 @@
uni.getStorage({ uni.getStorage({
key: 'userid', key: 'userid',
success: function(res) { success: function(res) {
console.log(res); // console.log(res);
that.$http({ that.$http({
url: that.api.sel_user, url: that.api.sel_user,
method: 'GET', method: 'GET',

View File

@ -1,14 +1,48 @@
<template> <template>
<web-view src="https://portal.lihe-control.com/#/realTime"></web-view> <web-view v-if='src' :src="src"></web-view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { 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> </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

View File

@ -214,9 +214,10 @@ var _default = {
onLoad: function onLoad(option) { onLoad: function onLoad(option) {
if (option.userid) { if (option.userid) {
this.userid = option.userid; this.userid = option.userid;
console.log(this.userid); // console.log(this.userid);
} }
}, },
methods: { methods: {
// 密码提交 // 密码提交
submit_pwd: function submit_pwd() { submit_pwd: function submit_pwd() {
@ -235,7 +236,7 @@ var _default = {
}); });
} }
if (this.newPassword == this.confirmNewPassword) { if (this.newPassword == this.confirmNewPassword) {
console.log(this.userid, this.oldPassword, this.newPassword); // console.log(this.userid,this.oldPassword,this.newPassword);
this.$http({ this.$http({
url: this.api.user_update_pwd, url: this.api.user_update_pwd,
method: 'put', method: 'put',
@ -245,7 +246,7 @@ var _default = {
"password": this.newPassword "password": this.newPassword
} }
}).then(function (res) { }).then(function (res) {
console.log(res); // console.log(res);
if (res.code == 200) { if (res.code == 200) {
uni.showToast({ uni.showToast({
icon: 'success', icon: 'success',

View File

@ -400,7 +400,7 @@ var _default = {
}], }],
signalCurrent: 0, signalCurrent: 0,
show: false, show: false,
rightList2: ['外控信号2#', '外控信号1#', '外控信号3#', '外控信号4#', '高液位信号', '中液位信号', '低液位信号', '电机信号'], rightList2: ['外控信号1#', '外控信号2#', '外控信号3#', '外控信号4#', '高液位信号', '中液位信号', '低液位信号', '电机信号'],
irrigate_value1: 0, irrigate_value1: 0,
irrigate_value2: 0, irrigate_value2: 0,
irrigate_value3: 0, irrigate_value3: 0,
@ -432,16 +432,16 @@ var _default = {
// clearTimeout(this.timer) // clearTimeout(this.timer)
}, },
onPullDownRefresh: function onPullDownRefresh() { onPullDownRefresh: function onPullDownRefresh() {
uni.showLoading({ // uni.showLoading({
title: '加载中...' // title: '加载中...'
}); // })
this.dataInit(); this.dataInit();
this.getReg();
}, },
methods: (_methods = { methods: (_methods = {
toWebView: function toWebView() { toWebView: function toWebView(id) {
// console.log(id);
uni.navigateTo({ uni.navigateTo({
url: '/pages/web_view/web_view' url: '/pages/web_view/web_view?id=' + id
}); });
}, },
countData10: function countData10(data) { countData10: function countData10(data) {
@ -453,9 +453,9 @@ var _default = {
}, },
dataInit: function dataInit() { dataInit: function dataInit() {
var _this = this; var _this = this;
// uni.showLoading({ uni.showLoading({
// title: '加载中...' title: '加载中...'
// }) });
var that = this; var that = this;
var deviceId = this.deviceId; var deviceId = this.deviceId;
var data = { var data = {
@ -486,9 +486,9 @@ var _default = {
}, },
getReg: function getReg() { getReg: function getReg() {
var _this2 = this; var _this2 = this;
// uni.showLoading({ uni.showLoading({
// title: '加载中...' title: '加载中...'
// }) });
var that = this; var that = this;
var data = { var data = {
equipmentId: this.deviceId, equipmentId: this.deviceId,
@ -500,14 +500,14 @@ var _default = {
url: this.api.readFs_reg, url: this.api.readFs_reg,
data: data data: data
}).then(function (res) { }).then(function (res) {
console.log(res, 11); // console.log(res, 11);
if (res.code == 200) { if (res.code == 200) {
uni.hideLoading(); uni.hideLoading();
uni.stopPullDownRefresh(); // uni.stopPullDownRefresh();
_this2.inputData1 = res.data; _this2.inputData1 = res.data;
_this2.getType00(); _this2.getType00();
_this2.inputData1[10 + (_this2.indexs - 1) + '01'] = _this2.countData10(_this2.inputData1[10 + (_this2.indexs - 1) + '01']); _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 { } else {
that.$refs.uToast.show({ that.$refs.uToast.show({
title: res.msg, title: res.msg,
@ -521,7 +521,7 @@ var _default = {
}, },
getType00: function getType00() { getType00: function getType00() {
var number = this.padString(this.inputData1[10 + (this.indexs - 1) + "00"].toString(2), 3); var number = this.padString(this.inputData1[10 + (this.indexs - 1) + "00"].toString(2), 3);
console.log(number); // console.log(number);
if (Number(number[0])) { if (Number(number[0])) {
this.topActive = 1; this.topActive = 1;
} else if (Number(number[1])) { } else if (Number(number[1])) {
@ -585,7 +585,13 @@ var _default = {
var statusIndex = 8; var statusIndex = 8;
for (var j = 0; j < statusIndex; j++) { for (var j = 0; j < statusIndex; j++) {
if (Number(number[number.length - 1 - 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

View File

@ -772,7 +772,7 @@ var _default = {
url: _this.api.getFs_rtdata + "?equipmentId=" + i.deviceId, url: _this.api.getFs_rtdata + "?equipmentId=" + i.deviceId,
method: 'post' method: 'post'
}).then(function (res) { }).then(function (res) {
console.log(res, '主页查看施肥机实时数据'); // console.log(res, '主页查看施肥机实时数据');
if (res.code == 200) { if (res.code == 200) {
uni.hideLoading({ uni.hideLoading({
title: '完成' title: '完成'

View File

@ -138,7 +138,7 @@ var _default = {
url: this.api.user_logout, url: this.api.user_logout,
method: 'GET' method: 'GET'
}).then(function (res) { }).then(function (res) {
console.log(res, '退出'); // console.log(res, '退出');
if (res.code == 200) { if (res.code == 200) {
uni.reLaunch({ uni.reLaunch({
url: '/pages/login/login' url: '/pages/login/login'
@ -193,7 +193,7 @@ var _default = {
uni.getStorage({ uni.getStorage({
key: 'userid', key: 'userid',
success: function success(res) { success: function success(res) {
console.log(res); // console.log(res);
that.$http({ that.$http({
url: that.api.sel_user, url: that.api.sel_user,
method: 'GET', method: 'GET',

View File

@ -133,7 +133,7 @@ __webpack_require__.r(__webpack_exports__);
/***/ (function(module, exports, __webpack_require__) { /***/ (function(module, exports, __webpack_require__) {
"use strict"; "use strict";
/* WEBPACK VAR INJECTION */(function(uni) {
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
value: true value: true
@ -145,10 +145,48 @@ exports.default = void 0;
// //
var _default = { var _default = {
data: function data() { 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; exports.default = _default;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
/***/ }) /***/ })

View File

@ -1 +1 @@
<web-view src="https://portal.lihe-control.com/#/realTime"></web-view> <block wx:if="{{src}}"><web-view src="{{src}}"></web-view></block>

View File

@ -2,6 +2,7 @@
"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": "wszhyWx",
"setting": { "setting": {
"compileHotReLoad": true "compileHotReLoad": true,
"urlCheck": false
} }
} }