Browse Source

Merge remote-tracking branch 'origin/feature-201844-wangcz' into feature-201844-wangcz

shenjunjie 7 years ago
parent
commit
20a1bc65d4

+ 1 - 2
components/default/RightBar.vue

@@ -95,7 +95,6 @@
   </div>
 </template>
 <script>
-  function handler() {}
   function whichTransitionEvent() {
     let t,
       el = document.createElement('surface'),
@@ -589,7 +588,7 @@ i {
   height: 180px;
   padding-top: 10px;
   width: 210px;
-  top: -76px;
+  top: 0;
 }
 .right-bar ul li .contact-us p {
   line-height: 33px;

+ 4 - 10
components/main/Search.vue

@@ -65,11 +65,8 @@
     <div class="search-hot" v-if="SelectItem">
       <ul class="list-untyled">
         <li class="item item-first">热门搜索</li>
-        <li class="item" v-for="w in hotBrand" v-if="ifFloorsHotSearchInValid">
-          <nuxt-link :to="`/search?w=${w.nameEn}&type=brand`">{{ w.nameEn }}</nuxt-link>
-        </li>
-        <li class="item" v-for="w in hotDevice" v-if="ifFloorsHotSearchInValid">
-          <nuxt-link :to="`/search?w=${w.code}&type=component`">{{ w.code }}</nuxt-link>
+        <li class="item" v-for="w in hotDeviceBrand" v-if="ifFloorsHotSearchInValid">
+          <nuxt-link :to="{path: w.detailsLink}">{{ w.title }}</nuxt-link>
         </li>
         <li class="item" v-if="!ifFloorsHotSearchInValid && index > 0" v-for="(w, index) in hotSearchData.items">
           <a :href="w.hrefUrl" target="_blank">{{w.body}}</a>
@@ -107,11 +104,8 @@
       }
     },
     computed: {
-      hotDevice () {
-        return this.$store.state.hotSearchDevice.hot.data
-      },
-      hotBrand () {
-        return this.$store.state.hotSearchBrand.hot.data
+      hotDeviceBrand () {
+        return this.$store.state.hotSearch.hot.data
       },
       similarKeywords () {
         let list = []

+ 12 - 3
components/mobile/applyPurchase/SayPriceInfo.vue

@@ -78,6 +78,9 @@
                 <div class="content-line date">
                   交期(天):<span>{{item.leadtime}}</span>
                 </div>
+                <div class="content-line date">
+                  税率%:<span>{{item.taxrate || 0}}</span>
+                </div>
                 <div class="content-line">
                   电话:<span v-if="item.user">{{item.user.userTel}}</span>
                   <span v-else>-</span>
@@ -95,10 +98,10 @@
                 <div class="content-line date">
                   交期(天):<span>{{item.leadtime}}</span>
                 </div>
+                <div class="content-line date">
+                  税率%:<span>{{item.taxrate || 0}}</span>
+                </div>
               </template>
-              <div class="content-line date">
-                税率%:<span>{{item.taxrate | '-'}}</span>
-              </div>
               <div class="content-line date">
                 报价时间:<span>{{item.offerTime | date}}</span>
               </div>
@@ -210,6 +213,9 @@
                 <div class="content-line inline-block date">
                   交期(天):<span>{{purchaseDetail.leadtime}}</span>
                 </div>
+                <div class="content-line inline-block date">
+                  税率%:<span>{{purchaseDetail.taxrate || 0}}</span>
+                </div>
                 <div class="content-line inline-block">
                   电话:<span>{{purchaseDetail.user ? purchaseDetail.user.userTel : '-'}}</span>
                 </div>
@@ -224,6 +230,9 @@
                 <div class="content-line inline-block date">
                   交期(天):<span>{{purchaseDetail.leadtime}}</span>
                 </div>
+                <div class="content-line inline-block date">
+                  税率%:<span>{{purchaseDetail.taxrate || 0}}</span>
+                </div>
               </template>
               <div class="content-line inline-block date">
                 报价时间:<span>{{purchaseDetail.offerTime | date}}</span>

+ 4 - 0
components/mobile/applyPurchase/SeekList.vue

@@ -80,6 +80,10 @@
                 交期(天):
                 <span class="date">{{item.quotations.leadtime || '-'}}</span>
               </div>
+              <div class="content">
+                税率%:
+                <span class="date">{{item.quotations.taxrate || 0}}</span>
+              </div>
               <table class="com-price-list" v-if="item.quotations.replies && item.quotations.replies.length">
                 <thead>
                 <tr>

+ 1 - 0
components/mobile/center/Seek.vue

@@ -73,6 +73,7 @@
                 replies: val.replies,
                 vendName: val.vendName,
                 leadtime: val.leadtime,
+                taxrate: val.taxrate,
                 user: val.user
               }
             })

+ 0 - 0
store/hotSearchBrand.js → store/hotSearch.js


+ 0 - 18
store/hotSearchDevice.js

@@ -1,18 +0,0 @@
-export const state = () => ({
-  hot: {
-    fetching: false,
-    data: []
-  }
-})
-export const mutations = {
-  REQUEST_HOT (state) {
-    state.hot.fetching = true
-  },
-  GET_HOT_FAILURE (state) {
-    state.hot.fetching = false
-  },
-  GET_HOT_SUCCESS (state, result) {
-    state.hot.fetching = false
-    state.hot.data = result
-  }
-}

+ 12 - 23
store/index.js

@@ -60,8 +60,7 @@ export const actions = {
     return Promise.all([
       // 全局数据
       store.dispatch('loadUserInfo'),
-      store.dispatch('loadHotSearchDevice'),
-      store.dispatch('loadHotSearchBrand')
+      store.dispatch('loadHotSearch')
     ])
   },
   // 获取用户信息
@@ -136,6 +135,17 @@ export const actions = {
       })
   },
 
+  // 获取首页加载热门搜索列表
+  loadHotSearch({ commit }) {
+    commit('hotSearch/REQUEST_HOT')
+    return axios.get('/cmsApi?method=queryContentPage&module=index_hotModels&orderBy=order_number%20ASC')
+      .then(response => {
+        commit('hotSearch/GET_HOT_SUCCESS', response.data)
+      }, err => {
+        commit('hotSearch/GET_HOT_FAILURE', err)
+      })
+  },
+
   // 获取楼层配置和特价信息
   loadNewFloors({ commit }, params = {}) {
     commit('floor/REQUEST_NEWLIST')
@@ -422,27 +432,6 @@ export const actions = {
         commit('help/GET_DETAIL_FAILURE', err)
       })
   },
-
-  // 获取最多搜索量的 器件
-  loadHotSearchDevice({ commit }) {
-    commit('hotSearchDevice/REQUEST_HOT')
-    return axios.get('/api/product/component/mostSearchComponent')
-      .then(response => {
-        commit('hotSearchDevice/GET_HOT_SUCCESS', response.data)
-      }, err => {
-        commit('hotSearchDevice/GET_HOT_FAILURE', err)
-      })
-  },
-  // 获取最多搜索量的 品牌
-  loadHotSearchBrand({ commit }) {
-    commit('hotSearchBrand/REQUEST_HOT')
-    return axios.get('/api/product/brand/mostSearchBrands')
-      .then(response => {
-        commit('hotSearchBrand/GET_HOT_SUCCESS', response.data)
-      }, err => {
-        commit('hotSearchBrand/GET_HOT_FAILURE', err)
-      })
-  },
   // 获取用户开店信息
   loadStoreStatus({ commit }, params = {}) {
     commit('option/REQUEST_STORE_STATUS')