Browse Source

Merge remote-tracking branch 'origin/master'

liguorui 6 years ago
parent
commit
5fa91ec04f

+ 11 - 9
components/brandlist/brandlist.js

@@ -25,10 +25,10 @@ Component({
       value:"",
       type:String
     },
-    // "serieslist":{
-    //   value:"",
-    //   type:String
-    // }
+    "getseries":{
+      value:"",
+      type:String
+    }
   },
 
   /**
@@ -53,14 +53,15 @@ Component({
   methods: {
     getBrands:function(){
       var _self=this;
-      get(pathmap.getbrand, {}, function (json) {
+      get(this.data.getbrand||pathmap.getbrand, {}, function (json) {
 
         var initiallist = {};
-        var brandlist = []
+        var brandlist = [];
+        var list = Object.prototype.toString.call(json.data)=="[object Array]"?json.data:json.data.brand;
         for(var i = 65; i < 91; i++){
           initiallist[String.fromCharCode(i)] = [];
         }
-        json.data.brand.forEach(function(item){
+        list.forEach(function(item){
           if(Object.prototype.toString.call(initiallist[item.initial])=="[object Array]"){
             initiallist[item.initial].push(item);
           }
@@ -87,8 +88,9 @@ Component({
       var _self = this;
       var brandinfo = e.currentTarget.dataset;
       var series = [];
-      get(pathmap.serieslist, {brand_id:brandinfo.id}, function (json) {
-        series = json.data.car_series;      
+      get(this.data.getseries||pathmap.serieslist, {brand_id:brandinfo.id}, function (json) {
+
+        series = Object.prototype.toString.call(json.data)=="[object Array]"?json.data:json.data.car_series; 
         _self.setData({
           serieslist:{
             belong:brandinfo,

+ 1 - 1
pages/cardetail/cardetail.js

@@ -334,7 +334,7 @@ Page(Object.assign({
     })
   },
   openSub:function(e){
-    var obj = e.target.dataset;
+    var obj = e.currentTarget.dataset;
     var check_info = this.data.detail.check_info;
     var item = Object.assign({},check_info[obj.index]._child[obj.indext]);
     item.opensub = !item.opensub;

+ 5 - 4
pages/cardetail/cardetail.wxml

@@ -373,7 +373,11 @@
 				<view class="cardetailw_check_si">
 					<block wx:for="{{item._child}}" wx:key="id" wx:for-item="sitem" wx:for-index="indext">
 						<view class="cardetailw_check_sit">
-							<view class="cardetailw_check_sitn">
+							<view 
+								bindtap="openSub"
+								data-index="{{index}}"
+								data-indext="{{indext}}"
+								class="cardetailw_check_sitn">
 								<view class="cardetailw_check_sitnw">{{sitem.name}}</view>
 								<view class="cardetailw_check_unp" wx:if="{{sitem.unpassn>0}}">
 									{{sitem.unpassn}}项
@@ -384,9 +388,6 @@
 									<image class="pass_number" src="../../img/checkpass.png"/>
 								</view>
 								<image 
-									bindtap="openSub"
-									data-index="{{index}}"
-									data-indext="{{indext}}"
 									class="cardetail_check_op {{sitem.opensub?'cardetail_check_opactive':''}}" src = "../../img/right.png"/>
 							</view>
 							<view  

+ 1 - 1
pages/evaluate/evaluate.js

@@ -12,7 +12,7 @@ Page({
   data: {
     
     getbrand:pathmap.getbrands,
-    serieslist:pathmap.carseries,
+    getseries:pathmap.carseries,
     windowh: app.globalData.windowh,
     area:{},
     areaselect:{},

+ 1 - 1
pages/evaluate/evaluate.wxml

@@ -255,7 +255,7 @@
 <brandlist
   show="{{brandlistshow}}"
   getbrand="{{getbrand}}"
-  serieslist="{{serieslist}}"
+  getseries="{{getseries}}"
   bind:close="closeBrandList"
   bind:select="selectModel"
   hasmodel="true"

+ 6 - 1
pages/index/banner.wxml

@@ -10,7 +10,12 @@
     >
       <block wx:for="{{banner}}" wx:key="id">
         <swiper-item>
-          <image class='banner_item' src="{{item.banner_img}}"/>
+          <navigator  
+              class='banner_item'
+              open-type="reLaunch"
+              url="../buy/buy?brand={{item.brand_id}}">
+            <image src="{{item.banner_img}}"/>
+          </navigator>
         </swiper-item>
       </block>      
     </swiper>

+ 4 - 0
pages/index/index.wxss

@@ -18,6 +18,10 @@
   width:100%;
   height: 100%;
 }
+.banner_item image{  
+  width:100%;
+  height: 100%;
+}
 .tab{
   position: absolute;
   bottom:10rpx;

+ 2 - 2
pages/orderdetail/orderdetail.wxss

@@ -33,11 +33,11 @@
 	line-height: 38rpx;
 	color: rgba(33, 36, 37, 1);
 	font-size: 28rpx;
-	font-family: PingFangSC-Medium,NotoSansHans-Medium;
+	font-weight: bold;
+	font-family: NotoSansHans-Bold;
 }
 .order_de_v image{
 	width:140rpx;
-	height: auto;
 	display:inline-block;
 }
 .order_de_remark{

+ 1 - 1
pages/sell/sell.js

@@ -12,7 +12,7 @@ Page({
    */
   data: {  
     getbrand:pathmap.getbrands,
-    serieslist:pathmap.carseries,
+    getseries:pathmap.carseries,
     windowh: app.globalData.windowh,
     area:{},
     areaselect:{},

+ 1 - 1
pages/sell/sell.wxml

@@ -212,7 +212,7 @@
 </page-scroll>
 <brandlist
   getbrand="{{getbrand}}"
-  serieslist="{{serieslist}}"
+  getseries="{{getseries}}"
   show="{{brandlistshow}}"
   bind:close="closeBrandList"
   bind:select="selectSeries"