Pārlūkot izejas kodu

新增404页面

shenjj 7 gadi atpakaļ
vecāks
revīzija
858358f47a

+ 1 - 1
components/applyPurchase/ApplyInfo.vue

@@ -755,7 +755,7 @@ export default {
           i {
             color: #e41515;
             position: relative;
-            top: 2px;
+            top: 0px;
             right: 3px;
           }
         }

+ 1 - 1
components/error/error.vue

@@ -30,7 +30,7 @@
           <nuxt-link :to="{ path: '/provider/factories'}">原厂专区</nuxt-link>
         </div>
 
-        <div class="infotext" v-else-if="title==='品'">您可以逛逛:
+        <div class="infotext" v-else-if="title==='品'">您可以逛逛:
           <nuxt-link :to="{ path: '/'}">商城首页</nuxt-link>
           <span>|</span>
           <nuxt-link :to="{ path: '/product/home'}">代理分销</nuxt-link>

+ 1 - 2
components/main/index.js

@@ -1,4 +1,3 @@
 import MainHeader from './Header.vue'
 import MainNav from './Nav.vue'
-import VendorHeader from './vendorHeader.vue'
-export { MainHeader, MainNav, VendorHeader }
+export { MainHeader, MainNav }

+ 1 - 0
components/mobile/applyPurchase/SeekList.vue

@@ -153,6 +153,7 @@ export default {
       } else {
         this.showLoginBox = true
       }
