/** 入驻小区 **/ (function (vc) { var DEFAULT_PAGE = 1; var DEFAULT_ROWS = 10; vc.extends({ data: { shareReadingFeeInfo: { fees: [], total: 0, records: 1, moreCondition: false, readingId: '', conditions: { readingId: '', state:'', communityId: '', roomName:'', ownerNameLike:'' } } }, _initMethod: function () { $that.shareReadingFeeInfo.conditions.readingId = vc.getParam('readingId'); $that._listShareReadingFees(DEFAULT_PAGE, DEFAULT_ROWS); }, _initEvent: function () { vc.on('shareReadingFee', 'listShareReadingFee', function (_param) { $that._listShareReadingFees(DEFAULT_PAGE, DEFAULT_ROWS); }); vc.on('pagination', 'page_event', function (_currentPage) { $that._listShareReadingFees(_currentPage, DEFAULT_ROWS); }); }, methods: { _listShareReadingFees: function (_page, _rows) { $that.shareReadingFeeInfo.conditions.page = _page; $that.shareReadingFeeInfo.conditions.row = _rows; $that.shareReadingFeeInfo.conditions.communityId = vc.getCurrentCommunity().communityId; let param = { params: $that.shareReadingFeeInfo.conditions }; //发送get请求 vc.http.apiGet('/meter.listFloorShareFee', param, function (json, res) { let _json = JSON.parse(json); $that.shareReadingFeeInfo.total = _json.total; $that.shareReadingFeeInfo.records = _json.records; $that.shareReadingFeeInfo.fees = _json.data; vc.emit('pagination', 'init', { total: $that.shareReadingFeeInfo.records, currentPage: _page }); }, function (errInfo, error) { console.log('请求失败处理'); } ); }, _queryShareReadingFeeMethod: function () { $that._listShareReadingFees(DEFAULT_PAGE, DEFAULT_ROWS); }, _toFeeDetailPage:function(_fee){ vc.jumpToPage('/#/pages/fee/feeDetail?feeId='+_fee.feeId); } } }); })(window.vc);