前段 将费用项修改 cmd模式 方便 二开 让代码开发起来更加简单

This commit is contained in:
java110 2022-04-01 09:08:09 +08:00
parent 290d871aa1
commit a74e57c603
4 changed files with 24 additions and 21 deletions

View File

@ -241,12 +241,13 @@
$('#addFeeConfigModel').modal('hide');
return;
}
vc.http.post('addFeeConfig', 'save', JSON.stringify(vc.component.addFeeConfigInfo), {
vc.http.apiPost('/feeConfig.saveFeeConfig', JSON.stringify(vc.component.addFeeConfigInfo), {
emulateJSON: true
},
function(json, res) {
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
if (res.status == 200) {
let _json = JSON.parse(json)
if (_json.code == 0) {
//关闭model
$('#addFeeConfigModel').modal('hide');
vc.component.clearAddFeeConfigInfo();
@ -254,6 +255,7 @@
vc.toast("添加成功");
return;
}
vc.toast(_json.msg)
},
function(errInfo, error) {
console.log('请求失败处理');

View File

@ -3,8 +3,7 @@
data: {
deleteFeeConfigInfo: {}
},
_initMethod: function () {
},
_initMethod: function() {},
_initEvent: function() {
vc.on('deleteFeeConfig', 'openDeleteFeeConfigModal', function(_params) {
vc.component.deleteFeeConfigInfo = _params;
@ -14,22 +13,22 @@
methods: {
deleteFeeConfig: function() {
vc.component.deleteFeeConfigInfo.communityId = vc.getCurrentCommunity().communityId;
vc.http.post(
'deleteFeeConfig',
'delete',
JSON.stringify(vc.component.deleteFeeConfigInfo),
{
vc.http.apiPost(
'/feeConfig.deleteFeeConfig',
JSON.stringify(vc.component.deleteFeeConfigInfo), {
emulateJSON: true
},
function(json, res) {
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
if (res.status == 200) {
let _json = JSON.parse(json)
if (_json.code == 0) {
//关闭model
$('#deleteFeeConfigModel').modal('hide');
vc.emit('feeConfigManage', 'listFeeConfig', {});
vc.toast("删除成功");
return;
}
vc.toast(_json.msg)
},
function(errInfo, error) {
console.log('请求失败处理');

View File

@ -236,18 +236,20 @@
vc.toast(vc.validate.errInfo);
return;
}
vc.http.post('editFeeConfig', 'update', JSON.stringify(vc.component.editFeeConfigInfo), {
vc.http.apiPost('/feeConfig.updateFeeConfig', JSON.stringify(vc.component.editFeeConfigInfo), {
emulateJSON: true
},
function(json, res) {
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
if (res.status == 200) {
let _json = JSON.parse(json);
if (_json.code == 0) {
//关闭model
$('#editFeeConfigModel').modal('hide');
vc.emit('feeConfigManage', 'listFeeConfig', {});
vc.toast("修改成功");
return;
}
vc.toast(_json.msg)
},
function(errInfo, error) {
console.log('请求失败处理');

View File

@ -75,7 +75,7 @@
//费用项ID选框去空
param.params.configId = param.params.configId.trim();
//发送get请求
vc.http.get('feeConfigManage', 'list', param,
vc.http.apiGet('/feeConfig.listFeeConfigs', param,
function(json, res) {
var _feeConfigManageInfo = JSON.parse(json);
vc.component.feeConfigManageInfo.total = _feeConfigManageInfo.total;