|
@@ -21,8 +21,8 @@
|
|
|
@click="setType(item, 1)">{{item.label}}</view>
|
|
|
</view>
|
|
|
<view class="chart-box">
|
|
|
- <canvas canvas-id="chartBox1" id="chartBox1" class="chart-canvas" @touchstart="touchLine1"
|
|
|
- @touchmove="moveLine1" @touchend="touchEndLine1" force-use-old-canvas="true"></canvas>
|
|
|
+ <canvas canvas-id="chartBox1" id="chartBox1" class="chart-canvas" @touchstart="touchLine1" @touchmove="moveLine1"
|
|
|
+ @touchend="touchEndLine1" force-use-old-canvas="true"></canvas>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="index-data-box">
|
|
@@ -32,8 +32,8 @@
|
|
|
@click="setType(item, 2)">{{item.label}}</view>
|
|
|
</view>
|
|
|
<view class="chart-box">
|
|
|
- <canvas canvas-id="chartBox2" id="chartBox2" class="chart-canvas" @touchstart="touchLine2"
|
|
|
- @touchmove="moveLine2" @touchend="touchEndLine2" force-use-old-canvas="true"></canvas>
|
|
|
+ <canvas canvas-id="chartBox2" id="chartBox2" class="chart-canvas" @touchstart="touchLine2" @touchmove="moveLine2"
|
|
|
+ @touchend="touchEndLine2" force-use-old-canvas="true"></canvas>
|
|
|
</view>
|
|
|
</view>
|
|
|
<u-top-tips ref="uTips"></u-top-tips>
|
|
@@ -71,7 +71,8 @@
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
|
- if (!uni.getStorageSync('token') || uni.getStorageSync('userData').registerFlag != 1 || uni.getStorageSync('userData').auditState != 2) {
|
|
|
+ if (!uni.getStorageSync('token') || uni.getStorageSync('userData').registerFlag != 1 || uni.getStorageSync(
|
|
|
+ 'userData').auditState != 2) {
|
|
|
uni.reLaunch({
|
|
|
url: '/pages/index/index'
|
|
|
});
|
|
@@ -83,7 +84,7 @@
|
|
|
this.setData(2, 'creat')
|
|
|
},
|
|
|
onShow() {
|
|
|
- this.userData = uni.getStorageSync("userData")||{}
|
|
|
+ this.userData = uni.getStorageSync("userData") || {}
|
|
|
this.getShopInfo()
|
|
|
},
|
|
|
onPullDownRefresh() {
|
|
@@ -108,7 +109,7 @@
|
|
|
},
|
|
|
// 跳转商品管理
|
|
|
goToGoodList() {
|
|
|
- if(!this.userData.roleInfos.some(v=>v.menuInfos.some(vv=>vv.label == '商品管理'))){
|
|
|
+ if (!this.userData.roleInfos.some(v => v.menuInfos.some(vv => vv.label == '商品管理'))) {
|
|
|
this.$refs.uTips.show({
|
|
|
title: '没有授权使用,请联系商户负责人',
|
|
|
type: 'warning',
|
|
@@ -122,7 +123,7 @@
|
|
|
},
|
|
|
// 跳转商品管理
|
|
|
goToOrderList() {
|
|
|
- if(!this.userData.roleInfos.some(v=>v.menuInfos.some(vv=>vv.label == '订单管理'))){
|
|
|
+ if (!this.userData.roleInfos.some(v => v.menuInfos.some(vv => vv.label == '订单管理'))) {
|
|
|
this.$refs.uTips.show({
|
|
|
title: '没有授权使用,请联系商户负责人',
|
|
|
type: 'warning',
|
|
@@ -153,6 +154,7 @@
|
|
|
let option = {
|
|
|
categories: column,
|
|
|
scrollPosition: 'left',
|
|
|
+ yAxis: {},
|
|
|
series: [{
|
|
|
name: "",
|
|
|
color: "#52A63A",
|
|
@@ -174,6 +176,7 @@
|
|
|
},
|
|
|
// 创建图表
|
|
|
creatChart(type, column, data) {
|
|
|
+ console.log(data)
|
|
|
let option = {
|
|
|
$this: _self,
|
|
|
canvasId: "chartBox" + type,
|
|
@@ -196,7 +199,11 @@
|
|
|
scrollBackgroundColor: '#DEE7F7',
|
|
|
scrollColor: '#52A63A',
|
|
|
},
|
|
|
- yAxis: {},
|
|
|
+ yAxis: {
|
|
|
+ format: (val) => {
|
|
|
+ return '¥' + parseFloat(val.toFixed(2))
|
|
|
+ }
|
|
|
+ },
|
|
|
categories: column,
|
|
|
legend: {
|
|
|
show: false
|