فهرست منبع

商城数据分析图片链接问题

xiebaomin 1 سال پیش
والد
کامیت
ba2f67bdba
2فایلهای تغییر یافته به همراه12 افزوده شده و 11 حذف شده
  1. 1 1
      src/views/mall-portrait/components/hot-tips.vue
  2. 11 10
      src/views/mall-portrait/index.vue

+ 1 - 1
src/views/mall-portrait/components/hot-tips.vue

@@ -64,7 +64,7 @@ export default {
       return (typeof str === 'object')
     },
     is_picture(str) {
-      const r = new RegExp(/\.(png|jpe?g|gif|svg)(\?.*)?$/)
+      const r = new RegExp(/\.(png|jpe?g|gif|svg|JPEG)(\?.*)?$/)
       return r.test(str)
     }
   }

+ 11 - 10
src/views/mall-portrait/index.vue

@@ -101,7 +101,7 @@ export default {
   data() {
     return {
       bandColumns: [{ text: '品牌logo', label: 'image', labelWidth: 80 }, { text: '品牌名称', label: 'name' }, { text: 'TOP', label: 'top', labelWidth: 80 }],
-      storeColumns: [{ text: '品牌logo', label: 'image', labelWidth: 80 }, { text: '品牌名称', label: 'name' }, { text: 'TOP', label: 'top', labelWidth: 80 }],
+      storeColumns: [{ text: '商品图片', label: 'image', labelWidth: 80 }, { text: '商品名称', label: 'name' }, { text: 'TOP', label: 'top', labelWidth: 80 }],
       keyColumns: [{ text: '搜索词', labelWidth: 120 }, { text: 'TOP', label: 'top' }],
       dataValue: {
         // 机构活跃度统计
@@ -159,18 +159,18 @@ export default {
     /**
      * 获取机构统计报表
      */
-    async getIns_statistics() {
-      const { data } = await getIns_statistics(this.params)
+    async getIns_statistics(e) {
+      const { data } = await getIns_statistics({ startCreateTime: e[0], endCreateTime: e[1] })
       this.dataValue.clubActivityCount = data.clubActivityCount
       this.dataValue.clubCount = data.clubCount
     },
-    async getIns_orderTrends() {
-      const { data } = await getIns_orderTrends(this.params)
+    async getIns_orderTrends(e) {
+      const { data } = await getIns_orderTrends({ startCreateTime: e[0], endCreateTime: e[1] })
       this.dataValue.addClubCount = data.clubCount
       this.dataValue.clubOrder = data.clubOrder
     },
-    async getIns_accessStatistics() {
-      const { data } = await getIns_accessStatistics(this.params)
+    async getIns_accessStatistics(e) {
+      const { data } = await getIns_accessStatistics({ startCreateTime: e[0], endCreateTime: e[1] })
       this.dataValue.record = data.record
       this.dataValue.remarks = data.remarks
       this.dataValue.brandProductSalesRecords = data.brandProductSalesRecords
@@ -180,10 +180,11 @@ export default {
     handleSelectTime(e, num) {
       this.params.startCreateTime = e[0]
       this.params.endCreateTime = e[1]
+      console.log(e)
       const obj = {
-        1: () => this.getIns_statistics(),
-        2: () => this.getIns_orderTrends(),
-        3: () => this.getIns_accessStatistics()
+        1: () => this.getIns_statistics(e),
+        2: () => this.getIns_orderTrends(e),
+        3: () => this.getIns_accessStatistics(e)
       }
       obj[num]()
     }