优化代码

This commit is contained in:
wuxw 2022-08-11 23:06:55 +08:00
parent 451b16613e
commit a18d565dc6
21 changed files with 43 additions and 63 deletions

View File

@ -85,9 +85,8 @@
vc.component.addNoticeInfo.communityId = vc.getCurrentCommunity().communityId;
vc.http.post(
'addNotice',
'save',
vc.http.apiPost(
'/notice.saveNotice',
JSON.stringify(vc.component.addNoticeInfo),
{
emulateJSON: true

View File

@ -121,9 +121,8 @@
return;
}
vc.component.addNoticeViewInfo.communityId = vc.getCurrentCommunity().communityId;
vc.http.post(
'addNoticeView',
'save',
vc.http.apiPost(
'/notice.saveNotice',
JSON.stringify(vc.component.addNoticeViewInfo),
{
emulateJSON: true

View File

@ -48,9 +48,8 @@
return ;
}
vc.component.addResourceEnterQuantityInfo.stock = vc.component.addResourceEnterQuantityInfo.stock + vc.component.addResourceEnterQuantityInfo.enterQuantity
vc.http.post(
'editResourceStore',
'update',
vc.http.apiPost(
'/resourceStore.updateResourceStore',
JSON.stringify(vc.component.addResourceEnterQuantityInfo),
{
emulateJSON:true

View File

@ -189,9 +189,8 @@
$('#addResourceStoreModel').modal('hide');
return;
}
vc.http.post(
'addResourceStore',
'save',
vc.http.apiPost(
'/resourceStore.saveResourceStore',
JSON.stringify(vc.component.addResourceStoreInfo), {
emulateJSON: true
},

View File

@ -18,9 +18,8 @@
methods: {
deleteAuditUser: function () {
vc.component.deleteAuditUserInfo.communityId = vc.getCurrentCommunity().communityId;
vc.http.post(
'deleteAuditUser',
'delete',
vc.http.apiPost(
'/auditUser.deleteAuditUser',
JSON.stringify(vc.component.deleteAuditUserInfo),
{
emulateJSON: true

View File

@ -14,9 +14,8 @@
methods: {
deleteComplaint: function () {
vc.component.deleteComplaintInfo.communityId = vc.getCurrentCommunity().communityId;
vc.http.post(
'deleteComplaint',
'delete',
vc.http.apiPost(
'/complaint.deleteComplaint',
JSON.stringify(vc.component.deleteComplaintInfo),
{
emulateJSON: true

View File

@ -14,9 +14,8 @@
methods: {
deleteItemOut: function () {
vc.component.deleteItemOutInfo.communityId = vc.getCurrentCommunity().communityId;
vc.http.post(
'deletePurchaseApply',
'delete',
vc.http.apiPost(
'/purchaseApply.deletePurchaseApply',
JSON.stringify(vc.component.deleteItemOutInfo),
{
emulateJSON: true

View File

@ -14,9 +14,8 @@
methods: {
deleteNotice: function () {
vc.component.deleteNoticeInfo.communityId = vc.getCurrentCommunity().communityId;
vc.http.post(
'deleteNotice',
'delete',
vc.http.apiPost(
'/notice.deleteNotice',
JSON.stringify(vc.component.deleteNoticeInfo),
{
emulateJSON: true

View File

@ -20,9 +20,8 @@
methods:{
deleteOrgCommunity:function(){
vc.component.deleteOrgCommunityInfo.communityId=vc.getCurrentCommunity().communityId;
vc.http.post(
'deleteOrgCommunity',
'delete',
vc.http.apiPost(
'/org.deleteOrgCommunity',
JSON.stringify(vc.component.deleteOrgCommunityInfo),
{
emulateJSON:true

View File

@ -14,9 +14,8 @@
methods: {
deletePurchaseApply: function () {
vc.component.deletePurchaseApplyInfo.communityId = vc.getCurrentCommunity().communityId;
vc.http.post(
'deletePurchaseApply',
'delete',
vc.http.apiPost(
'/purchaseApply.deletePurchaseApply',
JSON.stringify(vc.component.deletePurchaseApplyInfo),
{
emulateJSON: true

View File

@ -14,9 +14,8 @@
methods: {
deleteResourceStore: function () {
vc.component.deleteResourceStoreInfo.communityId = vc.getCurrentCommunity().communityId;
vc.http.post(
'deleteResourceStore',
'delete',
vc.http.apiPost(
'/resourceStore.deleteResourceStore',
JSON.stringify(vc.component.deleteResourceStoreInfo), {
emulateJSON: true
},

View File

@ -79,9 +79,8 @@
vc.toast(vc.validate.errInfo);
return;
}
vc.http.post(
'editComplaint',
'update',
vc.http.apiPost(
'/complaint.updateComplaint',
JSON.stringify(vc.component.editComplaintInfo), {
emulateJSON: true
},

View File

@ -86,9 +86,8 @@ console.log("JS加载开始");
return;
}
console.log("开始向后台发送请求!");
vc.http.post(
'editResourceStore',
'update',
vc.http.apiPost(
'/resourceStore.updateResourceStore',
JSON.stringify(vc.component.editResourceStoreInfo),
{
emulateJSON: true

View File

@ -106,9 +106,8 @@
return;
}
vc.component.editNoticeViewInfo.communityId = vc.getCurrentCommunity().communityId;
vc.http.post(
'editNotice',
'update',
vc.http.apiPost(
'/notice.updateNotice',
JSON.stringify(vc.component.editNoticeViewInfo),
{
emulateJSON: true

View File

@ -51,9 +51,8 @@ state:'',
return ;
}
vc.http.post(
'editPurchaseApply',
'update',
vc.http.apiPost(
'/purchaseApply.updatePurchaseApply',
JSON.stringify(vc.component.editPurchaseApplyInfo),
{
emulateJSON:true

View File

@ -83,9 +83,8 @@
return;
}
vc.http.post(
'editResourceStore',
'update',
vc.http.apiPost(
'/resourceStore.updateResourceStore',
JSON.stringify(vc.component.editResourceStoreInfo),
{
emulateJSON: true

View File

@ -175,9 +175,8 @@
vc.toast(vc.validate.errInfo);
return;
}
vc.http.post(
'editResourceStore',
'update',
vc.http.apiPost(
'/resourceStore.updateResourceStore',
JSON.stringify(vc.component.editResourceStoreInfo), {
emulateJSON: true
},

View File

@ -45,9 +45,8 @@
vc.toast(vc.validate.errInfo);
return;
}
vc.http.post(
'editResourceStoreType',
'update',
vc.http.apiPost(
'/resourceStoreType.updateResourceStoreType',
JSON.stringify(vc.component.editResourceStoreTypeInfo),
{
emulateJSON: true

View File

@ -65,9 +65,8 @@
data: vc.component.itemOutInfo.infos
}
vc.http.post(
'itemOutBinding',
'binding',
vc.http.apiPost(
'/itemOut.itemOut',
JSON.stringify(param), {
emulateJSON: true
},

View File

@ -18,9 +18,8 @@
},
deleteParkingSpace: function () {
vc.component.deleteParkingSpaceInfo.communityId = vc.getCurrentCommunity().communityId;
vc.http.post(
'deleteParkingSpace',
'delete',
vc.http.apiPost(
'/parkingSpace.deleteParkingSpace',
JSON.stringify(vc.component.deleteParkingSpaceInfo),
{
emulateJSON: true

View File

@ -86,15 +86,15 @@
return;
}
vc.component.editParkingSpaceInfo.communityId = vc.getCurrentCommunity().communityId;
vc.http.post(
'editParkingSpace',
'changeParkingSpace',
vc.http.apiPost(
'/parkingSpace.editParkingSpace',
JSON.stringify(vc.component.editParkingSpaceInfo),
{
emulateJSON: true
},
function (json, res) {
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
if (res.status == 200) {
//关闭model
$('#editParkingSpaceModel').modal('hide');