配置全局变量
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
|
||||
import { baseUrl } from '../project.config'
|
||||
let headerDefault = {
|
||||
'Accept': 'application/json'
|
||||
}
|
||||
@@ -6,8 +6,6 @@ let headerDefault1 = {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
}
|
||||
let TokenKey = 'X-Access-Token'
|
||||
let baseUrl = 'http://bxxt.hzwlsoft.com:1015'
|
||||
let URL_CONFIG = '/jero-boot/'
|
||||
|
||||
const http = (method, url, data, header= headerDefault) => {
|
||||
let Authorization = wx.getStorageSync(TokenKey) ? wx.getStorageSync(TokenKey) : '';
|
||||
@@ -39,8 +37,6 @@ const http = (method, url, data, header= headerDefault) => {
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
baseUrl,
|
||||
URL_CONFIG,
|
||||
get: (url, data, header) => http('GET', url, data, header),
|
||||
post: (url, data, header) => http('POST', url, data, header),
|
||||
post1: (url, data, header) => http('POST', url, data, headerDefault1),
|
||||
|
||||
Reference in New Issue
Block a user