| 
				
				
					
				
				
				 | 
			
			 | 
			@@ -21,17 +21,13 @@ Page({ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    actUrl: imgurl.act.url, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    loading: true, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    content: '数据正在加载中', | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    reloadIf: false | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    reloadIf: false, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    creditAmount: 0 | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			  }, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			  onLoad: function (options) { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    let that = this; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    console.log(options) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    if (options &&options.credit){ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      that.setData({ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        credit: options.credit | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      }) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    } | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    var todayDate = new Date().getTime(); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    that.getPoints(); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    that.setData({ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      optionsData: options, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      todayDate: todayDate | 
		
		
	
	
		
			
				| 
				
					
				
				
					
				
				
				 | 
			
			 | 
			@@ -58,6 +54,31 @@ Page({ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      }) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    } | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			  }, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			  // 获得积分,渲染页面 | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			  getPoints(){ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    let that = this; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    Http.get({ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      url: config.api.integralList, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      data: { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        pageNum: 1, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        pageSize: 1, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      } | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    }).then(res => { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      wx.stopPullDownRefresh(); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      that.setData({ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        creditAmount: res.data.list[0].creditAmount | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      }); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    }) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      .catch(err => { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        wx.stopPullDownRefresh(); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        wx.showToast({ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			          title: err.errMsg, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			          icon: 'none', | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			          duration: 2000, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			          mask: false | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        }); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      }) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			  }, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			  gotojifen(){ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    wx.navigateTo({ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      url: '/pages/integralmall/integraHistory/index', | 
		
		
	
	
		
			
				| 
				
					
				
				
					
				
				
				 | 
			
			 | 
			@@ -168,5 +189,6 @@ Page({ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			  onPullDownRefresh: function (e) { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    let that = this; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    that.getList(1); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    that.getPoints(); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			  } | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			}) |