Commit 5b07dae4 authored by Mac's avatar Mac

1

parent c9d68d6c
...@@ -204,15 +204,15 @@ export let isLogin = () => { ...@@ -204,15 +204,15 @@ export let isLogin = () => {
title: '请登录账号', title: '请登录账号',
duration: 2000, duration: 2000,
icon: "error", icon: "error",
success: () => { // success: () => {
setTimeout(() => { // setTimeout(() => {
uni.navigateTo({ // uni.navigateTo({
url: '/pages/login/login' // url: '/pages/login/login'
}); // });
clearTimeout(); // clearTimeout();
}, 2000) // }, 2000)
} // }
}); });
} }
......
...@@ -48,18 +48,18 @@ let request = (param) => { ...@@ -48,18 +48,18 @@ let request = (param) => {
duration: 2000, duration: 2000,
icon: "error", icon: "error",
success() { success() {
if (res.data.Code === 10001 || res.data.Code === 10000) { // if (res.data.Code === 10001 || res.data.Code === 10000) {
uni.reLaunch({ // uni.reLaunch({
url: '/pages/login/login' // url: '/pages/login/login'
}); // });
} else { // } else {
if (res.data.Message.indexOf('用户凭证为空') != -1 || res.data // if (res.data.Message.indexOf('用户凭证为空') != -1 || res.data
.Message.indexOf('用户凭证失效') != -1) { // .Message.indexOf('用户凭证失效') != -1) {
uni.reLaunch({ // uni.reLaunch({
url: '/pages/login/login' // url: '/pages/login/login'
}); // });
} // }
} // }
} }
}); });
} }
......
//请求电商接口 //请求电商接口
let host = '' let host = ''
if (process.env.NODE_ENV === "development") { if (process.env.NODE_ENV === "development") {
host = 'http://192.168.20.24:8200/api' host = 'http://192.168.10.65:8088/api'
} else { } else {
host = "https://mallapi.oytour.com/api" host = "https://mallapi.oytour.com/api"
} }
...@@ -37,17 +37,17 @@ let request = (param) => { ...@@ -37,17 +37,17 @@ let request = (param) => {
type: 'fail', type: 'fail',
message: res.data.message, message: res.data.message,
onClose: () => { onClose: () => {
if (res.data.resultCode === 10001 || res.data.resultCode === 10000 || res.data.resultCode === 10002 || res.data.resultCode === 10003) { // if (res.data.resultCode === 10001 || res.data.resultCode === 10000 || res.data.resultCode === 10002 || res.data.resultCode === 10003) {
uni.reLaunch({ // uni.reLaunch({
url: '/pages/login/login' // url: '/pages/login/login'
}); // });
} else { // } else {
if (res.data.message.indexOf('用户凭证为空') != -1 || res.data.message.indexOf('用户凭证失效') != -1) { // if (res.data.message.indexOf('用户凭证为空') != -1 || res.data.message.indexOf('用户凭证失效') != -1) {
uni.reLaunch({ // uni.reLaunch({
url: '/pages/login/login' // url: '/pages/login/login'
}); // });
} // }
} // }
}, },
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment