Browse Source

Merge branch 'master' into release-20170915

# Conflicts:
#	components/product/component/StoreInfo.vue
#	components/search/GoodList.vue
#	components/store/CommodityList.vue
yangc 8 năm trước cách đây
mục cha
commit
8896d6fbf4

+ 14 - 5
components/main/count/Box.vue

@@ -23,8 +23,8 @@
           autoplay: 5000,
           speed: 500,
           direction: 'vertical',
-          slidesPerView: 2,
-          slidesPerGroup: 2
+          slidesPerView: 1,
+          slidesPerGroup: 1
         }
       }
     },
@@ -52,11 +52,20 @@
 <style lang="scss" scoped>
   .count-box {
     position: relative;
-    top: 15px;
+    top: 20px;
     float: right;
-    width: 300px;
-    height: 60px;
+    width: 210px;
+    height: 40px;
+    margin-right: 65px;
     overflow: hidden;
+    border-radius: 3px;
+    background: url("/images/all/count_bg.png") no-repeat;
+    /*background: #7299E8;*/
+  .swiper-slide{
+    width: 100%;
+    /*background: #83c5f8;*/
+    border-radius: 3px;
+  }
 
   .swiper-container {
     height: 100%;

+ 93 - 27
components/main/count/Item.vue

@@ -1,7 +1,13 @@
 <template>
   <div class="count-item">
     <span class="title">{{ title }}</span>
-    <span v-for="num in nums" :class="num == ',' ? 'separator' : 'num'">{{ num }}</span>
+    <div class="count-content">
+      <span v-for="(num, index) in nums" :class="num == ',' ? 'separator' : nums.length - len > index ? 'zero num' : 'num'">{{ num }}</span>
+      <!-- <span v-if="nums.length < 7">个</span>
+       <span v-if="nums.length > 7">万</span>-->
+      <span v-text="isMore?'万':'个'" v-if="!isShow"></span>
+      <span v-if="isShow">亿</span>
+    </div>
   </div>
 </template>
 <script>
@@ -16,14 +22,41 @@
         type: String
       }
     },
+    data () {
+      return {
+        isMore: false,
+        isShow: false,
+        len: 0
+      }
+    },
     methods: {
       formatNumber (num) {
         let re = /(\d+)(\d{3})/
-        num = (Array(Math.max(0, 10 - String(num).length)).join(0) + num)
+        if (num > 99999999) {
+          this.isShow = true
+          let str2 = num.toString()
+          num = Math.floor(num / 100000000)
+          if (parseInt(str2.charAt(str2.length - 8)) > 8) {
+            num = num + 1
+          }
+        }
+        if (num > 9999) {
+          this.isMore = true
+          let str = num.toString()
+          num = Math.floor(num / 10000)
+          if (parseInt(str.charAt(str.length - 4)) > 4) {
+            num = num + 1
+          }
+        }
+        let length = String(num).length
+        this.len = length > 3 ? length + 1 : length
+        num = (Array(7 - length).join(0) + num)
         while (re.test(num)) {
-          num = num.replace(re, '$1,$2')
+          num = num.replace(re, '$1$2')
         }
-        return num.split('')
+        num = num.split('')
+//        console.log(num)
+        return num
       }
     },
     computed: {
@@ -40,28 +73,61 @@
     text-align: center;
     line-height: 20px;
 
-    .title {
-      display: inline-block;
-      width: 60px;
-      float: left;
-      font-weight: bold;
-    }
-    .separator, .num {
-      display: inline-block;
-    }
-    .separator {
-      font-size: 12px;
-      color: $primary;
-      margin: 0 5px 0 -2px;
-    }
-    .num {
-      background: $primary;
-      width: 15px;
-      height: 20px;
-      margin-right: 10px;
-      text-align: center;
-      color: $white;
-      font-weight: bold;
-    }
+  .title {
+    display: inline-block;
+    width: 55px;
+    float: left;
+    font-weight: bold;
+    line-height: 40px;
+    color: #fff;
+    font-size: 14px;
+  }
+  .separator, .num {
+    display: inline-block;
+  }
+  .separator {
+    font-size: 12px;
+    color: #7299E8;
+    line-height: 38px !important;
+    margin: 0 5px 0 -5px;
+    width: 3px;
+  }
+  .count-content{
+    width: 150px;
+    /*background: #fff;*/
+    float: right;
+    height: 30px;
+    margin-top: 5px;
+    padding-left: 3px;
+    margin-right: 5px;
+  span{
+    float: left;
+    line-height: 24px;
+    font-weight: bold;
+  }
+  span.zero{
+    color: #9EBCF7;
+  }
+  span:first-child{
+    margin-left: 3px;
+  }
+  span:last-child{
+    line-height: 30px;
+    color: #7299E8;
+    margin-left: 2px;
+  }
+  }
+  .num {
+    background: #7299E8;
+    width: 18px;
+    height: 24px;
+    margin-right: 2px;
+    line-height: 24px;
+    text-align: center;
+    color: $white;
+    font-weight: bold;
+    border-radius: 2px;
+    margin-top: 3px;
+  }
   }
 </style>

+ 12 - 8
components/product/ComponentGoods.vue

@@ -32,19 +32,23 @@
           <nuxt-link :to="'/store/' + compGoods.storeId" class="contact" :title="compGoods.storeName" target="_blank">{{compGoods.storeName}}</nuxt-link>
         </td>
         <td class="brand-code">
