http请求 域名修改
This commit is contained in:
@@ -18,7 +18,7 @@
|
|||||||
"color": "#999",
|
"color": "#999",
|
||||||
"backgroundColor": "#fff",
|
"backgroundColor": "#fff",
|
||||||
"borderStyle": "white",
|
"borderStyle": "white",
|
||||||
"list": [
|
"list": [
|
||||||
{
|
{
|
||||||
"text": "首页",
|
"text": "首页",
|
||||||
"pagePath": "pages/home/home",
|
"pagePath": "pages/home/home",
|
||||||
@@ -33,6 +33,12 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"plugins": {
|
||||||
|
"kdPlugin": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"provider": "wx6885acbedba59c14"
|
||||||
|
}
|
||||||
|
},
|
||||||
"style": "v2",
|
"style": "v2",
|
||||||
"sitemapLocation": "sitemap.json"
|
"sitemapLocation": "sitemap.json"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
import http from './http.js'
|
import http from './http.js'
|
||||||
|
let baseUrl = http.baseUrl
|
||||||
// let baseUrl = 'https://share.hzwlsoft.com'
|
let URL_CONFIG = http.URL_CONFIG
|
||||||
// let baseUrl = 'http://localhost:8080'
|
|
||||||
let baseUrl = 'http://10.0.1.16:8080'
|
|
||||||
let URL_CONFIG = '/jero-boot/'
|
|
||||||
// let baseUrl = 'http://192.168.1.110:8080'
|
|
||||||
/* 配置路径 */
|
/* 配置路径 */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,9 @@ let headerDefault1 = {
|
|||||||
'content-type': 'application/x-www-form-urlencoded'
|
'content-type': 'application/x-www-form-urlencoded'
|
||||||
}
|
}
|
||||||
let TokenKey = 'X-Access-Token'
|
let TokenKey = 'X-Access-Token'
|
||||||
let baseUrl = 'http://10.0.1.9:8080'
|
let baseUrl = 'http://bxxt.hzwlsoft.com:1015'
|
||||||
// let baseUrl = 'http://localhost:8080'
|
let URL_CONFIG = '/jero-boot/'
|
||||||
|
|
||||||
const http = (method, url, data, header= headerDefault) => {
|
const http = (method, url, data, header= headerDefault) => {
|
||||||
let Authorization = wx.getStorageSync(TokenKey) ? wx.getStorageSync(TokenKey) : '';
|
let Authorization = wx.getStorageSync(TokenKey) ? wx.getStorageSync(TokenKey) : '';
|
||||||
header[TokenKey] = Authorization == '' ? '' : Authorization
|
header[TokenKey] = Authorization == '' ? '' : Authorization
|
||||||
@@ -28,6 +29,7 @@ const http = (method, url, data, header= headerDefault) => {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
fail: err => {
|
fail: err => {
|
||||||
|
console.log(err)
|
||||||
reject(err);
|
reject(err);
|
||||||
wx.hideLoading();
|
wx.hideLoading();
|
||||||
},
|
},
|
||||||
@@ -37,6 +39,8 @@ const http = (method, url, data, header= headerDefault) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
baseUrl,
|
||||||
|
URL_CONFIG,
|
||||||
get: (url, data, header) => http('GET', url, data, header),
|
get: (url, data, header) => http('GET', url, data, header),
|
||||||
post: (url, data, header) => http('POST', url, data, header),
|
post: (url, data, header) => http('POST', url, data, header),
|
||||||
post1: (url, data, header) => http('POST', url, data, headerDefault1),
|
post1: (url, data, header) => http('POST', url, data, headerDefault1),
|
||||||
|
|||||||
+2
-2
@@ -20,7 +20,7 @@
|
|||||||
"checkInvalidKey": true,
|
"checkInvalidKey": true,
|
||||||
"checkSiteMap": true,
|
"checkSiteMap": true,
|
||||||
"uploadWithSourceMap": true,
|
"uploadWithSourceMap": true,
|
||||||
"compileHotReLoad": false,
|
"compileHotReLoad": true,
|
||||||
"lazyloadPlaceholderEnable": false,
|
"lazyloadPlaceholderEnable": false,
|
||||||
"useMultiFrameRuntime": true,
|
"useMultiFrameRuntime": true,
|
||||||
"useApiHook": true,
|
"useApiHook": true,
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
},
|
},
|
||||||
"compileType": "miniprogram",
|
"compileType": "miniprogram",
|
||||||
"libVersion": "2.19.0",
|
"libVersion": "2.19.0",
|
||||||
"appid": "wx24914e866df035fb",
|
"appid": "wx322b63d1e6ff4765",
|
||||||
"projectname": "income_payments_applet",
|
"projectname": "income_payments_applet",
|
||||||
"debugOptions": {
|
"debugOptions": {
|
||||||
"hidedInDevtools": []
|
"hidedInDevtools": []
|
||||||
|
|||||||
Reference in New Issue
Block a user