Browse Source

卖家中心-品牌申请/器件申请添加/product/**映射

yangc 8 years ago
parent
commit
050ff81030

+ 8 - 3
components/product/ComponentGoods.vue

@@ -147,7 +147,8 @@
         this.pageParams.page = 1
         this.pageCmpGoods(this.pageParams)
       },
-      async pageCmpGoods (pageParams) {
+//      async pageCmpGoods (pageParams) {
+      pageCmpGoods (pageParams) {
         let params = {}
         params.filter = { kindid: pageParams.filter.kindid }
         if (pageParams.filter.brandid && pageParams.filter.brandid !== '') {
@@ -158,8 +159,12 @@
         }
         params.page = pageParams.page
         params.count = pageParams.count
-        let { data } = await this.$http.get('/api/product/product/getCompGoodsByKindid', { params })
-        this.$store.commit('product/component/GET_CMPGOODS_SUCCESS', data)
+//        let { data } = await this.$http.get('/api/product/product/getCompGoodsByKindid', { params })
+//        this.$store.commit('product/component/GET_CMPGOODS_SUCCESS', data)
+        this.$http.get('/api/product/product/getCompGoodsByKindid', { params })
+          .then(response => {
+            this.$store.commit('product/component/GET_CMPGOODS_SUCCESS', response.data)
+          })
       },
       handleCurrentChange (page) {
         this.pageParams.page = page

+ 12 - 6
components/product/brand/CategoriesList.vue

@@ -102,13 +102,19 @@
         this.pageParams.filter.kindid = data.id
         this.pageCommodity(this.pageParams, this.ids)
       },
-      async pageCommodity (params) {
-        try {
-          let { data } = await this.$http.get('/api/product/component/list', { params })
-          this.$store.commit('brandComponent/GET_COMPONENT_SUCCESS', data)
-        } catch (err) {
+//      async pageCommodity (params) {
+      pageCommodity (params) {
+//        try {
+//          let { data } = await this.$http.get('/api/product/component/list', { params })
+//          this.$store.commit('brandComponent/GET_COMPONENT_SUCCESS', data)
+//        } catch (err) {
+//          this.$store.commit('brandComponent/GET_COMPONENT_FAILURE', err)
+//        }
+        this.$http.get('/api/product/component/list', { params }).then(response => {
+          this.$store.commit('brandComponent/GET_COMPONENT_SUCCESS', response)
+        }, err => {
           this.$store.commit('brandComponent/GET_COMPONENT_FAILURE', err)
-        }
+        })
       }
     }
   }

+ 1 - 1
nuxt.config.js

@@ -106,5 +106,5 @@ module.exports = {
     ssr: false
   }],
   /* TODO 暂时代理到商城测试版,之后再做出调整 */
-  proxyTable: ['/api/**', '/search/**', '/user/**', '/login/**', '/logout/**', '/static/**', '/vendor**', '/user**', '/trade/**', '/recommendation/**', '/store-service/**', '/basic/**', '/logout**', '/operation/**', '/help**', '/product**', '/platform-b2c**', '/store**', '/order/proxy**', '/report/**', '/store/**#/', '/kdn/**']
+  proxyTable: ['/api/**', '/search/**', '/user/**', '/login/**', '/logout/**', '/static/**', '/vendor**', '/user**', '/trade/**', '/recommendation/**', '/store-service/**', '/basic/**', '/logout**', '/operation/**', '/help**', '/product**', '/platform-b2c**', '/store**', '/order/proxy**', '/report/**', '/store/**#/', '/kdn/**', '/product/**']
 }