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
6c301c8a
Commit
6c301c8a
authored
Jun 29, 2020
by
xuzhenghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
69ac4857
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
10 deletions
+4
-10
src/components/Index/index.js
+2
-5
src/components/detail/index.js
+2
-5
No files found.
src/components/Index/index.js
View file @
6c301c8a
...
...
@@ -72,10 +72,8 @@ class Index extends Component {
const
{
errno
,
data
}
=
res
.
data
if
(
errno
===
0
)
{
if
(
data
.
status
==
1
)
{
// 新用户登录之后判断是否是新用户,是新用户先显示大礼包
this
.
setState
({
isShowUserGift
:
true
})
// 新用户登录之后判断是否是新用户
Toast
.
info
(
'新人大礼包已领取成功!'
,
2
)
}
else
{
// 老用户
this
.
setState
({
...
...
@@ -89,7 +87,6 @@ class Index extends Component {
showUserGiftFun
=
()
=>
{
let
newer_last_time
=
localStorage
.
getItem
(
'newer_last_time'
)
// 获取用户关闭大礼包的时间
let
now_time
=
(
new
Date
()).
valueOf
()
console
.
log
(
newer_last_time
)
if
(
!
newer_last_time
||
now_time
-
newer_last_time
>
86400000
)
{
this
.
setState
({
isShowUserGift
:
true
...
...
src/components/detail/index.js
View file @
6c301c8a
...
...
@@ -91,10 +91,8 @@ class Detail extends Component {
const
{
errno
,
data
}
=
res
.
data
if
(
errno
===
0
)
{
if
(
data
.
status
==
1
)
{
// 新用户登录之后判断是否是新用户,是新用户先显示大礼包
this
.
setState
({
isShowUserGift
:
true
})
// 新用户登录之后判断是否是新用户
Toast
.
info
(
'新人大礼包已领取成功!'
,
2
)
}
else
{
// 老用户
this
.
setState
({
...
...
@@ -108,7 +106,6 @@ class Detail extends Component {
showUserGiftFun
=
()
=>
{
let
newer_last_time
=
localStorage
.
getItem
(
'newer_last_time'
)
// 获取用户关闭大礼包的时间
let
now_time
=
(
new
Date
()).
valueOf
()
console
.
log
(
newer_last_time
)
if
(
!
newer_last_time
||
now_time
-
newer_last_time
>
86400000
)
{
this
.
setState
({
isShowUserGift
:
true
...
...
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