| | |
| | | ? BASE.API_DEV.manager |
| | | : BASE.API_PROD.manager) + BASE.PREFIX; |
| | | // 文件上传接口 |
| | | export const uploadFile = commonUrl + "/common/common/upload/file"; |
| | | export const uploadFile = commonUrl + "/common/lmk/file/upload"; |
| | | |
| | | |
| | | const service = axios.create({ |
| | |
| | | } |
| | | switch (data.code) { |
| | | case 400: |
| | | if (data.message !== null) { |
| | | Message.error(data.message); |
| | | if (data.msg !== null) { |
| | | Message.error(data.msg); |
| | | } else { |
| | | Message.error("系统异常"); |
| | | } |
| | |
| | | Cookies.set("userInfoManager", ""); |
| | | setStore("accessToken", ""); |
| | | if (router.history.current.name != "login") { |
| | | if (data.message !== null) { |
| | | Message.error(data.message); |
| | | if (data.msg !== null) { |
| | | Message.error(data.msg); |
| | | } else { |
| | | Message.error("未知错误,请重新登录"); |
| | | } |
| | |
| | | break; |
| | | case 500: |
| | | // 系统异常 |
| | | if (data.message !== null) { |
| | | Message.error(data.message); |
| | | if (data.msg !== null) { |
| | | Message.error(data.msg); |
| | | } else { |
| | | Message.error("系统异常"); |
| | | } |
| | |
| | | }); |
| | | }; |
| | | |
| | | export const uploadFileByLmk = (params) =>{ |
| | | return service({ |
| | | url: "/common/upload/file", |
| | | method: "POST", |
| | | headers:{'Content-Type': 'multipart/form-data'}, |
| | | data: params |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * 无需token验证的请求 避免旧token过期导致请求失败 |
| | | * @param {*} url |