Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mr-julyedu
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
baiguangyao
mr-julyedu
Commits
0a4e8c54
Commit
0a4e8c54
authored
May 12, 2020
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
微信登录拿完code后去掉无用query
parent
78d5d001
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
10 deletions
+18
-10
src/App.js
+18
-10
No files found.
src/App.js
View file @
0a4e8c54
import
React
,
{
Component
}
from
'react'
import
React
,
{
Component
}
from
'react'
import
Routes
from
'./router'
import
cookie
from
'js-cookie'
import
{
connect
}
from
"react-redux"
import
{
setCurrentUser
,
startFetchUser
}
from
"@/store/userAction"
import
{
initialState
}
from
"@/store/userReducer"
import
{
withRouter
,
Link
}
from
'react-router-dom'
import
{
compose
}
from
'redux'
import
{
getParam
,
http
,
browser
}
from
"@/utils"
import
{
Toast
}
from
"antd-mobile"
import
{
addDays
}
from
'date-fns'
import
{
connect
}
from
"react-redux"
import
{
setCurrentUser
,
startFetchUser
}
from
"@/store/userAction"
import
{
initialState
}
from
"@/store/userReducer"
import
{
withRouter
,
Link
}
from
'react-router-dom'
import
{
compose
}
from
'redux'
import
{
getParam
,
http
,
browser
}
from
"@/utils"
import
{
Toast
}
from
"antd-mobile"
import
{
addDays
}
from
'date-fns'
import
stringify
from
'json-stringify-safe'
import
Hammer
from
'hammerjs'
...
...
@@ -203,7 +203,15 @@ class App extends Component {
cookie
.
set
(
'role'
,
role
,
{
expires
,
domain
:
'.julyedu.com'
,
path
:
'/'
})
cookie
.
set
(
'uid'
,
uid
,
{
expires
,
domain
:
'.julyedu.com'
,
path
:
'/'
})
cookie
.
set
(
'token'
,
token
,
{
expires
,
domain
:
'.julyedu.com'
,
path
:
'/'
})
this
.
props
.
setCurrentUser
(
user
)
const
search
=
new
URLSearchParams
(
window
.
location
.
search
)
search
.
delete
(
'code'
)
search
.
delete
(
'aa'
)
if
(
search
.
has
(
'state'
)
&&
search
.
get
(
'state'
)
===
'STATE'
)
{
search
.
delete
(
'state'
)
}
const
loc
=
window
.
location
loc
.
replace
(
loc
.
origin
+
loc
.
pathname
+
'?'
+
search
.
toString
()
+
loc
.
hash
)
}
}
else
{
Toast
.
info
(
data
.
msg
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment