achao 2 năm trước cách đây
mục cha
commit
5cecd206aa
2 tập tin đã thay đổi với 131 bổ sung131 xóa
  1. 2 2
      unimall-admin/config/prod.env.js
  2. 129 129
      unimall-admin/src/views/dashboard/index.vue

+ 2 - 2
unimall-admin/config/prod.env.js

@@ -1,6 +1,6 @@
 module.exports = {
 	NODE_ENV: '"production"',
   	ENV_CONFIG: '"prod"',
-    HOST: '"https://cardapi.eliangeyun.com"',
-    BASE_API: '"https://cardapi.eliangeyun.com/m.api"'
+    HOST: '"http://8.209.114.119:8189"',
+    BASE_API: '"http://8.209.114.119:8189/m.api"'
 }

+ 129 - 129
unimall-admin/src/views/dashboard/index.vue

@@ -71,136 +71,136 @@ export default {
     }
   },
   created() {
-    info().then(response => {
-      const orderChart = echarts.init(document.getElementById('orderChart'))
-      const sumChart = echarts.init(document.getElementById('sumChart'))
-      const areaChart = echarts.init(document.getElementById('areaChart'))
-      const channelChart = echarts.init(document.getElementById('channelChart'))
-      this.waitStockCount = response.data.data.waitStockCount
-      this.goodsCount = response.data.data.goodsCount
-      // 每日订单走势
-      orderChart.setOption({
-        title: { text: '7日订单' },
-        legend: {
-          data: ['订单数'],
-          right: 1
-        },
-        yAxis: [
-          {
-            name: '订单数',
-            type: 'value',
-            axisLine: {
-              show: false
-            },
-            axisTick: {
-              show: false
-            },
-            axisLabel: {
-              color: '#666',
-              fontSize: 12
-            }
-          }
-        ],
-        xAxis: {
-          axisTick: {
-            show: false
-          },
-          axisLabel: {
-            color: '#666',
-            fontSize: 12,
-            margin: 12
-          },
-          data: response.data.data.daysOrder[0]
-        },
-        series: [
-          {
-            name: '订单数',
-            yAxisIndex: 0,
-            data: response.data.data.daysOrder[1],
-            type: 'bar',
-            color: '#00B5FF',
-            barWidth: 30
-          }
-        ]
-      })
-      // 订单金额走势
-      sumChart.setOption({
-        title: { text: '7日成交金额' },
-        legend: {
-          data: ['订单数'],
-          right: 1
-        },
-        yAxis: [
-          {
-            name: '订单数',
-            type: 'value',
-            axisLine: {
-              show: false
-            },
-            axisTick: {
-              show: false
-            },
-            axisLabel: {
-              color: '#666',
-              fontSize: 12
-            }
-          }
-        ],
-        xAxis: {
-          axisTick: {
-            show: false
-          },
-          axisLabel: {
-            color: '#666',
-            fontSize: 12,
-            margin: 12
-          },
-          data: response.data.data.daysSum[0]
-        },
-        series: [
-          {
-            name: '订单数',
-            yAxisIndex: 0,
-            data: response.data.data.daysSum[1],
-            type: 'line',
-            color: '#20B2AA'
-          }
-        ]
-      })
-      // 地区饼图
-      areaChart.setOption({
-        title: { text: '订单地区分布' },
-        legend: {
-          data: ['地区分布'],
-          right: 1,
-          color: '#20B2AA'
-        },
-        series: [
-          {
-            type: 'pie',
-            name: '地区分布',
-            data: response.data.data.area
-          }
-        ]
-      })
-      // 渠道饼图
-      channelChart.setOption({
-        title: { text: '订单渠道分布' },
-        legend: {
-          data: ['渠道分布'],
-          right: 1,
-          color: '#20B2AA'
-        },
-        series: [
-          {
-            type: 'pie',
-            name: '地区分布',
+    // info().then(response => {
+    //   const orderChart = echarts.init(document.getElementById('orderChart'))
+    //   const sumChart = echarts.init(document.getElementById('sumChart'))
+    //   const areaChart = echarts.init(document.getElementById('areaChart'))
+    //   const channelChart = echarts.init(document.getElementById('channelChart'))
+    //   this.waitStockCount = response.data.data.waitStockCount
+    //   this.goodsCount = response.data.data.goodsCount
+    //   // 每日订单走势
+    //   orderChart.setOption({
+    //     title: { text: '7日订单' },
+    //     legend: {
+    //       data: ['订单数'],
+    //       right: 1
+    //     },
+    //     yAxis: [
+    //       {
+    //         name: '订单数',
+    //         type: 'value',
+    //         axisLine: {
+    //           show: false
+    //         },
+    //         axisTick: {
+    //           show: false
+    //         },
+    //         axisLabel: {
+    //           color: '#666',
+    //           fontSize: 12
+    //         }
+    //       }
+    //     ],
+    //     xAxis: {
+    //       axisTick: {
+    //         show: false
+    //       },
+    //       axisLabel: {
+    //         color: '#666',
+    //         fontSize: 12,
+    //         margin: 12
+    //       },
+    //       data: response.data.data.daysOrder[0]
+    //     },
+    //     series: [
+    //       {
+    //         name: '订单数',
+    //         yAxisIndex: 0,
+    //         data: response.data.data.daysOrder[1],
+    //         type: 'bar',
+    //         color: '#00B5FF',
+    //         barWidth: 30
+    //       }
+    //     ]
+    //   })
+    //   // 订单金额走势
+    //   sumChart.setOption({
+    //     title: { text: '7日成交金额' },
+    //     legend: {
+    //       data: ['订单数'],
+    //       right: 1
+    //     },
+    //     yAxis: [
+    //       {
+    //         name: '订单数',
+    //         type: 'value',
+    //         axisLine: {
+    //           show: false
+    //         },
+    //         axisTick: {
+    //           show: false
+    //         },
+    //         axisLabel: {
+    //           color: '#666',
+    //           fontSize: 12
+    //         }
+    //       }
+    //     ],
+    //     xAxis: {
+    //       axisTick: {
+    //         show: false
+    //       },
+    //       axisLabel: {
+    //         color: '#666',
+    //         fontSize: 12,
+    //         margin: 12
+    //       },
+    //       data: response.data.data.daysSum[0]
+    //     },
+    //     series: [
+    //       {
+    //         name: '订单数',
+    //         yAxisIndex: 0,
+    //         data: response.data.data.daysSum[1],
+    //         type: 'line',
+    //         color: '#20B2AA'
+    //       }
+    //     ]
+    //   })
+    //   // 地区饼图
+    //   areaChart.setOption({
+    //     title: { text: '订单地区分布' },
+    //     legend: {
+    //       data: ['地区分布'],
+    //       right: 1,
+    //       color: '#20B2AA'
+    //     },
+    //     series: [
+    //       {
+    //         type: 'pie',
+    //         name: '地区分布',
+    //         data: response.data.data.area
+    //       }
+    //     ]
+    //   })
+    //   // 渠道饼图
+    //   channelChart.setOption({
+    //     title: { text: '订单渠道分布' },
+    //     legend: {
+    //       data: ['渠道分布'],
+    //       right: 1,
+    //       color: '#20B2AA'
+    //     },
+    //     series: [
+    //       {
+    //         type: 'pie',
+    //         name: '地区分布',
 
-            data: response.data.data.channel
-          }
-        ]
-      })
-    })
+    //         data: response.data.data.channel
+    //       }
+    //     ]
+    //   })
+    // })
   },
   methods: {
     handleSetLineChartData(type) {