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
6e9f7399
Commit
6e9f7399
authored
Aug 22, 2019
by
xuzhenghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
95e7986c
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
57 additions
and
21 deletions
+57
-21
src/common/HeaderSearch/index.js
+11
-1
src/common/OrderList/orderlist.scss
+5
-2
src/components/classify/courselist.js
+5
-1
src/components/detail/bargain/index.js
+17
-1
src/components/detail/outline/index.js
+2
-2
src/components/order/index.js
+0
-1
src/components/order/order.scss
+0
-2
src/components/order/payOrder/PayOrder.scss
+4
-0
src/components/video/index.js
+13
-11
No files found.
src/common/HeaderSearch/index.js
View file @
6e9f7399
...
@@ -12,15 +12,25 @@ class HeaderBar extends Component {
...
@@ -12,15 +12,25 @@ class HeaderBar extends Component {
}
}
goShop
=
()
=>
{
goShop
=
()
=>
{
location
.
replace
(
'/shopcart'
)
;
location
.
replace
(
'/shopcart'
)
}
}
render
()
{
render
()
{
{
console
.
log
(
this
.
props
.
toHref
);
}
return
(
return
(
<
div
className
=
'preferential'
>
<
div
className
=
'preferential'
>
<
div
className
=
"search-nav"
>
<
div
className
=
"search-nav"
>
{
!
this
.
props
.
toHref
&&
<
i
className
=
{
'iconfont iconiconfront-68 return'
}
onClick
=
{
this
.
return
.
bind
(
this
)}
><
/i
>
<
i
className
=
{
'iconfont iconiconfront-68 return'
}
onClick
=
{
this
.
return
.
bind
(
this
)}
><
/i
>
}
{
this
.
props
.
toHref
&&
<
i
className
=
{
'iconfont iconiconfront-68 return'
}
onClick
=
{
this
.
props
.
toHref
}
><
/i
>
}
<
SearchBar
<
SearchBar
placeholder
=
"搜索课程"
placeholder
=
"搜索课程"
cancelText
=
{
" "
}
cancelText
=
{
" "
}
...
...
src/common/OrderList/orderlist.scss
View file @
6e9f7399
...
@@ -10,6 +10,11 @@
...
@@ -10,6 +10,11 @@
position
:
relative
;
position
:
relative
;
width
:
125px
;
width
:
125px
;
height
:
90px
;
height
:
90px
;
img
{
width
:
100%
;
height
:
100%
;
border-radius
:
3px
;
}
a
{
a
{
position
:
relative
;
position
:
relative
;
...
@@ -42,8 +47,6 @@
...
@@ -42,8 +47,6 @@
.order-title
{
.order-title
{
font-size
:
16px
;
font-size
:
16px
;
color
:
$color_333
;
color
:
$color_333
;
height
:
18px
;
line-height
:
18px
;
}
}
.order-content
{
.order-content
{
...
...
src/components/classify/courselist.js
View file @
6e9f7399
...
@@ -112,6 +112,10 @@ class Classify extends Component {
...
@@ -112,6 +112,10 @@ class Classify extends Component {
}));
}));
}
}
toClassify
=
()
=>
{
location
.
replace
(
'/classify'
);
}
render
()
{
render
()
{
const
bottom
=
(
const
bottom
=
(
<
i
className
=
{
'iconfont iconiconfront-69 pull-down'
}
><
/i
>
<
i
className
=
{
'iconfont iconiconfront-69 pull-down'
}
><
/i
>
...
@@ -124,7 +128,7 @@ class Classify extends Component {
...
@@ -124,7 +128,7 @@ class Classify extends Component {
return
(
return
(
<
div
className
=
'class-child'
>
<
div
className
=
'class-child'
>
<
HeaderSearch
><
/HeaderSearch
>
<
HeaderSearch
toHref
=
{
this
.
toClassify
}
><
/HeaderSearch
>
<
Loading
isLoading
=
{
this
.
state
.
isLoading
}
>
<
Loading
isLoading
=
{
this
.
state
.
isLoading
}
>
<
div
className
=
'class-content'
>
<
div
className
=
'class-content'
>
<
WhiteSpace
/>
<
WhiteSpace
/>
...
...
src/components/detail/bargain/index.js
View file @
6e9f7399
...
@@ -8,6 +8,7 @@ import { api, getParam, http } from "@/utils"
...
@@ -8,6 +8,7 @@ import { api, getParam, http } from "@/utils"
import
Ranking
from
"@/components/bargainMiddlePage/ranking"
import
Ranking
from
"@/components/bargainMiddlePage/ranking"
import
{
compose
}
from
"redux"
import
{
compose
}
from
"redux"
import
{
withRouter
}
from
'react-router-dom'
import
{
withRouter
}
from
'react-router-dom'
import
{
connect
}
from
"react-redux"
;
class
Bargain
extends
Component
{
class
Bargain
extends
Component
{
...
@@ -125,8 +126,14 @@ class Bargain extends Component {
...
@@ -125,8 +126,14 @@ class Bargain extends Component {
// 我要砍价
// 我要砍价
iWantBargain
=
()
=>
{
iWantBargain
=
()
=>
{
const
{
user
}
=
this
.
props
const
uid
=
user
&&
user
.
data
&&
user
.
data
.
uid
if
(
!
uid
){
this
.
props
.
history
.
push
(
'/passport/login'
)
}
else
{
this
.
toKanjia
(
getParam
(
'id'
),
1
,
0
)
this
.
toKanjia
(
getParam
(
'id'
),
1
,
0
)
}
}
}
// 砍价接口
// 砍价接口
toKanjia
=
(
id
,
type
,
uid
)
=>
{
toKanjia
=
(
id
,
type
,
uid
)
=>
{
...
@@ -170,11 +177,14 @@ class Bargain extends Component {
...
@@ -170,11 +177,14 @@ class Bargain extends Component {
}
}
render
()
{
render
()
{
const
{
user
}
=
this
.
props
const
uid
=
user
&&
user
.
data
&&
user
.
data
.
uid
return
(
return
(
<
div
className
=
{
'bargain-func'
}
>
<
div
className
=
{
'bargain-func'
}
>
{
/*bargain_status 砍价状态 0-砍价中,1砍价结束,待支付,2砍价过期(没有砍价记录没有砍价信息),3已购买*/
}
{
/*bargain_status 砍价状态 0-砍价中,1砍价结束,待支付,2砍价过期(没有砍价记录没有砍价信息),3已购买*/
}
{
{
this
.
state
.
info
.
bargain_status
===
2
&&
(
this
.
state
.
info
.
bargain_status
===
2
||
!
uid
)
&&
<
BargainIntro
limitPeople
=
{
this
.
state
.
limitPeople
}
iWantBargain
=
{
this
.
iWantBargain
}
/
>
<
BargainIntro
limitPeople
=
{
this
.
state
.
limitPeople
}
iWantBargain
=
{
this
.
iWantBargain
}
/
>
}
}
{
{
...
@@ -394,5 +404,11 @@ function UseArtifact(props) {
...
@@ -394,5 +404,11 @@ function UseArtifact(props) {
export
default
compose
(
export
default
compose
(
connect
(
state
=>
({
user
:
state
.
user
}),
null
),
withRouter
withRouter
)(
Bargain
)
)(
Bargain
)
src/components/detail/outline/index.js
View file @
6e9f7399
...
@@ -110,13 +110,13 @@ class OutLine extends Component {
...
@@ -110,13 +110,13 @@ class OutLine extends Component {
{
{
// 已购买直播结束已上传视频:正常播放按钮,点击播放课程
// 已购买直播结束已上传视频:正常播放按钮,点击播放课程
!
introduce
.
is_aist
&&
item
.
class_status
===
2
&&
!
introduce
.
is_aist
&&
item
.
class_status
===
2
&&
<
Link
to
=
{
`/play/video?id=
${
introduce
.
v_course_id
}
`
}
className
=
'iconfont icondanseshixintubiao-23 icon-right-22'
><
/Link
>
<
Link
to
=
{
`/play/video?id=
${
introduce
.
v_course_id
+
'&video_id='
+
item
.
video_id
}
`
}
className
=
'iconfont icondanseshixintubiao-23 icon-right-22'
><
/Link
>
}
}
{
{
// 返现课程 是返现课程 未开课 已开课 是返现课程 未开课 已开课 已练习
// 返现课程 是返现课程 未开课 已开课 是返现课程 未开课 已开课 已练习
introduce
.
is_aist
&&
item
.
is_open
&&
introduce
.
is_baoming
===
1
&&
introduce
.
is_aist
&&
item
.
is_open
&&
introduce
.
is_baoming
===
1
&&
<
Link
to
=
{
`/play/video?id=
${
introduce
.
v_course_id
}
`
}
className
=
'aist aist_open'
><
/Link
>
<
Link
to
=
{
`/play/video?id=
${
introduce
.
v_course_id
+
'&video_id='
+
item
.
video_id
}
`
}
className
=
'aist aist_open'
><
/Link
>
}
}
...
...
src/components/order/index.js
View file @
6e9f7399
...
@@ -286,7 +286,6 @@ class Order extends Component {
...
@@ -286,7 +286,6 @@ class Order extends Component {
}
}
});
});
}
else
if
(
this
.
props
.
location
.
state
&&
this
.
props
.
location
.
state
.
group
===
1
){
}
else
if
(
this
.
props
.
location
.
state
&&
this
.
props
.
location
.
state
.
group
===
1
){
console
.
log
(
2
);
// 获取一键开团的课程
// 获取一键开团的课程
Promise
.
all
([
http
.
get
(
`
${
API
.
home
}
/m/course/detail/
${
getParam
(
'id'
)}
`
),
http
.
get
(
`
${
API
[
'base-api'
]}
/m/order/preorder`
)]).
then
(
resList
=>
{
Promise
.
all
([
http
.
get
(
`
${
API
.
home
}
/m/course/detail/
${
getParam
(
'id'
)}
`
),
http
.
get
(
`
${
API
[
'base-api'
]}
/m/order/preorder`
)]).
then
(
resList
=>
{
let
courseInfo
=
resList
[
0
],
let
courseInfo
=
resList
[
0
],
...
...
src/components/order/order.scss
View file @
6e9f7399
...
@@ -108,8 +108,6 @@
...
@@ -108,8 +108,6 @@
justify-content
:
space-around
;
justify-content
:
space-around
;
.order-title
{
.order-title
{
height
:
18px
;
line-height
:
18x
;
color
:
$color_333
;
color
:
$color_333
;
font-size
:
$font_16
;
font-size
:
$font_16
;
}
}
...
...
src/components/order/payOrder/PayOrder.scss
View file @
6e9f7399
...
@@ -168,6 +168,8 @@
...
@@ -168,6 +168,8 @@
.order-des
{
.order-des
{
height
:
24px
;
height
:
24px
;
line-height
:
33px
;
line-height
:
33px
;
position
:
absolute
;
bottom
:
0
;
.order-newprice
{
.order-newprice
{
font-size
:
16px
;
font-size
:
16px
;
...
@@ -190,6 +192,7 @@
...
@@ -190,6 +192,7 @@
.content
{
.content
{
border
:
none
;
border
:
none
;
padding-bottom
:
0
;
.cover
{
.cover
{
flex
:
inherit
;
flex
:
inherit
;
...
@@ -197,6 +200,7 @@
...
@@ -197,6 +200,7 @@
img
{
img
{
width
:
100%
;
width
:
100%
;
height
:
100%
;
}
}
.course-status
{
.course-status
{
...
...
src/components/video/index.js
View file @
6e9f7399
...
@@ -364,13 +364,6 @@ class Video extends Component {
...
@@ -364,13 +364,6 @@ class Video extends Component {
if
(
this
.
lessonAvailable
())
{
if
(
this
.
lessonAvailable
())
{
if
(
this
.
hasAuth
())
{
if
(
this
.
hasAuth
())
{
Promise
.
resolve
().
then
(()
=>
{
Promise
.
resolve
().
then
(()
=>
{
let
{
videoList
,
course
}
=
this
.
state
let
videoIndex
=
videoList
.
findIndex
(
item
=>
item
.
id
==
course
.
last_video_id
)
this
.
setState
({
activeIndex
:
videoIndex
<
0
?
0
:
videoIndex
})
this
.
initializePlayer
()
this
.
initializePlayer
()
this
.
playWithAuth
()
this
.
playWithAuth
()
})
})
...
@@ -425,8 +418,12 @@ class Video extends Component {
...
@@ -425,8 +418,12 @@ class Video extends Component {
}
}
lessonAvailable
=
()
=>
{
lessonAvailable
=
()
=>
{
const
{
videoList
,
activeIndex
}
=
this
.
state
let
{
videoList
,
course
}
=
this
.
state
return
videoList
[
activeIndex
][
'video_size'
]
!==
0
let
videoIndex
=
videoList
.
findIndex
(
item
=>
item
.
id
==
course
.
last_video_id
)
this
.
setState
({
activeIndex
:
videoIndex
})
return
videoList
[
videoIndex
][
'video_size'
]
!==
0
}
}
getCoursePrice
=
()
=>
{
getCoursePrice
=
()
=>
{
...
@@ -450,8 +447,13 @@ class Video extends Component {
...
@@ -450,8 +447,13 @@ class Video extends Component {
}
}
hasAuth
=
()
=>
{
hasAuth
=
()
=>
{
const
{
course
,
videoList
,
activeIndex
}
=
this
.
state
const
{
course
,
videoList
}
=
this
.
state
let
lesson
=
videoList
[
activeIndex
]
let
videoIndex
=
videoList
.
findIndex
(
item
=>
item
.
id
==
course
.
last_video_id
)
this
.
setState
({
activeIndex
:
videoIndex
})
let
lesson
=
videoList
[
videoIndex
]
if
(
lesson
[
'video_auth'
])
{
if
(
lesson
[
'video_auth'
])
{
this
.
setState
({
this
.
setState
({
...
...
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