Browse Source

增加商家简介页面+跳转功能

wangcz 8 years ago
parent
commit
fb14a5b5e5

+ 7 - 31
components/mobile/Home.vue

@@ -79,7 +79,7 @@
         <div class="search-list-bottom">
         <div class="search-list-bottom">
           <h5><i class="iconfont icon-remensousuo"></i>热搜器件</h5>
           <h5><i class="iconfont icon-remensousuo"></i>热搜器件</h5>
           <span v-for="item in hotwords">
           <span v-for="item in hotwords">
-          <nuxt-link to="item.url" >{{item.name}}</nuxt-link>
+          <nuxt-link :to="''+item.url" >{{item.name}}</nuxt-link>
         </span>
         </span>
         </div>
         </div>
       </div>
       </div>
@@ -102,10 +102,10 @@
         type: Array,
         type: Array,
         default () {
         default () {
           return [
           return [
-            {name: 'SCT2080KEC', url: '/product/component/1100400300009990'},
-            {name: '电池组', url: '/product/kind/346'},
-            {name: 'Vishay', url: '/product/brand/30327265e42a871be050007f01003d96'},
-            {name: 'Panasonic', url: '/product/brand/30327265e47d871be050007f01003d96'}
+            {name: 'SCT2080KEC', url: '/mobile/brand/componentDetail/1100400300009990'},
+            {name: '电池组', url: '/mobile/brand/componentDetail/346'},
+            {name: 'Vishay', url: '/mobile/brand/componentDetail/30327265e42a871be050007f01003d96'},
+            {name: 'Panasonic', url: '/mobile/brand/componentDetail/30327265e47d871be050007f01003d96'}
           ]
           ]
         }
         }
       }
       }
@@ -215,34 +215,10 @@
       width:1.14rem;
       width:1.14rem;
       height:1.14rem;
       height:1.14rem;
       margin:0 auto;
       margin:0 auto;
-      position:relative;
-    }
-    .home-main .home-main-content div:first-child{
-      background:rgb(255,48,100);
-    }
-    .home-main .home-main-content:nth-child(2) div{
-      background:rgb(250,103,67);
-    }
-    .home-main .home-main-content:nth-child(3) div {
-      background: rgb(252, 184, 54);
-    }
-    .home-main .home-main-content:nth-child(4) div{
-      background:rgb(99,147,255);
-    }
-    .home-main .home-main-content:nth-child(5) div{
-      background:rgb(67,201,173);
-    }
-    .home-main .home-main-content:last-child div{
-      background:rgb(135,201,79);
     }
     }
     .home-main .home-main-content div>img{
     .home-main .home-main-content div>img{
-      width: .8rem;
-      height:.8rem;
-      position:absolute;
-      left:50%;
-      top:50%;
-      margin-left:-36%;
-      margin-top:-36%;
+      width: 100%;
+      height:100%;
     }
     }
 
 
     .home-main .home-main-content p{
     .home-main .home-main-content p{

+ 1 - 1
components/mobile/MobileHeader.vue

@@ -59,7 +59,7 @@
   @import '~assets/scss/mobileCommon';
   @import '~assets/scss/mobileCommon';
   .mobile-header{
   .mobile-header{
     width:100%;
     width:100%;
-    position:fixed;
+    /*position:fixed;*/
     top:0;
     top:0;
     z-index:10000;
     z-index:10000;
     height:.88rem;
     height:.88rem;

+ 30 - 2
pages/mobile/shop/index.vue

@@ -2,7 +2,12 @@
   <div class="shop">
   <div class="shop">
     <div class="shop-top">
     <div class="shop-top">
       <p><i class="iconfont icon-dianpu1"></i><span>{{list.numberOfElements}}</span>家店铺</p>
       <p><i class="iconfont icon-dianpu1"></i><span>{{list.numberOfElements}}</span>家店铺</p>
-      <span>全部 <i class="iconfont icon-jiantoushang"></i></span>
+      <span @click="onClick()">全部 <i class="iconfont icon-jiantoushang"></i></span>
+      <ul class="supdown" v-if="down">
+        <li>原厂</li>
+        <li>代理</li>
+        <li>经销</li>
+      </ul>
     </div>
     </div>
     <div class="shop-list" v-for="item in list.content">
     <div class="shop-list" v-for="item in list.content">
       <h3>{{item.storeName}}</h3>
       <h3>{{item.storeName}}</h3>
@@ -29,7 +34,8 @@
       return {
       return {
         page: '',
         page: '',
         count: '',
         count: '',
-        types: ''
+        types: '',
+        down: false
       }
       }
     },
     },
     fetch ({ store }) {
     fetch ({ store }) {
@@ -41,6 +47,11 @@
       list () {
       list () {
         return this.$store.state.provider.stores.storeList.data
         return this.$store.state.provider.stores.storeList.data
       }
       }
+    },
+    methods: {
+      onClick () {
+        this.down = !this.down
+      }
     }
     }
   }
   }
 </script>
 </script>
