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
0ee93465
Commit
0ee93465
authored
Aug 22, 2019
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
微信登录redirect_url
parent
f9d09faf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
src/App.js
+14
-1
src/components/passport/index.js
+3
-2
No files found.
src/App.js
View file @
0ee93465
...
...
@@ -23,12 +23,25 @@ import './assets/font/iconfont.css';
class
App
extends
Component
{
previousLocation
=
this
.
props
.
location
previousLocation
=
{
...{
state
:
{
from
:
{
pathname
:
this
.
props
.
location
.
pathname
,
search
:
this
.
props
.
location
.
search
,
hash
:
this
.
props
.
location
.
hash
}
}
},
...
this
.
props
.
location
}
componentDidMount
()
{
//平台信息
cookie
.
set
(
'plat'
,
'5'
,
{
domain
:
'.julyedu.com'
})
console
.
log
(
this
.
props
.
location
);
this
.
props
.
startFetchUser
()
http
.
get
(
`
${
API
.
home
}
/m/user_info`
).
then
(
res
=>
{
...
...
src/components/passport/index.js
View file @
0ee93465
...
...
@@ -23,9 +23,10 @@ class Passport extends Component {
constructor
(
props
)
{
super
(
props
);
const
{
location
:
{
state
:
{
from
}}}
=
props
const
{
location
}
=
props
const
{
pathname
,
search
,
hash
}
=
location
const
{
from
}
=
location
.
state
||
{
from
:
{
pathname
:
pathname
,
search
:
search
,
hash
:
hash
}}
this
.
redirectURL
=
window
.
location
.
origin
+
from
.
pathname
+
from
.
search
+
from
.
hash
// console.log(props.location);
this
.
state
=
{
loginWays
:
[
{
...
...
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