-          <div class="brand"><nuxt-link :to="`/product/brand/${compGoods.brand.uuid}/`" title="compGoods.brand.nameEn">{{compGoods.brand.nameEn}}</nuxt-link></div>
-          <div class="code"><nuxt-link :to="`/product/component/${compGoods.uuid}/`" :title="compGoods.code">{{compGoods.code}}</nuxt-link></div>
+          <div class="brand" v-if="compGoods.brand.nameEn"><nuxt-link :to="`/product/brand/${compGoods.brand.uuid}/`" title="compGoods.brand.nameEn">{{compGoods.brand.nameEn}}</nuxt-link></div>
+          <div class="brand" v-if="!compGoods.brand.nameEn">—</div>
+          <div class="code" v-if="compGoods.code"><nuxt-link :to="`/product/component/${compGoods.uuid}/`" :title="compGoods.code">{{compGoods.code}}</nuxt-link></div>
+          <div class="code" v-if="!compGoods.code">—</div>
         </td>
         <td>
-          <div class="package">{{compGoods.packaging || '暂无包装方式信息'}}</div>
-          <div class="date">{{compGoods.produceDate || '-'}}</div>
+          <div class="package" v-if="compGoods.packaging">{{compGoods.packaging}}</div>
+          <div v-if="!compGoods.produceDate && !compGoods.packaging">—</div>
+          <div class="date" v-if="compGoods.produceDate">{{compGoods.produceDate}}</div>
         </td>
         <td class="text-left">
-          <div class="goods">
-            库存:<span>{{compGoods.reserve || '暂无库存'}}</span>
+          <div class="goods" v-if="compGoods.reserve">
+            库存:<span>{{compGoods.reserve}}</span>
           </div>
-          <div class="from" v-if="compGoods.reserve > 0">
-            起拍:<span>{{compGoods.minBuyQty}}</span>
+          <div v-if="!compGoods.reserve" style="text-align: center;margin-left: 0;"><span>—</span></div>
+          <div class="from" v-if="compGoods.reserve && compGoods.reserve > 0">
+            起拍:<span v-if="compGoods.minBuyQty">{{compGoods.minBuyQty}}</span>
           </div>
           <!--<div class="multiple" v-if="compGoods.reserve > 0">
             倍数:<span>{{compGoods.minPackQty}}</span>

+ 38 - 14
components/product/component/StoreInfo.vue

@@ -4,7 +4,7 @@
       <div class="storeIns">
         <div class="sign">选择商家:</div>
         <div class="storeInList" v-for="storeIn in store">
-          <div class="choose" :class="{'storeIn-active' : storeIn.isSelected, 'storeIn' : !storeIn.isSelected}" @click="addStore(storeIn)">
+          <div class="choose" :class="{'storeIn-active' : storeIn.isSelected, 'storeIn' : !storeIn.isSelected}" @click="store.length==1?'':addStore(storeIn)">
             <a class="storeLogo">
               <img :src="storeIn.logoUrl || '/images/component/default.png'" :alt="storeIn.storeName" :title="storeIn.storeName">
             </a>
@@ -46,20 +46,31 @@
           </tr>
         </thead>
         <tbody class="text-center">
-          <tr style="cursor: pointer;" v-for="list in storeList.content">
-            <td><a :href="'/store/' + list.storeid + '/' + list.batchCode">{{list.code}}</a></td>
-            <td><a :href="'/store/' + list.storeid + '/' + list.batchCode">{{list.produceDate}}</a></td>
-            <td><a :href="'/store/' + list.storeid + '/' + list.batchCode">{{list.packaging || '暂无包装方式'}}</a></td>
+          <tr style="cursor: pointer;" v-for="list in storeList.content" @click="goProductDetail(list.storeid, list.batchCode)">
+            <td>
+              <a v-if="list.code">{{list.code}}</a>
+              <a v-if="!list.code">—</a>
+            </td>
+            <td>
+              <a v-if="list.produceDate">{{list.produceDate}}</a>
+              <a v-if="!list.produceDate">—</a>
+            </td>
+            <td>
+              <a v-if="list.packaging">{{list.packaging}}</a>
+              <a v-if="!list.packaging">—</a>
+            </td>
             <td style="text-align: left;padding-left: 25px;">
-              <a :href="'/store/' + list.storeid + '/' + list.batchCode">
-                <div>
+              <a>
+                <div v-if="list.reserve">
                   <span>库存:</span>
                   <span>{{list.reserve}}</span>
                 </div>
-                <div>
+                <div v-if="!list.reserve" style="text-align: center;margin-left: 0;"><span>—</span></div>
+                <div v-if="list.reserve && list.reserve>0">
                   <span>起拍:</span>
-                  <span>{{list.minBuyQty}}</span>
+                  <span v-if="list.minBuyQty">{{list.minBuyQty}}</span>
                 </div>
+
                 <!--<div>-->
                   <!--<span>倍数:</span>-->
                   <!--<span>{{list.minPackQty}}</span>-->
@@ -67,14 +78,15 @@
               </a>
             </td>
             <td>
-              <a :href="'/store/' + list.storeid + '/' + list.batchCode">
+              <a>
                 <div v-for="price in list.prices">
-                  <span>{{price.start}}</span>+
+                  <span v-if="list.prices">{{price.start}}</span>+
+                  <span v-if="!list.prices">—</span>
                 </div>
               </a>
             </td>
             <td>
