v1.1.0
This commit is contained in:
@@ -15,6 +15,7 @@ const API = {
|
||||
createRecord: (data) => request.post('/health/escort-record', data),
|
||||
updateRecord: (id, data) => request.put(`/health/escort-record/${id}`, data),
|
||||
updateStatus: (id, data) => request.patch(`/health/escort-record/${id}/status`, data),
|
||||
deleteRecord: (id) => request.delete(`/health/escort-record/${id}`),
|
||||
},
|
||||
|
||||
resource: {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
class Request {
|
||||
|
||||
constructor(baseURL = 'https://api.huashengtec.com') {
|
||||
//constructor(baseURL = 'http://127.0.0.1:9004') {
|
||||
//constructor(baseURL = 'http://127.0.0.1:9010') {
|
||||
this.baseURL = baseURL
|
||||
}
|
||||
|
||||
@@ -45,6 +45,18 @@ class Request {
|
||||
post(url, data = {}, options = {}) {
|
||||
return this.request({ url, method: 'POST', data, ...options })
|
||||
}
|
||||
|
||||
put(url, data = {}, options = {}) {
|
||||
return this.request({ url, method: 'PUT', data, ...options })
|
||||
}
|
||||
|
||||
patch(url, data = {}, options = {}) {
|
||||
return this.request({ url, method: 'PATCH', data, ...options })
|
||||
}
|
||||
|
||||
delete(url, data = {}, options = {}) {
|
||||
return this.request({ url, method: 'DELETE', data, ...options })
|
||||
}
|
||||
}
|
||||
|
||||
const request = new Request()
|
||||
|
||||
Reference in New Issue
Block a user