Browse Source

bug修复

liguorui 6 years ago
parent
commit
0c17de4376

+ 3 - 2
app.wxss

@@ -30,7 +30,7 @@ page{
   width:30rpx;
   height: 30rpx;
   position: absolute;
-  top:70rpx;
+  top:100rpx;
   left:40rpx;
 }
 .page_head_back image{  
@@ -38,7 +38,7 @@ page{
   height: 30rpx;
 }
 .page_head_w{
-  padding-top: 60rpx;
+  padding-top: 105rpx;
   font-size: 36rpx;
   height: 44rpx;
   line-height: 44rpx;
@@ -66,6 +66,7 @@ page{
   display: flex;
   overflow: hidden;
   background-color: white;
+  border-top:1rpx solid #EBEBEB;
 }
 .page_footer_item{
   flex: 1;

+ 34 - 1
common/request.js

@@ -23,7 +23,40 @@ export const get=(url,data,callback,failback)=>{
     method: "GET",
     header: {
       "Content-Type": "json",
-      "Authorization":authorization
+      "Authorization":authorization,      
+      "Accept": "application/vnd.vpgame.v1+json"
+    },
+    data:data,
+    success: function (res){
+      if(res.statusCode!=200){
+        if(res.data.message){
+          wx.showToast({
+            title:res.data.message,
+            icon:"none"
+          })
+          return;
+        }
+      } 
+      callback && callback(res);
+    },
+    fail: function (error){
+      failback && failback(error);
+    },
+    complete: function () {
+      reducenum();
+    }
+  })
+} 
+export const postwithoutahth=(url,data,callback,failback)=>{
+  addnum();
+  var authorization = wx.getStorageSync("authorization");
+  wx.request({
+    url: app.globalData.serverpath+url,
+    method: "POST",
+    header: {
+      "Content-Type": "application/json",
+      "Authorization":authorization,
+      "Accept": "application/vnd.vpgame.v1+json"
     },
     data:data,
     success: function (res){

+ 1 - 1
common/stylemap.js

@@ -1,5 +1,5 @@
 export default {
-	"headerheight":128,
+	"headerheight":170,
 	"topsearchheight":78,
 	"footerheight":98
 }

+ 1 - 1
components/page-scroll/page-scroll.wxml

@@ -1,6 +1,7 @@
 <!--components/page-scroll/page-scroll.wxml-->
 <view 
 	class="page_scroll"
+	  	  class=""
   	style="{{styleSheet}}">
 	<view 
 		class="page_info"
@@ -11,7 +12,6 @@
 	</view>
 	<scroll-view 
   	  style="{{styleSheet}}"
-	  class="{{className}}"
 	  scroll-y="{{height==0}}"
 	  bindscroll="scroll"
 	  bindscrolltolower="scrollLower"

BIN
img/like_w.png


BIN
img/recommend_w.png


BIN
img/selectbrand.png


BIN
img/youmaylike.png


+ 3 - 0
module/brandlist/brandlist.js

@@ -0,0 +1,3 @@
+const brandlist = {
+	
+}

+ 110 - 0
module/brandlist/brandlist.wxml

@@ -0,0 +1,110 @@
+<!--筛选品牌模块-->
+<scroll-view
+  class="brandw_c"
+  style="{{selectbar=='brand'?'left:0rpx;':''}}"
+  scroll-into-view ="{{scrolltoinit}}"
+  bindscroll="brandScroll"
+  scroll-y=true
+>
+  <view      
+    style="height:{{headerheight}}rpx;"
+  ></view>
+  <view 
+    class="brandw_title"
+    style="height:{{headerheight}}rpx;"
+  >
+    <image 
+      class="brandw_back" 
+      src="../../img/back.png"
+      bindtap="filterBack"
+    />
+    <view class="brandw_title_w">品牌</view>
+  </view>
+  <view class="brandw_list">
+    <view class="brandw_t_line">热门品牌</view>
+    <view class="brandw_hotlist">
+      <block wx:for="{{brandrecommend}}" wx:key="brand_id">
+        <view 
+          class="brandw_hotlist_item"          
+          bindtap="getBrandDetail"
+          data-id="{{item.brand_id}}"
+          data-img="{{item.brand_img}}"
+          data-name="{{item.brand_name}}"
+        >
+          <view class="brandw_hotitem_img" style="background-image:url({{item.brand_img}})"></view>
+          <view class="brandw_hotitem_name">{{item.brand_name}}</view>
+        </view>
+      </block>
+    </view>
+
+    <view class="brandw_t_line">不限品牌</view>
+    <block wx:for="{{wheres.brandlist}}" wx:key="initial">
+      <view class="brandw_binitial" id="{{item.initial}}">
+        {{item.initial}}
+      </view>
+      <block wx:for="{{item.list}}" wx:for-item="branditem" wx:key="brand_id">
+        <view 
+          class="brandw_bitem"
+          bindtap="getBrandDetail"
+          data-id="{{branditem.brand_id}}"
+          data-img="{{branditem.img}}"
+          data-name="{{branditem.brand_name}}"
+        >
+          <view
+            class="brandw_bimg"
+            style="background-image:url({{branditem.img}})"
+          />
+          <view class="brandw_bname">{{branditem.brand_name}}</view>
+        </view>
+      </block>
+    </block>
+    <scroll-view
+      class="brand_serieslist"
+      scroll-y=true
+      style="height: {{windowh-headerheight}}rpx; {{serieslist?'right:0rpx;':''}}"
+    >
+      <view class="series_lelong">
+          <view
+            class="series_lelong_bimg"
+            style="background-image:url({{serieslist.belong.img}})"
+          />
+
+            <!-- serieslist.belong.img -->
+          <view class="series_lelong_name">{{serieslist.belong.name}}</view>
+        </view>  
+      <view class="car_series_t">选择车系</view>
+      <block
+        wx:for="{{serieslist.list}}"
+        wx:key="car_series_id"
+      >
+        <view 
+          class="brand_series_i"
+          bindtap="selectSeries"
+          data-series = "{{item}}"
+          >
+          <view
+            class="brand_series_bimg"
+            style="background-image:url({{serieslist.belong.img}})"
+          />
+          <view class="brand_series_name">{{item.car_series_name}}</view>
+        </view>          
+      </block>
+    </scroll-view>
+    <view 
+      class="brand_initail_c"
+      style="display: {{selectbar=='brand'?'block':'none'}}"
+    >
+    <!-- {{scrollinit==item.initial?'brand_initail_active':''}} -->
+      <view 
+        class="brand_initail_i"
+        wx:for="{{wheres.brandlist}}"
+        wx:key="initial"
+        style="height:{{initialheight}}rpx;background-position-y:(scrollinit*21)rpx "
+        bindtap="scrollInit"
+        data-init = "{{item.initial}}"
+      >
+        {{item.initial}}
+      </view>
+    </view>
+  </view>
+</scroll-view>

+ 188 - 0
module/brandlist/brandlist.wxss

@@ -0,0 +1,188 @@
+
+/****************品牌筛选条件***************/
+.brandw_c{
+	position: fixed;
+	top:0rpx;
+	left:100%;
+	width: 100%;
+	height: 100%;
+	background: white;
+	z-index:101;
+	transition: all 0.5s;
+}
+.brandw_title{
+	background-color:#fede18;
+	height:128rpx;
+	position: fixed;
+	z-index:100;
+	top:0rpx;
+	width: 100%;
+}
+.brandw_back{
+	width:30rpx;
+	height: 30rpx;
+	position: absolute;
+	top:70rpx;
+	left:40rpx;
+}
+.brandw_title_w{
+	padding-top: 60rpx;
+	font-size: 36rpx;
+	height: 44rpx;
+	line-height: 44rpx;
+	text-align: center;
+}
+.brandw_t_line{
+	height: 58rpx;
+	line-height: 58rpx;
+	background-color: rgba(242, 242, 245, 1);
+	color: rgba(56, 55, 53, 1);
+	font-size: 22rpx;
+	text-indent: 38rpx;
+}
+.brandw_hotlist{
+	padding: 0rpx 40rpx;
+	display: flex;
+	background: white;
+	flex-wrap: wrap;
+}
+.brandw_hotlist_item{
+	width:134rpx;
+	height: 159rpx;
+}
+.brandw_hotitem_img{
+	width: 70rpx;
+	height: 70rpx;
+	background-size: 70rpx;
+	background-repeat: no-repeat;
+	background-position: center;
+	margin:30rpx auto 0rpx;
+}
+.brandw_hotitem_name{
+	height: 33rpx;
+	line-height: 33rpx;
+	color: rgba(56, 55, 53, 1);
+	font-size: 22rpx;
+	text-align: center;
+}
+.brandw_binitial{
+	left: 0px;
+	top: 562px;
+	width: 750px;
+	height: 44rpx;
+	line-height: 44rpx;
+	border-bottom: 1rpx solid rgba(235, 235, 235, 1);
+	color:#FFE600;
+	font-size: 24rpx;
+	text-indent: 48rpx;
+}
+.brandw_bitem{
+	left: 0px;
+	margin-left:38rpx;
+	line-height: 70rpx;
+	height: 78rpx;
+	border-bottom: 1rpx solid rgba(235, 235, 235, 1);
+}
+.brandw_bimg{
+	height: 60rpx;
+	width:60rpx;
+	float:left;
+	margin:5px 30rpx 0rpx 0rpx;
+	background-repeat: no-repeat;
+	background-size: 60rpx;
+	background-position: center;
+}
+.brandw_bname{
+	display: inline;
+	margin-left:20rpx;
+	color: rgba(56, 55, 53, 1);
+	font-size: 26rpx;
+}
+
+.brand_serieslist{
+	width:440rpx;
+	background-color: white;
+	position: fixed;
+	bottom: 0rpx;
+	right:770rpx;
+	border-shadow:-1rpx 0rpx ;
+	box-shadow: -2rpx 0rpx 10rpx -1rpx rgba(0, 0, 0, 0.16);
+}
+.series_lelong{
+	height: 78rpx;
+	line-height: 78rpx;
+}
+.series_lelong_bimg{
+	height:60rpx;
+	width:60rpx;
+	float:left;
+	margin:10px 20rpx 0rpx 28rpx;
+	background-repeat:no-repeat;
+	background-size:60rpx;
+	background-position:center;
+}
+.series_lelong_name{
+	color: rgba(56, 55, 53, 1);
+	font-size: 26rpx;
+	display:inline;
+}
+.car_series_t{
+	text-indent: 28rpx;
+	height: 44rpx;
+	line-height: 44rpx;
+	background-color: rgba(247, 247, 247, 1);
+	color: rgba(56, 55, 53, 1);
+	font-size: 20rpx;
+}
+.brand_series_i{
+	height: 78rpx;
+	line-height: 78rpx;
+	margin-left:28rpx;
+	border-bottom: 1px solid rgba(235, 235, 235, 1);
+}
+.brand_series_bimg{
+	height:60rpx;
+	width:60rpx;
+	float:left;
+	margin:9px 20rpx 0rpx 0rpx;
+	background-repeat:no-repeat;
+	background-size:60rpx;
+	background-position:center;
+}
+.brand_series_name{
+	color: rgba(56, 55, 53, 1);
+	font-size: 22rpx;
+	display:inline;
+}
+/*************首字母指示点*************/
+.brand_initail_c{	
+	position: fixed;
+	bottom: 90rpx;
+	right:5rpx;
+	overflow:hidden;
+}
+.brand_selectbg{
+	width: 35rpx;
+	height: 35rpx;
+	position: absolute;
+	left:0rpx;
+	transition: top 0.5s;
+}
+.brand_initail_b{
+	position: absolute;
+	top:0rpx;
+	left:0rpx;
+}
+.brand_initail_i{
+	color:#383735;
+	font-size: 22rpx;
+	width: 35rpx;
+	line-height: 35rpx;
+	text-align: center;
+	background-size: 22rpx 22rpx;
+	position: relative;
+}
+.brand_initail_active{
+	border-radius: 17rpx;
+	background-color: #FFE600;
+}

+ 1 - 1
module/footer.wxml

@@ -62,7 +62,7 @@
         url="../../pages/usercenter/usercenter"
       >
         <image
-          src="../../img/footer_home{{local==3?'_active':''}}.png"
+          src="../../img/footer_my{{local==3?'_active':''}}.png"
         />
         <view
           class='page_footer_w'

+ 3 - 2
module/logs/logs.js

@@ -2,7 +2,7 @@ import { get,post } from "../../common/request.js"
 import pathmap from "../../common/pathmap"
 
 var app = getApp();	
-const logs = {
+export const logs = {
 	openLog:function(){
 		this.setData({openlog:true});
 	},
@@ -121,6 +121,7 @@ const logs = {
 
 const bindLogs = function(pages){
 	pages.setData({openlog:false,codeenable:false,logenable:false,codebtword:"获取验证码",mobilenumber:""});
-	Object.assign(pages,logs);
+	//Object.assign(pages,logs);
 }
+
 export default bindLogs;

+ 1 - 1
module/logs/logs.wxml

@@ -41,6 +41,6 @@
 		class="logs_sub_b {{logenable?'active':''}}"
 		bindtap="logIn"
 	>
-		登
+		登
 	</view>
 </view>

+ 2 - 2
module/search/search.wxml

@@ -3,10 +3,10 @@
 <template name="search">
   <view 
     class="search_space" 
-    style="height:{{topsearchheight}}rpx;"
+    style="height:{{topsearchheight}}rpx;top:{{headerheight}}rpx;"
   ></view>
   <view   
-    style="height:{{topsearchheight}}rpx;"
+    style="height:{{topsearchheight}}rpx;top:{{headerheight}}rpx;"
     class="search {{searchshow?'search_focus':''}}"
   >
     <view 

+ 1 - 1
module/search/search.wxss

@@ -37,7 +37,6 @@
   background: #fede18;
   width:100%;
   position: fixed;
-  top:128rpx;
   z-index: 10;
 }
 .search_input_b{
@@ -67,6 +66,7 @@
   width:500rpx;
   line-height: 52rpx;
   font-size: 24rpx;
+  font-family: PingFangSC-Regular, sans-serif;
 }
 .search_input_holder{
   color: rgba(183, 183, 183, 1);

+ 8 - 2
pages/buy/brandlist.wxml

@@ -94,10 +94,16 @@
       class="brand_initail_c"
       style="display: {{selectbar=='brand'?'block':'none'}}"
     >
+      <!-- {{scrollinit==item.initial?'brand_initail_active':''}} -->
+      <image 
+        class="brand_selectbg"
+        style="top:{{scrollinit*initialheight}}px "
+        src="../../img/selectbrand.png"/>
       <view 
-        class="brand_initail_i {{scrollinit==item.initial?'brand_initail_active':''}}"wx:for="{{wheres.brandlist}}"
+        class="brand_initail_i"
+        wx:for="{{wheres.brandlist}}"
         wx:key="initial"
-        style="height:{{initialheight}}rpx"
+        style="height:{{initialheight}}px;"
         bindtap="scrollInit"
         data-init = "{{item.initial}}"
       >

+ 4 - 2
pages/buy/buy.js

@@ -82,7 +82,8 @@ Page({
    */
   onLoad: function (options) {
     bindSearch(this);
-    var initialheight = (app.globalData.windowh-300)/26;
+    var initialheight = Math.round((app.globalData.windowh-300)/26/app.globalData.scale);
+    //initialheight = initialheight-initialheight%2;
     var searchdata = Object.assign(this.data.searchdata,options);
     this.setData(Object.assign({
       initialheight:initialheight
@@ -309,7 +310,8 @@ Page({
       var list = _self.data.wheres.brandlist;
       for(var i=0,l=list.length;i<l;i++){
         if(e.detail.scrollTop<list[i].top){
-          scrollinit = list[i?i-1:i].initial;
+          // scrollinit = list[i?i-1:i].initial;
+          scrollinit=(i?i-1:i)
           break;
         }
       }

+ 3 - 3
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}}"
+  data="{{topsearchheight:topsearchheight,searchshow:searchshow,searchfocus:searchfocus,windowh:windowh,brandrecommend:brandrecommend,keys:searchdata.keys,headerheight:headerheight}}"
 />
 <page-scroll 
   className="conent"
@@ -24,7 +24,7 @@
   <!--筛选模块-->
   <view 
     class="filter_c"
-    style="{{filterlock?'position: absolute; top:0rpx':'position: fixed; top:206rpx;'}}"
+    style="{{filterlock?'position: absolute; top:0rpx':'position: fixed; top:'+(headerheight+topsearchheight)+'rpx;'}}"
     >
     <view class="filter_nav">
       <block wx:for="{{filters}}" wx:key="name">
@@ -57,7 +57,7 @@
     <view class="nocar_back">查看所有好车</view>
     <view class="recommend">
       <view class="recommend_t">
-        <image class="recommend_img" src="../../img/like.png"/>
+        <image class="recommend_img" src="../../img/youmaylike.png"/>
       </view>
     </view>
     <view class="like_cart_c">

+ 9 - 172
pages/buy/buy.wxss

@@ -1,6 +1,7 @@
 /* pages/buy/buy.wxss */
 @import "../../module/search/search.wxss"
 @import "../../module/caritem/caritem.wxss"
+@import "../../module/brandlist/brandlist.wxss"
 .filter_space{
 	height: 88rpx;
 }
@@ -19,7 +20,7 @@
 	flex: 1;
 	text-align: center;
 	height: 85rpx;
-	border-bottom: 3rpx solid white;
+	border-bottom: 3rpx solid rgba(235, 235, 235, 1);
 	transition: all 0.5s;
 }
 .filter_nav_item_active{
@@ -51,15 +52,18 @@
 .sortby_list{
 	background: white;
 	padding: 0rpx 38rpx;
+	border-bottom: 2rpx solid #EBEBEB;
 }
 .sortby_item{
-	border-top:1px solid rgba(235, 235, 235, 1);
+	border-top:2rpx solid rgba(235, 235, 235, 1);
 	height: 78rpx;
 	line-height: 78rpx;
 	font-size:26rpx;
 	background-color: white;
 	color: rgba(56, 55, 53, 1);
-
+}
+.sortby_item:first-child{
+	border-top:0rpx;
 }
 .sortby_active{
 	width:26rpx;
@@ -80,6 +84,7 @@
 	display: flex;
 	justify-content:flex-start;
 	flex-wrap:wrap;
+	border-bottom: 2rpx solid #EBEBEB;
 }
 .price_item{
 	margin-top:20rpx;
@@ -100,175 +105,7 @@
 	border:1px solid #FFE600;
 }
 
-/****************品牌筛选条件***************/
-.brandw_c{
-	position: fixed;
-	top:0rpx;
-	left:100%;
-	width: 100%;
-	height: 100%;
-	background: white;
-	z-index:101;
-	transition: all 0.5s;
-}
-.brandw_title{
-	background-color:#fede18;
-	height:128rpx;
-	position: fixed;
-	z-index:100;
-	top:0rpx;
-	width: 100%;
-}
-.brandw_back{
-	width:30rpx;
-	height: 30rpx;
-	position: absolute;
-	top:70rpx;
-	left:40rpx;
-}
-.brandw_title_w{
-	padding-top: 60rpx;
-	font-size: 36rpx;
-	height: 44rpx;
-	line-height: 44rpx;
-	text-align: center;
-}
-.brandw_t_line{
-	height: 58rpx;
-	line-height: 58rpx;
-	background-color: rgba(242, 242, 245, 1);
-	color: rgba(56, 55, 53, 1);
-	font-size: 22rpx;
-	text-indent: 38rpx;
-}
-.brandw_hotlist{
-	padding: 0rpx 40rpx;
-	display: flex;
-	background: white;
-	flex-wrap: wrap;
-}
-.brandw_hotlist_item{
-	width:134rpx;
-	height: 159rpx;
-}
-.brandw_hotitem_img{
-	width: 70rpx;
-	height: 70rpx;
-	background-size: 70rpx;
-	background-repeat: no-repeat;
-	background-position: center;
-	margin:30rpx auto 0rpx;
-}
-.brandw_hotitem_name{
-	height: 33rpx;
-	line-height: 33rpx;
-	color: rgba(56, 55, 53, 1);
-	font-size: 22rpx;
-	text-align: center;
-}
-.brandw_binitial{
-	left: 0px;
-	top: 562px;
-	width: 750px;
-	height: 44rpx;
-	line-height: 44rpx;
-	border: 1rpx solid rgba(235, 235, 235, 1);
-	color:#FFE600;
-	font-size: 24rpx;
-	text-indent: 48rpx;
-}
-.brandw_bitem{
-	left: 0px;
-	line-height: 78rpx;
-	height: 78rpx;
-	border: 1rpx solid rgba(235, 235, 235, 1);
-}
-.brandw_bimg{
-	height: 60rpx;
-	width:60rpx;
-	float:left;
-	margin:10px 30rpx 0rpx 38rpx;
-	background-repeat: no-repeat;
-	background-size: 60rpx;
-	background-position: center;
-}
-.brandw_bname{
-	display: inline;
-	margin-left:20rpx;
-	color: rgba(56, 55, 53, 1);
-	font-size: 26rpx;
-}
 
-.brand_serieslist{
-	width:440rpx;
-	background-color: white;
-	position: fixed;
-	bottom: 0rpx;
-	right:770rpx;
-	border-shadow:-1rpx 0rpx ;
-	box-shadow: -2rpx 0rpx 10rpx -1rpx rgba(0, 0, 0, 0.16);
-}
-.series_lelong{
-	height: 78rpx;
-	line-height: 78rpx;
-}
-.series_lelong_bimg{
-	height:60rpx;
-	width:60rpx;
-	float:left;
-	margin:10px 20rpx 0rpx 28rpx;
-	background-repeat:no-repeat;
-	background-size:60rpx;
-	background-position:center;
-}
-.series_lelong_name{
-	color: rgba(56, 55, 53, 1);
-	font-size: 26rpx;
-	display:inline;
-}
-.car_series_t{
-	text-indent: 28rpx;
-	height: 44rpx;
-	line-height: 44rpx;
-	background-color: rgba(247, 247, 247, 1);
-	color: rgba(56, 55, 53, 1);
-	font-size: 20rpx;
-}
-.brand_series_i{
-	height: 78rpx;
-	line-height: 78rpx;
-}
-.brand_series_bimg{
-	height:60rpx;
-	width:60rpx;
-	float:left;
-	margin:9px 20rpx 0rpx 28rpx;
-	background-repeat:no-repeat;
-	background-size:60rpx;
-	background-position:center;
-}
-.brand_series_name{
-	color: rgba(56, 55, 53, 1);
-	font-size: 22rpx;
-	display:inline;
-}
-
-/*************首字母指示点*************/
-.brand_initail_c{	
-	position: fixed;
-	bottom: 90rpx;
-	right:5rpx;
-}
-.brand_initail_i{
-	color:#383735;
-	font-size: 22rpx;
-	width: 35rpx;
-	text-align: center;
-}
-.brand_initail_active{
-	border-radius: 17rpx;
-	background-color: #FFE600;
-}
 /**********筛选条件更多************/
 .more_c{
 	position: fixed;
@@ -366,7 +203,7 @@
   height: 32rpx;
   display: block;
   margin:0px auto;
-  width:176rpx;
+  width:258rpx;
 }
 .like_cart_c{
   margin-top:-20rpx;

+ 16 - 3
pages/cardetail/cardetail.js

@@ -5,11 +5,11 @@ import { get,post } from "../../common/request.js"
 import pathmap from "../../common/pathmap"
 import stylemap from "../../common/stylemap"
 import { retCartData } from "../../data/car"
-import bindLog from "../../module/logs/logs"
+import bindLog,{logs} from "../../module/logs/logs"
 
 const app = getApp();
 
-Page({
+Page(Object.assign({
 
   /**
    * 页面的初始数据
@@ -279,5 +279,18 @@ Page({
     var index = e.currentTarget.dataset.n;
     this.setData({timeindex:index});
     this.getPay(this.data.scaleindex,index)
+  },
+  callPhone:function(){
+    if(this.data.detail.custom_tel){
+      wx.makePhoneCall({
+        phoneNumber:this.data.detail.custom_tel
+      })
+    }else{
+      wx.showToast({
+        title:"缺少手机号吗",
+        icon:"none",
+        duration:2000
+      })
+    }
   }
-})
+},logs))

+ 7 - 2
pages/cardetail/cardetail.wxml

@@ -176,7 +176,9 @@
 			</block>  
 		</view>
 	</view>
-	<view class="cardetail_space">
+	<view 
+		wx:if="{{detail.check_info.length>0}}"
+		class="cardetail_space">
 		<view class="cardetail_space_t">检查报告</view>
 		<view class="cardetail_check_report">
 			<block wx:for="{{detail.check_info}}" wx:key="item">
@@ -210,7 +212,10 @@
 			/>
 			<view>收藏</view>
 		</view>
-		<view class="cardetail_op_phone">
+		<view 
+			class="cardetail_op_phone"
+			bindtap="callPhone"
+			>
 			<image src="../../img/phone.png"/>
 			<view>电话</view>
 		</view>

+ 1 - 1
pages/index/cardetail.wxml

@@ -9,7 +9,7 @@
     <view class="car_info">
       <navigator 
         open-type="navigate"
-        class="car_t"  
+        class="car_t"
         url="../cardetail/cardetail?id={{car.id}}"
       >{{car.title?car.title:'--'}}</navigator>
       <view class="car_time">

+ 1 - 0
pages/index/goodcar.wxml

@@ -27,5 +27,6 @@
         </swiper-item>
       </block>
     </swiper>
+    <view class="prevent_move"></view>
   </navigator>
 </template>

+ 3 - 0
pages/index/index.js

@@ -148,6 +148,9 @@ Page({
     },function(){
 
     })
+  },
+  catchTouchMove:function(){
+    return false
   }
 //   /*
 //     搜索失去聚焦事件

+ 113 - 112
pages/index/index.wxml

@@ -15,133 +15,134 @@
   bindscroll=""
 > -->
 <template 
-  is="header" 
+  is="header"
   data="{{title:'第一好车',headerheight:headerheight}}"
 />  
 <template
   is="search"
-  data="{{topsearchheight:topsearchheight,searchshow:searchshow,searchfocus:searchfocus,windowh:windowh,brandrecommend:brandrecommend}}"
+  data="{{topsearchheight:topsearchheight,searchshow:searchshow,searchfocus:searchfocus,windowh:windowh,brandrecommend:brandrecommend,headerheight:headerheight}}"
 />
 <!-- <include src="../../module/search/search.wxml"/> -->
 <page-scroll 
-  className="conent"
   styleSheet="height:{{windowh-headerheight-topsearchheight}}rpx;"
   scroll-y="true"
->    
-  <template is="banner" data="{{banner:banner}}"/>
-  <view class="nav_list">
-    <view class="nav_item">
-      <navigator 
-        open-type="reLaunch"
-        class="nav_item_link" 
-        url="../buy/buy">
-        <view class="nav_item_img">
-           <image src="../../img/home_buy.png"/>
-        </view>
-        <view class="nav_item_t">我要买车</view>
-      </navigator>
-    </view>
-    <view class="nav_item">
-      <navigator 
-        open-type="reLaunch"
-        class="nav_item_link" 
-        url="../sell/sell">
-        <view class="nav_item_img">
-          <image src="../../img/home_sell.png"/>
-        </view>
-        <view class="nav_item_t">我要卖车</view>
-      </navigator>
-    </view>
-    <view class="nav_item">
-      <navigator           
-        open-type="navigate"
-        class="nav_item_link" 
-        url="../evaluate/evaluate">
-        <view class="nav_item_img">
-          <image src="../../img/home_assess.png"/>
-        </view>
-        <view class="nav_item_t">我要估价</view>
-      </navigator>
-    </view>
-    <view class="nav_item">
-      <navigator 
-        open-type="navigate"
-        class="nav_item_link" 
-        url="../loans/loans">
-        <view class="nav_item_img">
-          <image src="../../img/home_loan.png"/>
+>  
+  <view class="content">  
+    <template is="banner" data="{{banner:banner}}"/>
+    <view class="nav_list">
+      <view class="nav_item">
+        <navigator 
+          open-type="reLaunch"
+          class="nav_item_link" 
+          url="../buy/buy">
+          <view class="nav_item_img">
+             <image src="../../img/home_buy.png"/>
+          </view>
+          <view class="nav_item_t">我要买车</view>
+        </navigator>
+      </view>
+      <view class="nav_item">
+        <navigator 
+          open-type="reLaunch"
+          class="nav_item_link" 
+          url="../sell/sell">
+          <view class="nav_item_img">
+            <image src="../../img/home_sell.png"/>
           </view>
-        <view class="nav_item_t">我要贷款</view>
-      </navigator>
+          <view class="nav_item_t">我要卖车</view>
+        </navigator>
+      </view>
+      <view class="nav_item">
+        <navigator           
+          open-type="navigate"
+          class="nav_item_link" 
+          url="../evaluate/evaluate">
+          <view class="nav_item_img">
+            <image src="../../img/home_assess.png"/>
+          </view>
+          <view class="nav_item_t">我要估价</view>
+        </navigator>
+      </view>
+      <view class="nav_item">
+        <navigator 
+          open-type="navigate"
+          class="nav_item_link" 
+          url="../loans/loans">
+          <view class="nav_item_img">
+            <image src="../../img/home_loan.png"/>
+            </view>
+          <view class="nav_item_t">我要贷款</view>
+        </navigator>
+      </view>
     </view>
-  </view>
-  <template is="goodcar" data="{{goodcars:goodcars}}"/>
+    <template is="goodcar" data="{{goodcars:goodcars}}"/>
 
-  <view class='brand'>
-    <block wx:for="{{brandrecommend}}" wx:key="id">
-      <view class="brand_item_b">
-        <view class="brand_item">
-          <navigator 
-            open-type="reLaunch"
-            class="brand_item_link" 
-            url="../buy/buy?brand={{item.brand_id}}">
-            <view class="brand_item_img" style="background-image:url({{item.brand_img}})"></view>
-            <view class="brand_item_name">{{item.brand_name}}</view>
-          </navigator>
+    <view class='brand'>
+      <block wx:for="{{brandrecommend}}" wx:key="id">
+        <view class="brand_item_b">
+          <view class="brand_item">
+            <navigator 
+              open-type="reLaunch"
+              class="brand_item_link" 
+              url="../buy/buy?brand={{item.brand_id}}">
+              <view class="brand_item_img" style="background-image:url({{item.brand_img}})"></view>
+              <view class="brand_item_name">{{item.brand_name}}</view>
+            </navigator>
+          </view>     
         </view>     
-      </view>     
-    </block>
-  </view>
-  <navigator 
-    open-type="reLaunch"
-    url="../buy/buy"
-    class="brand_more">查看更多好车</navigator>
-  <view class="recommend">
-    <view class="recommend_t">
-      <image class="recommend_img" src="../../img/recommend.png"/>
-      <view class="recommend_w">RECOMMENDATIONS</view>
+      </block>
+    </view>
+    <navigator 
+      open-type="reLaunch"
+      url="../buy/buy"
+      class="brand_more">查看更多好车</navigator>
+    <view class="recommend">
+      <view class="recommend_t">
+        <image class="recommend_img" src="../../img/recommend.png"/>
+        <view class="recommend_w">RECOMMENDATIONS</view>
+      </view>
+      <view class="recommend_sw">
+        <swiper 
+          class='recommend_list' 
+          autoplay='true' 
+          interval='3000' 
+          duration='300' 
+          bindchange='switchReTab'
+          circular='true'
+        >
+          <block wx:for="{{recommended}}" wx:key="id">
+            <swiper-item>
+              <template is="cardetail" data="{{car:item}}"/>
+            </swiper-item>
+          </block>      
+        </swiper>
+        <view class="recommended_tab">
+          <block wx:for="{{recommended}}" wx:key="id">
+            <view wx:if="{{item.selected}}" class='recommended_tab-item recommend_selected'></view>
+            <view wx:else class="recommended_tab-item"></view>
+          </block>
+        </view>
+      </view>
     </view>
-    <view class="recommend_sw">
-      <swiper 
-        class='recommend_list' 
-        autoplay='true' 
-        interval='3000' 
-        duration='300' 
-        bindchange='switchReTab'
-        circular='true'
-      >
-        <block wx:for="{{recommended}}" wx:key="id">
-          <swiper-item>
-            <template is="cardetail" data="{{car:item}}"/>
-          </swiper-item>
-        </block>      
-      </swiper>
-      <view class="recommended_tab">
-        <block wx:for="{{recommended}}" wx:key="id">
-          <view wx:if="{{item.selected}}" class='recommended_tab-item recommend_selected'></view>
-          <view wx:else class="recommended_tab-item"></view>
-        </block>
+    <view class="recommend">
+      <view class="recommend_t">
+        <image class="recommend_img" src="../../img/like.png"/>
+        <view class="recommend_w">GUESS YOU LIKE</view>
       </view>
     </view>
-  </view>
-  <view class="recommend">
-    <view class="recommend_t">
-      <image class="recommend_img" src="../../img/like.png"/>
-      <view class="recommend_w">GUESS YOU LIKE</view>
+    <view class="like_cart_c">
+      <block wx:for="{{like}}" wx:key="id">
+        <template is="caritem" data="{{car:item}}"/>
+      </block>
     </view>
-  </view>
-  <view class="like_cart_c">
-    <block wx:for="{{like}}" wx:key="id">
-      <template is="caritem" data="{{car:item}}"/>
-    </block>
-  </view>
-  <navigator 
-    open-type="reLaunch"
-    url="../buy/buy"
-    class="show_more">加载更多></navigator>
-  <image class="bottom_banner" src="../../img/banner.png"></image>
-  <template 
-    is="footer" 
-    data="{{local:0,footerheight:footerheight}}"
-  />                                       
+    <navigator 
+      open-type="reLaunch"
+      url="../buy/buy"
+      class="show_more">加载更多></navigator>
+    <image class="bottom_banner" src="../../img/banner.png"></image>
+    <template 
+      is="footer" 
+      data="{{local:0,footerheight:footerheight}}"
+    />  
+  </view>                                     
 </page-scroll>

+ 11 - 1
pages/index/index.wxss

@@ -3,7 +3,7 @@
 
 /*******topbanner*********/
 
-.conent{
+.content{
   background-color:#F9F9F9;
 }
 .banner{
@@ -83,6 +83,7 @@
   display: flex;
   margin-top:20rpx;
   background-color:white;
+  position: relative;
 }
 .goodcar_t{
   width:46rpx;
@@ -112,6 +113,15 @@
   text-align: center;
   font-family: PingFangSC-Light;
 }
+.prevent_move{
+  position: absolute;
+  top:0rpx;
+  left:0rpx;
+  background-color: rgba(0,0,0,0);
+  width: 100%;
+  height: 100%;
+}
+
 /*******brand*********/
 .brand{
   width:754rpx;

+ 13 - 9
pages/sell/sell.js

@@ -1,8 +1,8 @@
 // pages/sell/sell.js
-import { get,post,upload } from "../../common/request.js"
+import { get,post,postwithoutahth,upload } from "../../common/request.js"
 import pathmap from "../../common/pathmap"
 import stylemap from "../../common/stylemap"
-import bindLog from "../../module/logs/logs"
+// import bindLog from "../../module/logs/logs"
 const app = getApp();
 
 Page({
@@ -29,7 +29,7 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) { 
-    bindLog(this);
+    //bindLog(this);
     this.setData(stylemap);
     this.getCararea(0,0,0);
     this.getCarSeries(0,0,0);
@@ -38,9 +38,9 @@ Page({
     }catch(e){
 
     }
-    if(!authorization){      
-      this.openLog();
-    }
+    // if(!authorization){      
+    //   this.openLog();
+    // }
   },
 
   /**
@@ -205,11 +205,15 @@ Page({
       date: e.detail.value
     })
   },
+  bindMobile:function(e){
+    var mobile = e.detail.value;
+    this.setData({mobile:mobile});
+  },
   subSell:function(){
     var _self=this;
-    var mobile = wx.getStorageSync("mobile")
-    post(pathmap.sellingcar,{
-      mobile:mobile,
+    //var mobile = wx.getStorageSync("mobile")
+    postwithoutahth(pathmap.sellingcar,{
+      mobile:this.data.mobile,
       car_name:this.data.series['2'][this.data.selectseries['2']].car_model_name,
       plate_at:this.data.date,
       mileage:this.data.mileage,

+ 18 - 1
pages/sell/sell.wxml

@@ -19,6 +19,23 @@
 	  	>
 	  		完善信息,预约卖车
 	  	</view>
+
+	  	<view
+	  		class="sell_form_item"
+	  	>
+	  		<view class="sell_form_it">
+	  			<view class="sell_form_itw">
+	  				*
+	  			</view>
+	  			联系方式
+	  		</view>
+  			<input
+  				class="sell_form_input"
+  				placeholder="请输入"
+  				bindinput="bindMobile"
+  				placeholder-style="color:#9B9B9B"
+  			/>
+	  	</view>
 	  	<view
 	  		class="sell_form_item"
 	  	>
@@ -171,4 +188,4 @@
       data="{{local:2,footerheight:footerheight}}"
     />  
 </page-scroll>
-<include src="../../module/logs/logs.wxml"/>
+<!-- <include src="../../module/logs/logs.wxml"/> -->

+ 1 - 0
pages/shop/shop.js

@@ -108,6 +108,7 @@ Page({
         var obj = {
           lock:false,
           list:_self.data.list.concat(list),
+          total:json.data.total,
           offset:nextoffset
         }
         if(json.data.total<=nextoffset){

+ 4 - 1
pages/shop/shop.wxml

@@ -6,7 +6,7 @@
 	data="{{title:'店铺主页',headerheight:headerheight,hasback:true}}"
 />
 <page-scroll 
-  className="conent"
+  className="content"
   styleSheet="height:{{windowh-headerheight}}rpx;"
   scroll-y
   bind:scrolltolower="{{hasloadall?'':'loadCars'}}"
@@ -33,6 +33,9 @@
 			</view>
 		</view>
 	</view>
+	<view class="total_count">
+		全部车源<view class="total_count_n">({{total}})</view>
+	</view>
 	<view class="shop_cart_c">
 	    <block wx:for="{{list}}" wx:key="id">
       		<template is="caritem" data="{{car:item}}"/>

+ 17 - 0
pages/shop/shop.wxss

@@ -34,6 +34,23 @@
 	width:20rpx;
 	height: 20rpx;
 }
+.total_count{
+  background-color: #F9F9F9;
+  height: 76rpx;
+  line-height: 76rpx;
+  color: rgba(0, 0, 0, 1);
+  font-size: 26rpx;
+  font-weight: bold;
+  font-family: NotoSansHans-Medium;
+  text-indent: 38rpx;
+}
+.total_count_n{
+  color: rgba(135, 135, 135, 1);
+  font-size: 24rpx;
+  text-align: left;
+  font-weight: normal;
+  display:inline;
+}
 
 /*loading动画*/
 .loading {

+ 3 - 3
pages/usercenter/usercenter.js

@@ -1,9 +1,9 @@
 // pages/usercenter/usercenter.js
 
-import bindLog from "../../module/logs/logs"
+import bindLog,{logs} from "../../module/logs/logs"
 
 var app = getApp();
-Page({
+Page(Object.assign({
 
   /**
    * 页面的初始数据
@@ -83,4 +83,4 @@ Page({
   closeLogBack:function(){
     wx.navigateBack();
   }
-})
+},logs))