Browse Source

修改接口

seimin 3 years ago
parent
commit
ddae4200d3

+ 3 - 3
src/app/services/main.service.ts

@@ -99,9 +99,9 @@ export class MainService {
99
     });
99
     });
100
   }
100
   }
101
 
101
 
102
-  // 通用操作data信息(新增/更新/删除)//coop:操作类型addData:新增,updData更新,rmvData删除
103
-  coopDataM(m,coop, type, data): any {
104
-    return this.http.post(host.host + "/"+ m +"/" + coop + "/" + type, data, {
102
+  // 清空药品
103
+  coopDataM(coop, data): any {
104
+    return this.http.post(host.host + "/" + coop, data, {
105
       headers: this.headers,
105
       headers: this.headers,
106
     });
106
     });
107
   }
107
   }

+ 1 - 1
src/app/views/drug-search/drug-search.component.ts

@@ -49,7 +49,7 @@ export class DrugSearchComponent implements OnInit {
49
   confirmDel() {
49
   confirmDel() {
50
     this.btnLoading = true;
50
     this.btnLoading = true;
51
     this.mainService
51
     this.mainService
52
-      .coopDataM("drugsBag","updData", "drugsBag", {"drugsBag":{"hosId":1,"isEmpty":'ok'}})
52
+      .coopDataM("drugsBag/emptyData", {"hosId":1,"isEmpty":'ok'})
53
       .subscribe((data) => {
53
       .subscribe((data) => {
54
         this.btnLoading = false;
54
         this.btnLoading = false;
55
         this.delModal = false;
55
         this.delModal = false;