import req from "@/request.js";


const bpmModel = 'http://localhost:9000/plat-boot';
export default {
	  getDepartment(cb) {
        req.post(bpmModel+`/department/getDepartment`).then(rep=>{
            cb(rep.data);
        });
    },

    getUserList(id,cb) {
        req.post(bpmModel + `userList/getUserList?id=${ id }`,).then(rep => {
            cb(rep.data)
        });
    },
    getCode(cb){
      req.post(bpmModel+`oauth/getCode`).then(response=>{
        cb(response);
      });
    },
    remove(mes,cb) {
      req.remove(bpmModel + `/message/sendMessage`,{
        "content":mes.content,
			  "agentId" : 1000019,
			  "toUser":mes.toUser
      }).then(rep => {
        cb(rep.data)
      });
    }
}
