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