Commit 014faf2b authored by nano's avatar nano

fix

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