-              <a :href="'/store/' + list.storeid + '/' + list.batchCode">
+              <a>
                 <div v-show="list.currencyName.indexOf('USD')==-1 || !list.prices">
                   <span>—</span>
                 </div>
@@ -84,7 +96,7 @@
               </a>
             </td>
             <td>
-              <a :href="'/store/' + list.storeid + '/' + list.batchCode">
+              <a>
                 <div v-show="list.currencyName.indexOf('RMB')==-1 || !list.prices">
                   <span>—</span>
                 </div>
@@ -94,13 +106,16 @@
               </a>
             </td>
             <td>
-              <a :href="'/store/' + list.storeid + '/' + list.batchCode">
+              <a>
                 <div v-show="list.b2cMinDelivery">
                   <span>交期:</span>
                   <span>{{list.b2cMinDelivery}}</span>
                   <span v-if="list.b2cMaxDelivery && list.b2cMaxDelivery !== list.b2cMinDelivery">-</span>
                   <span v-if="list.b2cMaxDelivery && list.b2cMaxDelivery !== list.b2cMinDelivery">{{list.b2cMaxDelivery}}</span>
                 </div>
+                <div v-if="!list.b2cMinDelivery">
+                  <span>—</span>
+                </div>
               </a>
             </td>
             <td>
@@ -216,6 +231,9 @@
           this.params.filter.ignoreStore = !this.params.filter.ignoreStore
         }
         this.$store.dispatch('loadComponentInformation', this.params)
+      },
+      goProductDetail: function (storeid, batchcode) {
+        window.location.href = '/store/' + storeid + '/' + batchcode
       }
     }
   }
@@ -251,6 +269,8 @@
   }
   .storeInfo .storeIn-active {
     width: 98px;
+    height: 49px;
+    line-height: 49px;
     float: left;
     border: 1px solid #5078cb;
     text-align: center;
@@ -265,6 +285,10 @@
     text-align: center;
     vertical-align: middle;
   }
+  .storeInList .choose a img{
+    max-width: 95px;
+    max-height: 46px;
+  }
   a.storeLogo>img,.storeIn-active a.storeLogo>img {
     max-width: 95px;
     max-height: 46px;

+ 17 - 1
components/provider/NewStore.vue

@@ -31,7 +31,7 @@
           已入驻商家<span>{{storeCount}}</span>家
         </div>
         <div>
-          <a href="/vendor#/store-apply"><button>立即入驻</button></a>
+          <a @click="goStoreApply()"><button>立即入驻</button></a>
         </div>
       </div>
     </div>
@@ -42,12 +42,28 @@
 export default {
   name: 'new-store',
   computed: {
+    user () {
+      return this.$store.state.option.user
+    },
     stores () {
       return this.$store.state.provider.storeCms.newStores.data ? this.$store.state.provider.storeCms.newStores.data.content : []
     },
     storeCount () {
       return this.$store.state.provider.storeCms.storeCount.data
     }
+  },
+  methods: {
+    goStoreApply: function () {
+      if (!this.user.logged) {
+        this.$http.get('/login/page', {params: {returnUrl: window.location.href}}).then(response => {
+          if (response.data) {
+            this.$router.push('/auth/login')
+          }
+        })
+      } else {
+        window.location.href = '/vendor#/store-apply'
+      }
+    }
   }
 }
 </script>

+ 23 - 15
components/search/GoodList.vue

@@ -55,33 +55,37 @@
           <tbody id="productList-content">
           <tr v-for="item in good_list.components">
             <td>
-              <nuxt-link :to="`/product/component/${item.uuid}`">
-                <img width="80px" height="80px" :src="item.img?item.img:'/images/component/default.png'">
+              <nuxt-link class="component-img-box" :to="`/product/component/${item.uuid}`">
+                <img :src="item.img?item.img:item.brand.logoUrl?item.brand.logoUrl:'/images/component/default.png'">
               </nuxt-link>
             </td>
             <td class="brand-code">
-              <div class="brand"><nuxt-link :to="`/product/brand/${item.brand.uuid}`" class="text-num" v-text="item.brand.nameEn"></nuxt-link></div>
-              <div class="code"><nuxt-link :to="`/product/component/${item.uuid}`" class="f16 text-bold text-num" v-text="item.code"></nuxt-link></div>
-              <div class="brand"><nuxt-link :to="`/product/kind/${item.kindid}`" v-text="item.kind.nameCn">
-              </nuxt-link></div>
+              <div class="brand" v-if="item.brand.nameEn"><nuxt-link :to="`/product/brand/${item.brand.uuid}`" class="text-num" v-text="item.brand.nameEn"></nuxt-link></div>
+              <div class="brand" v-if="!item.brand.nameEn">—</div>
+              <div class="code"  v-if="item.code"><nuxt-link :to="`/product/component/${item.uuid}`" class="f16 text-bold text-num" v-text="item.code"></nuxt-link></div>
+              <div class="brand" v-if="!item.code">—</div>
+              <div class="brand"  v-if="item.kind.nameCn"><nuxt-link :to="`/product/kind/${item.kindid}`" v-text="item.kind.nameCn"></nuxt-link></div>
+              <div class="brand" v-if="!item.kind.nameCn">—</div>
             </td>
             <td>
-              <div class="package" v-text="item.packaging?item.packaging:'暂无包装方式信息'"></div>
+              <div class="package" v-text="item.packaging"></div>
               <div class="date" v-text="item.produceDate"></div>
+              <div v-if="!item.packaging && !item.produceDate">—</div>
             </td>
             <td>
-              <div>
+              <div v-if="item.storeName">
                 <nuxt-link :to="'/store/' + item.storeId" v-text="item.storeName">
                 </nuxt-link>
-                <span v-if="!item.storeName">—</span>
               </div>
+              <div v-if="!item.storeName">—</div>
             </td>
             <td class="text-left">
-              <div class="goods">
-                库存:<span v-text="item.reserve || '暂无库存'"></span>
+              <div class="goods"  v-if="item.reserve">
+                库存:<span v-text="item.reserve"></span>
               </div>
-              <div class="from" v-if="item.reserve > 0">
-                起拍:<span v-text="item.minBuyQty"></span>
+              <div v-if="!item.reserve" style="text-align: center;margin-left: 0;"><span>—</span></div>
+              <div class="from" v-if="item.reserve && item.reserve > 0">
+                起拍:<span v-text="item.minBuyQty" v-if="item.minBuyQty"></span>
               </div>
              <!-- <div class="multiple" v-if="item.reserve > 0">
                 倍数:<span v-text="item.minPackQty"></span>
@@ -399,11 +403,15 @@
     border: 1px solid #e8e8e8;
   }
 
