diff --git a/pages/index/index.vue b/pages/index/index.vue index 7a0db24..e9722af 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -206,31 +206,48 @@ onShow() { this.shopName = uni.getStorageSync('shopName') this.type = uni.getStorageSync('type') - this.getSaleInfo() - this.getServerData(); - this.getOrderInfoList(); - this.getWaitCount() + this.getSaleInfo() }, onLoad() { }, methods: { - getWaitCount() { - this.tui.request("/app/sale/getWaitCount", "POST", {}, false, false).then((res) => { - if (res.code == 200) { - this.waitCount = res.result - } else { - this.tui.toast(res.message) - } - - }) - }, getSaleInfo() { this.tui.request("/app/sale/getShopAll", "POST", { - shopId: this.shopIndex + pageVo: { + pageSize: 5, + pageNumber: 1 + }, }, false, false).then((res) => { if (res.code == 200) { - this.shopInfo = res.result + this.shopInfo = { + totalAmount:res.result.totalAmount, + totalCCount:res.result.totalCCount, + totalCount:res.result.totalCount, + totalJCount:res.result.totalJCount, + totalProfit:res.result.totalProfit + } + for (var i = 0; i <= res.result.salePage.records.length; i++) { + res.result.salePage.records[i].img = '/static/images/dingdan/dd' + i + '.png' + this.inventoryList = res.result.salePage.records + } + this.waitCount = res.result.countMap + let dataList = { + categories: this.getWeek(), + series: [{ + name: "七天营收统计", + linearColor: [ + [0, "#1890FF"], + [0.33, "#00B5FF"], + [0.66, "#00D1ED"], + [1, "#00E6BB"], + [1, "#90F489"] + ], + setShadow: [3, 8, 10, "#00E6BB"], + data: res.result.weekSale + }] + }; + this.chartData = JSON.parse(JSON.stringify(dataList)); } else { this.tui.toast(res.message) } @@ -271,31 +288,6 @@ } }).catch((res) => {}) }, - getServerData() { - - this.tui.request("/app/sale/getShopWeek", "POST", {}, false, false).then((res) => { - if (res.code == 200) { - let dataList = { - categories: this.getWeek(), - series: [{ - name: "七天营收统计", - linearColor: [ - [0, "#1890FF"], - [0.33, "#00B5FF"], - [0.66, "#00D1ED"], - [1, "#00E6BB"], - [1, "#90F489"] - ], - setShadow: [3, 8, 10, "#00E6BB"], - data: res.result - }] - }; - this.chartData = JSON.parse(JSON.stringify(dataList)); - } else { - this.tui.toast(res.message) - } - }) - }, getWeek() { let days = 7 let week = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"]; diff --git a/pages/index/peopleList.vue b/pages/index/peopleList.vue index 1537b1e..d0cbd9b 100644 --- a/pages/index/peopleList.vue +++ b/pages/index/peopleList.vue @@ -26,7 +26,7 @@ - + {{item.companyName}} @@ -63,7 +63,7 @@ - + {{item.companyName}} @@ -77,9 +77,9 @@ 拨打电话 - +