营销系统V1_4版本锁版,取消版本号

This commit is contained in:
Apple 2022-08-17 21:46:45 +08:00
parent 855218556e
commit d7bc189aaa
2 changed files with 11 additions and 10 deletions

View File

@ -1,6 +1,7 @@
import { Notify } from "zent";
// export const baseurl = 'https://marketapi.1688sup.com'
const Version = "v1.3.0";
//镜像环境
// export const baseurl = 'http://pre.marketapi.1688sup.com'
// const Version = "v1.3.0";
// window.baseurl = 'http://pre.marketapi.1688sup.com'
let baseurl = "";
if (process.env.NODE_ENV == "test" || process.env.NODE_ENV == "development") {
@ -18,7 +19,7 @@ const upload = (method, url, params, responseType) => {
method: method,
headers: new Headers({
authorization: sessionStorage.getItem("authorization"),
Version: Version,
// Version: Version,
}),
body: params,
};
@ -60,7 +61,7 @@ const derive = (method, url, params, responseType) => {
responseType: "blob",
headers: new Headers({
authorization: sessionStorage.getItem("authorization"),
Version: Version,
// Version: Version,
}),
};
if (method == "get") {
@ -116,7 +117,7 @@ const getData = (method, url, params, responseType) => {
obj = {
headers: new Headers({
authorization: sessionStorage.getItem("authorization"),
Version: Version,
// Version: Version,
}),
};
if (params) {
@ -176,7 +177,7 @@ const req = (method, url, params, responseType) => {
obj = {
headers: new Headers({
authorization: sessionStorage.getItem("authorization"),
Version: Version,
// Version: Version,
}),
};
if (params) {
@ -198,7 +199,7 @@ const req = (method, url, params, responseType) => {
body: JSON.stringify(params),
headers: new Headers({
"Content-Type": "application/json",
Version: Version,
// Version: Version,
}),
};
}
@ -210,7 +211,7 @@ const req = (method, url, params, responseType) => {
headers: new Headers({
"Content-Type": "application/json",
authorization: sessionStorage.getItem("authorization"),
Version: Version,
// Version: Version,
}),
};
}

View File

@ -162,7 +162,7 @@ const getAccountList = () => {
console.log(145, window.baseurl);
const xhr = new XMLHttpRequest();
xhr.open("GET", window.baseurl + "/auth/login/verify");
xhr.setRequestHeader("Version", "v1.3.0");
// xhr.setRequestHeader("Version", "v1.3.0");
xhr.responseType = "arraybuffer";
xhr.onreadystatechange = function (response) {
response.header = {