|
@@ -9,7 +9,7 @@
|
|
</uni-collapse>
|
|
</uni-collapse>
|
|
</view>
|
|
</view>
|
|
<view v-else>
|
|
<view v-else>
|
|
- <equipmentStatistics v-if="merchantList[0].id" :adminId="adminId" style="padding: 20upx;"></equipmentStatistics>
|
|
|
|
|
|
+ <equipmentStatistics v-if="firstMerchantAdminId" :adminId="firstMerchantAdminId" style="padding: 20upx;"></equipmentStatistics>
|
|
<view v-else style="text-align: center;">暂无数据</view>
|
|
<view v-else style="text-align: center;">暂无数据</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
@@ -31,7 +31,6 @@
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
globalUser:{},
|
|
globalUser:{},
|
|
- adminId: '',
|
|
|
|
merchantList:[{equipmentList:[]}],
|
|
merchantList:[{equipmentList:[]}],
|
|
extraIcon: {
|
|
extraIcon: {
|
|
color: '#4cd964',
|
|
color: '#4cd964',
|
|
@@ -42,9 +41,10 @@
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
...mapState(['loginUser']),
|
|
...mapState(['loginUser']),
|
|
- adminIdData:{
|
|
|
|
|
|
+ firstMerchantAdminId:{
|
|
get(){
|
|
get(){
|
|
- return this.adminId;
|
|
|
|
|
|
+ console.log('firstMerchantAdminId',this.merchantList[0].id)
|
|
|
|
+ return this.merchantList[0].id;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
merchantListSize:{
|
|
merchantListSize:{
|
|
@@ -56,7 +56,6 @@
|
|
},
|
|
},
|
|
onShow(state){
|
|
onShow(state){
|
|
this.globalUser = uni.getStorageSync("globalUser");
|
|
this.globalUser = uni.getStorageSync("globalUser");
|
|
- this.adminId = this.globalUser.id;
|
|
|
|
this.init();
|
|
this.init();
|
|
},
|
|
},
|
|
onLoad(state){
|
|
onLoad(state){
|
|
@@ -84,8 +83,9 @@
|
|
// console.log('getEquipmentListData')
|
|
// console.log('getEquipmentListData')
|
|
this.getEquipmentListByUser(this.globalUser)
|
|
this.getEquipmentListByUser(this.globalUser)
|
|
.then(data => {
|
|
.then(data => {
|
|
|
|
+ debugger
|
|
this.merchantList = data;
|
|
this.merchantList = data;
|
|
- // console.log('merchantList2',this.merchantList.length)
|
|
|
|
|
|
+ console.log('getEquipmentListData',this.merchantList)
|
|
uni.stopPullDownRefresh();
|
|
uni.stopPullDownRefresh();
|
|
}
|
|
}
|
|
, _ => void uni.stopPullDownRefresh());
|
|
, _ => void uni.stopPullDownRefresh());
|