@@ -57,7 +68,24 @@
     width:100%;
     width:100%;
     height:1.14rem;
     height:1.14rem;
     padding:0 .3rem;
     padding:0 .3rem;
+    position:relative;
     background:#fff;
     background:#fff;
+    .supdown{
+      position:absolute;
+      top:.8rem;
+      right:.2rem;
+      z-index:100;
+      background:#616264;
+      border-radius:.1rem;
+      li{
+        font-size: .28rem;
+        color:#ffffff;
+        height: .32rem;
+        line-height: .32rem;
+        margin: .2rem;
+        margin-right:.4rem;
+      }
+    }
     p{
     p{
       font-size:.24rem;
       font-size:.24rem;
       color:#000;
       color:#000;

+ 30 - 2
pages/mobile/user/_uuid.vue

@@ -3,7 +3,11 @@
     <div class="user-name">
     <div class="user-name">
       <img src="/images/component/default.png"/>
       <img src="/images/component/default.png"/>
       <p>{{userName}}uu用户名</p>
       <p>{{userName}}uu用户名</p>
-      <span>全部收藏 <i class="iconfont icon-jiantoushang"></i></span>
+      <span @click="onclick()">全部收藏 <i class="iconfont icon-jiantoushang"></i></span>
+      <ul class="supdown" v-if="down">
+        <li>店铺关注</li>
+        <li>器件收藏</li>
+      </ul>
     </div>
     </div>
     <div class="shop-list">
     <div class="shop-list">
       <h3>{{1213}}</h3>
       <h3>{{1213}}</h3>
@@ -28,13 +32,19 @@
     layout: 'main',
     layout: 'main',
     data () {
     data () {
       return {
       return {
-        userName: ''
+        userName: '',
+        down: false
       }
       }
     },
     },
     fetch ({ store, storeName }) {
     fetch ({ store, storeName }) {
       return Promise.all([
       return Promise.all([
         store.dispatch('shop/storeInfo', { storeName: storeName })
         store.dispatch('shop/storeInfo', { storeName: storeName })
       ])
       ])
+    },
+    methods: {
+      onclick () {
+        this.down = !this.down
+      }
     }
     }
   }
   }
 </script>
 </script>
@@ -50,6 +60,24 @@
       display:flex;
       display:flex;
       align-items: center;
       align-items: center;
       width:100%;
       width:100%;
+      position:relative;
+      .supdown{
+        position:absolute;
+        top:1rem;
+        right:.3rem;
+        z-index:1000;
+        width:1.7rem;
+        background:#616264;
+        border-radius:.1rem;
+        padding-left:.18rem;
+        li{
+          font-size: .28rem;
+          color:#ffffff;
+          height: .32rem;
+          line-height: .32rem;
+          margin: .2rem 0;
+        }
+      }
       img{
       img{
         display: inline-block;
         display: inline-block;
         width:1.25rem;
         width:1.25rem;