Browse Source

热卖推荐页面隐藏

yangc 8 years ago
parent
commit
af9e738fc7
4 changed files with 5 additions and 104 deletions
  1. 0 1
      components/home/Advert.vue
  2. 0 92
      components/home/Carousel.vue
  3. 0 1
      components/home/Search.vue
  4. 5 10
      nuxt.config.js

+ 0 - 1
components/home/Advert.vue

@@ -61,7 +61,6 @@
 </script>
 <style lang="scss" scoped>
   @import '~assets/scss/variables';
-
   .advert-slide {
     text-align: center;
     /*margin-bottom: $xlg-pad;*/

+ 0 - 92
components/home/Carousel.vue

@@ -1,92 +0,0 @@
-<template>
-  <div class="carousel" :style="{backgroundColor: activeColor}">
-    <div class="container">
-      <slot></slot>
-      <div class="carousel-container">
-        <div v-swiper:mySwiper="swiperOption">
-          <div class="swiper-wrapper">
-            <div class="swiper-slide" v-for="banner in banners.data">
-              <a :href="banner.hrefUrl" target="_blank">
-                <img :src="banner.pictureUrl"/>
-              </a>
-            </div>
-          </div>
-          <div class="swiper-pagination swiper-pagination-bullets"></div>
-          <div class="swiper-button-prev"><i class="iconfont icon-arrow-left"></i></div>
-          <div class="swiper-button-next"><i class="iconfont icon-arrow-right"></i></div>
-        </div>
-      </div>
-    </div>
-  </div>
-</template>
-<script>
-  export default {
-    name: 'carousel',
-    data () {
-      return {
-        activeSlide: 0,
-        swiperOption: {
-          autoplay: 6000,
-          pagination: '.swiper-pagination',
-          paginationClickable: true,
-          mousewheelControl: false,
-          effect: 'fade',
-          lazyLoading: true,
-          prevButton: '.swiper-button-prev',
-          nextButton: '.swiper-button-next',
-          onTransitionStart: (swiper) => {
-            // 不要通过vue刷新dom,会导致pagination无法刷新
-            // this.activeSlide = swiper.activeIndex
-            document.querySelector('.carousel').style.backgroundColor =
-              this.banners.data[swiper.activeIndex].metadata['background-color']
-          }
-        }
-    //    banners: {}
-      }
-    },
-//    mounted () {
-//      this.$http.get('/api/carousel/home%20page%20banner')
-//        .then(response => {
-//          this.banners = response
-//        })
-//    },
-    computed: {
-      banner () {
-        return this.$store.state.carousel.banners
-      },
-      activeColor () {
-        if (this.banners.data) {
-          return this.banners.data.length ? this.banners.data[this.activeSlide].metadata['background-color'] : null
-        }
-      }
-    }
-  }
-</script>
-<style lang="scss" scoped>
-  @import '~assets/scss/variables';
-
-  $carousel_width: 990px;
-  $carousel_height: 477px;
-
-  .carousel {
-    transition: background-color .3s;
-    position: relative;
-    margin-bottom: $lg-pad;
-
-    .carousel-container {
-      width: $carousel_width;
-      height: $carousel_height;
-      margin-left: 200px;
-      overflow: hidden;
-
-      .swiper-wrapper {
-        .swiper-slide {
-          img {
-            display: block;
-            height: $carousel_height;
-          }
-        }
-      }
-    }
-  }
-</style>

+ 0 - 1
components/home/Search.vue

@@ -131,7 +131,6 @@
 </script>
 <style lang="scss" scoped>
   @import '~assets/scss/variables';
-
   .search-box {
     width: 470px;
     height: 40px;

+ 5 - 10
nuxt.config.js

@@ -1,7 +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 webpack = require('webpack')
 
 module.exports = {
   router: {
@@ -20,11 +19,7 @@ module.exports = {
       { hid: 'description', name: 'description', content: '优软商城(usoftmall.com)是中国领先的IC电子元器件现货采购交易网上商城,提供上千万种电子元器件现货采购交易,采购电子元器件就上优软商城!' }
     ],
     link: [
-      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
-      { rel: 'stylesheet', type: 'text/css', href: 'https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css' },
-      { rel: 'stylesheet', type: 'text/css', href: 'https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css' },
-      { rel: 'stylesheet', type: 'text/css', href: 'https://cdn.bootcss.com/element-ui/1.3.7/theme-default/index.css' },
-      { rel: 'stylesheet', type: 'text/css', href: 'https://at.alicdn.com/t/font_0d1jjt5tukcblnmi.css' }
+      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
     ]
   },
   /*
@@ -79,10 +74,10 @@ module.exports = {
   css: [
     /* {
     src: 'font-awesome/css/font-awesome.css'
-  }, */{src: '~assets/scss/app.scss', lang: 'scss'},
-    {
+  }, */{src: '~assets/scss/app.scss', lang: 'scss'}
+    /* {
       src: 'swiper/dist/css/swiper.css'
-    }  /*, {
+    } */ /* , {
       src: 'element-ui/lib/theme-default/index.css'
     } */
   ],
@@ -111,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**']
+  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**']
 }