11.20
This commit is contained in:
+17
-18
@@ -1,19 +1,18 @@
|
||||
let BASE_URL=''
|
||||
if(process.env.UNI_PLATFORM =="h5"){
|
||||
if (window.location.href.indexOf('//casedata.igandan.com')>-1){
|
||||
BASE_URL='https://dev-app.igandan.com/app'
|
||||
}else{
|
||||
BASE_URL='https://dev-app.igandan.com/app'
|
||||
}
|
||||
}else if(process.env.UNI_PLATFORM =="mp-weixin"){
|
||||
const { envVersion } = uni.getAccountInfoSync().miniProgram;
|
||||
if (envVersion == "release") {
|
||||
BASE_URL='https://app.igandan.com/app'
|
||||
}else{
|
||||
BASE_URL='https://dev-app.igandan.com/app'
|
||||
}
|
||||
}else{
|
||||
//BASE_URL='https://dev-app.igandan.com/app'
|
||||
BASE_URL='https://app.igandan.com/app'
|
||||
}
|
||||
|
||||
console.log('打印app');
|
||||
let BASE_URL='https://dev-app.igandan.com/app';
|
||||
// try {
|
||||
// const app = getApp({allowDefault: true});
|
||||
|
||||
// if(app.globalData.apiHost && app.globalData.apiHost.indexOf('dev')>-1){
|
||||
// BASE_URL='https://dev-app.igandan.com/app'
|
||||
// }else{
|
||||
// BASE_URL='https://app.igandan.com/app'
|
||||
// }
|
||||
// console.log(app);
|
||||
// } catch (error) {
|
||||
|
||||
// }
|
||||
|
||||
|
||||
export default BASE_URL
|
||||
+25
-18
@@ -1,19 +1,26 @@
|
||||
let DOC_URL=''
|
||||
if(process.env.UNI_PLATFORM =="h5"){
|
||||
if (window.location.href.indexOf('//casedata.igandan.com')>-1){
|
||||
DOC_URL='https://doc.igandan.com/app/'
|
||||
}else{
|
||||
DOC_URL='https://dev-doc.igandan.com/app/'
|
||||
}
|
||||
}else if(process.env.UNI_PLATFORM =="mp-weixin"){
|
||||
const { envVersion } = uni.getAccountInfoSync().miniProgram;
|
||||
if (envVersion == "release") {
|
||||
DOC_URL='https://app.igandan.com/app/'
|
||||
}else{
|
||||
DOC_URL='https://dev-doc.igandan.com/app/'
|
||||
}
|
||||
}else{
|
||||
//DOC_URL='https://dev-doc.igandan.com/app/'
|
||||
DOC_URL='https://doc.igandan.com/app/'
|
||||
}
|
||||
//const app = getApp();
|
||||
let DOC_URL='https://dev-doc.igandan.com/app/';
|
||||
// if(app.globalData.apiHost.indexOf('dev')>-1){
|
||||
// DOC_URL='https://dev-doc.igandan.com/app/'
|
||||
// }else{
|
||||
// DOC_URL='https://doc.igandan.com/app/'
|
||||
// }
|
||||
// if(process.env.UNI_PLATFORM =="h5"){
|
||||
// if (window.location.href.indexOf('//casedata.igandan.com')>-1){
|
||||
// DOC_URL='https://doc.igandan.com/app/'
|
||||
// }else{
|
||||
// DOC_URL='https://dev-doc.igandan.com/app/'
|
||||
// }
|
||||
// }else if(process.env.UNI_PLATFORM =="mp-weixin"){
|
||||
// const { envVersion } = uni.getAccountInfoSync().miniProgram;
|
||||
// if (envVersion == "release") {
|
||||
// DOC_URL='https://app.igandan.com/app/'
|
||||
// }else{
|
||||
// DOC_URL='https://dev-doc.igandan.com/app/'
|
||||
// }
|
||||
// }else{
|
||||
// //DOC_URL='https://dev-doc.igandan.com/app/'
|
||||
// DOC_URL='https://doc.igandan.com/app/'
|
||||
// }
|
||||
|
||||
export default DOC_URL
|
||||
+18
-12
@@ -1,13 +1,19 @@
|
||||
let OTHER_HOST=''
|
||||
if(process.env.UNI_PLATFORM =="mp-weixin"){
|
||||
const { envVersion } = uni.getAccountInfoSync().miniProgram;
|
||||
if (envVersion == "release") {
|
||||
OTHER_HOST='https://wx.igandan.com'
|
||||
}else{
|
||||
OTHER_HOST='https://dev-wx.igandan.com'
|
||||
}
|
||||
}else{
|
||||
//OTHER_HOST='https://dev-wx.igandan.com'
|
||||
OTHER_HOST='https://wx.igandan.com'
|
||||
}
|
||||
let OTHER_HOST='https://dev-wx.igandan.com'
|
||||
//const app = getApp({allowDefault: true});
|
||||
// if(app.globalData.apiHost && app.globalData.apiHost.indexOf('dev')>-1){
|
||||
// OTHER_HOST='https://dev-wx.igandan.com'
|
||||
// }else{
|
||||
// OTHER_HOST='https://wx.igandan.com'
|
||||
// }
|
||||
// if(process.env.UNI_PLATFORM =="mp-weixin"){
|
||||
// const { envVersion } = uni.getAccountInfoSync().miniProgram;
|
||||
// if (envVersion == "release") {
|
||||
// OTHER_HOST='https://wx.igandan.com'
|
||||
// }else{
|
||||
// OTHER_HOST='https://dev-wx.igandan.com'
|
||||
// }
|
||||
// }else{
|
||||
// //OTHER_HOST='https://dev-wx.igandan.com'
|
||||
// OTHER_HOST='https://wx.igandan.com'
|
||||
// }
|
||||
export default OTHER_HOST
|
||||
+18
-6
@@ -106,6 +106,10 @@ export const request = (url, data = {}, method = 'post', loading = false, conten
|
||||
if (loading) {
|
||||
uni.hideLoading();
|
||||
};
|
||||
uni.showToast({
|
||||
title: res.data.code,
|
||||
icon: 'none'
|
||||
});
|
||||
if(url.indexOf('manager/getSystemTimeStamp')!=-1){
|
||||
e(res)
|
||||
}else if (res.data.code == 200 || res.data.code == 1 || res.data.code == "1" || res.data.code == "200"){
|
||||
@@ -133,12 +137,20 @@ export const request = (url, data = {}, method = 'post', loading = false, conten
|
||||
e(res.data)
|
||||
}else if(res.data.code==35002){
|
||||
n(res)
|
||||
uni.sendNativeEvent('goTabbarPage', {
|
||||
msg: 'home'
|
||||
},ret => {
|
||||
console.log(ret);
|
||||
})
|
||||
plus.runtime.quit()
|
||||
uni.showToast({
|
||||
title: '登录过期,请重新登录',
|
||||
icon: 'none'
|
||||
});
|
||||
uni.redirectTo({
|
||||
url: '/pages_app/login/login'
|
||||
});
|
||||
// uni.sendNativeEvent('goTabbarPage', {
|
||||
// msg: 'home'
|
||||
// },ret => {
|
||||
// console.log(ret);
|
||||
// })
|
||||
// plus.runtime.quit();
|
||||
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
|
||||
Reference in New Issue
Block a user