liguorui преди 6 години
родител
ревизия
df3a75651a

+ 10 - 0
app.js

@@ -40,6 +40,16 @@ App({
         _self.globalData.Authorization = false;
       }
     });
+    wx.getSystemInfo({
+        success: function(res) {
+            var model = res.model
+            if (model.search('iPhone X') != -1){
+                _self.globalData.isIpx = true;
+            }else{
+                _self.globalData.isIpx = false;
+            }
+        }
+    })
   },
   globalData: {
     //serverpath:"https://api.jasonre.cn"

+ 3 - 3
app.wxss

@@ -1,7 +1,6 @@
 /**app.wxss**/
 page{
   font-family: PingFangSC-Regular,NotoSansHans-Regular;
-  /*font-family: "PingFangSC-Medium,NotoSansHans-Medium";*/
 }
 .navigator-hover{
   background-color: transparent;
@@ -44,7 +43,7 @@ page{
   height: 44rpx;
   line-height: 44rpx;
   text-align: center;
-  font-family: PingFangSC-Medium;
+  font-family: PingFangSC-Medium,NotoSansHans-Medium;
 }
 .page_head_source{
   overflow: hidden;
@@ -62,6 +61,7 @@ page{
 }
 .page_footer{
   height: 98rpx;
+  z-index:100;
   position: fixed;
   bottom: 0rpx;
   width: 100%;
@@ -81,7 +81,7 @@ page{
   display: block;
   width:38rpx;
   height: 38rpx;
-  margin:10px auto 0px;
+  margin:15rpx auto 0rpx;
 }
 .page_footer_w{
   height: 36rpx;

+ 3 - 1
common/stylemap.js

@@ -1,5 +1,7 @@
+var app = getApp();
+
 export default {
 	"headerheight":170,
 	"topsearchheight":78,
-	"footerheight":140
+	"footerheight":app.globalData.isIpx?140:98
 }

+ 1 - 1
components/brandlist/brandlist.wxss

@@ -92,7 +92,7 @@
 	color:#FFE600;
 	font-size: 24rpx;
 	text-indent: 48rpx;
-	font-family: PingFangSC-Semibold;
+	font-family: PingFangSC-Semibold,NotoSansHans-Blod;
 }
 .brandw_bitem{
 	left: 0px;

+ 1 - 1
module/caritem/caritem.wxss

@@ -65,7 +65,7 @@
   line-height: 33rpx;
   color: rgba(33, 36, 37, 1);
   font-size: 28rpx;
-  font-family: PingFangSC-Semibold;
+  font-family: PingFangSC-Semibold,NotoSansHans-Blod;
 }
 .caritem_p_img{
   width: 20rpx;

+ 35 - 4
module/search/search.wxml

@@ -13,12 +13,43 @@
       class="search_input_b"
     >
     </view>
-    <view class="search_input_ani">
-      <image
+    <view class="search_input_ani">      
+      <image        
+        style="display: {{(searchshow||keylist.length==0)?'block':'none'}}" 
         class="search_input_ic"
         src="../../img/search.png"
       />
+      <view 
+        bindtap='searchFocus'  
+        style="display: {{searchshow?'none':'inline-block'}}" 
+        class="search_input_holder">
+        <view
+          style="display: {{keylist.length>0&&!searchshow?'flex':'none'}}"
+          class="search_input_keys">
+          <block  
+            wx:for="{{keylist}}" 
+            wx:key="{{item}}">
+              <view 
+                class="key_list_i"
+                wx:if="{{index<4}}"
+                >
+                <view class="key_list_iw">{{item}}</view>
+                <view 
+                  data-index="{{index}}"
+                  catchtap="deletekey"
+                  class="key_list_d">X</view>
+              </view>
+          </block> 
+        </view>
+        <view 
+          style="display: {{keylist.length==0?'inline-block':'none'}}" 
+          class="search_input_holderw">
+          搜索
+        </view>
+      </view>
+
       <input 
+        style="display: {{searchshow?'block':'none'}}"         
         class="search_input"  
         placeholder-class="search_input_holder"
         placeholder="搜索"
@@ -35,7 +66,7 @@
         取消
       </view>
     </view>
-    <view 
+    <!-- <view 
       class="input_supernatant"
       style="display:{{searchshow?'none':'block'}}"
     >
@@ -44,7 +75,7 @@
         bindtap='searchFocus'
       >
       </view>
-    </view>
+    </view> -->
     <view 
       class="hot_search"
       style="min-height:{{windowh-206}}px"

+ 33 - 0
module/search/search.wxss

@@ -36,6 +36,39 @@
   width:22rpx;
   height:22rpx;
 }
+.search_input_holder{
+  margin-left:10rpx;
+  width:500rpx;
+  line-height: 52rpx;
+  font-size: 24rpx;
+  font-family: PingFangSC-Regular,NotoSansHans-DemiLight;  
+}
+.search_input_holderw{
+  color: rgba(183, 183, 183, 1); 
+}
+.search_input_keys{
+  margin-left:-230rpx;
+}
+.key_list_i{
+  display: flex;
+  border:1rpx solid #B7B7B7;
+  border-radius: 4rpx;
+  padding:0rpx 10rpx;
+  line-height: 38rpx;
+  height: 38rpx;
+  color:#B7B7B7;
+  margin-right: 10rpx;
+}
+.key_list_iw{  
+  max-width:100rpx;
+  overflow: hidden;
+  white-space: nowrap;
+  text-overflow:ellipsis;
+}
+.key_list_d{
+  font-size: 10rpx;
+  display: inline-block;
+}
 .search_input{
   margin-left:10rpx;
   width:500rpx;

+ 13 - 2
pages/buy/buy.js

@@ -67,6 +67,7 @@ Page({
     searchdata:{
       sortby:"",
       price:"",
+      keys:"",
       car_age:"",
       mileage:"",
       transmission:"",
@@ -74,7 +75,8 @@ Page({
       emission:"",
       colour:"",
       filterlock:true
-    }
+    },
+    keylist:[]
   },
 
   /**
@@ -142,11 +144,14 @@ Page({
       })
       get(pathmap.searchcar, para, function (json) {
         var list = retCartData(json.data&&json.data.list);
+        var key = _self.data.searchdata.keys.replace(/(^\s*)|(\s*$)/g, ""); 
+        var keylist = key?key.split(/\s+/):[];
         var obj = {
           lock:false,
           list:list,
           searchdata:searchdata,
-          offset:_self.data.limit          
+          offset:_self.data.limit,
+          keylist: keylist        
         }
         if(json.data.total<=_self.data.limit){
           obj.hasloadall=true;
@@ -288,5 +293,11 @@ Page({
       colour:"",
       filterlock:true
     });
+  },
+  deletekey:function(e){
+    var index = e.currentTarget.dataset.index;
+    this.data.keylist.splice(index,1)
+    var keys = this.data.keylist.join(" ");
+    this.submitsearchinfo({keys:keys});
   }
 })

+ 2 - 2
pages/buy/buy.wxml

@@ -9,9 +9,9 @@
 />
 <template
   is="search"
-  data="{{topsearchheight:topsearchheight,searchshow:searchshow,searchfocus:searchfocus,windowh:windowh,brandrecommend:brandrecommend,keys:searchdata.keys,keylist:searchdata.keylist,headerheight:headerheight}}"
+  data="{{topsearchheight:topsearchheight,searchshow:searchshow,searchfocus:searchfocus,windowh:windowh,brandrecommend:brandrecommend,keys:searchdata.keys,keylist:keylist,headerheight:headerheight}}"
 />
-<page-scroll 
+<page-scroll
   className="content"
   styleSheet="height:{{windowh-headerheight-topsearchheight}}rpx;"
   scroll-y="{{selectbar==''?'true':'false'}}"

+ 5 - 5
pages/buy/buy.wxss

@@ -34,7 +34,7 @@
 	color: rgba(56, 55, 53, 1);
 	font-size: 28rpx;
 	display: inline;
-	font-family: PingFangSC-Medium;
+	font-family: PingFangSC-Medium,NotoSansHans-Medium;
 }
 .filter_nav_switch{
 	transition: all 0.5s;
@@ -145,7 +145,7 @@
 	height: 44rpx;
 	line-height: 44rpx;
 	text-align: center;
-	font-family: PingFangSC-Medium;
+	font-family: PingFangSC-Medium,NotoSansHans-Medium;
 }
 .wheres_more_i{
 	margin-top:20rpx;
@@ -156,7 +156,7 @@
 	color: rgba(56, 55, 53, 1);
 	font-size: 28rpx;
 	text-indent: 38rpx;
-	font-family: PingFangSC-Medium;
+	font-family: PingFangSC-Medium,NotoSansHans-Medium;
 }
 .more_list{
 	background: white;
@@ -204,13 +204,13 @@
 .more_bt_reset{
 	border-top:1px solid #EBEBEB;
 	width: 240rpx;
-	font-family: PingFangSC-Medium;
+	font-family: PingFangSC-Medium,NotoSansHans-Medium;
 }
 .more_bt_check{
 	flex: 1;
 	border-top:1px solid #EBEBEB;
 	background: linear-gradient(270deg,#FFD800,#FFE600);
-	font-family: PingFangSC-Medium;
+	font-family: PingFangSC-Medium,NotoSansHans-Medium;
 }
 /*******like*******/
 .nocar_w{

+ 1 - 1
pages/cardetail/cardetail.wxss

@@ -408,7 +408,7 @@
 	line-height: 98rpx;
 	color: rgba(56, 55, 53, 1);
 	font-size: 30rpx;
-	font-family: PingFangSC-Medium;
+	font-family: PingFangSC-Medium,NotoSansHans-Medium;
 }
 .cardetail_op_line{
 	border-top:25rpx solid #FFE600;

+ 2 - 1
pages/hotdt/hotdt.js

@@ -74,7 +74,8 @@ Page({
     get(pathmap.goodcardetail, {
       id:this.data.id
     }, function (json) {
-      json.data.content = json.data.content.replace('<img', '<img style="max-width:100%;height:auto" ');
+      //json.data.content = json.data.content.replace('/<img/g', '<img style="max-width:100%;height:auto" ');
+      json.data.content = json.data.content.replace(/<img/g, '<img class="info_img"');
       _self.setData(json.data);
     })
   }

+ 4 - 0
pages/hotdt/hotdt.wxss

@@ -54,4 +54,8 @@
 }
 .hotdt_content img{
 	max-width: 100%;
+}
+.info_img{
+	max-width: 100%;
+	height: auto!important;
 }

+ 3 - 3
pages/index/index.wxml

@@ -20,7 +20,7 @@
 />  
 <template
   is="search"
-  data="{{topsearchheight:topsearchheight,searchshow:searchshow,searchfocus:searchfocus,windowh:windowh,brandrecommend:brandrecommend,headerheight:headerheight}}"
+  data="{{keylist:[],topsearchheight:topsearchheight,searchshow:searchshow,searchfocus:searchfocus,windowh:windowh,brandrecommend:brandrecommend,headerheight:headerheight}}"
 />
 <!-- <include src="../../module/search/search.wxml"/> -->
 <page-scroll 
@@ -113,8 +113,8 @@
         >
           <block wx:for="{{recommended}}" wx:key="id">
             <swiper-item>
-              <template is="caritem" data="{{car:item}}"/>
-              <!-- <template is="cardetail" data="{{car:item}}"/> -->
+              <!-- <template is="caritem" data="{{car:item}}"/> -->
+              <template is="cardetail" data="{{car:item}}"/>
             </swiper-item>
           </block>      
         </swiper>

+ 16 - 9
pages/index/index.wxss

@@ -107,7 +107,7 @@
   vertical-align: middle;
   display: flex;
   align-items: center;
-  font-family: PingFangSC-Light;
+  font-family: PingFangSC-Light,NotoSansHans-Light;
 }
 .goodcar_item_label{
   display: inline-block;
@@ -177,7 +177,7 @@
   font-size: 22rpx;
   text-align: center;
   background-color: rgba(255, 230, 0, 1);
-  font-family: PingFangSC-Medium;
+  font-family: PingFangSC-Medium,NotoSansHans-Medium;
 }
 /**********recommend**********/
 .recommend{
@@ -242,14 +242,14 @@
 }
 .car_img{
   display: block;
-  width:336rpx;
+  width:290rpx;
   height:100%;
   background-repeat: no-repeat;
   background-size: 100%;
   background-position: center;
 }
 .car_info{
-  padding:10rpx 0rpx 0rpx 40rpx;
+  padding:10rpx 38rpx 0rpx 20rpx;
   align-items:center;
   flex: 1;
   display: flex;
@@ -276,22 +276,29 @@
   line-height: 33rpx;
   color: rgba(33, 36, 37, 1);
   font-size: 28rpx;
-  font-family: PingFangSC-Semibold;
+  font-family: PingFangSC-Semibold,NotoSansHans-Blod;
 }
 .car_characteristic{
-  height: 50rpx;
+  /*height: 50rpx;*/
+
+}
+.car_characteristic::after{
+  content:"";
+  display: block;
+  height: 0rpx;
+  clear: both;
 }
 .car_characteristic_i{
-  display: inline-block;
+  float: left;
   height: 34rpx;
   line-height: 34rpx;
   border-radius: 6rpx;
   font-size: 18rpx;
-  padding:0rpx 5rpx;
+  padding:0rpx 10rpx;
   margin-right: 15rpx;
   background-color: rgba(255, 230, 0, 1);
   color: rgba(56, 55, 53, 1);
-  font-family: PingFangSC-Light;
+  font-family: PingFangSC-Light,NotoSansHans-Light;
 }
 .show_more{
   border-top: 1rpx solid #F2F2F5;