68 lines
2.5 KiB
JavaScript
68 lines
2.5 KiB
JavaScript
/**
|
|
入驻小区
|
|
**/
|
|
(function (vc) {
|
|
var DEFAULT_PAGE = 1;
|
|
var DEFAULT_ROWS = 10;
|
|
vc.extends({
|
|
data: {
|
|
applyWithholdGoldInfo: {
|
|
applys: [],
|
|
goldId: '',
|
|
goldName: '',
|
|
}
|
|
},
|
|
_initMethod: function () {
|
|
},
|
|
_initEvent: function () {
|
|
vc.on('applyWithholdGold', 'switch', function (_data) {
|
|
$that.applyWithholdGoldInfo.goldId = _data.goldId;
|
|
$that.applyWithholdGoldInfo.goldName = _data.goldName;
|
|
$that._loadApplyWithholdGoldData(DEFAULT_PAGE, DEFAULT_ROWS);
|
|
});
|
|
vc.on('applyWithholdGold', 'paginationPlus', 'page_event',
|
|
function (_currentPage) {
|
|
$that._loadApplyWithholdGoldData(_currentPage, DEFAULT_ROWS);
|
|
});
|
|
vc.on('applyWithholdGold', 'notify', function (_data) {
|
|
$that._loadApplyWithholdGoldData(DEFAULT_PAGE, DEFAULT_ROWS);
|
|
})
|
|
},
|
|
methods: {
|
|
_loadApplyWithholdGoldData: function (_page, _row) {
|
|
let param = {
|
|
params: {
|
|
communityId: vc.getCurrentCommunity().communityId,
|
|
goldId: $that.applyWithholdGoldInfo.goldId,
|
|
mallApiCode:'queryPropertyGoldApplysBmoImpl',
|
|
page: _page,
|
|
row: _row
|
|
}
|
|
};
|
|
//发送get请求
|
|
vc.http.apiGet('/mall.getMallOpenApi',
|
|
param,
|
|
function (json) {
|
|
let _json = JSON.parse(json);
|
|
$that.applyWithholdGoldInfo.applys = _json.data;
|
|
vc.emit('applyWithholdGold', 'paginationPlus', 'init', {
|
|
total: _json.records,
|
|
dataCount: _json.total,
|
|
currentPage: _page
|
|
});
|
|
},
|
|
function () {
|
|
console.log('请求失败处理');
|
|
}
|
|
);
|
|
},
|
|
//查询
|
|
_qureyApplyWithholdGold: function () {
|
|
$that._loadApplyWithholdGoldData(DEFAULT_PAGE, DEFAULT_ROWS);
|
|
},
|
|
_openDeleteGoldWithdrawalModel:function(_applyWithholdGold){
|
|
vc.emit('deleteApplyWithholdGold','openDeleteApplyWithholdGoldModal',_applyWithholdGold);
|
|
}
|
|
}
|
|
});
|
|
})(window.vc); |