+  .product-list tbody>tr .component-img-box {
+    width: 80px;
+    height: 80px;
+  }
   .product-list tbody>tr img {
     border: 1px solid #e8e8e8;
     margin: 10px 0 5px 0;
-    width: 80px;
-    height: 80px;
+    max-width: 80px;
+    max-height: 80px;
   }
   .product-list tbody>tr .contact{
     font-size: 14px;

+ 317 - 312
components/store/CommodityList.vue

@@ -49,19 +49,23 @@
               </a>
             </td>
             <td class="brand-code">
-              <div class="brand" v-text="commodity.brandNameEn"></div>
-              <div class="code" v-text="commodity.code"></div>
+              <div class="brand" v-if="commodity.brandNameEn" v-text="commodity.brandNameEn"></div>
+              <div class="brand" v-if="!commodity.brandNameEn">—</div>
+              <div class="code" v-if="commodity.code" v-text="commodity.code"></div>
+              <div class="code" v-if="!commodity.code">—</div>
             </td>
             <td>
-              <div class="package" v-text="commodity.packaging || '暂无包装信息'"></div>
-              <div class="date" v-text="commodity.produceDate">2016-12-01</div>
+              <div class="package" v-if="commodity.packaging" v-text="commodity.packaging"></div>
+              <div class="package" v-if="!commodity.packaging && !commodity.produceDate">—</div>
+              <div class="date" v-if='commodity.produceDate' v-text="commodity.produceDate">2016-12-01</div>
             </td>
             <td style="text-align: left;vertical-align: middle;">
-              <div class="goods">
+              <div class="goods" v-if="commodity.reserve">
                 库存:<span v-text="commodity.reserve">31500</span>
               </div>
-              <div class="from">
-                起拍:<span v-text="commodity.minBuyQty">300</span>
+              <div v-if="!commodity.reserve" style="text-align: center;margin-left: 0;"><span>—</span></div>
+              <div class="from" v-if="commodity.reserve && commodity.reserve>0">
+                起拍:<span v-if="commodity.minBuyQty" v-text="commodity.minBuyQty">300</span>
               </div>
               <!--<div class="multiple">
                 倍数:<span>1</span>
@@ -88,6 +92,7 @@
                 <span v-if="commodity.b2cMinDelivery != commodity.b2cMaxDelivery" v-text="commodity.b2cMinDelivery + '-' + commodity.b2cMaxDelivery"></span>
                 <span v-if="commodity.b2cMinDelivery == commodity.b2cMaxDelivery" v-text="commodity.b2cMinDelivery"></span>
               </div>
+              <div v-if="!commodity.b2cMinDelivery"><span>—</span></div>
             </td>
             <td>
               <buy :item="commodity"></buy>
@@ -117,102 +122,102 @@
   </div>
 </template>
 <script>
-  function getAllLeafIds (kind) {
-    if (!kind) {
+function getAllLeafIds (kind) {
+  if (!kind) {
+    return null
+  }
+  if (kind.isLeaf === 1) {
+    return kind.id
+  } else {
+    if (!kind.children || kind.children.length === 0) {
       return null
     }
-    if (kind.isLeaf === 1) {
-      return kind.id
-    } else {
-      if (!kind.children || kind.children.length === 0) {
-        return null
-      }
-      let ids = []
-      for (let i = 0; i < kind.children.length; i++) {
-        ids.push(getAllLeafIds(kind.children[i]))
-      }
-      return ids.join('-')
+    let ids = []
+    for (let i = 0; i < kind.children.length; i++) {
+      ids.push(getAllLeafIds(kind.children[i]))
     }
-  }
-  import Buy from '~components/common/buyOrCar/buyComponent.vue'
-  import Page from '~components/common/page/pageComponent.vue'
-  export default {
-    name: 'commodity-list',
-    props: ['kinds'],
-    components: {
-      Buy,
-      Page
-    },
-    data () {
-      return {
-        defaultProps: {
-          children: 'children',
-          label: 'nameCn'
-        },
-        pageParams: {
-          page: 1,
-          count: 6
-        },
-        searchCode: '',
-        parentKindId: 0,
-        ids: null
+    return ids.join('-')
+  }
+}
+import Buy from '~components/common/buyOrCar/buyComponent.vue'
+import Page from '~components/common/page/pageComponent.vue'
+export default {
+  name: 'commodity-list',
+  props: ['kinds'],
+  components: {
+    Buy,
+    Page
+  },
+  data () {
+    return {
+      defaultProps: {
+        children: 'children',
+        label: 'nameCn'
+      },
+      pageParams: {
+        page: 1,
+        count: 6
+      },
+      searchCode: '',
+      parentKindId: 0,
+      ids: null
+    }
+  },
+  computed: {
+    commodities () {
+      return this.$store.state.shop.storeInfo.storeCommodity.data
+    }
+  },
+  methods: {
+    handlerCurrentNode (data, node) {
+      this.searchCode = ''
+      if (this.parentKindId === data.id) {
+        this.parentKindId = 0
+        this.ids = null
+      } else {
+        if (data.level === 1) {
+          this.parentKindId = data.id
+        }
+        this.ids = getAllLeafIds(data)
       }
+      this.pageParams.page = 1
+
+      this.pageCommodity(this.pageParams, this.ids)
     },
-    computed: {
-      commodities () {
-        return this.$store.state.shop.storeInfo.storeCommodity.data
-      }
+    goodsSearch (keyword) {
+      this.pageParams.page = 1
+      this.pageCommodity(this.pageParams, this.ids, keyword)
     },
-    methods: {
-      handlerCurrentNode (data, node) {
-        this.searchCode = ''
-        if (this.parentKindId === data.id) {
-          this.parentKindId = 0
-          this.ids = null
-        } else {
-          if (data.level === 1) {
-            this.parentKindId = data.id
-          }
-          this.ids = getAllLeafIds(data)
-        }
-        this.pageParams.page = 1
-
-        this.pageCommodity(this.pageParams, this.ids)
-      },
-      goodsSearch (keyword) {
-        this.pageParams.page = 1
-        this.pageCommodity(this.pageParams, this.ids, keyword)
-      },
-      async pageCommodity (pageParams, kindId, keyword) {
+    async pageCommodity (pageParams, kindId, keyword) {
 //    pageCommodity (pageParams, kindId, keyword) {
-        let params = { storeid: this.$route.params.uuid, origin: 'store', kindUuid: kindId, code: keyword }
-        params.page = pageParams.page
-        params.count = pageParams.count
+      let params = { storeid: this.$route.params.uuid, origin: 'store', kindUuid: kindId, code: keyword }
+      params.page = pageParams.page
+      params.count = pageParams.count
 
-        try {
-          let { data } = await this.$http.get('/api/commodity/commodities', { params })
-          this.$store.commit('shop/storeInfo/GET_STORE_COMMODITY_SUCCESS', data)
-        } catch (err) {
-          this.$store.commit('shop/storeInfo/GET_STORE_COMMODITY_FAILURE', err)
-        }
+      try {
+        let { data } = await this.$http.get('/api/commodity/commodities', { params })
+        this.$store.commit('shop/storeInfo/GET_STORE_COMMODITY_SUCCESS', data)
+      } catch (err) {
+        this.$store.commit('shop/storeInfo/GET_STORE_COMMODITY_FAILURE', err)
+      }
 //      this.$http.get('/api/commodity/commodities', { params }).then(response => {
 //        this.$store.commit('shop/storeInfo/GET_STORE_COMMODITY_SUCCESS', response)
 //      }, err => {
 //        this.$store.commit('shop/storeInfo/GET_STORE_COMMODITY_FAILURE', err)
 //      })
-      },
-      handleCurrentChange (page) {
-        this.pageParams.page = page
-        this.pageCommodity(this.pageParams, this.ids, this.searchCode)
-      }
+    },
+    handleCurrentChange (page) {
+      this.pageParams.page = page
+      this.pageCommodity(this.pageParams, this.ids, this.searchCode)
+    }
 //    goBack () {
 //      this.$router.back(-1)
 //    }
-    }
   }
+}
 </script>
 <style>
-  /*  产品分类调整*/
+/*  产品分类调整*/
   .category-content .el-tree{
     border: none;
   }
@@ -229,260 +234,260 @@
     background-color: #5078cb;
     border-color: #337ab7;
   }
-  .el-tree-node__expand-icon{
-    font-family: "iconfont" !important;
-    font-size: 14px;
-    font-style: normal;
-    -webkit-font-smoothing: antialiased;
-    width: inherit;
-    height: inherit;
-    border: inherit;
-    font-weight: bold;
-    text-shadow: -1px 0px 0 #333;
-    margin-right: 3px !important;
-  }
-  .el-tree-node__content{
-    line-height: 30px;
-    height: 30px;
-  }
-  .el-tree-node__expand-icon.is-leaf{
-    visibility: hidden;
-  }
-  .el-tree-node__expand-icon:before{
-    content: "\E621";
-  }
-  #goods-list-fragment .category-title {
-    height: 34px;
-    background-color: #5078cb;
-    font-size: 14px;
-    color: rgb(255,255,255);
-    font-weight: 600;
-    text-align: center;
-  }
+.el-tree-node__expand-icon{
+  font-family: "iconfont" !important;
+  font-size: 14px;
+  font-style: normal;
+  -webkit-font-smoothing: antialiased;
+  width: inherit;
+  height: inherit;
+  border: inherit;
+  font-weight: bold;
+  text-shadow: -1px 0px 0 #333;
+  margin-right: 3px !important;
+}
+.el-tree-node__content{
+  line-height: 30px;
+  height: 30px;
+}
+.el-tree-node__expand-icon.is-leaf{
+  visibility: hidden;
+}
+.el-tree-node__expand-icon:before{
+  content: "\E621";
+}
+	#goods-list-fragment .category-title {
+		height: 34px;
+		background-color: #5078cb;
+		font-size: 14px;
+		color: rgb(255,255,255);
+		font-weight: 600;
+		text-align: center;
+	}
 
-  #goods-list-fragment .category-content li {
-    line-height: 33px;
-    font-size: 14px;
-    color: #333;
-    float: left;
-    width: 100%;
-    padding-left: 10px;
-  }
+	#goods-list-fragment .category-content li {
+		line-height: 33px;
+		font-size: 14px;
+		color: #333;
+		float: left;
+		width: 100%;
+		padding-left: 10px;
+	}
 
-  #goods-list-fragment .category-content li a {
-    display: block;
-    padding-left: 15px;
-    text-decoration: none;
-    color: #333;
-    /* background:url("static/img/store/default/openblackR.png") no-repeat left; */
-  }
+	#goods-list-fragment .category-content li a {
+		display: block;
+		padding-left: 15px;
+		text-decoration: none;
+		color: #333;
+		/* background:url("static/img/store/default/openblackR.png") no-repeat left; */
+	}
 
