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
29ff89a7
Commit
29ff89a7
authored
Sep 20, 2019
by
xuzhenghua
Browse files
Options
Browse Files
Download
Plain Diff
pull
parents
51b9a8eb
d9389d99
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
10 deletions
+18
-10
src/App.js
+17
-9
src/components/detail/redPacket/index.js
+0
-0
src/components/passport/login/index.js
+1
-1
No files found.
src/App.js
View file @
29ff89a7
import
React
,
{
Component
}
from
'react'
import
React
,
{
Component
}
from
'react'
import
Routes
from
'./router'
import
Routes
from
'./router'
import
cookie
from
'js-cookie'
import
cookie
from
'js-cookie'
import
{
connect
}
from
"react-redux"
;
import
{
connect
}
from
"react-redux"
;
import
{
setCurrentUser
,
startFetchUser
}
from
"@/store/userAction"
;
import
{
setCurrentUser
,
startFetchUser
}
from
"@/store/userAction"
;
import
{
withRouter
}
from
'react-router-dom'
import
{
withRouter
}
from
'react-router-dom'
import
{
compose
}
from
'redux'
import
{
compose
}
from
'redux'
import
{
getParam
,
http
,
browser
}
from
"@/utils"
;
import
{
getParam
,
http
,
browser
}
from
"@/utils"
;
import
{
Toast
}
from
"antd-mobile"
;
import
{
Toast
}
from
"antd-mobile"
;
import
{
addDays
}
from
'date-fns'
import
{
addDays
}
from
'date-fns'
//拦截ajax请求,返回mock数据
//拦截ajax请求,返回mock数据
...
@@ -69,12 +69,18 @@ class App extends Component {
...
@@ -69,12 +69,18 @@ class App extends Component {
return
return
}
}
location
.
state
=
{
from
:
this
.
previousLocation
};
location
.
state
=
{
from
:
this
.
previousLocation
};
}
else
{
this
.
removeShareCodeCookie
()
}
}
})
})
}
}
removeShareCodeCookie
=
()
=>
{
cookie
.
remove
(
'share_code'
,
{
path
:
'/'
,
domain
:
'.julyedu.com'
})
}
setNavigationRecord
=
(
location
)
=>
{
setNavigationRecord
=
(
location
)
=>
{
let
{
location
:
_location
}
=
this
.
props
let
{
location
:
_location
}
=
this
.
props
let
{
state
:
_state
=
{}}
=
_location
let
{
state
:
_state
=
{}}
=
_location
...
@@ -165,7 +171,7 @@ class App extends Component {
...
@@ -165,7 +171,7 @@ class App extends Component {
let
payload
let
payload
if
(
res
.
data
.
code
===
200
)
{
if
(
res
.
data
.
code
===
200
)
{
//移除红包统计cookie
//移除红包统计cookie
cookie
.
remove
(
'share_code'
,
{
path
:
'/'
,
domain
:
'.julyedu.com'
}
)
this
.
removeShareCodeCookie
(
)
const
{
const
{
msg
,
data
:
{
msg
,
data
:
{
avatar_file
:
avatar
,
avatar_file
:
avatar
,
...
@@ -201,6 +207,8 @@ class App extends Component {
...
@@ -201,6 +207,8 @@ class App extends Component {
transformWxUser
=
res
=>
{
transformWxUser
=
res
=>
{
let
data
=
res
.
data
let
data
=
res
.
data
if
(
data
.
errno
==
200
)
{
if
(
data
.
errno
==
200
)
{
//移除红包统计cookie
this
.
removeShareCodeCookie
()
let
{
uid
,
token
,
avatar_file
:
avatar
,
uname
:
username
,}
=
data
.
data
let
{
uid
,
token
,
avatar_file
:
avatar
,
uname
:
username
,}
=
data
.
data
return
{
return
{
...
...
src/components/detail/redPacket/index.js
View file @
29ff89a7
This diff is collapsed.
Click to expand it.
src/components/passport/login/index.js
View file @
29ff89a7
...
@@ -148,7 +148,7 @@ const FormikConfig = {
...
@@ -148,7 +148,7 @@ const FormikConfig = {
validateOnChange
:
true
,
validateOnChange
:
true
,
validate
:
(
values
)
=>
{
validate
:
(
values
)
=>
{
let
errors
=
{}
let
errors
=
{}
if
(
!
validateTel
(
values
.
tel
))
{
if
(
!
/
\d
/
.
test
(
values
.
tel
))
{
errors
.
tel
=
'请填写正确格式的手机号'
errors
.
tel
=
'请填写正确格式的手机号'
}
}
if
(
!
/
[
0-9
]{6}
/
.
test
(
values
.
veriCode
))
{
if
(
!
/
[
0-9
]{6}
/
.
test
(
values
.
veriCode
))
{
...
...
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