接口节流优化
This commit is contained in:
@@ -40,7 +40,7 @@ export default (options = {}) => {
|
||||
if (arr.indexOf(options.url) > -1) {
|
||||
setTimeout(() => {
|
||||
arr.splice(arr.indexOf(options.url), 1)
|
||||
}, 300)
|
||||
}, 1500)
|
||||
}
|
||||
if (res.data.resultCode !== 10000 && res.data.code !== 'A0000') {
|
||||
errHandler(res.data)
|
||||
@@ -53,7 +53,7 @@ export default (options = {}) => {
|
||||
if (arr.indexOf(options.url) > -1) {
|
||||
setTimeout(() => {
|
||||
arr.splice(arr.indexOf(options.url), 1)
|
||||
}, 300)
|
||||
}, 1500)
|
||||
}
|
||||
reject(err)
|
||||
uni.showToast({
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
<template v-for="(item,index) in IOData">
|
||||
<view class="item">{{ item.clDid }}</view>
|
||||
<view class="item">
|
||||
<!-- <view class="status-point-success mr10"></view>-->
|
||||
<view style="width: 30rpx"> {{ item.value || '-'}}</view>
|
||||
<view v-if="item.value"> °C</view>
|
||||
</view>
|
||||
@@ -119,7 +118,7 @@ export default {
|
||||
navMenuActive: 0,
|
||||
navHeight: 0,
|
||||
img: '',
|
||||
topoImg:'',
|
||||
topoImg: '',
|
||||
navMenuList: [
|
||||
{
|
||||
text: '基本',
|
||||
@@ -369,10 +368,10 @@ export default {
|
||||
// }
|
||||
// })
|
||||
this.IOData = JSON.parse(message.toString())
|
||||
this.IOData.forEach(item=>{
|
||||
if(item.value === 0){
|
||||
this.IOData.forEach(item => {
|
||||
if (item.value === 0) {
|
||||
item.value = '0'
|
||||
}else if(!item.value){
|
||||
} else if (!item.value) {
|
||||
item.value = ''
|
||||
}
|
||||
})
|
||||
@@ -467,6 +466,7 @@ export default {
|
||||
width: 110rpx;
|
||||
font-size: 16rpx;
|
||||
opacity: 0.8;
|
||||
|
||||
.grid-card-content-2,
|
||||
.grid-card-content-1 {
|
||||
font-size: 16rpx;
|
||||
@@ -484,6 +484,7 @@ export default {
|
||||
right: 10rpx;
|
||||
width: 200rpx;
|
||||
opacity: 0.8;
|
||||
|
||||
.grid-card-content-2,
|
||||
.grid-card-content-1 {
|
||||
font-size: 16rpx;
|
||||
|
||||
@@ -46,6 +46,7 @@ export default {
|
||||
onLoad(options) {
|
||||
this.options = options
|
||||
this.engineeringList = uni.getStorageSync('engineeringList')
|
||||
this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
|
||||
},
|
||||
onShow() {
|
||||
queryEngineering().then(res => {
|
||||
@@ -53,9 +54,16 @@ export default {
|
||||
})
|
||||
},
|
||||
onNavigationBarButtonTap(e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/engineering/new',
|
||||
})
|
||||
if (this.userInfo.authorities === 'app_vip_user' || this.userInfo.authorities === 'engineering_user') {
|
||||
uni.navigateTo({
|
||||
url: `/pages/engineering/new`,
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '暂无权限',
|
||||
icon: 'none',
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
confirm(e) {
|
||||
|
||||
@@ -176,7 +176,7 @@ export default {
|
||||
this.formData.tempFiles.push(item)
|
||||
} else {
|
||||
this.formData.files.push({
|
||||
url: this.$config.static + item.filePath,
|
||||
url: item.filePath,
|
||||
extname: item.name.split('.')[1],
|
||||
name: item.name,
|
||||
...item,
|
||||
|
||||
Reference in New Issue
Block a user