-  #goods-list-fragment .category-content li a:hover{
-    color: #5078cb;
-    cursor: pointer;
-  }
+	#goods-list-fragment .category-content li a:hover{
+		color: #5078cb;
+		cursor: pointer;
+	}
 
-  #goods-list-fragment .category-content ul.list-body {
-    display: none;
-    color: #666;
-  }
+	#goods-list-fragment .category-content ul.list-body {
+		display: none;
+		color: #666;
+	}
 
-  #goods-list-fragment .category-content ul.list-body.active {
-    display: block;
-  }
+	#goods-list-fragment .category-content ul.list-body.active {
+		display: block;
+	}
 
-  #goods-list-fragment .category-content ul.list-body li {
-    float: none;
-    background-image: none;
-    min-height: 26px;
-    line-height: 26px;
-    font-size: 12px;
-  }
+	#goods-list-fragment .category-content ul.list-body li {
+		float: none;
+		background-image: none;
+		min-height: 26px;
+		line-height: 26px;
+		font-size: 12px;
+	}
 
-  #goods-list-fragment .category-content ul.list-body li a {
-    padding-left: 15px;
-    display: block;
-    color: rgb(50,50,50);
-    background: none;
-  }
+	#goods-list-fragment .category-content ul.list-body li a {
+		padding-left: 15px;
+		display: block;
+		color: rgb(50,50,50);
+		background: none;
+	}
 
