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