更换editor,可支持拖拽式上传

This commit is contained in:
lemon橪
2022-07-05 18:04:04 +08:00
parent 8ef3510c4b
commit c7b739e546
21 changed files with 324 additions and 551 deletions

View File

@@ -15,6 +15,9 @@ export const managerUrl =
(process.env.NODE_ENV === "development"
? BASE.API_DEV.manager
: BASE.API_PROD.manager) + BASE.PREFIX;
// 文件上传接口
export const uploadFile = commonUrl + "/common/common/upload/file";
const service = axios.create({
timeout: 8000,
@@ -311,9 +314,10 @@ export const uploadFileRequest = (url, params) => {
return service({
method: "post",
url: `${url}`,
params: params,
data: params,
headers: {
accessToken: accessToken
accessToken: accessToken,
'Content-Type': 'multipart/form-data'
}
});
};
@@ -346,7 +350,7 @@ export const postRequestWithNoToken = (url, params) => {
/**
* 无需token验证的请求 避免旧token过期导致请求失败
* @param {*} url
* @param {*} url
* @param {*} params
*/
export const postRequestWithNoTokenData = (url, params) => {