-  #goods-list-fragment .category-content ul.list-body li a:hover {
-    color: #5078cb;
-    cursor: pointer;
-  }
+	#goods-list-fragment .category-content ul.list-body li a:hover {
+		color: #5078cb;
+		cursor: pointer;
+	}
 
-  #goods-list-fragment .category-content ul.list-body li a.cur {
-    text-decoration: none;
-    font-size: 14px;
-    /* background:url("static/img/store/default/openblackR.png") no-repeat left; */
-  }
+	#goods-list-fragment .category-content ul.list-body li a.cur {
+		text-decoration: none;
+		font-size: 14px;
+		/* background:url("static/img/store/default/openblackR.png") no-repeat left; */
+	}
 
-  #goods-list-fragment .title-area {
-    margin-bottom: 30px;
-    width: 200px;
-    float: left;
-  }
-  #goods-list-fragment .category-content{
-    border: 1px solid #e8e8e8;
-  }
-  /* goods-area */
-  #goods-list-fragment .goods-area {
-    margin-left: 20px;
-    float: left;
-    margin-bottom: 30px;
-  }
+	#goods-list-fragment .title-area {
+		margin-bottom: 30px;
+		width: 200px;
+		float: left;
+	}
+	#goods-list-fragment .category-content{
+		border: 1px solid #e8e8e8;
+	}
+	/* goods-area */
+	#goods-list-fragment .goods-area {
+		margin-left: 20px;
+		float: left;
+		margin-bottom: 30px;
+	}
 
-  #goods-list-fragment .goods-area .btn-line {
-    border-radius: 0;
-  }
+	#goods-list-fragment .goods-area .btn-line {
+		border-radius: 0;
+	}
 
 
-  #goods-list-fragment .btn-info.btn-line {
-    background-color: #5078CB;
-    color: #fff;
-    font-weight: 600;
-  }
+	#goods-list-fragment .btn-info.btn-line {
+		background-color: #5078CB;
+		color: #fff;
+		font-weight: 600;
+	}
 
-  #goods-list-fragment .btn-line {
-    height: 34px;
-    width: 150px;
-    border: 1px solid #5078cb;
-    background-color: #fff;
-    color: rgb(80,120,203);
-    font-weight: 600;
-  }
+	#goods-list-fragment .btn-line {
+		height: 34px;
+		width: 150px;
+		border: 1px solid #5078cb;
+		background-color: #fff;
+		color: rgb(80,120,203);
+		font-weight: 600;
+	}
 