+      return false
     },
     goSayPriceInfo: function(id, agreed, index) {
       this.userType === 'buyer'

+ 39 - 6
layouts/shop.vue

@@ -1,8 +1,15 @@
 <template>
   <div id="main">
     <header-view v-if="!isInFrame"></header-view>
-    <store-header/>
-    <store-title/>
+    <template v-if="isShowShopHeader">
+      <store-header/>
+      <store-title/>
+    </template>
+    <template v-else>
+      <main-header></main-header>
+      <main-nav></main-nav>
+    </template>
+
     <img v-if="isConsignment" class="banner-img" src="/images/all/banner-consignment.png" alt="">
     <!--<img v-if="isConsignment" class="cuxiao-banner" src="/images/all/banner-cuxiao.png" alt="">-->
     <nuxt/>
@@ -14,7 +21,7 @@
 <script>
   import { Header, Footer, RightBar } from '~components/default'
   import { StoreHeader, StoreTitle } from '~components/store'
-
+  import { MainHeader, MainNav } from '~components/main'
   function getCount (str, char) {
     return str.split(char).length - 1
   }
@@ -25,7 +32,9 @@
       FooterView: Footer,
       RightBar,
       StoreHeader,
-      StoreTitle
+      StoreTitle,
+      MainHeader,
+      MainNav
     },
     head () {
       return {
@@ -58,11 +67,17 @@
         let path = this.$route.path
         if ((path.startsWith('/store/') && getCount(path, '/') === 2) || path.endsWith('/description')) {
           if (!this.isConsignment) {
+            if (!this.storeInfo.storeName) {
+              return '【优软商城】IC电子元器件现货采购交易平台商城'
+            }
             return this.storeInfo.storeName + this.getStoreType(this.storeInfo.type) + '专卖店-优软商城'
           } else {
             return 'IC电子元器件库存寄售呆滞尾料空闲库存商城自营现货寄售-优软商城'
           }
         } else if (path.startsWith('/store/') && getCount(path, '/') === 3) {
+          if (!this.commodity) {
+            return '【优软商城】IC电子元器件现货采购交易平台商城'
+          }
           return this.commodity.brandNameEn + this.commodity.code + '价格|现货库存|报价|产品参数-优软商城'
         } else {
           return '【优软商城】IC电子元器件现货采购交易平台商城'
@@ -72,11 +87,17 @@
         let path = this.$route.path
         if ((path.startsWith('/store/') && getCount(path, '/') === 2) || path.endsWith('/description')) {
           if (!this.isConsignment) {
+            if (!this.storeInfo.storeName) {
+              return '优软商城为您提供IC电子元器件库存寄售呆滞尾料空闲库存现货寄售服务,商城自营现货寄售让您更放心更省心。'
+            }
             return this.storeInfo.storeName + '官方' + this.getStoreType(this.storeInfo.type) + '专卖店,提供最新IC电子元器件现货在线销售。'
           } else {
             return '优软商城为您提供IC电子元器件库存寄售呆滞尾料空闲库存现货寄售服务,商城自营现货寄售让您更放心更省心。'
           }
         } else if (path.startsWith('/store/') && getCount(path, '/') === 3) {
+          if (!this.commodity) {
+            return '优软商城(usoftmall.com)是中国领先的IC电子元器件现货采购交易网上商城,提供上千万种电子元器件现货采购交易,采购电子元器件就上优软商城!'
+          }
           return this.commodity.enterpriseName + '提供' + this.commodity.brandNameEn + this.commodity.code + '价格和' + this.commodity.code + '现货库存,并且内容还包含' + this.commodity.code + '产品参数、' + this.commodity.code + '规格书数据手册等。'
         } else {
           return '优软商城(usoftmall.com)是中国领先的IC电子元器件现货采购交易网上商城,提供上千万种电子元器件现货采购交易,采购电子元器件就上优软商城!'
@@ -86,11 +107,17 @@
         let path = this.$route.path
         if ((path.startsWith('/store/') && getCount(path, '/') === 2) || path.endsWith('/description')) {
           if (!this.isConsignment) {
+            if (!this.storeInfo.storeName) {
+              return '优软商城,ic芯片库存寄售,电子元器件寄售'
+            }
             return '电子元器件' + this.getStoreType(this.storeInfo.type) + '专卖店'
           } else {
             return '优软商城,ic芯片库存寄售,电子元器件寄售'
           }
         } else if (path.startsWith('/store/') && getCount(path, '/') === 3) {
+          if (!this.commodity) {
+            return '优软商城'
+          }
           return this.commodity.code + '价格,' + this.commodity.code + '现货,' + this.commodity.code + '报价,' + this.commodity.code + '产品参数'
         } else {
           return '优软商城'
@@ -105,8 +132,14 @@
       isInDetail () {
         return this.$route.path.indexOf('/store/productDetail/') !== -1
       },
-      commodity () {
-        return this.$store.state.shop.storeInfo.commodity.data
+      isShowShopHeader () {
+        if (this.isInDetail && this.$store.state.shop.storeInfo.commodity.data) {
+          return true
+        } else if (this.storeInfo.id) {
+          return true
+        } else {
+          return false
+        }
       }
     },
     methods: {

+ 1 - 1
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://192.168.253.60:9090/platform-b2c/' : 'http://192.168.253.121:9090/platform-b2c/')
+const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://192.168.253.60:9090/platform-b2c/' : 'http://10.1.51.125:8080/platform-b2c/')
 const commonUrl = process.env.COMMON_URL || (isProdMode ? 'https://api-inquiry.usoftmall.com/' : 'http://218.17.158.219:24000/')
 
 module.exports = {

+ 17 - 9
pages/mobile/share/purChase/_uuid.vue

@@ -3,7 +3,7 @@
     <div class="purchase-top">
       <div class="purchase-top-bg">
         <div class="clearfix">
-          <div class="title fl">{{purchaseDetail.inquiry.enName}}</div>
+          <div class="title fl">{{purchaseDetail.inquiry ? purchaseDetail.inquiry.enName : ''}}</div>
           <div class="time fr">{{purchaseDetail.endDate | date}}</div>
         </div>
         <div class="desc">{{purchaseDetail.cmpCode}}</div>
@@ -93,6 +93,7 @@ import { SayPrice, SayPriceInfo } from '~components/mobile/applyPurchase'
 import { LoginBox, RemindBox } from '~components/mobile/common'
 import SeekList from '~components/mobile/applyPurchase/SeekList.vue'
 import PublishSeek from '~components/mobile/applyPurchase/PublishSeek.vue'
+// var flg = true
 export default {
   layout: 'mobileStore',
   props: ['userType', 'seekType', 'purchaseManList'],
@@ -126,7 +127,12 @@ export default {
       remindText: '',
       timeoutCount: 0,
       agreed: 0,
-      showsendApplyBox: false
+      showsendApplyBox: false,
+      purchaseDetail: {
+        inquiry: {
+          enName: ''
+        }
+      }
     }
   },
   components: {
@@ -138,18 +144,20 @@ export default {
     PublishSeek
   },
   computed: {
-    purchaseDetail() {
-      console.log(
-        this.$store.state.applyPurchase.purchaseManList.purchaseManDetail.data
-      )
-      return this.$store.state.applyPurchase.purchaseManList.purchaseManDetail
-        .data
-    },
+    // purchaseDetail() {
+    //   // if (flg === true) {
+    //   //   flg = false
+
+    //   // }
+    // },
     purchaseManListData() {
       return this.$store.state.applyPurchase.purchaseManList.purchaseManList
         .data.content
     }
   },
+  created() {
+    this.purchaseDetail = this.$store.state.applyPurchase.purchaseManList.purchaseManDetail.data
+  },
   methods: {
     toMore() {
       if (

+ 17 - 2
pages/product/brand/_code.vue

@@ -1,16 +1,20 @@
 <template>
   <div class="details">
-    <div class="information">
+    <div class="information" v-if="list.id">
       <brand-detail/>
       <div class="comm-list">
         <categories-list/>
         <brand-component/>
       </div>
     </div>
+    <div v-else>
+      <error-page :title="'品牌'"></error-page>
+    </div>
   </div>
 </template>
 <script>
   import { BrandDetail, CategoriesList, BrandComponent } from '~components/product'
+  import { ErrorPage } from '~components/error'
   export default {
     layout: 'main',
     data () {
@@ -21,7 +25,18 @@
     components: {
       BrandDetail,
       CategoriesList,
-      BrandComponent
+      BrandComponent,
+      ErrorPage
+    },
+    computed: {
+      list () {
+        let list = this.$store.state.brandDetail.detail.data
+        if (list.application && list.application !== '') {
+          this.applications = list.application.split(',')
+        }
+        console.log(list)
+        return list
+      }
     },
     fetch ({ store, params }) {
       return Promise.all([

+ 1 - 1
pages/product/component/_uuid.vue

@@ -6,7 +6,7 @@
       <store-info/>
     </div>
     <div v-else>
-      <error-page :title="'店铺'"></error-page>
+      <error-page :title="'器件'"></error-page>
     </div>
   </div>
 </template>

+ 17 - 5
pages/product/kind/_id.vue

@@ -1,14 +1,19 @@
 <template>
   <div class="container">
-    <categroy-nav></categroy-nav>
-    <!--<category-property  @loadCmpGoodsByBrandEvent="listemBrandFilter" @loadCmpGoodsByTypeEvent="listemProTypeFilter"></category-property>-->
-    <component-goods :brandid="brandid" :propertyJSON="propertyJSON"></component-goods>
+    <div v-if="actives.length">
+      <categroy-nav></categroy-nav>
+      <!--<category-property  @loadCmpGoodsByBrandEvent="listemBrandFilter" @loadCmpGoodsByTypeEvent="listemProTypeFilter"></category-property>-->
+      <component-goods :brandid="brandid" :propertyJSON="propertyJSON"></component-goods>
+    </div>
+    <div v-else>
+      <error-page :title="'类目'"></error-page>
+    </div>
   </div>
 </template>
 
 <script>
   import { CategroyNav, CategoryProperty, ComponentGoods } from '~components/product'
-
+  import { ErrorPage } from '~components/error'
   export default {
     layout: 'main',
     data () {
@@ -27,7 +32,14 @@
     components: {
       CategroyNav,
       CategoryProperty,
-      ComponentGoods
+      ComponentGoods,
+      ErrorPage
+    },
+    computed: {
+      actives () {
+        console.log(this.$store.state.product.kind.kindsParentWithBother.data)
+        return this.$store.state.product.kind.kindsParentWithBother.data
+      }
     },
     methods: {
       loadPage (id) {

+ 15 - 4
pages/store/_uuid/index.vue

@@ -1,13 +1,18 @@
 <template>
   <div class="container">
-    <recommend-product/>
-    <commodity-list :kinds="kinds"/>
+    <div v-if="storeInfoStore.id">
+      <recommend-product/>
+      <commodity-list :kinds="kinds"/>
+    </div>
+    <div v-else>
+      <error-page :title="'店铺'"></error-page>
+    </div>
   </div>
 </template>
 <script>
 import axios from '~plugins/axios'
 import { CommodityList, RecommendProduct } from '~components/store'
-
+import { ErrorPage } from '~components/error'
 export default {
 //  validate ({ params }) {
 //    return false
@@ -40,7 +45,13 @@ export default {
   },
   components: {
     RecommendProduct,
-    CommodityList
+    CommodityList,
+    ErrorPage
+  },
+  computed: {
+    storeInfoStore() {
+      return this.$store.state.shop.storeInfo.store.data
+    }
   }
 }
 </script>

+ 23 - 11
pages/store/productDetail/_batchCode.vue

@@ -1,30 +1,42 @@
 <template>
   <div class="container commodity">
-    <commodity-info />
-    <component-info />
+    <div v-if="commodity">
+      <commodity-info />
+      <component-info />
+    </div>
+    <div v-else>
+      <error-page :title="'产品'"></error-page>
+    </div>
   </div>
 </template>
 <script>
 import { ComponentInfo, CommodityInfo } from '~components/store'
-
+import { ErrorPage } from '~components/error'
 export default {
   layout: 'shop',
-  fetch ({ store, route }) {
+  fetch({ store, route }) {
     return Promise.all([
-//      store.dispatch('shop/findStoreInfoFromUuid', route.params),
+      //      store.dispatch('shop/findStoreInfoFromUuid', route.params),
       store.dispatch('shop/findCommodityOnBatchInfo', route.params)
     ])
   },
   components: {
     ComponentInfo,
-    CommodityInfo
+    CommodityInfo,
+    ErrorPage
+  },
+  computed: {
+    commodity() {
+      // console.log(this.$store.state.shop.storeInfo.commodity.data)
+      return this.$store.state.shop.storeInfo.commodity.data
+    }
   }
 }
 </script>
 <style>
-  .container.commodity {
-		width: 1190px;
-		padding-left: 0px;
-		padding-right: 0px;
-	}
+.container.commodity {
+  width: 1190px;
+  padding-left: 0px;
+  padding-right: 0px;
+}
 </style>