Browse Source

优化样式

liguorui 6 years ago
parent
commit
22fe323492
7 changed files with 36 additions and 19 deletions
  1. 3 1
      app.js
  2. 4 3
      common/stylemap.js
  3. 2 1
      pages/buy/buy.js
  4. 7 0
      pages/buy/buy.wxss
  5. 16 11
      pages/buy/more.wxml
  6. 2 1
      pages/cardetail/cardetail.js
  7. 2 2
      pages/cardetail/cardetail.wxml

+ 3 - 1
app.js

@@ -34,8 +34,10 @@ App({
     //   }
     // })
     wx.getSystemInfo({
-      success:function(res) {
+      success:function(res) {        
+        _self.globalData.pxscale = res.pixelRatio;
         _self.globalData.scale = 750/res.windowWidth;
+        _self.globalData.windowHeight = res.windowHeight;
         _self.globalData.windowh = res.windowHeight*_self.globalData.scale;
         _self.globalData.Authorization = false;
       }

+ 4 - 3
common/stylemap.js

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

+ 2 - 1
pages/buy/buy.js

@@ -76,7 +76,8 @@ Page({
       colour:"",
       filterlock:true
     },
-    keylist:[]
+    keylist:[],    
+    morebtheight:app.globalData.isIpx?120:98
   },
 
   /**

+ 7 - 0
pages/buy/buy.wxss

@@ -193,13 +193,20 @@
 	background: rgba(255, 230, 0, 0.1);
 	border:1px solid #FFE600;
 }
+.more_bts_space{
+	
+}
 .more_bts{
 	margin-top:48rpx;
 	line-height: 98rpx;
+	background-color: white;
+	width:100%;
 	color: rgba(56, 55, 53, 1);
 	font-size: 30rpx;
 	text-align: center;
 	display: flex;
+	position: absolute;
+	bottom: 0rpx;
 }
 .more_bt_reset{
 	border-top:1px solid #EBEBEB;

+ 16 - 11
pages/buy/more.wxml

@@ -143,15 +143,20 @@
         </view>
       </view>
     </view>
-    <view class="more_bts">
-      <view 
-        class="more_bt_reset"
-        bindtap="resetFilter"
-        >重置</view>
-      <view 
-        bindtap="moreSearch"
-        class="more_bt_check"
-      >查看车源</view>
-    </view>
-  </page-scroll>
+    <view 
+      style="height:{{morebtheight}}rpx"
+      class="more_bts_space"></view>
+  </page-scroll>  
+  <view       
+    style="height:{{morebtheight}}rpx"
+    class="more_bts">
+    <view 
+      class="more_bt_reset"
+      bindtap="resetFilter"
+      >重置</view>
+    <view 
+      bindtap="moreSearch"
+      class="more_bt_check"
+    >查看车源</view>
+  </view>
 </view>

+ 2 - 1
pages/cardetail/cardetail.js

@@ -59,7 +59,8 @@ Page(Object.assign({
     },
     scrollindex:0,
     desopen:false,
-    showcheck:false
+    showcheck:false,
+    footerbtheight:app.globalData.isIpx?120:98
   },
 
   /**

+ 2 - 2
pages/cardetail/cardetail.wxml

@@ -228,10 +228,10 @@
 	</view>
 	<view class="no_more">——没有更多——</view>
 	<view 
-		style="height: {{footerheight}}rpx"
+		style="height: {{footerbtheight}}rpx"
 		class="cardetail_op_list_space"></view>
 	<view 		
-		style="height: {{footerheight}}rpx"
+		style="height: {{footerbtheight}}rpx"
 		class="cardetail_op_list">
 		<view 
 			class="cardetail_op_collect"