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
015bdece
Commit
015bdece
authored
Oct 31, 2019
by
xuzhenghua
Browse files
Options
Browse Files
Download
Plain Diff
登录
parents
4bd2d265
af76a1e0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
78 additions
and
18 deletions
+78
-18
src/components/blessingPreheat/collectBlessing/index.js
+64
-15
src/components/blessingPreheat/collectBlessing/index.scss
+12
-3
src/components/blessingPreheat/index.js
+2
-0
No files found.
src/components/blessingPreheat/collectBlessing/index.js
View file @
015bdece
import
React
,
{
Component
}
from
'react'
;
import
{
connect
}
from
'react-redux'
;
import
{
Link
}
from
'react-router-dom'
;
import
{
http
}
from
'@/utils'
;
import
{
http
,
getParam
,
SendMessageToApp
}
from
'@/utils'
;
import
{
Toast
}
from
"antd-mobile"
;
import
ListFrame
from
'./../listFrame/index'
;
import
ListHeader
from
'./../listHeader'
;
...
...
@@ -47,7 +47,7 @@ class CollectBlessing extends Component {
{
id
:
1
,
text
:
'1.每天三次抽奖机会;'
},
{
id
:
2
,
text
:
'2.中奖概率翻4倍'
,
des
:
'(热力值越高,中奖概率越大);'
},
{
id
:
3
,
text
:
'3.满111减51、满1111减411;'
},
{
id
:
4
,
text
:
'4.AI水平测试增加
1
次。'
},
{
id
:
4
,
text
:
'4.AI水平测试增加
2
次。'
},
]
}
],
...
...
@@ -57,28 +57,68 @@ class CollectBlessing extends Component {
qqToShare
=
()
=>
{
const
{
uid
,
history
}
=
this
.
props
;
if
(
!
uid
)
{
history
.
push
(
'/passport'
);
if
(
getParam
(
'version'
))
{
if
(
!
uid
)
{
SendMessageToApp
(
"toLogin"
);
}
else
{
let
data
=
{
title
:
'AI充电节,积福气享1折秒课,超10万元奖品来就送!!'
,
desc
:
'把这门超5万人报名的【Python基础入门 升级版】课程送给你,附200元红包,请笑纳!--七月在线'
,
link
:
'https://m.julyedu.com/blessingPreheat'
,
imgUrl
:
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/index-share-img.png'
,
};
SendMessageToApp
(
"QQshare"
,
data
);
}
}
else
{
history
.
push
(
'/blessingPreheat?utm_source=1&utm_medium=1&utm_campaign=11&utm_content=1&utm_term=1'
);
this
.
fetchUserBlessing
(
3
,
()
=>
{
this
.
handleToAddBlessing
(
3
);
});
if
(
!
uid
)
{
history
.
push
(
'/passport'
);
}
else
{
history
.
push
(
'/blessingPreheat?utm_source=qq&utm_medium=11&utm_campaign=QQ11&utm_content=11&utm_term=11'
)
this
.
fetchUserBlessing
(
3
,
()
=>
{
this
.
handleToAddBlessing
(
3
);
});
}
}
}
wechatToShare
=
()
=>
{
const
{
uid
,
history
}
=
this
.
props
;
if
(
getParam
(
'version'
))
{
if
(
!
uid
)
{
SendMessageToApp
(
"toLogin"
);
}
else
{
let
data
=
{
title
:
'AI充电节,积福气享1折秒课,超10万元奖品来就送!!'
,
desc
:
'把这门超5万人报名的【Python基础入门 升级版】课程送给你,附200元红包,请笑纳!--七月在线'
,
link
:
'https://m.julyedu.com/blessingPreheat'
,
imgUrl
:
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/index-share-img.png'
,
};
SendMessageToApp
(
"WXshare"
,
data
);
}
}
else
{
if
(
!
uid
)
{
history
.
push
(
'/passport'
);
}
else
{
history
.
push
(
'/blessingPreheat?utm_source=1&utm_medium=1&utm_campaign=11&utm_content=1&utm_term=1'
);
this
.
fetchUserBlessing
(
1
,
()
=>
{
this
.
handleToAddBlessing
(
1
);
});
}
}
}
weiboToShare
=
()
=>
{
const
{
uid
,
history
}
=
this
.
props
;
if
(
!
uid
)
{
history
.
push
(
'/passport'
);
}
else
{
history
.
push
(
'/blessingPreheat?utm_source=
q&utm_medium=11&utm_campaign=qq11&utm_content=1
1&utm_term=11'
);
this
.
fetchUserBlessing
(
1
,
()
=>
{
this
.
handleToAddBlessing
(
1
);
history
.
push
(
'/blessingPreheat?utm_source=
sina&utm_medium=11&utm_campaign=sina11&utm_content=
1&utm_term=11'
);
this
.
fetchUserBlessing
(
2
,
()
=>
{
this
.
handleToAddBlessing
(
2
);
});
}
}
fetchUserBlessing
(
key
,
cb
)
{
const
{
handleToShowShare
,
handleToHideShare
}
=
this
.
props
;
let
{
seconds
}
=
this
.
state
;
...
...
@@ -123,7 +163,7 @@ class CollectBlessing extends Component {
render
()
{
const
{
isSign
,
userInfo
:
{
isLogin
=
false
,
blessingVal
=
0
},
userInfo
:
{
isLogin
=
false
,
blessingVal
=
0
,
buyBlessing
=
0
,
inviteBlessing
=
0
},
handleToShowNotice
,
handleToShowList
,
handleToShowInvite
,
...
...
@@ -211,6 +251,11 @@ class CollectBlessing extends Component {
data
-
type
=
"wechat"
onClick
=
{
this
.
wechatToShare
}
><
/a
>
<
a
className
=
"collect-blessing__share-button"
data
-
type
=
"weibo"
onClick
=
{
this
.
weiboToShare
}
><
/a
>
<
/div
>
<
/div
>
}
...
...
@@ -223,14 +268,18 @@ class CollectBlessing extends Component {
{
index
===
4
&&
<
a
className
=
"collect-blessing__content"
onClick
=
{
handleToShowInvite
}
>
邀请
<
br
/>
链接
<
span
>
邀请链接
<
/span
>
<
i
>
已加
{
inviteBlessing
}
点
<
/i
>
<
/a
>
}
{
index
===
5
&&
<
a
className
=
"collect-blessing__content"
onClick
=
{
toSection
}
>
去选课
<
/a
>
onClick
=
{
toSection
}
>
<
span
>
去选课
<
/span
>
<
i
>
已加
{
buyBlessing
}
点
<
/i
>
<
/a
>
}
<
/div
>
))
...
...
src/components/blessingPreheat/collectBlessing/index.scss
View file @
015bdece
...
...
@@ -42,6 +42,7 @@
.collect-blessing__content
{
display
:
inline-flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
width
:
64px
;
...
...
@@ -52,6 +53,11 @@
text-align
:
center
;
background
:
linear-gradient
(
-40deg
,
rgba
(
255
,
75
,
240
,
1
)
0%
,
rgba
(
162
,
0
,
255
,
1
)
100%
);
i
{
font-style
:
normal
;
font-size
:
12px
;
}
&
[
data-layout
=
"column"
]
{
flex-direction
:
column
;
}
...
...
@@ -72,10 +78,9 @@
}
.collect-blessing__share-button
{
display
:
inline-
block
;
width
:
14
px
;
display
:
block
;
width
:
20
px
;
height
:
11px
;
margin
:
0
4px
;
background-size
:
auto
100%
;
background-repeat
:
no-repeat
;
background-position
:
center
;
...
...
@@ -87,6 +92,10 @@
&
[
data-type
=
"wechat"
]
{
background-image
:
url('https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/wechat-icon.png')
;
}
&
[
data-type
=
"weibo"
]
{
background-image
:
url('https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/icon-weibo.png')
;
}
}
.activity__over
{
...
...
src/components/blessingPreheat/index.js
View file @
015bdece
...
...
@@ -206,6 +206,8 @@ class BlessingPreheat extends Component {
userInfo
:
Object
.
assign
({},
userInfo
,
{
isLogin
:
!!
uid
,
blessingVal
:
data
.
user_blessing_value
,
buyBlessing
:
(
data
.
types_total_blessing_value
&&
data
.
types_total_blessing_value
.
buy_course
)?
data
.
types_total_blessing_value
.
buy_course
:
0
,
inviteBlessing
:
(
data
.
types_total_blessing_value
&&
data
.
types_total_blessing_value
.
invite
)?
data
.
types_total_blessing_value
.
invite
:
0
,
})
})
if
(
data
.
is_login
===
1
)
{
...
...
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