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
4bffadfb
Commit
4bffadfb
authored
Nov 04, 2019
by
FE
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '11-11' of gitlab.julyedu.com:baiguangyao/mr-julyedu into 11-11
parents
5019ac9a
77363ffc
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
3 deletions
+18
-3
src/components/activity/index.js
+12
-1
src/components/activity/invite.js
+2
-2
src/components/blessingPreheat/collectBlessing/index.js
+4
-0
No files found.
src/components/activity/index.js
View file @
4bffadfb
import
React
,
{
Component
}
from
'react'
import
React
,
{
Component
}
from
'react'
import
{
connect
}
from
"react-redux"
;
import
{
connect
}
from
"react-redux"
;
import
{
http
,
getParam
}
from
'@/utils'
;
import
{
http
,
getParam
}
from
'@/utils'
;
import
cookie
from
'js-cookie'
import
'./index.scss'
;
import
'./index.scss'
;
import
{
Toast
}
from
"antd-mobile"
;
import
{
Toast
}
from
"antd-mobile"
;
import
jsCookie
from
'js-cookie'
;
import
jsCookie
from
'js-cookie'
;
...
@@ -8,11 +9,19 @@ import jsCookie from 'js-cookie';
...
@@ -8,11 +9,19 @@ import jsCookie from 'js-cookie';
class
Activity
extends
Component
{
class
Activity
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
);
super
(
props
);
this
.
state
=
{
'butText'
:
'立即领取'
}
}
}
componentWillMount
()
{
componentWillMount
()
{
jsCookie
.
set
(
'blessing_invite_uid'
,
getParam
(
'shareuid'
),
{
domain
:
'.julyedu.com'
,
expires
:
30
});
jsCookie
.
set
(
'blessing_invite_uid'
,
getParam
(
'shareuid'
),
{
domain
:
'.julyedu.com'
,
expires
:
30
});
jsCookie
.
set
(
'blessing_invite_code'
,
getParam
(
'inviteCode'
),
{
domain
:
'.julyedu.com'
,
expires
:
30
});
jsCookie
.
set
(
'blessing_invite_code'
,
getParam
(
'inviteCode'
),
{
domain
:
'.julyedu.com'
,
expires
:
30
});
if
(
cookie
.
get
(
'uid'
))
{
this
.
setState
(()
=>
({
butText
:
'已领取'
}));
}
}
}
getGift
=
()
=>
{
getGift
=
()
=>
{
...
@@ -20,15 +29,17 @@ class Activity extends Component {
...
@@ -20,15 +29,17 @@ class Activity extends Component {
this
.
props
.
history
.
push
(
'/passport'
);
this
.
props
.
history
.
push
(
'/passport'
);
}
else
{
}
else
{
Toast
.
info
(
'领取成功,你可前往七月在线官网/APP进行查看'
,
2
);
Toast
.
info
(
'领取成功,你可前往七月在线官网/APP进行查看'
,
2
);
localStorage
.
setItem
(
'lingqu'
,
1
);
}
}
}
}
render
()
{
render
()
{
const
{
butText
}
=
this
.
state
;
return
(
return
(
<
div
className
=
"activity__con"
>
<
div
className
=
"activity__con"
>
<
div
className
=
'banner__con'
><
/div
>
<
div
className
=
'banner__con'
><
/div
>
<
div
className
=
'content__con'
>
<
div
className
=
'content__con'
>
<
div
className
=
"button__get"
onClick
=
{
this
.
getGift
}
>
立即领取
<
/div
>
<
div
className
=
"button__get"
onClick
=
{
this
.
getGift
}
>
{
butText
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
)
)
...
...
src/components/activity/invite.js
View file @
4bffadfb
...
@@ -201,8 +201,8 @@ class Invite extends Component {
...
@@ -201,8 +201,8 @@ class Invite extends Component {
return
(
return
(
<
div
className
=
"user__item-info item__con-only"
key
=
{
index
}
>
<
div
className
=
"user__item-info item__con-only"
key
=
{
index
}
>
<
div
className
=
"item__con"
>
<
div
className
=
"item__con"
>
<
img
className
=
"user_avatar"
src
=
{
item
.
avatar
}
/
>
<
img
className
=
"user_avatar"
src
=
{
item
.
head_image
}
/
>
<
div
className
=
"user_name"
>
{
item
.
name
}
<
/div
>
<
div
className
=
"user_name"
>
{
item
.
user_
name
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
)
)
...
...
src/components/blessingPreheat/collectBlessing/index.js
View file @
4bffadfb
...
@@ -180,9 +180,13 @@ class CollectBlessing extends Component {
...
@@ -180,9 +180,13 @@ class CollectBlessing extends Component {
history
.
push
(
'/passport'
)
history
.
push
(
'/passport'
)
}
}
}
else
{
}
else
{
if
(
getParam
(
'version'
))
{
history
.
push
(
'/invite?version='
+
getParam
(
'version'
))
}
else
{
history
.
push
(
'/invite'
)
history
.
push
(
'/invite'
)
}
}
}
}
}
render
()
{
render
()
{
const
{
const
{
...
...
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