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
a3bfbf5e
Commit
a3bfbf5e
authored
Sep 19, 2019
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
红包统计
parent
87099ecc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
10 deletions
+21
-10
src/App.js
+16
-8
src/components/detail/redPacket/index.js
+5
-2
No files found.
src/App.js
View file @
a3bfbf5e
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
{
withRouter
}
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
{
withRouter
}
from
'react-router-dom'
import
{
compose
}
from
'redux'
import
{
getParam
,
http
,
browser
}
from
"@/utils"
;
import
{
Toast
}
from
"antd-mobile"
;
import
{
addDays
}
from
'date-fns'
//拦截ajax请求,返回mock数据
...
...
@@ -46,6 +46,8 @@ class App extends Component {
this
.
setNavigationRecord
(
this
.
props
.
location
)
window
.
addEventListener
(
'beforeunload'
,
this
.
removeShareCodeCookie
)
//平台信息
cookie
.
set
(
'plat'
,
'5'
,
{
domain
:
'.julyedu.com'
})
...
...
@@ -70,12 +72,18 @@ class App extends Component {
return
}
location
.
state
=
{
from
:
this
.
previousLocation
};
}
else
{
this
.
removeShareCodeCookie
()
}
})
}
removeShareCodeCookie
=
()
=>
{
cookie
.
remove
(
'share_code'
,
{
path
:
'/'
,
domain
:
'.julyedu.com'
})
}
setNavigationRecord
=
(
location
)
=>
{
let
{
location
:
_location
}
=
this
.
props
let
{
state
:
_state
=
{}}
=
_location
...
...
src/components/detail/redPacket/index.js
View file @
a3bfbf5e
...
...
@@ -56,7 +56,11 @@ class RedPacket extends PureComponent {
this
.
judgePopupType
();
window
.
addEventListener
(
'beforeunload'
,
this
.
removeStatisticsCookie
)
if
(
!
this
.
props
.
userInfo
||
!
this
.
props
.
userInfo
.
uid
)
{
this
.
setRelativeCookie
()
}
// 微信进入
const
isWechat
=
getParam
(
'wechat'
);
const
{
userInfo
}
=
this
.
props
;
...
...
@@ -113,7 +117,6 @@ class RedPacket extends PureComponent {
componentWillUnmount
()
{
window
.
removeEventListener
(
'beforeunload'
,
this
.
removeStatisticsCookie
)
this
.
removeStatisticsCookie
()
}
...
...
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