-  #goods-list-fragment .btn-line:hover {
-    background-color: #5078CB;
-    color: #fff;
-  }
+	#goods-list-fragment .btn-line:hover {
+		background-color: #5078CB;
+		color: #fff;
+	}
 
-  /* 物品列表 */
-  #goods-list-fragment .goodslist .brand-code {
-    font-size: 14px;
-    text-align: center;
-  }
+	/* 物品列表 */
+	#goods-list-fragment .goodslist .brand-code {
+		font-size: 14px;
+		text-align: center;
+	}
 
-  #goods-list-fragment #search_btn {
-    background: #5078CB;
-    color: #FFFFFF;
-  }
+	#goods-list-fragment #search_btn {
+		background: #5078CB;
+		color: #FFFFFF;
+	}
 
-  #goods-list-fragment #search_input {
-    font-size: 14px;
-  }
+	#goods-list-fragment #search_input {
+		font-size: 14px;
+	}
 
-  #goods-list-fragment .brand-code .code {
-    font-weight: 600;
-  }
+	#goods-list-fragment .brand-code .code {
+		font-weight: 600;
+	}
 
-  #goods-list-fragment .goodslist th {
-    color: rgb(50,50,50);
-    font-size: 14px;
-    font-weight: 600;
-    background-color: #f7f7f7;
-    text-align: center;
-  }
+	#goods-list-fragment .goodslist th {
+		color: rgb(50,50,50);
+		font-size: 14px;
+		font-weight: 600;
+		background-color: #f7f7f7;
+		text-align: center;
+	}
 
-  #goods-list-fragment .category-content a.selected-node,
-  #goods-list-fragment .category-content ul.list-body li a.selected-node {
-    color: #5078cb;
-  }
+	#goods-list-fragment .category-content a.selected-node,
+	#goods-list-fragment .category-content ul.list-body li a.selected-node {
+		color: #5078cb;
+	}
 
-  #goods-list-fragment .category-content a.selected-parent-node,
-  #goods-list-fragment .category-content ul.list-body li a.selected-parent-node {
-    /* background:url("static/img/store/default/openblack.png") no-repeat left; */
-  }
+	#goods-list-fragment .category-content a.selected-parent-node,
+	#goods-list-fragment .category-content ul.list-body li a.selected-parent-node {
+		/* background:url("static/img/store/default/openblack.png") no-repeat left; */
+	}
 
-  #goods-list-fragment .goodslist tbody>tr {
-    border: 1px solid #e8e8e8;
-  }
-  #goods-list-fragment .goodslist tbody>tr td.commodity-icon .img{
-    border: 1px solid #e8e8e8;
-    margin: 10px;
-    width: 80px;
-    height: 80px;
-    overflow: hidden;
-    line-height: 75px;
-  }
-  #goods-list-fragment .goodslist tbody>tr td.commodity-icon .img>img {
-    width: 80px;
-    height: 80px;
-  }
-  #goods-list-fragment .goodslist td {
-    font-size: 12px;
-    color: #333;
-    text-align: center;
-    line-height: 20px;
-  }
+	#goods-list-fragment .goodslist tbody>tr {
+		border: 1px solid #e8e8e8;
+	}
+	#goods-list-fragment .goodslist tbody>tr td.commodity-icon .img{
+		border: 1px solid #e8e8e8;
+		margin: 10px;
+		width: 80px;
+		height: 80px;
+		overflow: hidden;
+		line-height: 75px;
+	}
+	#goods-list-fragment .goodslist tbody>tr td.commodity-icon .img>img {
+		width: 80px;
+		height: 80px;
+	}
+	#goods-list-fragment .goodslist td {
+		font-size: 12px;
+		color: #333;
+		text-align: center;
+		line-height: 20px;
+	}
 
-  /* 物品列表按钮 */
-  #goods-list-fragment .btn-buy-now {
-    background-color: #5078CB;
-    color: #fff;
-    width: 80px;
-    height: 30px;
-    font-size: 12px;
-    border: 1px solid #5078cb;
-  }
+	/* 物品列表按钮 */
+	#goods-list-fragment .btn-buy-now {
+		background-color: #5078CB;
+		color: #fff;
+		width: 80px;
+		height: 30px;
+		font-size: 12px;
+		border: 1px solid #5078cb;
+	}
 
