| | |
| | | var vm = new Vue({ |
| | | el:'#nav', |
| | | data:{ |
| | | nav:{}, |
| | | nav:{ |
| | | moreNoticeUrl:'/flow/noticeFlow', |
| | | notices:[], |
| | | total:0 |
| | | }, |
| | | userName:"", |
| | | navCommunityInfo:{ |
| | | _currentCommunity:{ |
| | |
| | | getNavData:function(){ |
| | | |
| | | var param = { |
| | | msg:'123', |
| | | params:{ |
| | | page:1, |
| | | row:3, |
| | | communityId:vc.getCurrentCommunity().communityId |
| | | } |
| | | |
| | | }; |
| | | |
| | | //发送get请求 |
| | |
| | | 'getNavData', |
| | | param, |
| | | function(json){ |
| | | vm.nav = JSON.parse(json); |
| | | var _noticeObj = JSON.parse(json); |
| | | vm.nav.notices = _noticeObj.notices; |
| | | vm.nav.total = _noticeObj.total; |
| | | },function(){ |
| | | console.log('请求失败处理'); |
| | | } |
| | |
| | | }, |
| | | changeCommunity:function(_community){ |
| | | vc.setCurrentCommunity(_community); |
| | | vm.navCommunityInfo._currentCommunity= _community; |
| | | //中心加载当前页 |
| | | location.reload(); |
| | | }, |
| | | _noticeDetail:function(_notice){ |
| | | //console.log(_notice.noticeId); |
| | | vc.jumpToPage("/flow/noticeDetailFlow?noticeId="+_notice.noticeId); |
| | | } |
| | | } |
| | | |