|
@@ -1,5 +1,5 @@
|
|
-var Fly = require("../lib/wx.umd.min") //wx.js is your downloaded code
|
|
|
|
-var fly = new Fly(); //Create an instance of Fly
|
|
|
|
|
|
+const Fly = require("../lib/wx.umd.min") //wx.js is your downloaded code
|
|
|
|
+const fly = new Fly(); //Create an instance of Fly
|
|
const app = getApp()
|
|
const app = getApp()
|
|
|
|
|
|
//设置超时
|
|
//设置超时
|
|
@@ -10,12 +10,13 @@ import whiteList from './whiteList';
|
|
|
|
|
|
// Add interceptors
|
|
// Add interceptors
|
|
fly.interceptors.request.use((request) => {
|
|
fly.interceptors.request.use((request) => {
|
|
- wx.showLoading({
|
|
|
|
- title: '加载中',
|
|
|
|
- mask: true
|
|
|
|
- })
|
|
|
|
|
|
+// console.log('进入fly-request', request);
|
|
|
|
+wx.showLoading({
|
|
|
|
+ 'title': '加载中',
|
|
|
|
+ 'mask': true
|
|
|
|
+});
|
|
// 不显示加载页面的接口
|
|
// 不显示加载页面的接口
|
|
- if (whiteList.loading.indexOf(request.url) === -1) {
|
|
|
|
|
|
+ if (request.url.indexOf(whiteList.loading) === -1) {
|
|
// 隐藏loading遮罩
|
|
// 隐藏loading遮罩
|
|
wx.hideLoading();
|
|
wx.hideLoading();
|
|
}
|
|
}
|
|
@@ -111,6 +112,6 @@ fly.interceptors.response.use(
|
|
}
|
|
}
|
|
)
|
|
)
|
|
// Set the base url
|
|
// Set the base url
|
|
-fly.config.baseURL = "http://192.168.20.52:9999"
|
|
|
|
|
|
+fly.config.baseURL = "https://wx.sgsino.cn"
|
|
|
|
|
|
export default fly;
|
|
export default fly;
|