فهرست منبع

新增店铺关闭状态,原厂推荐和优秀商家接口调整。

yangc 8 سال پیش
والد
کامیت
79fe23672d

+ 5 - 5
components/provider/ExcellentSuppliers.vue

@@ -6,14 +6,14 @@
     </div>
     <ul class="list-unstyled list-inline">
       <li class="store-box" v-for="(store, index) in stores" :class="{ 'margin-left-zero' : index % 5 == 0}" >
-        <a :href="'/store/' + store.uuid" target="_blank">
-          <div class="img"><img :src="store.logoUrl || '/images/store/common/default.png'"/></div>
+        <a :href="'/store/' + store.store.uuid" target="_blank">
+          <div class="img"><img :src="store.store.logoUrl || '/images/store/common/default.png'"/></div>
           <div class="content">
-            <div class="name" title="store.storeName">
-              <span>{{store.storeName}}</span>
+            <div class="name" title="store.store.storeName">
+              <span>{{store.store.storeName}}</span>
             </div>
             <div class="description">
-              商家介绍:<span>{{store.description}}</span>
+              商家介绍:<span>{{store.store.description}}</span>
             </div>
           </div>
         </a>

+ 4 - 4
components/provider/RecommendOriginal.vue

@@ -4,17 +4,17 @@
     <div class="hr-blue"></div>
     <ul class="recommend-list list-unstyled list-inline">
       <li class="recommend" v-for="(store, index) in stores">
-        <a :href="'/store/' + store.uuid" target="_blank">
-          <div class="img"><img :src="store.logoUrl || '/images/store/common/default.png'" /></div>
+        <a :href="'/store/' + store.store.uuid" target="_blank">
+          <div class="img"><img :src="store.store.logoUrl || '/images/store/common/default.png'" /></div>
           <div class="content">
             <div class="name">
-              <span :title="store.storeName">{{store.storeName}}</span>
+              <span :title="store.store.storeName">{{store.store.storeName}}</span>
             </div>
             <!--<div class="subject" style="min-height: 5px;">
             </div>-->
             <div class="description">
               <strong>商家介绍</strong>:
-              <span>{{store.description || '暂无简介'}}</span>
+              <span>{{store.store.description || '暂无简介'}}</span>
             </div>
           </div>
         </a>

+ 1 - 1
components/store/BaseInfo.vue

@@ -1,5 +1,5 @@
 <template>
-  <div style="margin-bottom: 30px;">
+  <div style="margin-bottom: 30px;" v-if="!storeInfo.status || storeInfo.status == 'OPENED'">
     <div id="introduction-fragment">
       <div class="container">
         <div class="menu-com row">

+ 1 - 1
components/store/CommodityInfo.vue

@@ -1,5 +1,5 @@
 <template>
-  <div>
+  <div v-if="!storeInfo.status || storeInfo.status == 'OPENED'">
     <div class="menu-com row">
       <div class="menu-title col-md-12">
         <a href="/">商城首页</a> >

+ 4 - 1
components/store/CommodityList.vue

@@ -1,5 +1,5 @@
 <template>
-  <div id="goods-list-fragment">
+  <div id="goods-list-fragment" v-if="!storeInfo.status || storeInfo.status == 'OPENED'">
     <div class="container" style="width: 1190px; padding: 0;">
       <div class="title-area">
         <div class="category-title">
