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
34235273
Commit
34235273
authored
Nov 03, 2019
by
xuzhenghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pull
parent
dee8d50b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
35 deletions
+52
-35
src/components/activity/index.js
+2
-2
src/components/activity/invite.js
+46
-27
src/components/blessingPreheat/addressPopup/index.js
+3
-1
src/components/blessingPreheat/collectBlessing/index.js
+0
-3
src/components/order/index.js
+1
-2
No files found.
src/components/activity/index.js
View file @
34235273
...
...
@@ -11,8 +11,8 @@ class Activity extends Component {
}
componentWillMount
()
{
jsCookie
.
set
(
'blessing_invite_uid'
,
getParam
(
'shareuid'
));
jsCookie
.
set
(
'blessing_invite_code'
,
getParam
(
'inviteCode'
));
jsCookie
.
set
(
'blessing_invite_uid'
,
getParam
(
'shareuid'
)
,
{
domain
:
'.julyedu.com'
}
);
jsCookie
.
set
(
'blessing_invite_code'
,
getParam
(
'inviteCode'
)
,
{
domain
:
'.julyedu.com'
}
);
}
getGift
=
()
=>
{
...
...
src/components/activity/invite.js
View file @
34235273
...
...
@@ -15,6 +15,7 @@ class Invite extends Component {
hotValue
:
0
,
hot_schedule
:
''
,
userList
:
[],
inviteCode
:
''
,
}
}
...
...
@@ -33,13 +34,16 @@ class Invite extends Component {
if
(
!
this
.
props
.
user
.
hasError
)
{
this
.
getUserList
();
this
.
getHotValue
();
this
.
getInviteCode
();
}
}
componentWillReceiveProps
(
nextProps
)
{
console
.
log
(
'componentWillReceiveProps'
);
if
(
!
nextProps
.
user
.
hasError
)
{
this
.
getUserList
();
this
.
getHotValue
();
this
.
getInviteCode
();
}
}
...
...
@@ -70,8 +74,33 @@ class Invite extends Component {
});
}
getInviteCode
=
()
=>
{
http
.
get
(
`
${
API
.
home
}
/sys/user/invite/link`
).
then
(
res
=>
{
let
{
code
,
data
,
msg
}
=
res
.
data
;
if
(
code
===
200
)
{
let
inviteCode
=
data
.
blessing_invite_code
;
if
(
is_weixin
())
{
wxShare
({
title
:
'AI充电节,积福气享1折秒课,超10万元奖品来就送!!'
,
desc
:
'把这门超5万人报名的【Python基础入门 升级版】课程送给你,附200元红包,请笑纳!--七月在线'
,
link
:
encodeURI
(
location
.
origin
+
`/invite?shareuid=
${
jsCookie
.
get
(
'uid'
)}
&new=1&inviteCode=
${
inviteCode
}
`
),
imgUrl
:
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/index-share-img.png'
,
});
}
this
.
setState
(()
=>
({
inviteCode
:
inviteCode
}))
}
else
if
(
code
===
4030
||
code
===
4040
)
{
history
.
push
(
'/passport'
);
}
else
{
Toast
.
info
(
msg
,
2
);
}
});
}
inviteFriends
=
()
=>
{
const
{
user
,
history
}
=
this
.
props
;
const
{
inviteCode
}
=
this
.
state
;
// 未登录先去登录
if
(
getParam
(
'version'
))
{
if
(
user
.
hasError
)
{
...
...
@@ -89,33 +118,23 @@ class Invite extends Component {
if
(
user
.
hasError
)
{
history
.
push
(
'/passport'
);
}
else
{
http
.
get
(
`
${
API
.
home
}
/sys/user/invite/link`
).
then
(
res
=>
{
let
{
code
,
data
,
msg
}
=
res
.
data
;
if
(
code
===
200
)
{
let
inviteCode
=
data
.
blessing_invite_code
;
if
(
is_weixin
())
{
wxShare
({
title
:
'AI充电节,积福气享1折秒课,超10万元奖品来就送!!'
,
desc
:
'把这门超5万人报名的【Python基础入门 升级版】课程送给你,附200元红包,请笑纳!--七月在线'
,
link
:
encodeURI
(
location
.
origin
+
`/invite?shareuid=
${
jsCookie
.
get
(
'uid'
)}
&new=1&inviteCode=
${
inviteCode
}
`
),
imgUrl
:
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/index-share-img.png'
,
});
this
.
setState
({
showTip
:
true
,
isWeiXin
:
true
,
});
}
else
{
history
.
push
(
`/invite?shareuid=
${
jsCookie
.
get
(
'uid'
)}
&new=1&inviteCode=
${
inviteCode
}
`
)
this
.
setState
({
showTip
:
true
,
});
}
}
else
if
(
code
===
4030
||
code
===
4040
)
{
history
.
push
(
'/passport'
);
}
else
{
Toast
.
info
(
msg
,
2
);
}
});
if
(
is_weixin
())
{
wxShare
({
title
:
'AI充电节,积福气享1折秒课,超10万元奖品来就送!!'
,
desc
:
'把这门超5万人报名的【Python基础入门 升级版】课程送给你,附200元红包,请笑纳!--七月在线'
,
link
:
encodeURI
(
location
.
origin
+
`/invite?shareuid=
${
jsCookie
.
get
(
'uid'
)}
&new=1&inviteCode=
${
inviteCode
}
`
),
imgUrl
:
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/index-share-img.png'
,
});
this
.
setState
({
showTip
:
true
,
isWeiXin
:
true
,
});
}
else
{
history
.
push
(
`/invite?shareuid=
${
jsCookie
.
get
(
'uid'
)}
&new=1&inviteCode=
${
inviteCode
}
`
);
this
.
setState
({
showTip
:
true
,
});
}
}
}
}
...
...
src/components/blessingPreheat/addressPopup/index.js
View file @
34235273
...
...
@@ -77,6 +77,8 @@ class AddressPopup extends Component {
return
errors
;
}}
validateOnBlur
=
{
false
}
validateOnChange
=
{
false
}
onSubmit
=
{(
values
)
=>
{
this
.
handleToSubmit
(
values
);
}}
...
...
@@ -136,7 +138,7 @@ class AddressPopup extends Component {
/
>
<
button
className
=
"address-form__submit"
data
-
status
=
{
isEmpty
(
errors
)?
'do'
:
''
}
data
-
status
=
"do"
type
=
"submit"
>
提交
<
/button
>
<
/Form
>
...
...
src/components/blessingPreheat/collectBlessing/index.js
View file @
34235273
...
...
@@ -71,11 +71,8 @@ class CollectBlessing extends Component {
}
}
else
{
if
(
!
uid
)
{
console
.
log
(
1
,
1
);
history
.
push
(
'/passport'
);
}
else
{
console
.
log
(
2
,
1
);
history
.
push
(
'/blessingPreheat?utm_source=qq&utm_medium=11&utm_campaign=QQ11&utm_content=11&utm_term=11'
)
this
.
fetchUserBlessing
(
3
,
()
=>
{
this
.
handleToAddBlessing
(
3
);
...
...
src/components/order/index.js
View file @
34235273
...
...
@@ -145,8 +145,7 @@ class Order extends Component {
ischeck
:
this
.
state
.
useBalance
,
}
http
.
post
(
`
${
API
[
'base-api'
]}
/pdd/m`
,
params
).
then
(
res
=>
{
console
.
log
(
res
);
if
(
res
.
data
.
errno
===
200
)
{
if
(
Number
(
res
.
data
.
errno
)
===
200
)
{
sessionStorage
.
removeItem
(
'orderUseCacheObj'
);
if
(
res
.
data
.
data
.
pay_jump
===
1
)
{
this
.
props
.
history
.
push
(
`/togroup?id=
${
res
.
data
.
data
.
oid
}
`
);
...
...
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