优化代码

This commit is contained in:
wuxw 2022-08-11 23:52:47 +08:00
parent 214f7acc07
commit 91ddf3d8ce
16 changed files with 32 additions and 48 deletions

View File

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

View File

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

View File

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

View File

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

View File

@ -13,9 +13,8 @@
methods: {
deleteInspectionRoute: function() {
vc.component.deleteInspectionRouteInfo.communityId = vc.getCurrentCommunity().communityId;
vc.http.post(
'deleteInspectionRoute',
'delete',
vc.http.apiPost(
'/inspectionRoute.deleteInspectionRoute',
JSON.stringify(vc.component.deleteInspectionRouteInfo), {
emulateJSON: true
},

View File

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

View File

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

View File

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

View File

@ -110,9 +110,8 @@
return;
}
vc.component.editActivitiesViewInfo.communityId = vc.getCurrentCommunity().communityId;
vc.http.post(
'editActivitiesView',
'update',
vc.http.apiPost(
'/activities.updateActivities',
JSON.stringify(vc.component.editActivitiesViewInfo), {
emulateJSON: true
},

View File

@ -192,9 +192,8 @@
} else {
vc.component.editAdvertInfo.photos = [];
}
vc.http.post(
'editAdvert',
'update',
vc.http.apiPost(
'/advert.updateAdvert',
JSON.stringify(vc.component.editAdvertInfo), {
emulateJSON: true
},

View File

@ -260,9 +260,8 @@
return;
}
vc.http.post(
'editApplicationKey',
'update',
vc.http.apiPost(
'/applicationKey.updateApplicationKey',
JSON.stringify(vc.component.editApplicationKeyInfo),
{
emulateJSON: true

View File

@ -181,9 +181,8 @@
vc.toast(vc.validate.errInfo);
return;
}
vc.http.post(
'editInspectionPlan',
'update',
vc.http.apiPost(
'/inspectionPlan.updateInspectionPlan',
JSON.stringify(vc.component.editInspectionPlanInfo),
{
emulateJSON: true

View File

@ -109,9 +109,8 @@
vc.toast(vc.validate.errInfo);
return;
}
vc.http.post(
'editInspectionPoint',
'update',
vc.http.apiPost(
'/inspectionPoint.updateInspectionPoint',
JSON.stringify(vc.component.editInspectionPointInfo), {
emulateJSON: true
},

View File

@ -228,9 +228,8 @@
return;
}
vc.http.post(
'editMachine',
'update',
vc.http.apiPost(
'/machine.updateMachine',
JSON.stringify(vc.component.editMachineInfo), {
emulateJSON: true
},

View File

@ -135,9 +135,8 @@
return;
}
vc.component.editOwnerRepairInfo.communityId = vc.getCurrentCommunity().communityId;
vc.http.post(
'editOwnerRepair',
'update',
vc.http.apiPost(
'/ownerRepair.updateOwnerRepair',
JSON.stringify(vc.component.editOwnerRepairInfo),
{
emulateJSON: true

View File

@ -122,9 +122,8 @@
vc.toast(vc.validate.errInfo);
return;
}
vc.http.post(
'editVisit',
'update',
vc.http.apiPost(
'/visit.updateVisit',
JSON.stringify(vc.component.editVisitInfo),
{
emulateJSON: true