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
76d9e8a8
Commit
76d9e8a8
authored
Dec 17, 2019
by
xuzhenghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app
parent
e3116e1d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
src/components/activity/newyear-2019/landing/index.js
+11
-0
src/components/activity/newyear-2019/treasure-box/team.js
+10
-0
No files found.
src/components/activity/newyear-2019/landing/index.js
View file @
76d9e8a8
...
...
@@ -10,6 +10,7 @@ import { browser, getParam, http, wxShare, SendMessageToApp } from "@/utils"
import
{
Link
}
from
"react-router-dom"
import
QRCode
from
"qrcode"
import
YearCourse
from
'../preheat/YearCourse'
import
jsCookie
from
"js-cookie"
class
Landing
extends
Component
{
...
...
@@ -163,6 +164,16 @@ class Landing extends Component {
inviteMembers
=
treasure_code
=>
{
const
{
history
,
match
,
user
,
location
}
=
this
.
props
if
(
getParam
(
'version'
))
{
let
data
=
{
title
:
`@
${
user
.
data
.
username
}
邀您一起组队拿豪礼!`
,
desc
:
`加入我的队伍,机械键盘,纸质书籍等超多奖品等你拿!`
,
link
:
`
${
window
.
location
.
origin
}
/
${
location
.
pathname
}
?treasure_code=
${
treasure_code
}
&origin=2`
,
//todo 分享图片更换
imgUrl
:
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newIndex/community/tou5_bj.png'
}
SendMessageToApp
(
"toShare"
,
data
)
}
if
(
browser
.
isWeixin
)
{
wxShare
({
title
:
`@
${
user
.
data
.
username
}
邀您一起组队拿豪礼!`
,
...
...
src/components/activity/newyear-2019/treasure-box/team.js
View file @
76d9e8a8
...
...
@@ -86,15 +86,25 @@ class TeamInfo extends Component {
const
{
is_my_team
,
my_team
:
{
treasure_code
}}
=
this
.
state
;
if
(
is_my_team
)
{
// 有自己的队伍
// 直接跳转
if
(
!
getParam
(
'version'
))
{
this
.
props
.
history
.
push
(
'/activity/newyear-2019/landing?origin=1&treasure_code='
+
treasure_code
);
}
else
{
this
.
props
.
history
.
push
(
'/activity/newyear-2019/landing?origin=1&treasure_code='
+
treasure_code
+
'&version='
+
getParam
(
'version'
));
}
}
else
{
// 没自己的队伍
// 请求创建队伍的接口
http
.
get
(
`
${
API
.
home
}
/sys/treasure/createMyTeam`
).
then
(
res
=>
{
const
{
code
,
data
,
msg
}
=
res
.
data
;
if
(
code
===
200
)
{
const
{
treasure_code
}
=
data
;
if
(
!
getParam
(
'version'
))
{
this
.
props
.
history
.
push
(
'/activity/newyear-2019/landing?origin=1&treasure_code='
+
treasure_code
);
}
else
{
this
.
props
.
history
.
push
(
'/activity/newyear-2019/landing?origin=1&treasure_code='
+
treasure_code
+
'&version='
+
getParam
(
'version'
));
}
}
else
{
Toast
.
info
(
msg
);
}
});
...
...
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