|
@@ -10,6 +10,10 @@ const extConfig = uni.getExtConfigSync();
|
|
|
console.log(extConfig)
|
|
|
const baseUrl=extConfig.url+'/'
|
|
|
//wx2c6f04c0dcd15984正式 wx33053a645546ec31
|
|
|
+//测试地址
|
|
|
+//const webUrl = 'http://dms.32che.cn/'
|
|
|
+//正式
|
|
|
+const webUrl = 'http://webwx.66km.com/'
|
|
|
const http = (url = '', date = {}, type = 'POST', header = {
|
|
|
}) => {
|
|
|
return new Promise((resolve, reject) => {
|
|
@@ -51,7 +55,13 @@ const http = (url = '', date = {}, type = 'POST', header = {
|
|
|
}else if(res.data.code==409){
|
|
|
// getToken(url,date,type,header)
|
|
|
}
|
|
|
-
|
|
|
+ if(res.data.code==1){
|
|
|
+ uni.showToast({
|
|
|
+ title: res.data.msg,
|
|
|
+ icon:'none',
|
|
|
+ duration: 3000,
|
|
|
+ });
|
|
|
+ }
|
|
|
resolve(res.data);
|
|
|
}).catch(error => {
|
|
|
let [err, res] = error;
|
|
@@ -169,5 +179,5 @@ function refresh(url,date,type,header){
|
|
|
}
|
|
|
|
|
|
export default {
|
|
|
- http,baseUrl,httpBinary
|
|
|
+ http,baseUrl,httpBinary,webUrl
|
|
|
}
|