|  |  | @@ -23,7 +23,7 @@ Page({ | 
		
	
		
			
			|  |  |  | } else { | 
		
	
		
			
			|  |  |  | app.userCarLogin() | 
		
	
		
			
			|  |  |  | that.bindCar(that.data.addCar) | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | }, | 
		
	
		
			
			|  |  |  | jumpToAdd: function() { | 
		
	
	
		
			
				|  |  | @@ -32,9 +32,10 @@ Page({ | 
		
	
		
			
			|  |  |  | }); | 
		
	
		
			
			|  |  |  | }, | 
		
	
		
			
			|  |  |  | jumpToPay: function() { | 
		
	
		
			
			|  |  |  | wx.redirectTo({ | 
		
	
		
			
			|  |  |  | url: '/pages/pay/pay', | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | console.log("停车支付去") | 
		
	
		
			
			|  |  |  | //wx.redirectTo({ | 
		
	
		
			
			|  |  |  | //  url: '/pages/pay/pay', | 
		
	
		
			
			|  |  |  | //}) | 
		
	
		
			
			|  |  |  | }, | 
		
	
		
			
			|  |  |  | passb: function() { | 
		
	
		
			
			|  |  |  | wx.showToast({ | 
		
	
	
		
			
				|  |  | @@ -69,6 +70,9 @@ Page({ | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | .then(res => { | 
		
	
		
			
			|  |  |  | console.log(res) | 
		
	
		
			
			|  |  |  | that.setData({ | 
		
	
		
			
			|  |  |  | addCar: null | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | that.initUsrCarList() | 
		
	
		
			
			|  |  |  | wx.showModal({ | 
		
	
		
			
			|  |  |  | title: '提示', | 
		
	
	
		
			
				|  |  | @@ -87,10 +91,8 @@ Page({ | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | }, | 
		
	
		
			
			|  |  |  | unbindCar: function(e) { | 
		
	
		
			
			|  |  |  | console.log(e) | 
		
	
		
			
			|  |  |  | unbindCar: function(carNum) { | 
		
	
		
			
			|  |  |  | var that = this | 
		
	
		
			
			|  |  |  | var carNum = e.currentTarget.dataset.car | 
		
	
		
			
			|  |  |  | // carLogin | 
		
	
		
			
			|  |  |  | app.userCarLogin() | 
		
	
		
			
			|  |  |  | var postData = | 
		
	
	
		
			
				|  |  | @@ -123,13 +125,44 @@ Page({ | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | }, | 
		
	
		
			
			|  |  |  | unbindCarBtn: function(e) { | 
		
	
		
			
			|  |  |  | console.log(e) | 
		
	
		
			
			|  |  |  | var that = this | 
		
	
		
			
			|  |  |  | var carNum = e.currentTarget.dataset.car | 
		
	
		
			
			|  |  |  | that.unbindCar(carNum) | 
		
	
		
			
			|  |  |  | }, | 
		
	
		
			
			|  |  |  | getStopFee: function() { | 
		
	
		
			
			|  |  |  | var that = this | 
		
	
		
			
			|  |  |  | for (var i = 0; i < that.data.carList.length; i++) { | 
		
	
		
			
			|  |  |  | var carItem = that.data.carList[i] | 
		
	
		
			
			|  |  |  | var postData = | 
		
	
		
			
			|  |  |  | (app.globalData.parkVendor == 1) ? { | 
		
	
		
			
			|  |  |  | etcpToken: app.globalData.etcpToken, | 
		
	
		
			
			|  |  |  | carNumber: carItem.carNumber, | 
		
	
		
			
			|  |  |  | } : { | 
		
	
		
			
			|  |  |  | carNumber: carItem.carNumber, | 
		
	
		
			
			|  |  |  | outCarId: carItem.outCarId, | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | var stopFee = 'carList[' + i + '].stopFee' | 
		
	
		
			
			|  |  |  | Http.post({ | 
		
	
		
			
			|  |  |  | url: config.api.getCarStopFee, | 
		
	
		
			
			|  |  |  | data: postData | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | .then(res => { | 
		
	
		
			
			|  |  |  | console.log(res) | 
		
	
		
			
			|  |  |  | that.setData({ | 
		
	
		
			
			|  |  |  | [stopFee]: res.data | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | }, | 
		
	
		
			
			|  |  |  | initPark: function() { | 
		
	
		
			
			|  |  |  | var that = this | 
		
	
		
			
			|  |  |  | // 车场信息获取 | 
		
	
		
			
			|  |  |  | Http.get({ | 
		
	
		
			
			|  |  |  | url: config.api.getParkInfo, | 
		
	
		
			
			|  |  |  | data: {} | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | url: config.api.getParkInfo, | 
		
	
		
			
			|  |  |  | data: {} | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | .then(res => { | 
		
	
		
			
			|  |  |  | console.log(res) | 
		
	
		
			
			|  |  |  | that.setData({ | 
		
	
	
		
			
				|  |  | @@ -137,7 +170,7 @@ Page({ | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | }, | 
		
	
		
			
			|  |  |  | initUsrCarList: function () { | 
		
	
		
			
			|  |  |  | initUsrCarList: function() { | 
		
	
		
			
			|  |  |  | var that = this | 
		
	
		
			
			|  |  |  | // 绑定车获取 | 
		
	
		
			
			|  |  |  | Http.get({ | 
		
	
	
		
			
				|  |  | @@ -148,6 +181,8 @@ Page({ | 
		
	
		
			
			|  |  |  | that.setData({ | 
		
	
		
			
			|  |  |  | carList: res.data | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | // 获取 停车费 | 
		
	
		
			
			|  |  |  | that.getStopFee() | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | }, | 
		
	
		
			
			|  |  |  | init: function() { | 
		
	
	
		
			
				|  |  | 
 |