| 
				
				
					
				
				
				 | 
			
			 | 
			@@ -79,6 +79,7 @@ Page({ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    wx.setStorageSync('imgurl', imgurl); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    if (app.globalData.token) { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      this.updateUserInfo();       | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      if (options.couponChannelId || options.orderId || options.id) { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        that.userStatus(options); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      } else { | 
		
		
	
	
		
			
				| 
				
				
				
					
				
				 | 
			
			 | 
			@@ -88,6 +89,7 @@ Page({ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      // 由于 token 是网络请求,可能会在 Page.onLoad 之后才返回 | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      // 所以此处加入 callback 以防止这种情况 | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      app.tokenCallback = token => { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        this.updateUserInfo(); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        if (options.couponChannelId || options.orderId || options.id) { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			          that.userStatus(options); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        } else { | 
		
		
	
	
		
			
				| 
				
				
				
					
				
				 | 
			
			 | 
			@@ -108,7 +110,23 @@ Page({ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      that.checkuserstatus(); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    } | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			  }, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			  /** | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			 * 获取手机信息 | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			 */ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			  updateUserInfo() { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    wx.getSystemInfo({ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      success: function (res) { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        Http.post({ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			          url: config.api.updateUserInfo, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			          data: { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            systemInfo: JSON.stringify(res) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			          } | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        }).then(res => { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			          console.log(res) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        }) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      } | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    }) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			  }, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			  checkuserstatus(options) { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    let that = this; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    Http.get({ | 
		
		
	
	
		
			
				| 
				
					
				
				
				
				 | 
			
			 | 
			
  |