Browse Source

手机询价计数器请求统一

yangc 7 years ago
parent
commit
c3c22b48e8
2 changed files with 10 additions and 10 deletions
  1. 4 4
      components/mobile/common/StatisticsMobile.vue
  2. 6 6
      pages/index.vue

+ 4 - 4
components/mobile/common/StatisticsMobile.vue

@@ -160,12 +160,12 @@
         return this.$store.state.count.allCount.data
       },
       inquirySheet () {
-        let sheetNum = this.$store.state.count.inquirySheet.data.count
-        return this.formatDouble(sheetNum)
+        let sheetNum = this.$store.state.count.inquirySheet.data
+        return sheetNum ? this.formatDouble(sheetNum.count) : 0
       },
       inquirySheetLast () {
-        let lastSheetNum = this.$store.state.count.inquirySheetLast.data.count
-        return this.formatDouble(lastSheetNum)
+        let lastSheetNum = this.$store.state.count.inquirySheetLast.data
+        return lastSheetNum ? this.formatDouble(lastSheetNum.count) : 0
       },
       all () {
         let count = this.$store.state.supplier.merchant.merchantAll.data

+ 6 - 6
pages/index.vue

@@ -47,10 +47,10 @@
       Home
     },
     fetch ({store}) {
-      let today = new Date()
-      let nowYear = today.getFullYear()
-      let nowMonth = today.getMonth() + 1
-      let LastMonth = today.getMonth()
+//      let today = new Date()
+//      let nowYear = today.getFullYear()
+//      let nowMonth = today.getMonth() + 1
+//      let LastMonth = today.getMonth()
       return !store.state.option.isMobile ? Promise.all([
         store.dispatch('loadNewFloors', {type: 'home_floor_f1,home_floor_f2,home_floor_f3,home_floor_f4,home_floor_f5,home_expand_f1,home_expand_f2'}),
         store.dispatch('loadBanners', {type: 'home_banner_carousel'}),
@@ -66,8 +66,8 @@
       ]) : Promise.all([
         store.dispatch('supplier/loadVendorAll', {page: 1, size: 20}),
         store.dispatch('loadAllCount', {_status: 'actived', usedFor: 'mall_home_banner'}),
-        store.dispatch('loadInquirySheet', {year: nowYear, month: nowMonth}),
-        store.dispatch('loadInquirySheetLast', {year: nowYear, month: LastMonth}),
+        store.dispatch('loadInquirySheet'),
+//        store.dispatch('loadInquirySheetLast', {year: nowYear, month: LastMonth}),
         store.dispatch('provider/findSimilarStoreList', {page: 1, count: 10, type: 'ORIGINAL_FACTORY-DISTRIBUTION-AGENCY-CONSIGNMENT', keyword: ''}),
         store.dispatch('applyPurchase/loadMobileHomeList', {pageNumber: 1, pageSize: 5, enUU: store.state.option.user.data.enterprise ? store.state.option.user.data.enterprise.uu : null})
       ])