Browse Source

处理手机端问题

yangc 8 years ago
parent
commit
93c99f33d2

+ 4 - 0
assets/scss/mobileCommon.scss

@@ -196,3 +196,7 @@ input {
 .loading {
   z-index: 100000 !important;
 }
+
+.mobile-content {
+  margin-top: .88rem !important;
+}

+ 11 - 12
components/mobile/Home.vue

@@ -35,12 +35,6 @@
           </div>
           <p>店铺列表</p>
         </nuxt-link>
-        <a @click="goCollect" class="home-main-content">
-          <div>
-            <img src="/images/mobile/@2x/home/storebrand@2x.png">
-          </div>
-          <p>我的收藏</p>
-        </a>
         <nuxt-link to="/mobile/brand/brandCenter/ABCD" class="home-main-content">
           <div>
             <!--<i class="icon-pinpai iconfont"></i>-->
@@ -51,6 +45,12 @@
           </h2>-->
           <p>品牌列表</p>
         </nuxt-link>
+        <a @click="goCollect" class="home-main-content">
+          <div>
+            <img src="/images/mobile/@2x/home/storebrand@2x.png">
+          </div>
+          <p>我的收藏</p>
+        </a>
         <a @click="showStoreInfo = true" class="home-main-content">
           <div>
             <img src="/images/mobile/@2x/home/phonebrand@2x.png">
@@ -170,10 +170,14 @@
   .home{
     font-size: .28rem;
     background: #f7fbff;
+    position: fixed;
+    top: 0;
+    bottom: .98rem;
+    width: 100%;
+    overflow-y: auto;
     .home-header{
       width:100%;
       height:6.12rem;
-      padding-bottom:1rem;
       >a{
         font-size:.28rem;
         color:#fff;
@@ -240,11 +244,6 @@
     }
     }
     .home-main{
-      position: fixed;
-      top: 6.12rem;
-      bottom: 0;
-      background: #f7fbff;
-      width:100%;
       text-align: center;
       padding-top: .46rem;
     }

+ 3 - 0
components/mobile/MobileHeader.vue

@@ -261,6 +261,9 @@
 </script>
 <style lang="scss" scoped>
   .mobile-header{
+    position: fixed;
+    top: 0;
+    z-index: 10;
     width:100%;
     height:.88rem;
     line-height: .88rem;

+ 3 - 3
components/mobile/brand/BrandCenter.vue

@@ -1,8 +1,8 @@
 <template>
-  <div class="mobile-brand-center">
+  <div class="mobile-brand-center mobile-content">
     <div class="mobile-brand-wrap">
       <div class="mobile-brand-header">
-        <img src="/images/mobile/@2x/brand/brandWall.png" alt="" v-show="!isScrolled">
+        <img src="/images/mobile/@2x/brand/brandWall.png" alt="">
         <div class="mobile-brand-index" :class="{'scrolled': isScrolled}">
           <p>索引:</p>
           <nuxt-link :to="'/mobile/brand/brandCenter/' + item"
@@ -141,7 +141,7 @@
           }
           &.scrolled {
             position: fixed;
-            top: 0;
+            top: .88rem;
             width: 100%;
             background: #fff;
             border-bottom: .04rem solid #ccc;

+ 1 - 1
components/mobile/brand/BrandDetail.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="brand-detail" @click="checkShowFilter()">
+  <div class="brand-detail mobile-content" @click="checkShowFilter()">
     <div class="brand-logo">
       <div class="brand-logo-box">
         <img :src="brandDetail.logoUrl || '/images/component/default.png'" :alt="brandDetail.nameEn"/>

+ 1 - 1
components/mobile/brand/ComponentDetail.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="component-detail">
+  <div class="component-detail mobile-content">
     <div class="base-detail">
       <div class="base-detail-item" v-if="component.kind.nameCn">
         <span>类&nbsp;&nbsp;&nbsp;&nbsp;目:</span>

+ 1 - 1
components/mobile/store/StoreDetail.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="store-detail">
+  <div class="store-detail mobile-content">
     <div class="store-logo">
       <div class="store-logo-box">
         <img :src="store.logoUrl || '/images/component/default.png'"/>

+ 1 - 1
pages/mobile/search/_keycode.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="search-list">
+  <div class="search-list mobile-content">
   <div class="search-item" v-if="productList.expose > 0 || productList.brands">
       <span :class="activeType=='store'?'active':''" @click="clickType('store')">所有器件</span>
       <span :class="activeType=='support'?'active':''" @click="clickType('support')">仅看有货</span>

+ 13 - 13
pages/mobile/shop/index.vue

@@ -1,10 +1,10 @@
 <template>
-  <div class="shop">
+  <div class="shop mobile-content">
     <div class="shop-top">
       <p><i class="iconfont icon-dianpu1"></i><span>{{list.totalElements || 0}}</span>家店铺</p>
       <span @click="onClick()">{{downName}} <i class="iconfont icon-arrow-down"></i></span>
       <ul class="supdown" v-if="down">
-        <li @click="onDown('ORIGINAL_FACTORY-DISTRIBUTION-AGENCY' )" v-show="downName !== '全部'">全部</li>
+        <li @click="onDown('ORIGINAL_FACTORY-DISTRIBUTION-AGENCY-CONSIGNMENT')" v-show="downName !== '全部'">全部</li>
         <li @click="onDown('ORIGINAL_FACTORY')" v-show="downName !== '原厂'">原厂</li>
         <li @click="onDown('AGENCY')" v-show="downName !== '代理'">代理</li>
         <li @click="onDown('DISTRIBUTION')" v-show="downName !== '经销'">经销</li>
@@ -52,7 +52,7 @@
       return {
         page: 1,
         count: 10,
-        types: 'ORIGINAL_FACTORY-DISTRIBUTION-AGENCY',
+        types: 'ORIGINAL_FACTORY-DISTRIBUTION-AGENCY-CONSIGNMENT',
         down: false,
         downName: '全部',
         isFocus: true,
@@ -201,18 +201,18 @@
       position:relative;
       background:#fff;
       .supdown{
-        position:absolute;
-        top:.8rem;
-        right:.2rem;
-        z-index:1;
-        background:#616264;
-        border-radius:.1rem;
+        position: absolute;
+        top: .8rem;
+        right: .1rem;
+        z-index: 1;
+        background: #616264;
+        border-radius: .1rem;
         li{
           font-size: .28rem;
-          color:#ffffff;
-          height: .32rem;
-          line-height: .32rem;
-          margin: .4rem .3rem;
+          color: #ffffff;
+          line-height: .8rem;
+          padding: 0 .4rem;
+          height: .8rem;
         }
       }
       p{

+ 1 - 1
pages/mobile/user/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="user-content">
+  <div class="user-content mobile-content">
     <div class="user-name">
       <img src="/images/component/default.png"/>
       <div class="user-info">