解决一直加载问题
parent
aaa4a9afda
commit
03e52f9e35
|
@ -14,8 +14,10 @@ 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'
|
||||||
|
@ -32,6 +34,14 @@ 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) {
|
||||||
|
|
|
@ -59,12 +59,14 @@
|
||||||
</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" mode=""></image>
|
<image v-if="inputData['30'] == 1 || inputData['30'] == 3" src="../../static/in-sel.png"
|
||||||
|
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" mode=""></image>
|
<image v-if="inputData['30'] == 2 || inputData['30'] == 3" src="../../static/out-sel.png"
|
||||||
|
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>
|
||||||
|
@ -90,7 +92,8 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<u-popup v-model="show" mode="center" :mask-close-able='false' width="640rpx" height="880rpx" :closeable='false'>
|
<u-popup v-model="show" mode="center" :mask-close-able='false' width="640rpx" height="880rpx"
|
||||||
|
:closeable='false'>
|
||||||
<view class="contentPop">
|
<view class="contentPop">
|
||||||
<view class="contentPop_box">
|
<view class="contentPop_box">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
|
@ -112,7 +115,8 @@
|
||||||
手动启动时间
|
手动启动时间
|
||||||
<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" step="0.1" />
|
@blur="changeData10(10 + (indexs - 1) + '01', $event)" type="digit" placeholder="0"
|
||||||
|
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>
|
||||||
|
@ -312,7 +316,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.indexs - 1) + '01'])
|
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 {
|
} else {
|
||||||
that.$refs.uToast.show({
|
that.$refs.uToast.show({
|
||||||
|
@ -1028,6 +1033,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%;
|
||||||
|
|
|
@ -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: '完成'
|
||||||
|
@ -334,7 +334,11 @@
|
||||||
uni.stopPullDownRefresh();
|
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.navigateTo({
|
uni.reLaunch({
|
||||||
url: '/pages/login/login'
|
url: '/pages/login/login'
|
||||||
});
|
});
|
||||||
uni.removeStorage({
|
uni.removeStorage({
|
||||||
|
|
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
|
@ -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 == 401) {
|
if (res.data.code == 200) {} else if (res.data.code == 401) {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/login/login'
|
url: '/pages/login/login'
|
||||||
});
|
});
|
||||||
|
@ -12042,6 +12042,14 @@ 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) {
|
||||||
|
|
|
@ -360,6 +360,10 @@ var _methods;
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
var _default = {
|
var _default = {
|
||||||
data: function data() {
|
data: function data() {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -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: '完成'
|
||||||
|
@ -780,7 +780,9 @@ var _default = {
|
||||||
uni.stopPullDownRefresh();
|
uni.stopPullDownRefresh();
|
||||||
i.childList = res.data;
|
i.childList = res.data;
|
||||||
// console.log(this.waterAndFertilizerParamsList);
|
// console.log(this.waterAndFertilizerParamsList);
|
||||||
}
|
} else {}
|
||||||
|
}).catch(function (err) {
|
||||||
|
console.log('接口失败');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.navigateTo({
|
uni.reLaunch({
|
||||||
url: '/pages/login/login'
|
url: '/pages/login/login'
|
||||||
});
|
});
|
||||||
uni.removeStorage({
|
uni.removeStorage({
|
||||||
|
|
Loading…
Reference in New Issue