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
594dc211
Commit
594dc211
authored
Nov 05, 2019
by
FE
Browse files
Options
Browse Files
Download
Plain Diff
merge and del build
parents
5d79ae99
e1767bec
Show whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
249 additions
and
84 deletions
+249
-84
src/common/closable-popup/index.scss
+1
-1
src/components/activity/index.js
+2
-3
src/components/activity/invite.js
+27
-2
src/components/blessingPreheat/ReserveCourse/index.js
+2
-6
src/components/blessingPreheat/banner/index.scss
+2
-2
src/components/blessingPreheat/collectBlessing/index.js
+3
-3
src/components/blessingPreheat/collectBlessing/index.scss
+1
-0
src/components/blessingPreheat/courseList/index.js
+1
-5
src/components/blessingPreheat/coursePopup/index.js
+44
-10
src/components/blessingPreheat/coursePopup/index.scss
+18
-3
src/components/blessingPreheat/levelTest/index.js
+5
-7
src/components/blessingPreheat/live/index.js
+51
-15
src/components/blessingPreheat/live/index.scss
+24
-3
src/components/blessingPreheat/luckDraw/index.scss
+1
-1
src/components/blessingPreheat/recordPopup/index.js
+13
-2
src/components/blessingPreheat/recordPopup/index.scss
+13
-6
src/components/blessingPreheat/sharePopup/index.js
+1
-1
src/components/blessingPreheat/sharePopup/index.scss
+4
-0
src/components/blessingRank/index.scss
+7
-2
src/components/expand/share.js
+1
-1
src/components/order/deposit/final-order/index.js
+3
-2
src/components/preferential/index.js
+11
-7
src/components/preferential/index.scss
+9
-0
src/components/search/index.js
+1
-0
src/router/router-config.js
+1
-1
src/utils/index.js
+3
-1
No files found.
src/common/closable-popup/index.scss
View file @
594dc211
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
.close
{
.close
{
position
:
absolute
;
position
:
absolute
;
bottom
:
-
88
px
;
bottom
:
-
74
px
;
left
:
50%
;
left
:
50%
;
transform
:
translateX
(
-50%
);
transform
:
translateX
(
-50%
);
font-size
:
36px
;
font-size
:
36px
;
...
...
src/components/activity/index.js
View file @
594dc211
...
@@ -19,7 +19,7 @@ class Activity extends Component {
...
@@ -19,7 +19,7 @@ class Activity extends Component {
jsCookie
.
set
(
'blessing_invite_code'
,
getParam
(
'inviteCode'
),
{
domain
:
'.julyedu.com'
,
expires
:
30
});
jsCookie
.
set
(
'blessing_invite_code'
,
getParam
(
'inviteCode'
),
{
domain
:
'.julyedu.com'
,
expires
:
30
});
if
(
cookie
.
get
(
'uid'
))
{
if
(
cookie
.
get
(
'uid'
))
{
this
.
setState
(()
=>
({
this
.
setState
(()
=>
({
butText
:
'已领取'
butText
:
'已领取
,去使用
'
}));
}));
}
}
}
}
...
@@ -28,8 +28,7 @@ class Activity extends Component {
...
@@ -28,8 +28,7 @@ class Activity extends Component {
if
(
this
.
props
.
user
.
hasError
)
{
if
(
this
.
props
.
user
.
hasError
)
{
this
.
props
.
history
.
push
(
'/passport'
,
{
from
:
this
.
props
.
location
.
pathname
});
this
.
props
.
history
.
push
(
'/passport'
,
{
from
:
this
.
props
.
location
.
pathname
});
}
else
{
}
else
{
Toast
.
info
(
'领取成功,你可前往七月在线官网/APP进行查看'
,
2
);
this
.
props
.
history
.
push
(
'/blessingPreheat'
);
localStorage
.
setItem
(
'lingqu'
,
1
);
}
}
}
}
...
...
src/components/activity/invite.js
View file @
594dc211
...
@@ -16,6 +16,7 @@ class Invite extends Component {
...
@@ -16,6 +16,7 @@ class Invite extends Component {
hot_schedule
:
''
,
hot_schedule
:
''
,
userList
:
[],
userList
:
[],
inviteCode
:
''
,
inviteCode
:
''
,
isshowAppTip
:
false
}
}
}
}
...
@@ -28,8 +29,28 @@ class Invite extends Component {
...
@@ -28,8 +29,28 @@ class Invite extends Component {
this
.
props
.
history
.
push
(
`/activity?shareuid=
${
shareuid
}
&inviteCode=
${
getParam
(
'inviteCode'
)}
`
);
this
.
props
.
history
.
push
(
`/activity?shareuid=
${
shareuid
}
&inviteCode=
${
getParam
(
'inviteCode'
)}
`
);
}
}
}
}
this
.
distinguishVersion
()
}
}
distinguishVersion
=
()
=>
{
// plat_form 1ios 2android
// version 1->3.704 2->4.5.1.20191105
if
(
getParam
(
'plat_form'
)
==
1
){
let
version
=
Number
(
getParam
(
'version'
))
this
.
setState
({
isshowAppTip
:
version
<
3.704
?
true
:
false
});
}
if
(
getParam
(
'plat_form'
)
==
2
){
let
version
=
getParam
(
'version'
).
replace
(
/
\.
/g
,
''
).
slice
(
0
,
3
)
this
.
setState
({
isshowAppTip
:
Number
(
version
)
<
451
?
true
:
false
});
}
}
componentDidMount
()
{
componentDidMount
()
{
if
(
!
this
.
props
.
user
.
hasError
)
{
if
(
!
this
.
props
.
user
.
hasError
)
{
this
.
getUserList
();
this
.
getUserList
();
...
@@ -100,12 +121,15 @@ class Invite extends Component {
...
@@ -100,12 +121,15 @@ class Invite extends Component {
inviteFriends
=
()
=>
{
inviteFriends
=
()
=>
{
const
{
user
,
history
}
=
this
.
props
;
const
{
user
,
history
}
=
this
.
props
;
const
{
inviteCode
}
=
this
.
state
;
const
{
inviteCode
,
isshowAppTip
}
=
this
.
state
;
// 未登录先去登录
// 未登录先去登录
if
(
getParam
(
'version'
))
{
if
(
getParam
(
'version'
))
{
if
(
user
.
hasError
)
{
if
(
user
.
hasError
)
{
SendMessageToApp
(
"toLogin"
);
SendMessageToApp
(
"toLogin"
);
}
else
{
}
else
{
if
(
isshowAppTip
){
Toast
.
info
(
'请前往h5/pc端使用该功能'
,
2
);
}
else
{
let
data
=
{
let
data
=
{
title
:
'AI充电节,积福气享1折秒课,超10万元奖品来就送!!'
,
title
:
'AI充电节,积福气享1折秒课,超10万元奖品来就送!!'
,
desc
:
'把这门超5万人报名的【Python基础入门 升级版】课程送给你,附200元红包,请笑纳!--七月在线'
,
desc
:
'把这门超5万人报名的【Python基础入门 升级版】课程送给你,附200元红包,请笑纳!--七月在线'
,
...
@@ -114,6 +138,7 @@ class Invite extends Component {
...
@@ -114,6 +138,7 @@ class Invite extends Component {
}
}
SendMessageToApp
(
"toShare"
,
data
)
SendMessageToApp
(
"toShare"
,
data
)
}
}
}
}
else
{
}
else
{
if
(
user
.
hasError
)
{
if
(
user
.
hasError
)
{
history
.
push
(
'/passport'
);
history
.
push
(
'/passport'
);
...
@@ -158,7 +183,7 @@ class Invite extends Component {
...
@@ -158,7 +183,7 @@ class Invite extends Component {
<
/div
>
<
/div
>
<
div
className
=
"content__two"
>
<
div
className
=
"content__two"
>
福气值越高,
热力值越高,
中奖概率越大!
福气值越高,中奖概率越大!
<
/div
>
<
/div
>
<
div
className
=
"box__out"
>
<
div
className
=
"box__out"
>
...
...
src/components/blessingPreheat/ReserveCourse/index.js
View file @
594dc211
...
@@ -34,7 +34,7 @@ class ReserveCourse extends Component {
...
@@ -34,7 +34,7 @@ class ReserveCourse extends Component {
const
{
code
,
data
,
msg
}
=
res
.
data
;
const
{
code
,
data
,
msg
}
=
res
.
data
;
if
(
code
===
200
)
{
if
(
code
===
200
)
{
this
.
setState
({
this
.
setState
({
courseData
:
data
.
filter
((
item
,
index
)
=>
index
<
4
),
courseData
:
JSON
.
stringify
(
data
)
==
'{}'
?
[]:
data
.
filter
((
item
,
index
)
=>
index
<
4
),
courseDataAll
:
data
courseDataAll
:
data
})
})
}
else
{
}
else
{
...
@@ -105,11 +105,7 @@ class ReserveCourse extends Component {
...
@@ -105,11 +105,7 @@ class ReserveCourse extends Component {
if
(
!
getParam
(
'version'
))
{
if
(
!
getParam
(
'version'
))
{
this
.
props
.
history
.
push
(
`/getDetail?id=
${
courseId
}
`
)
this
.
props
.
history
.
push
(
`/getDetail?id=
${
courseId
}
`
)
}
else
{
}
else
{
let
data
=
{
SendMessageToApp
(
"toCourse"
,
courseId
);
courseId
:
courseId
,
type
:
0
// 正常跳课程详情页type:0,积福气浏览课程详情页-没有浏览过type:1 已浏览过type:2
}
SendMessageToApp
(
"toCourse"
,
data
);
}
}
}
}
// 查看更多
// 查看更多
...
...
src/components/blessingPreheat/banner/index.scss
View file @
594dc211
...
@@ -24,11 +24,11 @@
...
@@ -24,11 +24,11 @@
li
{
li
{
flex
:
1
;
flex
:
1
;
width
:
63px
;
width
:
63px
;
height
:
3
0px
;
height
:
4
0px
;
font-size
:
11px
;
font-size
:
11px
;
color
:
#fff
;
color
:
#fff
;
text-align
:
center
;
text-align
:
center
;
line-height
:
3
0px
;
line-height
:
4
0px
;
&
.active
{
&
.active
{
background
:
#FF42F9
;
background
:
#FF42F9
;
}
}
...
...
src/components/blessingPreheat/collectBlessing/index.js
View file @
594dc211
...
@@ -18,7 +18,7 @@ class CollectBlessing extends Component {
...
@@ -18,7 +18,7 @@ class CollectBlessing extends Component {
rules
:
[
rules
:
[
'app/h5/pc端活动页签到+5点福气值(每天一次)'
,
'app/h5/pc端活动页签到+5点福气值(每天一次)'
,
'关注七月在线微信服务号+30点福气值(仅限一次)'
,
'关注七月在线微信服务号+30点福气值(仅限一次)'
,
'分享活动页到朋友圈、qq,分别+2点福气值(每个平台每天一次)'
,
'分享活动页到朋友圈、qq
、微博
,分别+2点福气值(每个平台每天一次)'
,
'浏览指定课程详情页,一门课程+2点福气值(每天一次)'
,
'浏览指定课程详情页,一门课程+2点福气值(每天一次)'
,
'邀请好友注册,+10点福气值/人(无上限)'
,
'邀请好友注册,+10点福气值/人(无上限)'
,
'活动期间每购买一门课程+20点福气值'
,
'活动期间每购买一门课程+20点福气值'
,
...
@@ -181,7 +181,7 @@ class CollectBlessing extends Component {
...
@@ -181,7 +181,7 @@ class CollectBlessing extends Component {
}
}
}
else
{
}
else
{
if
(
getParam
(
'version'
))
{
if
(
getParam
(
'version'
))
{
history
.
push
(
'/invite?version='
+
getParam
(
'version'
))
history
.
push
(
'/invite?version='
+
getParam
(
'version'
)
+
'&plat_form='
+
getParam
(
'plat_form'
)
)
}
else
{
}
else
{
history
.
push
(
'/invite'
)
history
.
push
(
'/invite'
)
}
}
...
@@ -252,7 +252,7 @@ class CollectBlessing extends Component {
...
@@ -252,7 +252,7 @@ class CollectBlessing extends Component {
(
isLogin
&&
isSign
)
(
isLogin
&&
isSign
)
?
(
?
(
<
button
className
=
"collect-blessing__content"
data
-
status
=
"done"
>
<
button
className
=
"collect-blessing__content"
data
-
status
=
"done"
>
+
5
点
<
br
/>
福气值
已加
5
点
<
/button
>
<
/button
>
)
)
:
(
:
(
...
...
src/components/blessingPreheat/collectBlessing/index.scss
View file @
594dc211
...
@@ -47,6 +47,7 @@
...
@@ -47,6 +47,7 @@
justify-content
:
center
;
justify-content
:
center
;
width
:
64px
;
width
:
64px
;
height
:
100%
;
height
:
100%
;
padding
:
0
;
border-style
:
none
;
border-style
:
none
;
border-radius
:
5px
;
border-radius
:
5px
;
font-size
:
12px
;
font-size
:
12px
;
...
...
src/components/blessingPreheat/courseList/index.js
View file @
594dc211
...
@@ -301,11 +301,7 @@ class CourseList extends Component {
...
@@ -301,11 +301,7 @@ class CourseList extends Component {
if
(
!
getParam
(
'version'
))
{
if
(
!
getParam
(
'version'
))
{
history
.
push
(
`/detail?id=
${
courseId
}
`
);
history
.
push
(
`/detail?id=
${
courseId
}
`
);
}
else
{
}
else
{
let
data
=
{
SendMessageToApp
(
"toCourse"
,
courseId
);
courseId
:
courseId
,
type
:
0
// 正常跳课程详情页type:0,积福气浏览课程详情页-没有浏览过type:1 已浏览过type:2
};
SendMessageToApp
(
"toCourse"
,
data
);
}
}
}
}
...
...
src/components/blessingPreheat/coursePopup/index.js
View file @
594dc211
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
classnames
from
'classnames'
;
import
{
http
,
SendMessageToApp
}
from
"@/utils"
;
import
{
http
,
SendMessageToApp
}
from
"@/utils"
;
import
{
Link
}
from
'react-router-dom'
;
import
'./index.scss'
;
import
'./index.scss'
;
import
{
getParam
}
from
'../../../utils'
;
import
{
getParam
}
from
'../../../utils'
;
...
@@ -8,12 +8,31 @@ class CoursePopup extends Component {
...
@@ -8,12 +8,31 @@ class CoursePopup extends Component {
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
);
super
(
props
);
this
.
state
=
{
this
.
state
=
{
courseList
:
[]
courseList
:
[],
isshowAppTip
:
false
};
};
}
}
componentDidMount
()
{
componentDidMount
()
{
this
.
fetchCourseData
();
this
.
fetchCourseData
();
this
.
distinguishVersion
();
}
distinguishVersion
=
()
=>
{
// plat_form 1ios 2android
// version 1->3.704 2->4.5.1.20191105
if
(
getParam
(
'plat_form'
)
==
1
){
let
version
=
Number
(
getParam
(
'version'
))
this
.
setState
({
isshowAppTip
:
version
<
3.704
?
true
:
false
});
}
if
(
getParam
(
'plat_form'
)
==
2
){
let
version
=
getParam
(
'version'
).
replace
(
/
\.
/g
,
''
).
slice
(
0
,
3
)
this
.
setState
({
isshowAppTip
:
Number
(
version
)
<
451
?
true
:
false
});
}
}
}
fetchCourseData
=
()
=>
{
fetchCourseData
=
()
=>
{
...
@@ -46,17 +65,23 @@ class CoursePopup extends Component {
...
@@ -46,17 +65,23 @@ class CoursePopup extends Component {
if
(
!
getParam
(
'version'
))
{
if
(
!
getParam
(
'version'
))
{
history
.
push
(
`/detail?id=
${
item
.
course_id
}
&ac=11`
);
history
.
push
(
`/detail?id=
${
item
.
course_id
}
&ac=11`
);
}
else
{
}
else
{
let
type
=
0
;
if
(
this
.
state
.
isshowAppTip
){
SendMessageToApp
(
"toCourse"
,
item
.
course_id
);
}
else
{
if
(
item
.
blessing
)
{
if
(
item
.
blessing
)
{
type
=
2
;
let
data
=
{
}
else
{
courseId
:
item
.
course_id
,
type
=
1
;
type
:
2
}
}
SendMessageToApp
(
"toBlessingCourse"
,
data
);
}
else
{
let
data
=
{
let
data
=
{
courseId
:
item
.
course_id
,
courseId
:
item
.
course_id
,
type
:
type
// 正常跳课程详情页type:0,积福气浏览课程详情页-没有浏览过type:1 已浏览过type:2
type
:
1
// 正常跳课程详情页type:0,积福气浏览课程详情页-没有浏览过type:1 已浏览过type:2
}
SendMessageToApp
(
"toBlessingCourse"
,
data
);
}
}
}
SendMessageToApp
(
"toCourse"
,
data
);
}
}
}
else
{
}
else
{
toLogin
();
toLogin
();
...
@@ -64,7 +89,7 @@ class CoursePopup extends Component {
...
@@ -64,7 +89,7 @@ class CoursePopup extends Component {
}
}
render
()
{
render
()
{
const
{
courseList
}
=
this
.
state
;
const
{
courseList
,
isshowAppTip
}
=
this
.
state
;
const
{
handleToHide
}
=
this
.
props
;
const
{
handleToHide
}
=
this
.
props
;
return
(
return
(
<
div
className
=
"course-popup__container"
>
<
div
className
=
"course-popup__container"
>
...
@@ -74,7 +99,9 @@ class CoursePopup extends Component {
...
@@ -74,7 +99,9 @@ class CoursePopup extends Component {
{
{
courseList
.
map
(
item
=>
(
courseList
.
map
(
item
=>
(
<
span
<
span
className
=
"course-popup__item"
className
=
{
classnames
(
"course-popup__item"
,
{
"course-popup__item--active"
:
item
.
blessing
})}
key
=
{
item
.
course_id
}
key
=
{
item
.
course_id
}
onClick
=
{()
=>
{
this
.
toCourseDetail
(
item
)}}
onClick
=
{()
=>
{
this
.
toCourseDetail
(
item
)}}
>
>
...
@@ -87,6 +114,13 @@ class CoursePopup extends Component {
...
@@ -87,6 +114,13 @@ class CoursePopup extends Component {
))
))
}
}
<
/div
>
<
/div
>
{
isshowAppTip
&&
<
div
className
=
"course-popup-apptip"
>
当前版本浏览课程暂不能增加福气值,可以前往
h5
/
pc
端浏览课程增加福气值
<
/div
>
}
<
/div
>
<
/div
>
<
i
className
=
"iconfont iconiconfront-2"
onClick
=
{
handleToHide
}
><
/i
>
<
i
className
=
"iconfont iconiconfront-2"
onClick
=
{
handleToHide
}
><
/i
>
<
/div
>
<
/div
>
...
...
src/components/blessingPreheat/coursePopup/index.scss
View file @
594dc211
...
@@ -9,10 +9,11 @@
...
@@ -9,10 +9,11 @@
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
background-color
:
rgba
(
0
,
0
,
0
,
.5
);
background-color
:
rgba
(
0
,
0
,
0
,
.5
);
z-index
:
2
;
.iconfont
{
.iconfont
{
margin
:
16px
0
0
;
margin
:
16px
0
0
;
font-size
:
2
4
px
;
font-size
:
2
8
px
;
color
:
#fff
;
color
:
#fff
;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
...
@@ -20,8 +21,7 @@
...
@@ -20,8 +21,7 @@
.course-popup
{
.course-popup
{
width
:
300px
;
width
:
300px
;
height
:
275px
;
padding
:
20px
0
;
padding
:
20px
0
0
;
border-radius
:
10px
;
border-radius
:
10px
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
background-color
:
#fff
;
background-color
:
#fff
;
...
@@ -64,10 +64,24 @@
...
@@ -64,10 +64,24 @@
}
}
}
}
.course-popup__item--active
{
.course-popup__name
{
color
:rgba
(
82
,
92
,
101
,
.6
)
;
}
}
.course-popup__name
{
.course-popup__name
{
width
:
200px
;
width
:
200px
;
font-size
:
12px
;
font-size
:
12px
;
color
:rgba
(
82
,
92
,
101
,
1
)
;
white-space
:
nowrap
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
overflow
:
hidden
;
}
}
.course-popup-apptip
{
padding
:
10px
15px
0
15px
;
color
:
#FF0000
;
text-align
:
center
;
}
\ No newline at end of file
src/components/blessingPreheat/levelTest/index.js
View file @
594dc211
...
@@ -50,18 +50,16 @@ class LevelTest extends Component {
...
@@ -50,18 +50,16 @@ class LevelTest extends Component {
}
}
startTest
=
()
=>
{
startTest
=
()
=>
{
const
{
history
,
isLogin
,
toLogin
}
=
this
.
props
;
const
{
isLogin
,
toLogin
}
=
this
.
props
;
if
(
isLogin
)
{
if
(
isLogin
)
{
// history.push('/levelTest/test');
if
(
getParam
(
'version'
))
{
// if(getParam('version')) {
window
.
location
.
href
=
`
${
API
.
m
}
/levelTest/test?version=
${
getParam
(
'version'
)}
`
;
}
else
{
window
.
location
.
href
=
`
${
API
.
m
}
/levelTest/test`
;
window
.
location
.
href
=
`
${
API
.
m
}
/levelTest/test`
;
// }else{
}
// history.push('/levelTest/test');
// }
}
else
{
}
else
{
toLogin
();
toLogin
();
}
}
}
}
render
()
{
render
()
{
...
...
src/components/blessingPreheat/live/index.js
View file @
594dc211
import
React
,
{
Component
}
from
'react'
import
React
,
{
Component
}
from
'react'
import
'./index.scss'
import
'./index.scss'
import
{
Tabs
,
Toast
}
from
"antd-mobile"
import
{
Tabs
,
Toast
}
from
"antd-mobile"
import
{
getParam
,
http
,
SendMessageToApp
}
from
"@/utils"
import
{
getParam
,
http
,
SendMessageToApp
,
browser
}
from
"@/utils"
import
{
Popup
}
from
"@common/index"
import
{
Popup
}
from
"@common/index"
import
QRCode
from
'qrcode'
import
QRCode
from
'qrcode'
import
{
uniqBy
}
from
'lodash'
import
{
uniqBy
}
from
'lodash'
...
@@ -12,12 +12,15 @@ import { withRouter } from 'react-router-dom'
...
@@ -12,12 +12,15 @@ import { withRouter } from 'react-router-dom'
@
connect
(
state
=>
({
user
:
state
.
user
}))
@
connect
(
state
=>
({
user
:
state
.
user
}))
class
Live
extends
Component
{
class
Live
extends
Component
{
popupInstance
=
null
state
=
{
state
=
{
tabs
:
[],
tabs
:
[],
lives
:
{},
lives
:
{},
preheatLives
:
[],
preheatLives
:
[],
today
:
''
,
today
:
''
,
isApp
:
getParam
(
'version'
)
isApp
:
getParam
(
'version'
),
QRCodeUrl
:
''
,
}
}
...
@@ -69,22 +72,33 @@ class Live extends Component {
...
@@ -69,22 +72,33 @@ class Live extends Component {
}
}
toLiveRoom
=
id
=>
{
toLiveRoom
=
id
=>
{
const
{
history
,
isLogin
}
=
this
.
props
;
const
{
history
,
isLogin
}
=
this
.
props
if
(
this
.
state
.
isApp
)
{
if
(
this
.
state
.
isApp
)
{
if
(
isLogin
)
{
if
(
isLogin
)
{
SendMessageToApp
(
'toLiveRoom'
,
id
)
SendMessageToApp
(
'toLiveRoom'
,
id
)
}
else
{
}
else
{
SendMessageToApp
(
"toLogin"
)
SendMessageToApp
(
"toLogin"
)
}
}
}
else
{
}
else
{
if
(
isLogin
)
{
if
(
isLogin
)
{
window
.
location
.
href
=
`
${
window
.
location
.
protocol
}
//www.julyedu.com/live/m_room/
${
id
}
`
window
.
location
.
href
=
`
${
window
.
location
.
protocol
}
//www.julyedu.com/live/m_room/
${
id
}
`
}
else
{
}
else
{
history
.
push
(
'/passport'
)
history
.
push
(
'/passport'
)
}
}
}
}
}
}
saveImage
=
()
=>
{
let
version
=
getParam
(
'version'
)
version
=
typeof
version
===
'string'
?
version
.
replace
(
'.'
,
''
).
replace
(
'.'
,
''
).
slice
(
0
,
3
)
:
''
const
{
QRCodeUrl
}
=
this
.
state
if
(
version
&&
parseInt
(
version
)
<
451
)
{
Toast
.
info
(
'当前不支持此功能,升级到最新版本app可以点击保存二维码!'
,
2
,
null
,
false
)
}
else
{
SendMessageToApp
(
'generateQRCode'
,
QRCodeUrl
)
}
}
makeSubscribe
=
id
=>
{
makeSubscribe
=
id
=>
{
const
{
user
,
history
}
=
this
.
props
const
{
user
,
history
}
=
this
.
props
if
(
user
.
hasError
)
{
if
(
user
.
hasError
)
{
...
@@ -94,12 +108,30 @@ class Live extends Component {
...
@@ -94,12 +108,30 @@ class Live extends Component {
.
then
(
res
=>
{
.
then
(
res
=>
{
const
{
data
}
=
res
const
{
data
}
=
res
if
(
data
.
errno
==
200
)
{
if
(
data
.
errno
==
200
)
{
this
.
setState
(()
=>
({
QRCodeUrl
:
data
.
data
.
url
,
}))
QRCode
.
toDataURL
(
data
.
data
.
url
,
(
err
,
url
)
=>
{
QRCode
.
toDataURL
(
data
.
data
.
url
,
(
err
,
url
)
=>
{
Popup
({
if
(
!
this
.
popupInstance
)
{
this
.
popupInstance
=
Popup
({
title
:
'扫码关注“七月在线”服务号即可预约'
,
title
:
'扫码关注“七月在线”服务号即可预约'
,
content
:
<
img
id
=
{
'live-qr-code'
}
src
=
{
url
}
alt
=
""
/>
content
:
(
<>
<
img
id
=
{
'live-qr-code'
}
src
=
{
url
}
alt
=
""
/>
{
browser
.
isAndroidApp
?
(
<
button
className
=
{
'save-image'
}
onClick
=
{
this
.
saveImage
}
>
保存二维码
<
/button
>
)
:
null
}
<
/
>
),
close
:
()
=>
new
Promise
(
resolve
=>
{
this
.
popupInstance
=
null
resolve
()
})
})
})
})
}
})
}
else
{
}
else
{
Toast
.
info
(
data
.
msg
,
2
,
null
,
false
)
Toast
.
info
(
data
.
msg
,
2
,
null
,
false
)
}
}
...
@@ -134,23 +166,25 @@ class Live extends Component {
...
@@ -134,23 +166,25 @@ class Live extends Component {
return
(
return
(
<
div
key
=
{
index
}
>
<
div
key
=
{
index
}
>
{
{
todayLives
.
map
((
item
,
index
)
=>
{
todayLives
&&
todayLives
.
map
((
item
,
index
)
=>
{
return
(
return
(
<
LiveContent
item
=
{
item
}
key
=
{
index
}
makeSubscribe
=
{
this
.
makeSubscribe
}
toLiveRoom
=
{
this
.
toLiveRoom
}
/
>
<
LiveContent
item
=
{
item
}
key
=
{
index
}
makeSubscribe
=
{
this
.
makeSubscribe
}
toLiveRoom
=
{
this
.
toLiveRoom
}
/
>
)
)
})
})
}
}
<
/div
>
<
/div
>
)
)
})
})
:
tabs
.
map
((
item
,
index
)
=>
{
:
tabs
.
map
((
item
,
index
)
=>
{
const
todayLives
=
preheatLives
[
item
.
title
]
const
todayLives
=
preheatLives
[
item
.
title
]
return
(
return
(
<
div
key
=
{
index
}
>
<
div
key
=
{
index
}
>
{
{
todayLives
.
map
((
item
,
index
)
=>
{
todayLives
&&
todayLives
.
map
((
item
,
index
)
=>
{
return
(
return
(
<
LiveContent
item
=
{
item
}
key
=
{
index
}
makeSubscribe
=
{
this
.
makeSubscribe
}
toLiveRoom
=
{
this
.
toLiveRoom
}
/
>
<
LiveContent
item
=
{
item
}
key
=
{
index
}
makeSubscribe
=
{
this
.
makeSubscribe
}
toLiveRoom
=
{
this
.
toLiveRoom
}
/
>
)
)
})
})
}
}
...
@@ -201,7 +235,9 @@ function LiveContent({item, makeSubscribe, toLiveRoom}) {
...
@@ -201,7 +235,9 @@ function LiveContent({item, makeSubscribe, toLiveRoom}) {
<
/div
>
<
/div
>
{
{
item
[
'on_live'
]
item
[
'on_live'
]
?
<
button
className
=
{
'on-living'
}
onClick
=
{()
=>
{
toLiveRoom
(
item
[
'room_url'
])}}
>
正在直播
<
/button
>
?
<
button
className
=
{
'on-living'
}
onClick
=
{()
=>
{
toLiveRoom
(
item
[
'room_url'
])
}}
>
正在直播
<
/button
>
:
:
item
[
'is_end'
]
item
[
'is_end'
]
?
<
button
className
=
{
'subscribed'
}
>
已结束
<
/button
>
?
<
button
className
=
{
'subscribed'
}
>
已结束
<
/button
>
...
...
src/components/blessingPreheat/live/index.scss
View file @
594dc211
...
@@ -189,8 +189,7 @@
...
@@ -189,8 +189,7 @@
.am-tabs-tab-bar-wrap
{
.am-tabs-tab-bar-wrap
{
height
:
33px
;
height
:
33px
;
border
:
1px
solid
rgba
(
255
,
246
,
4
,
1
);
border-radius
:
0
0
6px
6px
;
}
}
.am-tabs-default-bar-tab
{
.am-tabs-default-bar-tab
{
...
@@ -214,8 +213,15 @@
...
@@ -214,8 +213,15 @@
.am-tabs-default-bar-tab-active
{
.am-tabs-default-bar-tab-active
{
background
:
#FFF604
;
background
:
#FFF604
;
border-radius
:
0
0
5px
5px
;
}
.am-tabs-default-bar-top
{
.am-tabs-default-bar-content
{
border
:
1px
solid
rgba
(
255
,
246
,
4
,
1
);
border-radius
:
0
0
6px
6px
;
border-radius
:
0
0
6px
6px
;
}
}
}
}
}
}
}
...
@@ -227,12 +233,27 @@
...
@@ -227,12 +233,27 @@
.content
{
.content
{
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
flex-direction
:
column
;
align-items
:
center
;
img
{
img
{
width
:
120px
;
width
:
120px
;
height
:
120px
;
height
:
120px
;
margin-top
:
10px
;
}
}
}
}
.save-image
{
width
:
133px
;
height
:
30px
;
margin-top
:
16px
;
background
:
rgba
(
83
,
39
,
250
,
1
);
border-radius
:
15px
;
font-size
:
14px
;
color
:
#fff
;
-webkit-appearance
:
none
;
outline
:
0
;
border
:
none
;
}
}
}
src/components/blessingPreheat/luckDraw/index.scss
View file @
594dc211
...
@@ -74,7 +74,7 @@
...
@@ -74,7 +74,7 @@
.prize__content
{
.prize__content
{
display
:
flex
;
display
:
flex
;
flex-wrap
:
nowrap
;
flex-wrap
:
nowrap
;
padding
:
10px
7px
0
;
padding
:
10px
7px
0
0
;
overflow-y
:
auto
;
overflow-y
:
auto
;
}
}
...
...
src/components/blessingPreheat/recordPopup/index.js
View file @
594dc211
...
@@ -21,6 +21,15 @@ export default class RecordPopup extends Component {
...
@@ -21,6 +21,15 @@ export default class RecordPopup extends Component {
});
});
}
}
handleToTestRecord
=
(
e
,
id
)
=>
{
e
.
preventDefault
();
if
(
getParam
(
'version'
))
{
history
.
push
(
`/levelTest/report?id=
${
id
}
&version=
${
getParam
(
'version'
)}
`
)
}
else
{
history
.
push
(
`/levelTest/report?id=
${
id
}
`
)
}
}
render
()
{
render
()
{
let
{
recordList
}
=
this
.
state
;
let
{
recordList
}
=
this
.
state
;
...
@@ -41,6 +50,7 @@ export default class RecordPopup extends Component {
...
@@ -41,6 +50,7 @@ export default class RecordPopup extends Component {
<
/div
>
<
/div
>
<
div
className
=
"table__body"
>
<
div
className
=
"table__body"
>
{
{
recordList
.
length
>
0
?
recordList
.
map
((
item
,
index
)
=>
{
recordList
.
map
((
item
,
index
)
=>
{
return
(
<
div
className
=
"tr__container"
key
=
{
index
}
>
return
(
<
div
className
=
"tr__container"
key
=
{
index
}
>
<
span
className
=
"tr"
>
{
item
.
submit_time
}
<
/span
>
<
span
className
=
"tr"
>
{
item
.
submit_time
}
<
/span
>
...
@@ -48,13 +58,14 @@ export default class RecordPopup extends Component {
...
@@ -48,13 +58,14 @@ export default class RecordPopup extends Component {
<
span
className
=
"tr"
>
<
span
className
=
"tr"
>
{
{
index
===
0
?
(
index
===
0
?
(
<
a
href
=
{
`/levelTest/report?id=
${
item
.
id
}
`
}
>
测试记录
<
/a
>
<
a
onClick
=
{(
e
)
=>
this
.
handleToTestRecord
(
e
,
item
.
id
)
}
>
测试记录
<
/a
>
)
:
(
null
)
)
:
(
null
)
}
}
<
/span
>
<
/span
>
<
/div
>
<
/div
>
)
)
})
}):
<
div
className
=
{
'notdata'
}
>
暂无测试记录
<
/div
>
}
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
...
src/components/blessingPreheat/recordPopup/index.scss
View file @
594dc211
...
@@ -14,10 +14,9 @@
...
@@ -14,10 +14,9 @@
.gift__record
{
.gift__record
{
width
:
300px
;
width
:
300px
;
height
:
250px
;
background
:
rgba
(
255
,
255
,
255
,
1
);
background
:
rgba
(
255
,
255
,
255
,
1
);
border-radius
:
5px
;
border-radius
:
5px
;
padding
:
18px
24px
0
24px
;
padding
:
18px
24px
30px
24px
;
position
:
relative
;
position
:
relative
;
span
.tr
{
span
.tr
{
display
:
flex
;
display
:
flex
;
...
@@ -60,7 +59,6 @@
...
@@ -60,7 +59,6 @@
}
}
.table__body
{
.table__body
{
width
:
250px
;
width
:
250px
;
height
:
102px
;
border
:
1px
solid
rgba
(
207
,
219
,
229
,
0
.4
);
border
:
1px
solid
rgba
(
207
,
219
,
229
,
0
.4
);
border-radius
:
0px
0px
1px
1px
;
border-radius
:
0px
0px
1px
1px
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
...
@@ -76,12 +74,21 @@
...
@@ -76,12 +74,21 @@
&
:last-child
{
&
:last-child
{
border-bottom
:
none
;
border-bottom
:
none
;
}
}
p
{
color
:
#525c65
;
}
}
}
}
}
.notdata
{
text-align
:
center
;
color
:
#999999
;
line-height
:
35px
;
}
.close__button
{
.close__button
{
width
:
32
px
;
width
:
24
px
;
height
:
32
px
;
height
:
24
px
;
border-radius
:
50%
;
border-radius
:
50%
;
position
:
absolute
;
position
:
absolute
;
left
:
50%
;
left
:
50%
;
...
@@ -92,7 +99,7 @@
...
@@ -92,7 +99,7 @@
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
i
{
i
{
font-size
:
32
px
;
font-size
:
24
px
;
color
:
#fff
;
color
:
#fff
;
}
}
}
}
...
...
src/components/blessingPreheat/sharePopup/index.js
View file @
594dc211
...
@@ -19,7 +19,7 @@ export default class SharePopup extends Component {
...
@@ -19,7 +19,7 @@ export default class SharePopup extends Component {
<
div
className
=
"share__content"
>
<
div
className
=
"share__content"
>
<
p
className
=
"share__text"
>
分享活动页到朋友圈、
qq
、微博分别
<
/p
>
<
p
className
=
"share__text"
>
分享活动页到朋友圈、
qq
、微博分别
<
/p
>
<
div
className
=
'share__rule'
>
<
div
className
=
'share__rule'
>
<
img
src
=
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/add2.png'
/>
<
img
className
=
{
'share__add2'
}
src
=
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/add2.png'
/>
<
span
>
(每个平台每天一次)
<
/span
>
<
span
>
(每个平台每天一次)
<
/span
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
...
src/components/blessingPreheat/sharePopup/index.scss
View file @
594dc211
...
@@ -45,5 +45,8 @@
...
@@ -45,5 +45,8 @@
font-size
:
12px
;
font-size
:
12px
;
color
:
#525C65
;
color
:
#525C65
;
}
}
.share__add2
{
width
:
95px
;
}
}
}
}
}
\ No newline at end of file
src/components/blessingRank/index.scss
View file @
594dc211
...
@@ -95,9 +95,14 @@
...
@@ -95,9 +95,14 @@
}
}
.rank__table-user
{
.rank__table-user
{
display
:
inline-
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
padding
:
0
5px
;
span
{
flex
:
1
;
text-align
:
left
;
}
}
}
.rank__table-portrait
{
.rank__table-portrait
{
...
...
src/components/expand/share.js
View file @
594dc211
...
@@ -91,7 +91,7 @@ class ExpandShare extends Component {
...
@@ -91,7 +91,7 @@ class ExpandShare extends Component {
this
.
props
.
history
.
push
(
'/passport/login'
)
this
.
props
.
history
.
push
(
'/passport/login'
)
}
else
{
}
else
{
this
.
props
.
history
.
push
(
this
.
props
.
history
.
push
(
`/deposit-order?oid=
${
getParam
(
'id'
)
}
&source=
${
1
}
`
,
`/deposit-order?oid=
${
courseId
}
&source=
${
1
}
`
,
{
{
id
:
courseId
,
id
:
courseId
,
isexpand
:
1
,
isexpand
:
1
,
...
...
src/components/order/deposit/final-order/index.js
View file @
594dc211
...
@@ -400,8 +400,9 @@ class FinalDepositOrder extends Component {
...
@@ -400,8 +400,9 @@ class FinalDepositOrder extends Component {
getBalanceOffset
=
()
=>
{
getBalanceOffset
=
()
=>
{
let
originalTotalPrice
=
this
.
getOriginTotalPrice
()
let
originalTotalPrice
=
this
.
getOriginTotalPrice
()
let
offset
=
parseFloat
(
this
.
state
.
user_account
)
-
parseFloat
(
originalTotalPrice
)
let
currentPrice
=
this
.
moneyOff
(
originalTotalPrice
)
offset
=
offset
>=
0
?
originalTotalPrice
:
this
.
state
.
user_account
let
offset
=
parseFloat
(
this
.
state
.
user_account
)
-
parseFloat
(
currentPrice
)
offset
=
offset
>=
0
?
currentPrice
:
this
.
state
.
user_account
return
offset
return
offset
}
}
...
...
src/components/preferential/index.js
View file @
594dc211
...
@@ -43,7 +43,7 @@ class Preferential extends Component {
...
@@ -43,7 +43,7 @@ class Preferential extends Component {
http
.
get
(
`
${
API
.
home
}
/m/home/bargainZone`
).
then
((
res
)
=>
{
http
.
get
(
`
${
API
.
home
}
/m/home/bargainZone`
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
200
)
{
if
(
res
.
data
.
code
===
200
)
{
this
.
setState
({
this
.
setState
({
dataList
:
res
.
data
.
data
,
dataList
:
JSON
.
stringify
(
res
.
data
.
data
)
==
'{}'
?
[]:
res
.
data
.
data
,
isLoading
:
false
,
isLoading
:
false
,
})
})
}
else
{
}
else
{
...
@@ -83,7 +83,7 @@ class Preferential extends Component {
...
@@ -83,7 +83,7 @@ class Preferential extends Component {
}
}
toCourseDetail
=
(
id
)
=>
{
toCourseDetail
=
(
id
)
=>
{
const
{
dispatch
,
history
}
=
this
.
props
;
const
{
dispatch
,
history
}
=
this
.
props
;
// dispatch(getCourses(id, () => {
// dispatch(getCourses(id, () => {
history
.
push
(
`/detail?id=
${
id
}
`
)
history
.
push
(
`/detail?id=
${
id
}
`
)
// }));
// }));
...
@@ -95,11 +95,11 @@ class Preferential extends Component {
...
@@ -95,11 +95,11 @@ class Preferential extends Component {
{
title
:
'砍价专区'
},
{
title
:
'砍价专区'
},
{
title
:
'一键拼团'
}
{
title
:
'一键拼团'
}
]
]
const
{
user
=
{}
}
=
this
.
props
;
const
{
user
=
{}
}
=
this
.
props
;
let
isLogin
=
user
.
data
&&
user
.
data
.
uid
?
true
:
false
;
let
isLogin
=
user
.
data
&&
user
.
data
.
uid
?
true
:
false
;
return
(
return
(
<
div
className
=
'preferential'
>
<
div
className
=
'preferential'
>
<
HeaderSearch
isLogin
=
{
isLogin
}
/
>
<
HeaderSearch
isLogin
=
{
isLogin
}
/
>
<
Loading
isLoading
=
{
this
.
state
.
isLoading
}
>
<
Loading
isLoading
=
{
this
.
state
.
isLoading
}
>
<
div
className
=
'class-content'
>
<
div
className
=
'class-content'
>
<
WhiteSpace
/>
<
WhiteSpace
/>
...
@@ -116,11 +116,14 @@ class Preferential extends Component {
...
@@ -116,11 +116,14 @@ class Preferential extends Component {
>
>
<
/Tabs
>
<
/Tabs
>
<
div
className
=
'tabs'
>
<
div
className
=
'tabs'
>
{
this
.
state
.
dataList
.
length
>
0
?
<
ul
>
<
ul
>
{
this
.
state
.
dataList
.
map
((
item
,
index
)
=>
{
{
this
.
state
.
dataList
.
map
((
item
,
index
)
=>
{
const
Info
=
(
const
Info
=
(
<
div
className
=
"info"
>
<
div
className
=
"info"
>
<
p
className
=
'title'
onClick
=
{()
=>
this
.
toCourseDetail
(
item
.
course_id
)}
>
<
p
className
=
'title'
onClick
=
{()
=>
this
.
toCourseDetail
(
item
.
course_id
)}
>
{
/* <Link to={`/detail?id=${item.course_id}`}> */
}
{
/* <Link to={`/detail?id=${item.course_id}`}> */
}
{
item
.
course_title
}
{
item
.
course_title
}
{
/* </Link> */
}
{
/* </Link> */
}
...
@@ -167,7 +170,8 @@ class Preferential extends Component {
...
@@ -167,7 +170,8 @@ class Preferential extends Component {
/
>
/
>
)
)
})}
})}
<
/ul
>
<
/ul>:<div className={'notdata'}>砍价的课程已被设置为双十一活动课程,参加双十一活动购买课程优惠更多哦!</
div
>
}
<
/div
>
<
/div
>
<
WhiteSpace
/>
<
WhiteSpace
/>
...
...
src/components/preferential/index.scss
View file @
594dc211
...
@@ -148,5 +148,14 @@
...
@@ -148,5 +148,14 @@
}
}
}
}
.notdata
{
width
:
100%
;
padding
:
0
35px
;
text-align
:
center
;
margin-top
:
100px
;
color
:
#666
;
font-size
:
14px
;
}
}
}
src/components/search/index.js
View file @
594dc211
...
@@ -109,6 +109,7 @@ class Search extends PureComponent {
...
@@ -109,6 +109,7 @@ class Search extends PureComponent {
})
})
:
<
div
style
=
{{
textAlign
:
'center'
,
padding
:
'20px'
}}
>
暂无热门
<
/div
>
:
<
div
style
=
{{
textAlign
:
'center'
,
padding
:
'20px'
}}
>
暂无热门
<
/div
>
}
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
...
src/router/router-config.js
View file @
594dc211
...
@@ -207,7 +207,7 @@ export default [
...
@@ -207,7 +207,7 @@ export default [
},
},
// 定金-邀请好友助力
// 定金-邀请好友助力
{
{
path
:
'/expand/index
activity
'
,
path
:
'/expand/index'
,
component
:
ExpandShare
component
:
ExpandShare
},
},
{
{
...
...
src/utils/index.js
View file @
594dc211
...
@@ -83,7 +83,9 @@ const browser = (function () {
...
@@ -83,7 +83,9 @@ const browser = (function () {
isWeixin
:
/MicroMessenger/i
.
test
(
ua
),
isWeixin
:
/MicroMessenger/i
.
test
(
ua
),
isAndroid
:
/Android/i
.
test
(
ua
),
isAndroid
:
/Android/i
.
test
(
ua
),
isIOS
:
/
\(
i
[^
;
]
+;
(
U;
)?
CPU.+Mac OS X/i
.
test
(
ua
),
isIOS
:
/
\(
i
[^
;
]
+;
(
U;
)?
CPU.+Mac OS X/i
.
test
(
ua
),
isIPad
:
/iPad/i
.
test
(
ua
)
isIPad
:
/iPad/i
.
test
(
ua
),
isAndroidApp
:
/Android/i
.
test
(
ua
)
&&
getParam
(
'version'
),
isIOSApp
:
/iPhone/i
.
test
(
ua
)
&&
getParam
(
'version'
)
}
}
})()
})()
...
...
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