Procházet zdrojové kódy

fix: 线上缴费数据优化

mozhuangru před 1 dnem
rodič
revize
2f94c64bbb

+ 2 - 1
src/views/hui-jia/components/online-pay-day/index.vue

@@ -71,7 +71,7 @@ export default {
     getOnlinePayDay () {
       huiJiaApi.getOnlinePayDay().then(res => {
         this.xAxisData = (res.data.data.list || []).map(item => item.statData)
-        this.seriesData = (res.data.data.list || []).map(item => item.payAmount / 10000)
+        this.seriesData = (res.data.data.list || []).map(item => (item.payAmount / 10000).toFixed(2))
         this.initChart()
       })
     },
@@ -194,6 +194,7 @@ export default {
         },
         yAxis: [
           {
+            max: 500,
             axisLabel: {
               color: 'rgba(160, 179, 214, 0.7)',
               fontSize: 11,

+ 2 - 1
src/views/hui-jia/components/online-pay-week/index.vue

@@ -88,7 +88,7 @@ export default {
     initChart () {
       this.onlinePayWeekBarInstance = echarts.init(this.$refs.onlinePayWeekBar)
       const xAxisData = this.xAxisData
-      const seriesData = this.seriesData.map((num) => num / 10000)
+      const seriesData = this.seriesData.map((num) => (num / 10000).toFixed(2))
       let all = seriesData.reduce((total, num) => {
         return Number(total) + Number(num)
       }, 0)
@@ -193,6 +193,7 @@ export default {
         },
         yAxis: [
           {
+            max: 500,
             axisLabel: {
               color: 'rgba(160, 179, 214, 0.7)',
               fontSize: 11,

+ 3 - 1
src/views/hui-jia/components/online-pay/index.vue

@@ -84,12 +84,13 @@ export default {
       this.onlinePayInstance = echarts.init(this.$refs.onlinePayBar)
      
       const xAxisData = this.xAxisData
-      const seriesData = this.seriesData.map((num) => num / 10000)
+      const seriesData = this.seriesData.map((num) => (num / 10000).toFixed(2))
       // let max = 0
       // max = seriesData.reduce((max, num) => {
       //   return Math.max(Number(max), Number(num))
       // })
       // max = this.getMax(max)
+
       const option = {
         tooltip: {},
         legend: {
@@ -155,6 +156,7 @@ export default {
         },
         yAxis: [
           {
+            max: 5000,
             axisLabel: {
               color: 'rgba(160, 179, 214, 0.7)',
               fontSize: 11,

+ 1 - 1
vue.config.js

@@ -35,7 +35,7 @@ module.exports = {
   devServer: {
     proxy: {
       '/api': {
-        target: 'https://wy-test.huiguanjia.cn/9ad134a361f8d778/', // 对应自己的接口
+        target: 'https://pm.huiguanjia.cn/9ad134a361f8d778/', // 对应自己的接口
         changeOrigin: true,
         ws: false,
         pathRewrite: {