添加全局蓝牙监听
This commit is contained in:
@ -5,7 +5,13 @@ const request = (options) => {
|
|||||||
console.log("options"+JSON.stringify(options),BASE.BASE_URL)
|
console.log("options"+JSON.stringify(options),BASE.BASE_URL)
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
// 处理GET请求参数
|
// 处理GET请求参数
|
||||||
let url = BASE.BASE_URL + options.url;
|
let url =options.url;
|
||||||
|
if(url.indexOf('http://')===0 || url.indexOf('https://')===0){
|
||||||
|
url=url;
|
||||||
|
}else{
|
||||||
|
url=BASE.BASE_URL + url;
|
||||||
|
}
|
||||||
|
|
||||||
console.log("url"+url)
|
console.log("url"+url)
|
||||||
if (options.method === 'GET' && options.data) {
|
if (options.method === 'GET' && options.data) {
|
||||||
// 使用qs序列化参数
|
// 使用qs序列化参数
|
||||||
|
Reference in New Issue
Block a user