|
@@ -41,6 +41,7 @@
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ globalUser:{},
|
|
merchantList: [{
|
|
merchantList: [{
|
|
equipmentList: []
|
|
equipmentList: []
|
|
}],
|
|
}],
|
|
@@ -59,13 +60,14 @@
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
uni.setNavigationBarTitle({title: this.$t('merchantList.title')});
|
|
uni.setNavigationBarTitle({title: this.$t('merchantList.title')});
|
|
- var globalUser = uni.getStorageSync("globalUser");
|
|
|
|
- this.id = globalUser.id;
|
|
|
|
|
|
+ this.globalUser = uni.getStorageSync("globalUser");
|
|
|
|
+ this.id = this.globalUser.id;
|
|
|
|
+ this.getEquipmentListData();
|
|
},
|
|
},
|
|
onLoad(state) {
|
|
onLoad(state) {
|
|
- var globalUser = uni.getStorageSync("globalUser");
|
|
|
|
- this.id = globalUser.id;
|
|
|
|
- this.getEquipmentListData();
|
|
|
|
|
|
+ // this.globalUser = uni.getStorageSync("globalUser");
|
|
|
|
+ // this.id = this.globalUser.id;
|
|
|
|
+ // this.getEquipmentListData();
|
|
},
|
|
},
|
|
onPullDownRefresh() {
|
|
onPullDownRefresh() {
|
|
this.getEquipmentListData();
|
|
this.getEquipmentListData();
|
|
@@ -128,12 +130,12 @@
|
|
},
|
|
},
|
|
getEquipmentListData() {
|
|
getEquipmentListData() {
|
|
if(this.id==1){
|
|
if(this.id==1){
|
|
- this.getEquipmentListByProvince(this.loginUser)
|
|
|
|
|
|
+ this.getEquipmentListByProvince(this.globalUser)
|
|
.then(data => {
|
|
.then(data => {
|
|
this.list = data;
|
|
this.list = data;
|
|
}, _ => void uni.stopPullDownRefresh());
|
|
}, _ => void uni.stopPullDownRefresh());
|
|
}else{
|
|
}else{
|
|
- this.getEquipmentListByUser(this.loginUser)
|
|
|
|
|
|
+ this.getEquipmentListByUser(this.globalUser)
|
|
.then(data => {
|
|
.then(data => {
|
|
this.merchantList = data;
|
|
this.merchantList = data;
|
|
var listName = data[0].equipmentList;
|
|
var listName = data[0].equipmentList;
|