You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
839 B
32 lines
839 B
import proxy from "../proxy"; |
|
const comment = { |
|
list: |
|
(data = {}) => |
|
async (dispatch) => |
|
await proxy.get("comment/list", data, { dispatch }), |
|
info: |
|
(data = {}) => |
|
async (dispatch) => { |
|
await proxy.get("comment/info", data, { dispatch }); |
|
}, |
|
add: |
|
(data = {}, data2) => |
|
async (dispatch) => { |
|
await proxy.post("comment/add", data, { dispatch }); |
|
if (data2) await proxy.get("book/info", data2, { dispatch }); |
|
}, |
|
del: |
|
(data = {}, data2 = {}) => |
|
async (dispatch) => { |
|
await proxy.delete("ar/delete", data); |
|
await proxy.get("ar/list", data2, { dispatch }); |
|
}, |
|
update: |
|
(data = {}, data2 = {}) => |
|
async (dispatch) => { |
|
await proxy.put("ar/update", data); |
|
await proxy.get("ar/list", data2, { dispatch }); |
|
}, |
|
}; |
|
|
|
export default comment; |