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
e4da19af
Commit
e4da19af
authored
Oct 24, 2019
by
wangshuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
邀请好友注册
parent
544f896f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
6 deletions
+18
-6
src/components/activity/index.js
+6
-1
src/components/activity/invite.js
+12
-5
No files found.
src/components/activity/index.js
View file @
e4da19af
import
React
,
{
Component
}
from
'react'
import
{
connect
}
from
"react-redux"
;
import
{
http
,
getParam
,
is_weixin
,
wxShare
}
from
'@/utils'
;
import
{
http
,
getParam
}
from
'@/utils'
;
import
'./index.scss'
;
import
{
Toast
}
from
"antd-mobile"
;
import
jsCookie
from
'js-cookie'
;
class
Activity
extends
Component
{
constructor
(
props
)
{
super
(
props
);
}
componentWillMount
()
{
jsCookie
.
set
(
'blessing_invite_code'
,
getParam
(
'shareuid'
));
}
getGift
=
()
=>
{
if
(
this
.
props
.
user
.
hasError
)
{
this
.
props
.
history
.
push
(
'/passport'
);
...
...
src/components/activity/invite.js
View file @
e4da19af
import
React
,
{
Component
}
from
'react'
;
import
{
connect
}
from
"react-redux"
import
'./index.scss'
;
import
{
http
,
getParam
,
is_weixin
,
wxShare
}
from
'@/utils'
;
import
{
http
,
getParam
,
is_weixin
,
wxShare
,
getC
}
from
'@/utils'
;
import
{
Toast
}
from
"antd-mobile"
;
import
jsCookie
from
'js-cookie'
;
class
Invite
extends
Component
{
...
...
@@ -17,8 +18,14 @@ class Invite extends Component {
}
componentWillMount
()
{
if
(
getParam
(
'new'
))
{
this
.
props
.
history
.
push
(
'/activity'
);
let
uid
=
jsCookie
.
get
(
'uid'
);
let
shareuid
=
getParam
(
'shareuid'
);
if
(
uid
===
shareuid
)
{
}
else
{
if
(
getParam
(
'new'
))
{
this
.
props
.
history
.
push
(
`/activity?shareuid=
${
shareuid
}
`
);
}
}
}
...
...
@@ -72,7 +79,7 @@ class Invite extends Component {
wxShare
({
title
:
"哈哈哈哈哈哈哈"
,
desc
:
"你的老相好在七月在线学习呢你来不来"
,
link
:
encodeURI
(
location
.
origin
+
'/invite?new=1'
),
link
:
encodeURI
(
location
.
origin
+
`/invite?shareuid=
${
shareuid
}
new=1`
),
imgUrl
:
'https://julyedu-img-public.oss-cn-beijing.aliyuncs.com/Public/Image/20a86c1353.jpg'
});
this
.
setState
({
...
...
@@ -80,7 +87,7 @@ class Invite extends Component {
isWeiXin
:
true
,
});
}
else
{
history
.
replaceState
(
null
,
null
,
'invite?new=1'
)
history
.
replaceState
(
null
,
null
,
`invite?shareuid=
${
jsCookie
.
get
(
'uid'
)}
&new=1`
)
this
.
setState
({
showTip
:
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