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
9d280df3
Commit
9d280df3
authored
Oct 24, 2019
by
wangshuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
邀请好友新接口添加
parent
18407a8f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
src/components/activity/index.js
+2
-1
src/components/activity/invite.js
+11
-3
No files found.
src/components/activity/index.js
View file @
9d280df3
...
...
@@ -11,7 +11,8 @@ class Activity extends Component {
}
componentWillMount
()
{
jsCookie
.
set
(
'blessing_invite_code'
,
getParam
(
'shareuid'
));
jsCookie
.
set
(
'blessing_invite_uid'
,
getParam
(
'shareuid'
));
jsCookie
.
set
(
'blessing_invite_code'
,
getParam
(
'code'
));
}
getGift
=
()
=>
{
...
...
src/components/activity/invite.js
View file @
9d280df3
...
...
@@ -24,7 +24,7 @@ class Invite extends Component {
}
else
{
if
(
getParam
(
'new'
))
{
this
.
props
.
history
.
push
(
`/activity?shareuid=
${
shareuid
}
`
);
this
.
props
.
history
.
push
(
`/activity?shareuid=
${
shareuid
}
&code=
${
inviteCode
}
`
);
}
}
}
...
...
@@ -74,12 +74,16 @@ class Invite extends Component {
if
(
this
.
props
.
user
.
hasError
)
{
this
.
props
.
history
.
push
(
'/passport'
);
}
else
{
http
.
get
(
`
${
API
.
home
}
/sys/user/invite/link`
).
then
(
res
=>
{
let
{
code
,
data
,
msg
}
=
res
;
if
(
code
===
200
)
{
let
inviteCode
=
data
.
blessing_invite_code
;
if
(
is_weixin
())
{
// TODO 这里需要运营确定文案
wxShare
({
title
:
"哈哈哈哈哈哈哈"
,
desc
:
"你的老相好在七月在线学习呢你来不来"
,
link
:
encodeURI
(
location
.
origin
+
`/invite?shareuid=
${
shareuid
}
new=1
`
),
link
:
encodeURI
(
location
.
origin
+
`/invite?shareuid=
${
jsCookie
.
get
(
'uid'
)}
&new=1&code=
${
inviteCode
}
`
),
imgUrl
:
'https://julyedu-img-public.oss-cn-beijing.aliyuncs.com/Public/Image/20a86c1353.jpg'
});
this
.
setState
({
...
...
@@ -87,11 +91,15 @@ class Invite extends Component {
isWeiXin
:
true
,
});
}
else
{
history
.
replaceState
(
null
,
null
,
`invite?shareuid=
${
jsCookie
.
get
(
'uid'
)}
&new=1
`
)
history
.
replaceState
(
null
,
null
,
`invite?shareuid=
${
jsCookie
.
get
(
'uid'
)}
&new=1&code=
${
inviteCode
}
`
)
this
.
setState
({
showTip
:
true
,
});
}
}
else
{
Toast
.
info
(
msg
,
2
);
}
});
}
}
...
...
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