| 
				
				
					
				
				
				 | 
			
			 | 
			@@ -5,8 +5,6 @@ const util = require("../../../utils/util"); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			Page({ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			  data: { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    data: {}, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    couponChannelId: null, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    couponId: null, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    orderId: "", | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    day: "", | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    hour: "", | 
		
		
	
	
		
			
				| 
				
				
				
					
				
				 | 
			
			 | 
			@@ -15,10 +13,6 @@ Page({ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			  onLoad(options) { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    let that = this; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    console.log(options.id); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    that.setData({ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      couponId: options.id | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    }) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    console.log(options.targetAd); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    wx.showLoading({ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      title: "加载中..." | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    }); | 
		
		
	
	
		
			
				| 
				
				
				
					
				
				 | 
			
			 | 
			@@ -29,8 +23,7 @@ Page({ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      Http.get({ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        url: config.api.couponDetail, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        data: { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			          couponId: options.id, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			          targetAd: options.targetAd | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			          id: options.id, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        } | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      }).then(res => { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        console.log(res); | 
		
		
	
	
		
			
				| 
				
					
				
				
					
				
				
				 | 
			
			 | 
			@@ -62,8 +55,7 @@ Page({ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        console.log(that.data.day); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        wx.hideLoading(); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        that.setData({ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			          data: res.data, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			          couponChannelId: res.data.couponChannelId | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			          data: res.data | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        }); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      }); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    } | 
		
		
	
	
		
			
				| 
				
					
				
				
					
				
				
				 | 
			
			 | 
			@@ -168,8 +160,8 @@ Page({ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			          return Http.post({ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            url: config.api.orderSave, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            data: { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			              couponChannelId: that.data.couponChannelId, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			              couponId: that.data.couponId | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			              couponChannelId: '' + that.data.data.id, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			              couponId: '' + that.data.data.couponId | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            } | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			          }); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        }) | 
		
		
	
	
		
			
				| 
				
				
				
					
				
				 | 
			
			 | 
			@@ -178,13 +170,13 @@ Page({ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			          if (err.code == 11005) { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            // 用户手机未授权 | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            wx.redirectTo({ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			              url: "../../getphoneInfo/index?couponId=" + that.data.couponId | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			              url: "../../getphoneInfo/index?couponChannelId=" + that.data.id | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            }); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			          } | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			          if (err.code == 11006) { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            // 用户手机已加密 | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            wx.redirectTo({ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			              url: "../../phoneinput/phoneinput?couponId=" + that.data.couponId | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			              url: "../../phoneinput/phoneinput?couponChannelId=" + that.data.id | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            }); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			          } | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        }) | 
		
		
	
	
		
			
				| 
				
					
				
				
				
				 | 
			
			 | 
			
  |