Browse Source

修改bug

lgr 6 years ago
parent
commit
97cc8289e2

+ 4 - 4
components/brandlist/brandlist.js

@@ -43,9 +43,9 @@ Component({
     this.setData(Object.assign({
       initialheight:initialheight
     },stylemap));
-    if(!this.data.brandrecommend.length){
-      this.loadBrandRecommend();
-    }
+    // if(!this.data.brandrecommend.length){
+    //   this.loadBrandRecommend();
+    // }
   },
   /**
    * 组件的方法列表
@@ -66,7 +66,7 @@ Component({
             initiallist[item.initial].push(item);
           }
         })
-        var inith = 392;
+        var inith = _self.data.brandrecommend.length?392:0;
         var scale = app.globalData.scale;
         for(var name in initiallist){
           var l = initiallist[name].length;

+ 1 - 1
components/brandlist/brandlist.wxml

@@ -31,7 +31,7 @@
     scroll-into-view ="{{scrolltoinit}}"
   >
     <view class="brandw_list">
-      <view class="brandw_t_line">热门品牌</view>
+      <view wx:if="{{brandrecommend.length}}" class="brandw_t_line">热门品牌</view>
       <view class="brandw_hotlist">
         <block wx:for="{{brandrecommend}}" wx:key="brand_id">
           <view 

+ 1 - 1
module/caritem/caritem.wxss

@@ -18,7 +18,7 @@
   background-position: center;
 }
 .caritem_info{
-  padding:15rpx 0rpx 15rpx 20rpx;
+  padding:15rpx 38rpx 15rpx 20rpx;
   align-items:center;
   display: flex;
   flex-direction:column;

+ 2 - 2
module/caritem/collectcaritem.wxml

@@ -14,7 +14,7 @@
         class="caritem_t"
       >{{car.title?car.title:'--'}}</navigator>
       <view class="caritem_time">
-        {{car.licensetime}}上牌 | {{car.mileage}}万公里
+        {{car.licensetime}}上牌 | {{car.mileage}}万公里
         <navigator 
           open-type="navigateTo"
           catchtap=""
@@ -25,7 +25,7 @@
         </navigator>
       </view>
       <view class="caritem_p">
-        {{car.saleprice}}万
+        {{car.sale_price}}万
         <image class="caritem_p_img" src="../../img/placard.png"/>
       </view>
       <view class="caritem_guide_p">

+ 3 - 0
pages/buy/buy.js

@@ -131,6 +131,9 @@ Page({
   getList:function(searchdata){
     var _self = this;
     var para = this.transformSearchData(searchdata);
+    if (searchdata.keys){
+      searchdata.keylist = searchdata.keys.split(/\W+/);
+    }
     para.offset = 0;
     para.limit = this.data.limit;
     if(!this.data.lock){

+ 1 - 1
pages/buy/buy.wxml

@@ -9,7 +9,7 @@
 />
 <template
   is="search"
-  data="{{topsearchheight:topsearchheight,searchshow:searchshow,searchfocus:searchfocus,windowh:windowh,brandrecommend:brandrecommend,keys:searchdata.keys,headerheight:headerheight}}"
+  data="{{topsearchheight:topsearchheight,searchshow:searchshow,searchfocus:searchfocus,windowh:windowh,brandrecommend:brandrecommend,keys:searchdata.keys,keylist:searchdata.keylist,headerheight:headerheight}}"
 />
 <page-scroll 
   className="content"

+ 5 - 0
pages/cardetail/cardetail.js

@@ -313,7 +313,12 @@ Page(Object.assign({
   },
   toScroll:function(e){
     var index = e.target.dataset.index;
+    var collocatetype = this.data.collocatetype.map(function (item) {
+      item.opened = false;
+      return item;
+    })
     this.setData({
+      collocatetype: collocatetype,
       scrollto:index=="0"?0:this.data.scrollitem[index]+1,
       desopen:false
     })

+ 0 - 1
pages/cardetail/cardetail.wxss

@@ -186,7 +186,6 @@
 	position: relative;
 }
 .cardetail_space_col{
-	height:730rpx;
 	overflow: hidden;
 }
 /*.cardetail_space_pic{

+ 2 - 1
pages/index/index.wxml

@@ -113,7 +113,8 @@
         >
           <block wx:for="{{recommended}}" wx:key="id">
             <swiper-item>
-              <template is="cardetail" data="{{car:item}}"/>
+              <template is="caritem" data="{{car:item}}"/>
+              <!-- <template is="cardetail" data="{{car:item}}"/> -->
             </swiper-item>
           </block>      
         </swiper>