/** 入驻小区 **/ (function (vc) { var DEFAULT_PAGE = 1; var DEFAULT_ROWS = 10; vc.extends({ data: { aOwnerDetailAccountInfo: { accounts: [], ownerId: '', name: '', } }, _initMethod: function () { }, _initEvent: function () { vc.on('aOwnerDetailAccount', 'switch', function (_data) { $that.aOwnerDetailAccountInfo.ownerId = _data.ownerId; $that._loadAOwnerDetailAccountData(DEFAULT_PAGE, DEFAULT_ROWS); }); vc.on('aOwnerDetailAccount', 'paginationPlus', 'page_event', function (_currentPage) { $that._loadAOwnerDetailAccountData(_currentPage, DEFAULT_ROWS); }); vc.on('aOwnerDetailAccount', 'notify', function (_data) { $that._loadAOwnerDetailAccountData(DEFAULT_PAGE, DEFAULT_ROWS); }) }, methods: { _loadAOwnerDetailAccountData: function (_page, _row) { let param = { params: { ownerId: $that.aOwnerDetailAccountInfo.ownerId, page: _page, row: _row } }; //发送get请求 vc.http.apiGet('/account.queryAdminOwnerAccount', param, function (json) { let _roomInfo = JSON.parse(json); $that.aOwnerDetailAccountInfo.accounts = _roomInfo.data; vc.emit('aOwnerDetailAccount', 'paginationPlus', 'init', { total: _roomInfo.records, dataCount: _roomInfo.total, currentPage: _page }); }, function () { console.log('请求失败处理'); } ); }, //查询 _qureyAOwnerDetailAccount: function () { $that._loadAOwnerDetailAccountData(DEFAULT_PAGE, DEFAULT_ROWS); }, _accountDetail: function (_account) { vc.jumpToPage('/#/pages/property/accountDetailManage?acctId=' + _account.acctId); }, } }); })(window.vc);