|
@@ -387,6 +387,7 @@
|
|
index: 0,
|
|
index: 0,
|
|
searchClientId: null,
|
|
searchClientId: null,
|
|
searchDeviceName: null,
|
|
searchDeviceName: null,
|
|
|
|
+ firstShow: true, // 添加一个标志变量
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -403,30 +404,33 @@
|
|
this.getEquipmentListData();
|
|
this.getEquipmentListData();
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
- this.input = this.input + 1;
|
|
|
|
- this.globalUser = uni.getStorageSync("globalUser");
|
|
|
|
- this.globalUser.offset = 0;
|
|
|
|
- this.globalUser.limit = 20;
|
|
|
|
- this.searchClientId = null;
|
|
|
|
- this.searchDeviceName = null;
|
|
|
|
- this.globalUser.deviceName = null;
|
|
|
|
- this.globalUser.clientId = null;
|
|
|
|
- uni.setNavigationBarTitle({
|
|
|
|
- title: this.$t('equipmentStatusList.title')
|
|
|
|
- });
|
|
|
|
- uni.setTabBarItem({
|
|
|
|
- index: 3,
|
|
|
|
- text: this.$t('tabs.tab4')
|
|
|
|
- });
|
|
|
|
- var token = uni.getStorageSync("token");
|
|
|
|
- if (token.length > 1) {
|
|
|
|
- this.getEquipmentListData();
|
|
|
|
- this.upBtn = false;
|
|
|
|
- this.nextBtn = true;
|
|
|
|
- } else {
|
|
|
|
- uni.reLaunch({
|
|
|
|
- url: '../Login/Login',
|
|
|
|
|
|
+ if (this.firstShow) {
|
|
|
|
+ this.input = this.input + 1;
|
|
|
|
+ this.globalUser = uni.getStorageSync("globalUser");
|
|
|
|
+ this.globalUser.offset = 0;
|
|
|
|
+ this.globalUser.limit = 20;
|
|
|
|
+ this.searchClientId = null;
|
|
|
|
+ this.searchDeviceName = null;
|
|
|
|
+ this.globalUser.deviceName = null;
|
|
|
|
+ this.globalUser.clientId = null;
|
|
|
|
+ uni.setNavigationBarTitle({
|
|
|
|
+ title: this.$t('equipmentStatusList.title')
|
|
|
|
+ });
|
|
|
|
+ uni.setTabBarItem({
|
|
|
|
+ index: 3,
|
|
|
|
+ text: this.$t('tabs.tab4')
|
|
});
|
|
});
|
|
|
|
+ var token = uni.getStorageSync("token");
|
|
|
|
+ if (token.length > 1) {
|
|
|
|
+ this.getEquipmentListData();
|
|
|
|
+ this.upBtn = false;
|
|
|
|
+ this.nextBtn = true;
|
|
|
|
+ } else {
|
|
|
|
+ uni.reLaunch({
|
|
|
|
+ url: '../Login/Login',
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ this.firstShow = false;
|
|
}
|
|
}
|
|
|
|
|
|
},
|
|
},
|