|  |  | @@ -12,18 +12,22 @@ Page({ | 
		
	
		
			
			|  |  |  | wx.showLoading({ | 
		
	
		
			
			|  |  |  | title: '加载中...', | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | Http.get({ | 
		
	
		
			
			|  |  |  | url: Http.config.api.couponDetail, | 
		
	
		
			
			|  |  |  | data: { | 
		
	
		
			
			|  |  |  | id: e.id | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | }).then(res => { | 
		
	
		
			
			|  |  |  | wx.hideLoading(); | 
		
	
		
			
			|  |  |  | this.setData({ | 
		
	
		
			
			|  |  |  | data: res, | 
		
	
		
			
			|  |  |  | couponId: e.id | 
		
	
		
			
			|  |  |  | if (e.flag == 'pay') { | 
		
	
		
			
			|  |  |  | this.orderFunc(); | 
		
	
		
			
			|  |  |  | } else { | 
		
	
		
			
			|  |  |  | Http.get({ | 
		
	
		
			
			|  |  |  | url: config.api.couponDetail, | 
		
	
		
			
			|  |  |  | data: { | 
		
	
		
			
			|  |  |  | id: e.id | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | }).then(res => { | 
		
	
		
			
			|  |  |  | wx.hideLoading(); | 
		
	
		
			
			|  |  |  | this.setData({ | 
		
	
		
			
			|  |  |  | data: res, | 
		
	
		
			
			|  |  |  | couponId: e.id | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | }, | 
		
	
		
			
			|  |  |  | /** | 
		
	
		
			
			|  |  |  | * 支付订单更新 | 
		
	
	
		
			
				|  |  | @@ -31,7 +35,7 @@ Page({ | 
		
	
		
			
			|  |  |  | payOrderUpdate: (orderId, payOrderId, status, reason) => { | 
		
	
		
			
			|  |  |  | // 支付成功 | 
		
	
		
			
			|  |  |  | return Http.post({ | 
		
	
		
			
			|  |  |  | url: Http.config.api.payOrderUpdate, | 
		
	
		
			
			|  |  |  | url: config.api.payOrderUpdate, | 
		
	
		
			
			|  |  |  | data: { | 
		
	
		
			
			|  |  |  | payOrderId: payOrderId, | 
		
	
		
			
			|  |  |  | orderId: orderId, | 
		
	
	
		
			
				|  |  | @@ -109,7 +113,7 @@ Page({ | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | .then(res => { | 
		
	
		
			
			|  |  |  | return Http.post({ | 
		
	
		
			
			|  |  |  | url: Http.config.api.orderSave, | 
		
	
		
			
			|  |  |  | url: config.api.orderSave, | 
		
	
		
			
			|  |  |  | data: { | 
		
	
		
			
			|  |  |  | couponId: that.data.couponId | 
		
	
		
			
			|  |  |  | } | 
		
	
	
		
			
				|  |  | @@ -119,7 +123,7 @@ Page({ | 
		
	
		
			
			|  |  |  | if (err.code == 11005) { | 
		
	
		
			
			|  |  |  | // 用户手机未授权 | 
		
	
		
			
			|  |  |  | wx.redirectTo({ | 
		
	
		
			
			|  |  |  | url: '../../getphoneInfo/index', | 
		
	
		
			
			|  |  |  | url: '../../getphoneInfo/index?couponId='+that.data.couponId, | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | if (err.code == 11006) { | 
		
	
	
		
			
				|  |  | @@ -137,7 +141,7 @@ Page({ | 
		
	
		
			
			|  |  |  | if (res.data.payment > 0) { | 
		
	
		
			
			|  |  |  | // real pay | 
		
	
		
			
			|  |  |  | return Http.post({ | 
		
	
		
			
			|  |  |  | url: Http.config.api.payOrderCreate, | 
		
	
		
			
			|  |  |  | url: config.api.payOrderCreate, | 
		
	
		
			
			|  |  |  | data: { | 
		
	
		
			
			|  |  |  | orderId: orderId | 
		
	
		
			
			|  |  |  | } | 
		
	
	
		
			
				|  |  | 
 |