-  #goods-list-fragment .btn-add-cart {
-    margin-top: 10px;
-    color: #214797;
-    width: 80px;
-    height: 30px;
-    font-size: 12px;
-    background-color: #fff;
-    border: 1px solid #e8e8e8;
-  }
-  #goods-list-fragment .btn-buy-now:hover{
-    background: #214797;
-  }
-  #goods-list-fragment .btn-add-cart:hover{
-    background-color: #5078CB;
-    color: #fff;
-  }
-  .category-content{
-    min-height: 243px;
-  }
-  .no-record{
-    font-size: 14px;
-    color: #999;
-    text-align: center;
-    line-height: 200px;
-  }
-  .no-record i{
-    margin-right: 5px;
-  }
-  .text-center{
-    text-align: center;
-    margin-top: 30px;
-  }
-  .text-center  .col-xs-2  img{
-    margin: 50px 0 50px 95px;
-    vertical-align: middle;
-  }
-  .text-center .txt-info{
-    font-size: 14px;
-    margin-top: 70px;
-  }
-  .text-center  .col-xs-4  p{
-    color: #999;
-    margin-top: 3px;
-    margin-bottom: 2px;
-  }
-  .text-center  .txt-info a{
-    font-size: 14px;
-  }
-  .text-center  .col-xs-4 i{
-    color: #5078cb;
-    font-size: 14px;
-  }
-  .goodslist{
-    margin-bottom: 16px;
-  }
+	#goods-list-fragment .btn-add-cart {
+		margin-top: 10px;
+		color: #214797;
+		width: 80px;
+		height: 30px;
+		font-size: 12px;
+		background-color: #fff;
+		border: 1px solid #e8e8e8;
+	}
+	#goods-list-fragment .btn-buy-now:hover{
+		background: #214797;
+	}
+	#goods-list-fragment .btn-add-cart:hover{
+		background-color: #5078CB;
+		color: #fff;
+	}
+	.category-content{
+		min-height: 243px;
+	}
+	.no-record{
+		font-size: 14px;
+		color: #999;
+		text-align: center;
+		line-height: 200px;
+	}
+	.no-record i{
+		margin-right: 5px;
+	}
+	.text-center{
+		text-align: center;
+		margin-top: 30px;
+	}
+	.text-center  .col-xs-2  img{
+		margin: 50px 0 50px 95px;
+		vertical-align: middle;
+	}
+	.text-center .txt-info{
+		font-size: 14px;
+		margin-top: 70px;
+	}
+	.text-center  .col-xs-4  p{
+		color: #999;
+		margin-top: 3px;
+		margin-bottom: 2px;
+	}
+	.text-center  .txt-info a{
+		font-size: 14px;
+	}
+	.text-center  .col-xs-4 i{
+		color: #5078cb;
+		font-size: 14px;
+	}
+	.goodslist{
+		margin-bottom: 16px;
+	}
 
-  @font-face {
+	@font-face {
     font-family: 'iconfont';  /* project id 357960 */
     src: url('//at.alicdn.com/t/font_27kjyd082ezpk3xr.eot');
     src: url('//at.alicdn.com/t/font_27kjyd082ezpk3xr.eot?#iefix') format('embedded-opentype'),

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

@@ -27,14 +27,14 @@
             </div>
             <div style="background: #FFFFFF;" v-if="isOpen">
               <ul class = "shop-contact list-unstyled" style="padding: 15px 0; margin-bottom: 0; border-top: #e8e8e8 1px solid; margin-top: 20px;">
-                <li v-if="storeInfo.enterprise.enTel&&storeInfo.enterprise.enTel.length > 0">
+                <li v-if="storeInfo.enterprise.enTel">
                   <span>电话:</span><span v-text="storeInfo.enterprise.enTel"></span>
                 </li>
-                <li v-if="storeInfo.enterprise.enFax&&storeInfo.enterprise.enFax.length > 0">
+                <li v-if="storeInfo.enterprise.enFax">
                   <span>传真:</span><span v-text="storeInfo.enterprise.enFax"></span>
                 </li>
-                <li v-if="storeInfo.enterprise.address&&storeInfo.enterprise.address.length > 0">
-                  <span>地址:</span><span v-text="storeInfo.enterprise.address"></span>
+                <li v-if="storeInfo.enterprise.address || storeInfo.enterprise.enAddress">
+                  <span>地址:</span><span v-text="storeInfo.enterprise.address || storeInfo.enterprise.enAddress"></span>
                 </li>
                 <li class="text-right">
                   <nuxt-link :to="{ name: 'store-uuid-description', params: { uuid: storeInfo.uuid } }">了解更多&gt;</nuxt-link>

+ 2 - 2
nuxt.config.js

@@ -1,6 +1,6 @@
 const path = require('path')
 const isProdMode = Object.is(process.env.NODE_ENV, 'production')
-const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://www.usoftmall.com/' : 'http://192.168.253.60:9090/platform-b2c/')
+const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://10.10.100.107:8081/platform-b2c/' : 'http://192.168.253.60:9090/platform-b2c/')
 
 module.exports = {
   router: {
@@ -107,5 +107,5 @@ module.exports = {
     ssr: false
   }],
   /* TODO 暂时代理到商城测试版,之后再做出调整 */
-  proxyTable: ['/api/**', '/search/**', '/user/**', '/login/**', '/register/**', '/logout/**', '/static/**', '/vendor**', '/user**', '/trade/**', '/recommendation/**', '/store-service/**', '/basic/**', '/logout**', '/operation/**', '/help**', '/product**', '/store**', '/order/proxy**', '/report/**', '/store/**#/**', '/kdn/**', '/product/**Submit', '/admin**', '/product/**Submit/**', '/release/**', '/auth/store/**', '/produce/**']
+  proxyTable: ['/api/**', '/search/**', '/user/**', '/login/**', '/register/**', '/logout/**', '/static/**', '/vendor**', '/user**', '/trade/**', '/recommendation/**', '/store-service/**', '/basic/**', '/logout**', '/operation/**', '/help**', '/product**', '/store**', '/order/proxy**', '/report/**', '/store/**#/**', '/kdn/**', '/product/**Submit', '/admin**', '/product/**Submit/**', '/release/**', '/auth/store/**', '/produce/**', '/file**']
 }

BIN
static/images/all/count_bg.png