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
fe0518b7
Commit
fe0518b7
authored
Nov 05, 2019
by
xuzhenghua
Browse files
Options
Browse Files
Download
Plain Diff
旧版app
parents
eabfd915
9b06f2b7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
76 additions
and
24 deletions
+76
-24
src/components/activity/invite.js
+26
-1
src/components/blessingPreheat/ReserveCourse/index.js
+1
-5
src/components/blessingPreheat/collectBlessing/index.js
+1
-1
src/components/blessingPreheat/courseList/index.js
+1
-5
src/components/blessingPreheat/coursePopup/index.js
+36
-8
src/components/blessingPreheat/coursePopup/index.scss
+9
-2
src/components/blessingPreheat/live/index.js
+2
-2
No files found.
src/components/activity/invite.js
View file @
fe0518b7
...
@@ -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'
);
...
...
src/components/blessingPreheat/ReserveCourse/index.js
View file @
fe0518b7
...
@@ -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/collectBlessing/index.js
View file @
fe0518b7
...
@@ -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'
)
}
}
...
...
src/components/blessingPreheat/courseList/index.js
View file @
fe0518b7
...
@@ -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 @
fe0518b7
...
@@ -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,19 @@ class CoursePopup extends Component {
...
@@ -46,17 +65,19 @@ 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
(
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 +85,7 @@ class CoursePopup extends Component {
...
@@ -64,7 +85,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"
>
...
@@ -89,6 +110,13 @@ class CoursePopup extends Component {
...
@@ -89,6 +110,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 @
fe0518b7
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
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
;
...
@@ -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
;
...
@@ -79,3 +79,9 @@
...
@@ -79,3 +79,9 @@
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/live/index.js
View file @
fe0518b7
...
@@ -166,7 +166,7 @@ class Live extends Component {
...
@@ -166,7 +166,7 @@ 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
}
<
LiveContent
item
=
{
item
}
key
=
{
index
}
makeSubscribe
=
{
this
.
makeSubscribe
}
toLiveRoom
=
{
this
.
toLiveRoom
}
/
>
toLiveRoom
=
{
this
.
toLiveRoom
}
/
>
...
@@ -181,7 +181,7 @@ class Live extends Component {
...
@@ -181,7 +181,7 @@ 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
}
<
LiveContent
item
=
{
item
}
key
=
{
index
}
makeSubscribe
=
{
this
.
makeSubscribe
}
toLiveRoom
=
{
this
.
toLiveRoom
}
/
>
toLiveRoom
=
{
this
.
toLiveRoom
}
/
>
...
...
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