update:法人修改重新上传
This commit is contained in:
@@ -1,28 +1,37 @@
|
||||
import { message } from "ant-design-vue";
|
||||
import axios from "axios";
|
||||
export async function get(url, params) {
|
||||
var response = await axios.get(url, { params });
|
||||
if (response.status == 200) {
|
||||
try {
|
||||
var response = await axios.get(url, { params });
|
||||
return response.data;
|
||||
} else if (response.status == 401) {
|
||||
message.warning(
|
||||
"未登录或身份认证信息已过期",
|
||||
(onclose = () => {
|
||||
top && top.login();
|
||||
})
|
||||
);
|
||||
} catch (error) {
|
||||
if (error.response && error.response.status == "401") {
|
||||
return new {
|
||||
errorCode: -1,
|
||||
errorMsg: "身份认证失败"
|
||||
}();
|
||||
} else {
|
||||
return new {
|
||||
errorCode: -1,
|
||||
errorMsg: "请求出错"
|
||||
}();
|
||||
}
|
||||
}
|
||||
}
|
||||
export async function post(url, data) {
|
||||
var response = await axios.post(url, data);
|
||||
if (response.status == 200) {
|
||||
try {
|
||||
var response = await axios.post(url, data);
|
||||
return response.data;
|
||||
} else if (response.status == 401) {
|
||||
message.warning(
|
||||
"未登录或身份认证信息已过期",
|
||||
(onclose = () => {
|
||||
top && top.login();
|
||||
})
|
||||
);
|
||||
} catch (error) {
|
||||
if (error.response && error.response.status == "401") {
|
||||
return new {
|
||||
errorCode: -1,
|
||||
errorMsg: "身份认证失败"
|
||||
}();
|
||||
} else {
|
||||
return new {
|
||||
errorCode: -1,
|
||||
errorMsg: "请求出错"
|
||||
}();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user