Browse Source

验收修改

yangc 8 years ago
parent
commit
6147909252

+ 19 - 5
components/mobile/brand/ComponentDetail.vue

@@ -12,7 +12,7 @@
       <div class="base-detail-item attach" @click="goAttach(component.attach)">
         <span>规格书:<img src="/images/mobile/@2x/productDetail/pdf.png" alt=""><span>查看</span></span>
       </div>
-      <div class="base-detail-item" v-if="component.description">
+      <div class="base-detail-item product-description" v-if="component.description">
         <span class="description">产品描述:{{component.description}}</span>
       </div>
       <i class="iconfont icon-shoucang" :style="isCollect?'color:#ff7800':'color: #ddd'" @click="collectComponent"></i>
@@ -40,7 +40,13 @@
         </thead>
         <tbody>
           <tr v-for="store in storeList.content">
-            <td class="store-name"><div>{{store.storeName || '-'}}</div></td>
+            <td class="store-name">
+              <div>
+                <nuxt-link :to="'/mobile/shop/' + store.storeid">
+                  {{store.storeName || '-'}}
+                </nuxt-link>
+              </div>
+            </td>
             <td>
               <div v-if="!store.packaging && !store.breakUp && !store.produceDate">-</div>
               <div>{{store.packaging}}</div>
@@ -209,16 +215,19 @@
     padding-top: .26rem;
     .base-detail {
       margin: 0 .27rem .19rem .27rem;
-      padding: .18rem .36rem;
+      padding: .18rem .36rem 0 .36rem;
       border-radius: .1rem;
       background: url('/images/mobile/@2x/productDetail/component-desc-bg.png')no-repeat;
       background-size: cover;
-      height: 3.17rem;
+      max-height: 3.17rem;
       position: relative;
       .base-detail-item {
-        margin-bottom: .2rem;
+        margin-top: .2rem;
         position: relative;
         color: #fff;
+        &:nth-child(1) {
+          margin-top: 0;
+        }
         &:nth-last-child(1) {
           color: #999;
         }
@@ -228,6 +237,8 @@
             background-color: #fff;
             width: .36rem;
             height: .4rem;
+            position: relative;
+            bottom: .05rem;
           }
           >span >span {
             margin-left: .1rem;
@@ -237,6 +248,9 @@
         &:last-child {
           margin-bottom: 0;
         }
+        &.product-description {
+          height: 1.58rem;
+        }
         .description {
           line-height: .4rem;
           max-height: 1.2rem;

+ 8 - 2
components/mobile/search/MainSearch.vue

@@ -1,7 +1,7 @@
 <template>
-  <div class="main-search">
+  <div class="main-search" @touchstart="cancelFocus">
     <div class="main-search-header">
-      <input type="text" v-model="keyword" placeholder="请输入您要查找的型号或品牌" @keyup.13="onSearch()" autofocus>
+      <input type="text" id="search-box" v-model="keyword" placeholder="请输入您要查找的型号或品牌" @keyup.13="onSearch()">
       <span @click="onSearch()">搜索</span>
       <a @click="cancelSearch">取消</a>
     </div>
@@ -95,11 +95,17 @@
       },
       cancelSearch: function () {
         this.$emit('cancelSearchAction')
+      },
+      cancelFocus: function () {
+        document.getElementById('search-box').blur()
       }
     },
     created () {
       this.$store.dispatch('resetSearchKeywords')
     },
+    mounted () {
+      document.getElementById('search-box').focus()
+    },
     watch: {
       'keyword': {
         handler (val, oldVal) {

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

@@ -48,10 +48,12 @@
       <p v-text="getRemindText()"></p>
       <nuxt-link to="/">返回首页</nuxt-link>
     </div>
+    <remind-box :title="collectResult" :timeoutCount="timeoutCount"></remind-box>
   </div>
 </template>
 
 <script>
+  import RemindBox from '~components/mobile/common/RemindBox.vue'
   export default {
     layout: 'main',
     data () {
@@ -63,9 +65,14 @@
         type: '',
         listName: '全部收藏',
         isShop: true,
-        isDevice: true
+        isDevice: true,
+        collectResult: '取消成功',
+        timeoutCount: 0
       }
     },
+    components: {
+      RemindBox
+    },
     fetch ({ store }) {
       return Promise.all([
         store.dispatch('product/saveStores', { count: 100, page: 1, type: 'component' }),
@@ -103,12 +110,14 @@
           this.$http.post('/trade/storeFocus/delete/storeId', [item.storeid])
             .then(response => {
               this.$store.dispatch('shop/StoreFocusPage', { count: 100, page: 1 })
+              this.timeoutCount++
             })
         } else {
           // /trade/collection/
           this.$http.delete('/trade/collection/' + item.id)
             .then(response => {
               this.$store.dispatch('product/saveStores', { count: 100, page: 1, type: 'component' })
+              this.timeoutCount++
             })
         }
       },