/** 业主详情页面 **/ (function (vc) { vc.extends({ data: { communityIntegralInfo: { integralId: "", integralName: '', amount: "", communityName: "", communityId: "", _currentTab: 'communityIntegralDetail', } }, _initMethod: function () { $that._loadCommunityIntegralInfo(); }, _initEvent: function () { vc.on('communityIntegral', 'listGoldData', function (_info) { $that._loadCommunityIntegralInfo(); $that.changeTab($that.communityIntegralInfo._currentTab); }); vc.on('communityIntegral', 'listGoldWithdrawal',function(){ $that.communityIntegralInfo._currentTab = 'applyWithholdIntegral'; $that.changeTab($that.communityIntegralInfo._currentTab); }) }, methods: { _loadCommunityIntegralInfo: function () { let param = { params: { page: 1, row: 1, communityId: vc.getCurrentCommunity().communityId, mallApiCode:'queryCommunityIntegralBmoImpl' } } //发送get请求 vc.http.apiGet('/mall.getMallOpenApi', param, function (json, res) { let _json = JSON.parse(json); vc.copyObject(_json.data[0], $that.communityIntegralInfo); $that.changeTab($that.communityIntegralInfo._currentTab); }, function (errInfo, error) { console.log('请求失败处理'); } ); }, changeTab: function (_tab) { $that.communityIntegralInfo._currentTab = _tab; vc.emit(_tab, 'switch', { integralId: $that.communityIntegralInfo.integralId, integralName: $that.communityIntegralInfo.integralName, }); }, _openApplyWithholdIntegral:function(){ vc.emit('withholdIntegral', 'openWithholdIntegralModal',{ integralId:$that.communityIntegralInfo.integralId, amount:$that.communityIntegralInfo.amount, communityId:$that.communityIntegralInfo.communityId, }) } } }); })(window.vc);