| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -12,7 +12,7 @@ Page({ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    nodata: false, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    loadMoreType: 'none', | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    loadMoreVisible: false, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    noticeCategory: '1',//模块编码(0-政策导航,1-印象,2-味道)
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    noticeCategory: '',//模块编码(政策导航-最热政策:notice_navigation_hot、了解锦水-印象:notice_impression、了解锦水-味道:notice_taste、政策导航-最新通知:  notice_navigation_new、了解锦水-警示:notice_warning)
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    noticeContentNew:'', | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -20,6 +20,19 @@ Page({ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					   * 生命周期函数--监听页面加载 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					   */ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  onLoad: function (options) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    this.setData({ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      noticeCategory:options.modulecode | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    if(options.modulecode == 'notice_impression'){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      wx.setNavigationBarTitle({ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        title: '锦水印象'  | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      }) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }else{ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      wx.setNavigationBarTitle({ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        title: '锦水警事'  | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      }) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    this.noticelist(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  noticelist() { | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -27,7 +40,7 @@ Page({ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    let params = { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      pageIndex: that.data.pageIndex, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      pageSize: that.data.pageSize, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      noticeCategory: that.data.noticeCategory | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      noticeCategory: that.data.noticeCategory, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    api.noticelist(params).then(function (res) { //了解锦水-模块管理接口
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let noticelistObj = {} | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -37,7 +50,6 @@ Page({ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        noticelistObj.noticeContentNew = res.data[i].noticeContent.replace(/<img/gi, '<img style="display:none" '); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        noticelistItem.push(noticelistObj) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      console.log(JSON.stringify(noticelistItem)) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      that.setData({ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        noticelist: that.data.noticelist.concat(noticelistItem), | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        loadMoreType: res.data.length === that.data.pageSize ? 'loading' : 'none', | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -120,7 +132,7 @@ Page({ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					   //跳转倒详情页面
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					   toDetail(e){     | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    wx.navigateTo({ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      url: '../noticeDetail/noticeDetail?id=' + e.currentTarget.dataset.id | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      url: `../noticeDetail/noticeDetail?id=${e.currentTarget.dataset.id}&modulecode=${this.data.noticeCategory}` | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					}) |