Commit 85685ebc authored by mengcuiguang's avatar mengcuiguang

Merge branch 'dev_huanmoxiaoshuoge_dy_240528' of...

Merge branch 'dev_huanmoxiaoshuoge_dy_240528' of http://gitlab.mints-id.com/android/uniapp_vedio into dev_huanmoxiaoshuoge_dy_240528
parents 8c30811a 151be183
This diff is collapsed.
...@@ -126,7 +126,17 @@ ...@@ -126,7 +126,17 @@
}, },
computed: { computed: {
showEmpty: function() { showEmpty: function() {
return isEmpty(this.dataList); console.log(this.dataList)
if (isEmpty(this.dataList)) {
return true
} else {
if (typeof this.dataList == 'object') {
if (this.dataList.list != undefined) {
return isEmpty(this.dataList.list)
}
}
}
return false
}, },
scrollStyle: function() { scrollStyle: function() {
return { return {
...@@ -290,8 +300,8 @@ ...@@ -290,8 +300,8 @@
...param, ...param,
...this.param ...this.param
} }
} }
apiRequest({ apiRequest({
url: this.url, url: this.url,
method: this.method || "GET", method: this.method || "GET",
......
...@@ -19,10 +19,11 @@ ...@@ -19,10 +19,11 @@
}; };
}, },
methods: { methods: {
goWareHouse() { goWareHouse() {
uni.switchTab({ uni.$emit('goWareHouse')
url: '/pages/warehouse/warehouse' // uni.switchTab({
}); // url: '/pages/warehouse/warehouse'
// });
} }
}, },
} }
......
...@@ -86,6 +86,11 @@ ...@@ -86,6 +86,11 @@
mounted() { mounted() {
// 渲染完成 初始化首页数据 // 渲染完成 初始化首页数据
this.loadComponentData(); this.loadComponentData();
let that = this
uni.$on('goWareHouse', function(data) {
that.tabChange(1)
})
}, },
methods: { methods: {
tabChange(index) { tabChange(index) {
...@@ -93,14 +98,14 @@ ...@@ -93,14 +98,14 @@
this.currentPage = index; this.currentPage = index;
this.loadComponentData(); this.loadComponentData();
}, },
loadComponentData() { loadComponentData() {
if (this.currentPage == 0) { if (this.currentPage == 0) {
this.$refs.index.show(); this.$refs.index.show();
} else if (this.currentPage == 1) { } else if (this.currentPage == 1) {
this.$refs.recommend.show(); this.$refs.recommend.show();
} else if (this.currentPage == 2) { } else if (this.currentPage == 2) {
this.$refs.user.show(); this.$refs.user.show();
} }
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment