Ver código fonte

tdk参数还原

yangc 8 anos atrás
pai
commit
fd0b263c2d
3 arquivos alterados com 191 adições e 191 exclusões
  1. 15 15
      layouts/default.vue
  2. 100 100
      layouts/main.vue
  3. 76 76
      layouts/shop.vue

+ 15 - 15
layouts/default.vue

@@ -15,21 +15,21 @@
       HeaderView: Header,
       HeaderView: Header,
       FooterView: Footer,
       FooterView: Footer,
       RightBar
       RightBar
-    },
-    head () {
-      return {
-        title: this.title
-      }
-    },
-    computed: {
-      title () {
-        let path = this.$route.path
-        if (path.startsWith('/help')) {
-          return '帮助中心-优软商城'
-        } else {
-          return '【优软商城】IC电子元器件现货采购交易平台商城'
-        }
-      }
     }
     }
+//    head () {
+//      return {
+//        title: this.title
+//      }
+//    },
+//    computed: {
+//      title () {
+//        let path = this.$route.path
+//        if (path.startsWith('/help')) {
+//          return '帮助中心-优软商城'
+//        } else {
+//          return '【优软商城】IC电子元器件现货采购交易平台商城'
+//        }
+//      }
+//    }
   }
   }
 </script>
 </script>

+ 100 - 100
layouts/main.vue

@@ -19,106 +19,106 @@
       RightBar,
       RightBar,
       MainHeader,
       MainHeader,
       MainNav
       MainNav
-    },
-    head () {
-      return {
-        title: this.title,
-        meta: [
-          {hid: 'description', name: 'description', content: this.description},
-          {hid: 'keywords', name: 'keywords', content: this.keywords}
-        ]
-      }
-    },
-    computed: {
-      title () {
-        let path = this.$route.path
-        console.log(path)
-        if (path === '/product/kind/home') {
-          return '电子元器件器件选型参数型号查询器件类别分类大全-优软商城'
-        } else if (path.startsWith('/product/kind/')) {
-          return this.kinds[this.kinds.length - 1].nameCn + '产品品牌型号大全-优软商城'
-        } else if (path.startsWith('/product/component/')) {
-          return this.componentDetail.brand.nameCn + this.componentDetail.code + '参数|供应商|数据手册中文资料|规格书-优软商城'
-        } else if (path.startsWith('/product/brand/brandList/')) {
-          return 'IC电子元器件品牌中心品牌大全-优软商城'
-        } else if (path.startsWith('/product/brand/')) {
-          return this.brandDetail.nameEn + '(' + this.brandDetail.nameCn + ')产品分类及产品型号大全-优软商城'
-        } else if (path === '/provider/factories') {
-          return 'IC电子元器件厂家原厂直销原厂专卖店大全-优软商城'
-        } else if (path === '/provider/home') {
-          return 'IC电子元器件代理商经销商专营店大全-优软商城'
-        } else if (path === '/news') {
-          return 'IC电子元器件行业市场资讯新闻-优软商城'
-        } else if (path.startsWith('/news/')) {
-          return this.newsDetail.title + '-IC电子元器件行业市场资讯新闻-优软商城' || 'IC电子元器件行业市场资讯新闻-优软商城'
-        } else if (path === '/search') {
-          return this.$route.query.w + '-产品搜索-优软商城'
-        } else if (path === '/searchStore') {
-          return this.$route.query.w + '-店铺搜索-优软商城'
-        } else {
-          return '【优软商城】IC电子元器件现货采购交易平台商城'
-        }
-      },
-      description () {
-        let path = this.$route.path
-        if (path === '/product/kind/home') {
-          return '优软商城电子元器件器件型号查询器件类别分类大全,优软商城提供元器件智能选型服务,能让您完美的找到热门型号的替代型号产品,一键搜索功能让您快速找到您想要的型号。'
-        } else if (path.startsWith('/product/kind/')) {
-          return '优软商城' + this.kinds[this.kinds.length - 1].nameCn + '产品品牌型号大全,能让您快速的找到' + this.kinds[this.kinds.length - 1].nameCn + '产品品牌型号。'
-        } else if (path.startsWith('/product/component/')) {
-          return '优软商城提供' + this.componentDetail.brand.nameCn + this.componentDetail.code + '数据手册中文资料规格书下载,' + this.componentDetail.code + '供应商及参数报价。'
-        } else if (path.startsWith('/product/brand/brandList/')) {
-          return 'IC电子元器件品牌中心品牌大全,优软商城品牌中心汇聚国内国际电子元器件品牌,全力打造国家级元器件电商品台。'
-        } else if (path.startsWith('/product/brand/')) {
-          return this.brandDetail.brief
-        } else if (path === '/provider/factories') {
-          return 'IC电子元器件厂家原厂直销原厂专卖店大全,优软商城原厂专区提供IC电子元器件厂家原厂直销原厂专卖店大全。'
-        } else if (path === '/provider/home') {
-          return 'IC电子元器件代理商经销商专营店大全,优软商城代理经销专区提供IC电子元器件代理商经销商专卖店大全。'
-        } else if (path === '/news') {
-          return '优软商城电子元器件采购网提供精准的电子快讯,电子资讯,电子元器件资讯。'
-        } else if (path.startsWith('/news/')) {
-          return this.newsDetail.summary
-        } else {
-          return '优软商城(usoftmall.com)是中国领先的IC电子元器件现货采购交易网上商城,提供上千万种电子元器件现货采购交易,采购电子元器件就上优软商城!'
-        }
-      },
-      keywords () {
-        let path = this.$route.path
-        if (path === '/product/kind/home') {
-          return '电子元器件分类,电子元器件参数,电子元器件型号,电子元器件类别'
-        } else if (path.startsWith('/product/kind/')) {
-          return this.kinds[this.kinds.length - 1].nameCn
-        } else if (path.startsWith('/product/component/')) {
-          return this.componentDetail.code + '供应商,' + this.componentDetail.code + '数据手册,' + this.componentDetail.code + '规格书'
-        } else if (path.startsWith('/product/brand/brandList/')) {
-          return 'ic,元器件,品牌'
-        } else if (path.startsWith('/product/brand/')) {
-          return this.brandDetail.nameEn + '(' + this.brandDetail.nameCn
-        } else if (path === '/provider/factories') {
-          return '电子元器件原厂,电子元器件厂家'
-        } else if (path === '/provider/home') {
-          return 'ic代理商,ic经销商,电子元器件代理商 , 电子元器件经销商'
-        } else if (path === '/news') {
-          return '元器件新闻,电子资讯,电子元器件资讯'
-        } else if (path.startsWith('/news/')) {
-          return ''
-        } else {
-          return '优软商城'
-        }
-      },
-      kinds () {
-        return this.$store.state.product.kind.kindsParentWithBother.data
-      },
-      componentDetail () {
-        return this.$store.state.componentDetail.detail.data
-      },
-      brandDetail () {
-        return this.$store.state.brandDetail.detail.data
-      },
-      newsDetail () {
-        return this.$store.state.newsData.detailNews.detailNews.data
-      }
     }
     }
+//    head () {
+//      return {
+//        title: this.title,
+//        meta: [
+//          {hid: 'description', name: 'description', content: this.description},
+//          {hid: 'keywords', name: 'keywords', content: this.keywords}
+//        ]
+//      }
+//    },
+//    computed: {
+//      title () {
+//        let path = this.$route.path
+//        console.log(path)
+//        if (path === '/product/kind/home') {
+//          return '电子元器件器件选型参数型号查询器件类别分类大全-优软商城'
+//        } else if (path.startsWith('/product/kind/')) {
+//          return this.kinds[this.kinds.length - 1].nameCn + '产品品牌型号大全-优软商城'
+//        } else if (path.startsWith('/product/component/')) {
+//          return this.componentDetail.brand.nameCn + this.componentDetail.code + '参数|供应商|数据手册中文资料|规格书-优软商城'
+//        } else if (path.startsWith('/product/brand/brandList/')) {
+//          return 'IC电子元器件品牌中心品牌大全-优软商城'
+//        } else if (path.startsWith('/product/brand/')) {
+//          return this.brandDetail.nameEn + '(' + this.brandDetail.nameCn + ')产品分类及产品型号大全-优软商城'
+//        } else if (path === '/provider/factories') {
+//          return 'IC电子元器件厂家原厂直销原厂专卖店大全-优软商城'
+//        } else if (path === '/provider/home') {
+//          return 'IC电子元器件代理商经销商专营店大全-优软商城'
+//        } else if (path === '/news') {
+//          return 'IC电子元器件行业市场资讯新闻-优软商城'
+//        } else if (path.startsWith('/news/')) {
+//          return this.newsDetail.title + '-IC电子元器件行业市场资讯新闻-优软商城' || 'IC电子元器件行业市场资讯新闻-优软商城'
+//        } else if (path === '/search') {
+//          return this.$route.query.w + '-产品搜索-优软商城'
+//        } else if (path === '/searchStore') {
+//          return this.$route.query.w + '-店铺搜索-优软商城'
+//        } else {
+//          return '【优软商城】IC电子元器件现货采购交易平台商城'
+//        }
+//      },
+//      description () {
+//        let path = this.$route.path
+//        if (path === '/product/kind/home') {
+//          return '优软商城电子元器件器件型号查询器件类别分类大全,优软商城提供元器件智能选型服务,能让您完美的找到热门型号的替代型号产品,一键搜索功能让您快速找到您想要的型号。'
+//        } else if (path.startsWith('/product/kind/')) {
+//          return '优软商城' + this.kinds[this.kinds.length - 1].nameCn + '产品品牌型号大全,能让您快速的找到' + this.kinds[this.kinds.length - 1].nameCn + '产品品牌型号。'
+//        } else if (path.startsWith('/product/component/')) {
+//          return '优软商城提供' + this.componentDetail.brand.nameCn + this.componentDetail.code + '数据手册中文资料规格书下载,' + this.componentDetail.code + '供应商及参数报价。'
+//        } else if (path.startsWith('/product/brand/brandList/')) {
+//          return 'IC电子元器件品牌中心品牌大全,优软商城品牌中心汇聚国内国际电子元器件品牌,全力打造国家级元器件电商品台。'
+//        } else if (path.startsWith('/product/brand/')) {
+//          return this.brandDetail.brief
+//        } else if (path === '/provider/factories') {
+//          return 'IC电子元器件厂家原厂直销原厂专卖店大全,优软商城原厂专区提供IC电子元器件厂家原厂直销原厂专卖店大全。'
+//        } else if (path === '/provider/home') {
+//          return 'IC电子元器件代理商经销商专营店大全,优软商城代理经销专区提供IC电子元器件代理商经销商专卖店大全。'
+//        } else if (path === '/news') {
+//          return '优软商城电子元器件采购网提供精准的电子快讯,电子资讯,电子元器件资讯。'
+//        } else if (path.startsWith('/news/')) {
+//          return this.newsDetail.summary
+//        } else {
+//          return '优软商城(usoftmall.com)是中国领先的IC电子元器件现货采购交易网上商城,提供上千万种电子元器件现货采购交易,采购电子元器件就上优软商城!'
+//        }
+//      },
+//      keywords () {
+//        let path = this.$route.path
+//        if (path === '/product/kind/home') {
+//          return '电子元器件分类,电子元器件参数,电子元器件型号,电子元器件类别'
+//        } else if (path.startsWith('/product/kind/')) {
+//          return this.kinds[this.kinds.length - 1].nameCn
+//        } else if (path.startsWith('/product/component/')) {
+//          return this.componentDetail.code + '供应商,' + this.componentDetail.code + '数据手册,' + this.componentDetail.code + '规格书'
+//        } else if (path.startsWith('/product/brand/brandList/')) {
+//          return 'ic,元器件,品牌'
+//        } else if (path.startsWith('/product/brand/')) {
+//          return this.brandDetail.nameEn + '(' + this.brandDetail.nameCn
+//        } else if (path === '/provider/factories') {
+//          return '电子元器件原厂,电子元器件厂家'
+//        } else if (path === '/provider/home') {
+//          return 'ic代理商,ic经销商,电子元器件代理商 , 电子元器件经销商'
+//        } else if (path === '/news') {
+//          return '元器件新闻,电子资讯,电子元器件资讯'
+//        } else if (path.startsWith('/news/')) {
+//          return ''
+//        } else {
+//          return '优软商城'
+//        }
+//      },
+//      kinds () {
+//        return this.$store.state.product.kind.kindsParentWithBother.data
+//      },
+//      componentDetail () {
+//        return this.$store.state.componentDetail.detail.data
+//      },
+//      brandDetail () {
+//        return this.$store.state.brandDetail.detail.data
+//      },
+//      newsDetail () {
+//        return this.$store.state.newsData.detailNews.detailNews.data
+//      }
+//    }
   }
   }
 </script>
 </script>

+ 76 - 76
layouts/shop.vue

@@ -12,9 +12,9 @@
   import { Header, Footer, RightBar } from '~components/default'
   import { Header, Footer, RightBar } from '~components/default'
   import { StoreHeader, StoreTitle } from '~components/store'
   import { StoreHeader, StoreTitle } from '~components/store'
 
 
-  function getCount (str, char) {
-    return str.split(char).length - 1
-  }
+//  function getCount (str, char) {
+//    return str.split(char).length - 1
+//  }
   export default {
   export default {
     name: 'shop',
     name: 'shop',
     components: {
     components: {
@@ -23,79 +23,79 @@
       RightBar,
       RightBar,
       StoreHeader,
       StoreHeader,
       StoreTitle
       StoreTitle
-    },
-    head () {
-      return {
-        title: this.title,
-        meta: [
-          {hid: 'description', name: 'description', content: this.description},
-          {hid: 'keywords', name: 'keywords', content: this.keywords}
-        ]
-      }
-    },
-    computed: {
-      title () {
-        let path = this.$route.path
-        if (path.startsWith('/store/') && getCount(path, '/') === 2) {
-          if (path.indexOf('33069557578d44e69bd91ad12d28a8d4') === -1) {
-            return this.storeInfo.storeName + this.getStoreType(this.storeInfo.type) + '专卖店-优软商城'
-          } else {
-            return 'IC电子元器件库存寄售呆滞尾料空闲库存商城自营现货寄售-优软商城'
-          }
-        } else if (path.startsWith('/store/') && getCount(path, '/') === 3) {
-          return this.commodity.brandNameEn + this.commodity.code + '价格|现货库存|报价|产品参数-优软商城'
-        } else {
-          return '【优软商城】IC电子元器件现货采购交易平台商城'
-        }
-      },
-      description () {
-        let path = this.$route.path
-        if (path.startsWith('/store/') && getCount(path, '/') === 2) {
-          if (path.indexOf('33069557578d44e69bd91ad12d28a8d4') === -1) {
-            return this.storeInfo.storeName + '官方' + this.getStoreType(this.storeInfo.type) + '专卖店,提供最新IC电子元器件现货在线销售。'
-          } else {
-            return '优软商城为您提供IC电子元器件库存寄售呆滞尾料空闲库存现货寄售服务,商城自营现货寄售让您更放心更省心。'
-          }
-        } else if (path.startsWith('/store/') && getCount(path, '/') === 3) {
-          return this.commodity.enterpriseName + '提供' + this.commodity.brandNameEn + this.commodity.code + '价格和' + this.commodity.code + '现货库存,并且内容还包含' + this.commodity.code + '产品参数、' + this.commodity.code + '规格书数据手册等。'
-        } else {
-          return '优软商城(usoftmall.com)是中国领先的IC电子元器件现货采购交易网上商城,提供上千万种电子元器件现货采购交易,采购电子元器件就上优软商城!'
-        }
-      },
-      keywords () {
-        let path = this.$route.path
-        if (path.startsWith('/store/') && getCount(path, '/') === 2) {
-          if (path.indexOf('33069557578d44e69bd91ad12d28a8d4') === -1) {
-            return '电子元器件' + this.getStoreType(this.storeInfo.type) + '专卖店'
-          } else {
-            return '优软商城,ic芯片库存寄售,电子元器件寄售'
-          }
-        } else if (path.startsWith('/store/') && getCount(path, '/') === 3) {
-          return this.commodity.code + '价格,' + this.commodity.code + '现货,' + this.commodity.code + '报价,' + this.commodity.code + '产品参数'
-        } else {
-          return '优软商城'
-        }
-      },
-      storeInfo () {
-        return this.$store.state.shop.storeInfo.store.data
-      },
-      commodity () {
-        return this.$store.state.shop.storeInfo.commodity.data
-      }
-    },
-    methods: {
-      getStoreType: function (type) {
-        if (type === 'ORIGINAL_FACTORY') {
-          return '原厂'
-        } else if (type === 'AGENCY') {
-          return '代理'
-        } else if (type === 'DISTRIBUTION') {
-          return '经销'
-        } else if (type === 'CONSIGNMENT') {
-          return '寄售'
-        }
-        return ''
-      }
     }
     }
+//    head () {
+//      return {
+//        title: this.title,
+//        meta: [
+//          {hid: 'description', name: 'description', content: this.description},
+//          {hid: 'keywords', name: 'keywords', content: this.keywords}
+//        ]
+//      }
+//    },
+//    computed: {
+//      title () {
+//        let path = this.$route.path
+//        if (path.startsWith('/store/') && getCount(path, '/') === 2) {
+//          if (path.indexOf('33069557578d44e69bd91ad12d28a8d4') === -1) {
+//            return this.storeInfo.storeName + this.getStoreType(this.storeInfo.type) + '专卖店-优软商城'
+//          } else {
+//            return 'IC电子元器件库存寄售呆滞尾料空闲库存商城自营现货寄售-优软商城'
+//          }
+//        } else if (path.startsWith('/store/') && getCount(path, '/') === 3) {
+//          return this.commodity.brandNameEn + this.commodity.code + '价格|现货库存|报价|产品参数-优软商城'
+//        } else {
+//          return '【优软商城】IC电子元器件现货采购交易平台商城'
+//        }
+//      },
+//      description () {
+//        let path = this.$route.path
+//        if (path.startsWith('/store/') && getCount(path, '/') === 2) {
+//          if (path.indexOf('33069557578d44e69bd91ad12d28a8d4') === -1) {
+//            return this.storeInfo.storeName + '官方' + this.getStoreType(this.storeInfo.type) + '专卖店,提供最新IC电子元器件现货在线销售。'
+//          } else {
+//            return '优软商城为您提供IC电子元器件库存寄售呆滞尾料空闲库存现货寄售服务,商城自营现货寄售让您更放心更省心。'
+//          }
+//        } else if (path.startsWith('/store/') && getCount(path, '/') === 3) {
+//          return this.commodity.enterpriseName + '提供' + this.commodity.brandNameEn + this.commodity.code + '价格和' + this.commodity.code + '现货库存,并且内容还包含' + this.commodity.code + '产品参数、' + this.commodity.code + '规格书数据手册等。'
+//        } else {
+//          return '优软商城(usoftmall.com)是中国领先的IC电子元器件现货采购交易网上商城,提供上千万种电子元器件现货采购交易,采购电子元器件就上优软商城!'
+//        }
+//      },
+//      keywords () {
+//        let path = this.$route.path
+//        if (path.startsWith('/store/') && getCount(path, '/') === 2) {
+//          if (path.indexOf('33069557578d44e69bd91ad12d28a8d4') === -1) {
+//            return '电子元器件' + this.getStoreType(this.storeInfo.type) + '专卖店'
+//          } else {
+//            return '优软商城,ic芯片库存寄售,电子元器件寄售'
+//          }
+//        } else if (path.startsWith('/store/') && getCount(path, '/') === 3) {
+//          return this.commodity.code + '价格,' + this.commodity.code + '现货,' + this.commodity.code + '报价,' + this.commodity.code + '产品参数'
+//        } else {
+//          return '优软商城'
+//        }
+//      },
+//      storeInfo () {
+//        return this.$store.state.shop.storeInfo.store.data
+//      },
+//      commodity () {
+//        return this.$store.state.shop.storeInfo.commodity.data
+//      }
+//    },
+//    methods: {
+//      getStoreType: function (type) {
+//        if (type === 'ORIGINAL_FACTORY') {
+//          return '原厂'
+//        } else if (type === 'AGENCY') {
+//          return '代理'
+//        } else if (type === 'DISTRIBUTION') {
+//          return '经销'
+//        } else if (type === 'CONSIGNMENT') {
+//          return '寄售'
+//        }
+//        return ''
+//      }
+//    }
   }
   }
 </script>
 </script>