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
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
4 deletions
+19
-4
src/components/activity/index.js
+12
-1
src/components/activity/invite.js
+2
-2
src/components/blessingPreheat/collectBlessing/index.js
+5
-1
No files found.
src/components/activity/index.js
View file @
4bffadfb
import
React
,
{
Component
}
from
'react'
import
{
connect
}
from
"react-redux"
;
import
{
http
,
getParam
}
from
'@/utils'
;
import
cookie
from
'js-cookie'
import
'./index.scss'
;
import
{
Toast
}
from
"antd-mobile"
;
import
jsCookie
from
'js-cookie'
;
...
...
@@ -8,11 +9,19 @@ import jsCookie from 'js-cookie';
class
Activity
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
'butText'
:
'立即领取'
}
}
componentWillMount
()
{
jsCookie
.
set
(
'blessing_invite_uid'
,
getParam
(
'shareuid'
),
{
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
=
()
=>
{
...
...
@@ -20,15 +29,17 @@ class Activity extends Component {
this
.
props
.
history
.
push
(
'/passport'
);
}
else
{
Toast
.
info
(
'领取成功,你可前往七月在线官网/APP进行查看'
,
2
);
localStorage
.
setItem
(
'lingqu'
,
1
);
}
}
render
()
{
const
{
butText
}
=
this
.
state
;
return
(
<
div
className
=
"activity__con"
>
<
div
className
=
'banner__con'
><
/div
>
<
div
className
=
'content__con'
>
<
div
className
=
"button__get"
onClick
=
{
this
.
getGift
}
>
立即领取
<
/div
>
<
div
className
=
"button__get"
onClick
=
{
this
.
getGift
}
>
{
butText
}
<
/div
>
<
/div
>
<
/div
>
)
...
...
src/components/activity/invite.js
View file @
4bffadfb
...
...
@@ -201,8 +201,8 @@ class Invite extends Component {
return
(
<
div
className
=
"user__item-info item__con-only"
key
=
{
index
}
>
<
div
className
=
"item__con"
>
<
img
className
=
"user_avatar"
src
=
{
item
.
avatar
}
/
>
<
div
className
=
"user_name"
>
{
item
.
name
}
<
/div
>
<
img
className
=
"user_avatar"
src
=
{
item
.
head_image
}
/
>
<
div
className
=
"user_name"
>
{
item
.
user_
name
}
<
/div
>
<
/div
>
<
/div
>
)
...
...
src/components/blessingPreheat/collectBlessing/index.js
View file @
4bffadfb
...
...
@@ -180,7 +180,11 @@ class CollectBlessing extends Component {
history
.
push
(
'/passport'
)
}
}
else
{
history
.
push
(
'/invite'
)
if
(
getParam
(
'version'
))
{
history
.
push
(
'/invite?version='
+
getParam
(
'version'
))
}
else
{
history
.
push
(
'/invite'
)
}
}
}
...
...
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