立减金后台V1_3_0锁定版本
This commit is contained in:
parent
80712660b5
commit
118eb64510
|
@ -1,27 +1,24 @@
|
|||
import { Notify } from 'zent'
|
||||
// export const baseurl = 'https://marketapi.1688sup.com'
|
||||
// window.baseurl = 'https://marketapi.1688sup.com'
|
||||
// const Version = 'v1.2.0'
|
||||
window.baseurl = 'http://pre.marketapi.1688sup.com'
|
||||
let baseurl = 'http://pre.marketapi.1688sup.com'
|
||||
// if (process.env.NODE_ENV == 'test' || process.env.NODE_ENV == 'development') {
|
||||
// // 测试环境
|
||||
// baseurl = 'http://192.168.6.75'
|
||||
// window.baseurl = 'http://192.168.6.75'
|
||||
// }
|
||||
// if (process.env.NODE_ENV == 'production') {
|
||||
// // 生成环境
|
||||
// baseurl = 'https://marketapi.1688sup.com'
|
||||
// }
|
||||
// export let HOST = host;
|
||||
// export let API_URL = api_url;
|
||||
// export const baseurl = window.baseurl
|
||||
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') {
|
||||
// 测试环境
|
||||
baseurl = 'http://192.168.6.75'
|
||||
window.baseurl = 'http://192.168.6.75'
|
||||
}
|
||||
if (process.env.NODE_ENV == 'production') {
|
||||
// 生成环境
|
||||
baseurl = 'https://marketapi.1688sup.com'
|
||||
window.baseurl = 'https://marketapi.1688sup.com'
|
||||
}
|
||||
const upload = (method, url, params, responseType) => {
|
||||
let obj = {
|
||||
method: method,
|
||||
headers: new Headers({
|
||||
authorization: sessionStorage.getItem('authorization'),
|
||||
// Version: Version
|
||||
Version: Version
|
||||
}),
|
||||
body: params
|
||||
}
|
||||
|
@ -63,7 +60,7 @@ const derive = (method, url, params, responseType) => {
|
|||
responseType: 'blob',
|
||||
headers: new Headers({
|
||||
authorization: sessionStorage.getItem('authorization'),
|
||||
// Version: Version
|
||||
Version: Version
|
||||
})
|
||||
}
|
||||
if (method == 'get') {
|
||||
|
@ -119,7 +116,7 @@ const getData = (method, url, params, responseType) => {
|
|||
obj = {
|
||||
headers: new Headers({
|
||||
authorization: sessionStorage.getItem('authorization'),
|
||||
// Version: Version
|
||||
Version: Version
|
||||
})
|
||||
}
|
||||
if (params) {
|
||||
|
@ -179,7 +176,7 @@ const req = (method, url, params, responseType) => {
|
|||
obj = {
|
||||
headers: new Headers({
|
||||
authorization: sessionStorage.getItem('authorization'),
|
||||
// Version: Version
|
||||
Version: Version
|
||||
})
|
||||
}
|
||||
if (params) {
|
||||
|
@ -201,7 +198,7 @@ const req = (method, url, params, responseType) => {
|
|||
body: JSON.stringify(params),
|
||||
headers: new Headers({
|
||||
'Content-Type': 'application/json',
|
||||
// Version: Version
|
||||
Version: Version
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -213,7 +210,7 @@ const req = (method, url, params, responseType) => {
|
|||
headers: new Headers({
|
||||
'Content-Type': 'application/json',
|
||||
authorization: sessionStorage.getItem('authorization'),
|
||||
// Version: Version
|
||||
Version: Version
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -160,7 +160,7 @@ const getAccountList = () => {
|
|||
console.log(145, window.baseurl);
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.open("GET", window.baseurl + "/auth/login/verify");
|
||||
// xhr.setRequestHeader("Version", "v1.2.0");
|
||||
xhr.setRequestHeader("Version", "v1.3.0");
|
||||
xhr.responseType = "arraybuffer";
|
||||
xhr.onreadystatechange = function (response) {
|
||||
response.header = {
|
||||
|
|
Loading…
Reference in New Issue