Commit 014faf2b authored by nano's avatar nano

fix

parent e46a84f3
{
"private": true,
"scripts": {
"start": "PORT=8081 roadhog server",
"start": "roadhog server",
"build": "roadhog build",
"lint": "eslint --ext .js src test",
"precommit": "npm run lint"
......
export default {
apiRoot: 'http://192.168.1.9:3000',
returnSSO: 'http://localhost:8000/',
SSOProvider: 'https://ygobbs.com/session/sso_provider'
apiRoot: 'http://192.168.1.9:3000'
};
......@@ -90,15 +90,6 @@ export default {
localStorage.setItem("token", token)
}
<<<<<<< Updated upstream
if(user && user.active) {
yield put(routerRedux.replace("/profiles"))
// message.info("登录成功")
} else {
yield put(routerRedux.replace(`/verify`))
}
=======
if(user) {
if(handleSSO(user)){
return
......@@ -112,7 +103,6 @@ export default {
yield put(routerRedux.replace(`/verify`))
}
}
>>>>>>> Stashed changes
},
*preLogin({ payload }, { call, put }) {
const {token } = payload
......@@ -126,14 +116,7 @@ export default {
if (data ) {
yield put({ type: 'preLoginSuccess', payload: { user: data, token }})
<<<<<<< Updated upstream
if(data.active) {
// yield put(routerRedux.replace("/profiles"))
}
}
} catch (error) {
message.error(error.message)
=======
if(data) {
if(handleSSO(user)){
return
......@@ -148,7 +131,6 @@ export default {
}
} catch (error) {
yield put(routerRedux.replace("/signin"))
>>>>>>> Stashed changes
}
},
*updateProfile({ payload }, { call, put, select }) {
......@@ -157,11 +139,6 @@ export default {
let token = yield select(state => state.user.token)
let { messages } = yield select(state => state.common)
try {
<<<<<<< Updated upstream
let token = yield select(state => state.user.token)
let { messages } = yield select(state => state.common)
=======
>>>>>>> Stashed changes
let { data } = yield call(updateProfile, {...payload, token})
......
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