68 lines
2.7 KiB
JavaScript
68 lines
2.7 KiB
JavaScript
/**
|
|
入驻小区
|
|
**/
|
|
(function (vc) {
|
|
var DEFAULT_PAGE = 1;
|
|
var DEFAULT_ROWS = 10;
|
|
vc.extends({
|
|
data: {
|
|
applyWithholdIntegralInfo: {
|
|
applys: [],
|
|
integralId: '',
|
|
integralName: '',
|
|
}
|
|
},
|
|
_initMethod: function () {
|
|
},
|
|
_initEvent: function () {
|
|
vc.on('applyWithholdIntegral', 'switch', function (_data) {
|
|
$that.applyWithholdIntegralInfo.integralId = _data.integralId;
|
|
$that.applyWithholdIntegralInfo.integralName = _data.integralName;
|
|
$that._loadApplyWithholdIntegralData(DEFAULT_PAGE, DEFAULT_ROWS);
|
|
});
|
|
vc.on('applyWithholdIntegral', 'paginationPlus', 'page_event',
|
|
function (_currentPage) {
|
|
$that._loadApplyWithholdIntegralData(_currentPage, DEFAULT_ROWS);
|
|
});
|
|
vc.on('applyWithholdIntegral', 'notify', function (_data) {
|
|
$that._loadApplyWithholdIntegralData(DEFAULT_PAGE, DEFAULT_ROWS);
|
|
})
|
|
},
|
|
methods: {
|
|
_loadApplyWithholdIntegralData: function (_page, _row) {
|
|
let param = {
|
|
params: {
|
|
communityId: vc.getCurrentCommunity().communityId,
|
|
integralId: $that.communityIntegralDetailInfo.integralId,
|
|
mallApiCode:'queryCommunityIntegralApplyBmoImpl',
|
|
page: _page,
|
|
row: _row
|
|
}
|
|
};
|
|
//发送get请求
|
|
vc.http.apiGet('/mall.getMallOpenApi',
|
|
param,
|
|
function (json) {
|
|
let _json = JSON.parse(json);
|
|
$that.applyWithholdIntegralInfo.applys = _json.data;
|
|
vc.emit('applyWithholdIntegral', 'paginationPlus', 'init', {
|
|
total: _json.records,
|
|
dataCount: _json.total,
|
|
currentPage: _page
|
|
});
|
|
},
|
|
function () {
|
|
console.log('请求失败处理');
|
|
}
|
|
);
|
|
},
|
|
//查询
|
|
_qureyApplyWithholdIntegral: function () {
|
|
$that._loadApplyWithholdIntegralData(DEFAULT_PAGE, DEFAULT_ROWS);
|
|
},
|
|
_openDeleteIntegralWithdrawalModel:function(_applyWithholdIntegral){
|
|
vc.emit('deleteApplyWithholdIntegral', 'openDeleteApplyWithholdIntegralModal',_applyWithholdIntegral);
|
|
}
|
|
}
|
|
});
|
|
})(window.vc); |