@@ -161,6 +161,9 @@ export default {
   computed: {
     commodities () {
       return this.$store.state.shop.storeInfo.storeCommodity.data
+    },
+    storeInfo () {
+      return this.$store.state.shop.storeInfo.store.data
     }
   },
   methods: {

+ 4 - 1
components/store/ComponentInfo.vue

@@ -1,5 +1,5 @@
 <template>
-  <div id="component-info-fragment">
+  <div id="component-info-fragment" v-if="!storeInfo.status || storeInfo.status == 'OPENED'">
     <div class="component-info">
       <div class="head">
         <span class="tab">产品参数<b class="tip">(仅供参考,以实际产品为准)</b></span>
@@ -23,6 +23,9 @@
 export default {
   name: 'component-info',
   computed: {
+    storeInfo () {
+      return this.$store.state.shop.storeInfo.store.data
+    },
     component () {
       return this.$store.state.shop.storeInfo.component.data
     }

+ 1 - 1
components/store/RecommendProduct.vue

@@ -1,5 +1,5 @@
 <template>
-  <div id="recommend-fragment" v-if="commodities && commodities.length > 0">
+  <div id="recommend-fragment" v-if="(commodities && commodities.length > 0) && (!storeInfo.status || storeInfo.status == 'OPENED')" >
     <div class="recommend-list">
       <ul>
         <li v-for="commodity in commodities">

+ 1 - 1
components/store/common/StoreHeader.vue

@@ -1,5 +1,5 @@
 <template>
-  <div id="nav_fragment">
+  <div id="nav_fragment"  v-if="!storeInfo.status || storeInfo.status == 'OPENED'">
     <div class="container">
       <div class="row" style="height: 120px; padding-top: 30px; margin: 0;">
         <!-- 店铺信息以及下拉菜单 -->

+ 8 - 1
components/store/common/StoreTitle.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="container" id="title-fragment">
-    <div class="container">
+    <div class="container" v-if="!storeInfo.status || storeInfo.status == 'OPENED'">
       <div class="row" style="margin-bottom: 20px;">
         <!-- 商标展示 -->
         <div class="shop-logo">
@@ -13,6 +13,10 @@
         </div>
       </div>
     </div>
+    <div class="store-closed" v-if="storeInfo.status && storeInfo.status != 'OPENED'">
+      <img src="/images/all/default.png" alt="">
+      <span>该店铺处于关闭状态,请<a href="/">返回首页</a></span>
+    </div>
   </div>
 </template>
 <script>
@@ -30,6 +34,9 @@ export default {
   #title-fragment {
 		padding: 0;
 	}
+  #title-fragment .store-closed {
+    text-align: center;
+  }
 	#title-fragment .container {
 		width: 1190px;
 		padding-left: 0px;

+ 1 - 1
pages/provider/factories.vue

@@ -19,7 +19,7 @@ export default {
       store.dispatch('loadBanners', {type: 'Brand'}),
       store.dispatch('provider/loadSalesStore', { isOriginal: true }),
       store.dispatch('provider/loadNewStores', { types: 'ORIGINAL_FACTORY' }),
-      store.dispatch('provider/loadRecommendOriginal', { types: 'ORIGINAL_FACTORY', num: 5 }),
+      store.dispatch('provider/loadRecommendOriginal', { types: 'ORIGINAL_FACTORY' }),
       store.dispatch('provider/findStoreList', { page: 1, count: 10, types: 'ORIGINAL_FACTORY' })
     ])
   },

+ 1 - 1
pages/provider/home.vue

@@ -18,7 +18,7 @@ export default{
       store.dispatch('loadBanners', {type: 'Agent'}),
       store.dispatch('provider/loadSalesStore', { isOriginal: false }),
       store.dispatch('provider/loadNewStores', { types: 'AGENCY-DISTRIBUTION' }),
-      store.dispatch('provider/loadRecommendStores', { types: 'AGENCY-DISTRIBUTION', num: 5 }),
+      store.dispatch('provider/loadRecommendOriginal', { types: 'AGENCY,DISTRIBUTION' }),
       store.dispatch('provider/loadHotComponents')
     ])
   },

+ 2 - 1
pages/provider/list.vue

@@ -12,7 +12,8 @@ export default {
   layout: 'main',
   fetch ({ store }) {
     return Promise.all([
-      store.dispatch('provider/loadRecommendStores'),
+//      store.dispatch('provider/loadRecommendStores'),
+      store.dispatch('provider/loadRecommendOriginal', { types: 'AGENCY,DISTRIBUTION' }),
       store.dispatch('provider/findStoreList', { page: 1, count: 10, types: 'AGENCY-DISTRIBUTION' })
     ])
   },

+ 1 - 1
store/provider.js

@@ -67,7 +67,7 @@ export const actions = {
   // 获取原厂推荐信息
   loadRecommendOriginal ({ commit }, params = {}) {
     commit('storeCms/REQUEST_RECOMMEND_STORE')
-    return axios.get('/api/store-service/stores/five', { params })
+    return axios.get('api/ads/store/excellence-list', { params })
       .then(response => {
         commit('storeCms/GET_RECOMMEND_STORE_SUCCESS', response.data)
       }, err => {