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
9f3a7d5a
Commit
9f3a7d5a
authored
Oct 12, 2019
by
FE
Browse files
Options
Browse Files
Download
Plain Diff
pull and solve
parents
57d68e99
c0fe8506
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
20 deletions
+29
-20
src/assets/css/index.scss
+0
-3
src/components/coupons/myCoupons/index.js
+23
-14
src/components/passport/index.js
+2
-2
src/components/study/freeCourses/index.js
+1
-1
src/components/video/index.js
+3
-0
No files found.
src/assets/css/index.scss
View file @
9f3a7d5a
...
@@ -28,9 +28,6 @@ $z-max: 999999; //为了应付某些插件z-index 值过高的问题
...
@@ -28,9 +28,6 @@ $z-max: 999999; //为了应付某些插件z-index 值过高的问题
// --------------------------------------------------
// --------------------------------------------------
//
//
body
{
position
:
relative
;
}
html
,
body
,
div
,
span
,
object
,
iframe
,
h1
,
h2
,
h3
,
h4
,
h5
,
h6
,
p
,
blockquote
,
pre
,
a
,
abbr
,
address
,
cite
,
code
,
del
,
dfn
,
em
,
img
,
ins
,
kbd
,
q
,
samp
,
small
,
strong
,
sub
,
sup
,
var
,
b
,
i
,
dl
,
dt
,
dd
,
ol
,
ul
,
li
,
fieldset
,
form
,
label
,
legend
,
table
,
caption
,
tbody
,
tfoot
,
thead
,
tr
,
th
,
td
{
html
,
body
,
div
,
span
,
object
,
iframe
,
h1
,
h2
,
h3
,
h4
,
h5
,
h6
,
p
,
blockquote
,
pre
,
a
,
abbr
,
address
,
cite
,
code
,
del
,
dfn
,
em
,
img
,
ins
,
kbd
,
q
,
samp
,
small
,
strong
,
sub
,
sup
,
var
,
b
,
i
,
dl
,
dt
,
dd
,
ol
,
ul
,
li
,
fieldset
,
form
,
label
,
legend
,
table
,
caption
,
tbody
,
tfoot
,
thead
,
tr
,
th
,
td
{
border
:
0
none
;
border
:
0
none
;
font-size
:
inherit
;
font-size
:
inherit
;
...
...
src/components/coupons/myCoupons/index.js
View file @
9f3a7d5a
...
@@ -53,14 +53,17 @@ class UseCoupon extends PureComponent {
...
@@ -53,14 +53,17 @@ class UseCoupon extends PureComponent {
const
{
location
:
{
state
=
{}}}
=
this
.
props
;
const
{
location
:
{
state
=
{}}}
=
this
.
props
;
if
(
this
.
state
.
redeemCode
!==
''
)
{
if
(
this
.
state
.
redeemCode
!==
''
)
{
http
.
post
(
`
${
API
.
home
}
/m/coupon/exchange`
,
{
http
.
post
(
`
${
API
.
home
}
/m/coupon/exchange`
,
{
code
:
this
.
state
.
redeemCode
code
:
this
.
state
.
redeemCode
,
type
:
state
.
from
.
substr
(
1
)
})
})
.
then
(
res
=>
{
.
then
(
res
=>
{
const
data
=
res
.
data
const
data
=
res
.
data
if
(
data
.
code
===
200
)
{
if
(
data
.
code
===
200
)
{
// 如果从我的页面进来,点击兑换直接兑换成功课程,弹出弹窗
// 如果从订单页面进来,点击兑换兑换成券
const
coupon
=
data
.
data
const
coupon
=
data
.
data
if
(
state
.
from
===
'/my'
)
{
if
(
coupon
[
'ctype'
]
==
2
)
{
if
(
coupon
[
'ctype'
]
==
2
)
{
this
.
setState
({
this
.
setState
({
courseCouponData
:
coupon
,
courseCouponData
:
coupon
,
...
@@ -68,27 +71,34 @@ class UseCoupon extends PureComponent {
...
@@ -68,27 +71,34 @@ class UseCoupon extends PureComponent {
redeemCode
:
''
redeemCode
:
''
})
})
}
else
{
}
else
{
if
(
this
.
state
.
showUseButton
)
{
this
.
setState
({
this
.
setState
({
couponList
:
[...
this
.
state
.
couponList
,
coupon
],
couponList
:
[...
this
.
state
.
couponList
,
coupon
],
redeemCode
:
''
redeemCode
:
''
})
})
}
else
{
Toast
.
info
(
'兑换成功'
)
this
.
getMyCoupons
()
}
}
if
(
state
.
from
===
'/order'
)
{
const
coupon
=
data
.
data
const
coupon
=
data
.
data
if
(
coupon
[
'ctype'
]
==
2
&&
coupon
[
'limit_course'
]
!=
this
.
state
.
courseId
)
{
this
.
setState
({
invalid_coupons
:
[...
this
.
state
.
invalid_coupons
,
coupon
],
showUseButton
:
null
,
redeemCode
:
''
});
}
else
{
this
.
setState
({
this
.
setState
({
valid_coupons
:
[...
this
.
state
.
valid_coupons
,
coupon
],
valid_coupons
:
[...
this
.
state
.
valid_coupons
,
coupon
],
redeemCode
:
''
redeemCode
:
''
})
})
}
}
Toast
.
info
(
'兑换成功'
)
Toast
.
info
(
'兑换成功'
)
if
(
state
.
from
===
'/my'
)
{
this
.
getMyCoupons
()
}
if
(
state
.
from
===
'/order'
)
{
this
.
getAllCoupons
()
this
.
getAllCoupons
()
}
}
}
}
else
{
}
else
{
Toast
.
info
(
data
.
msg
)
Toast
.
info
(
data
.
msg
)
}
}
...
@@ -136,15 +146,14 @@ class UseCoupon extends PureComponent {
...
@@ -136,15 +146,14 @@ class UseCoupon extends PureComponent {
}
}
// 立即兑换课程
// 立即兑换课程
toExchangeCourse
=
(
e
,
code
)
=>
{
toExchangeCourse
=
(
e
,
code
)
=>
{
e
.
stopPropagation
();
e
.
stopPropagation
();
http
.
post
(
`
${
API
[
'base-api'
]}
/pay/miandan/
${
code
}
`
,
{
http
.
post
(
`
${
API
[
'base-api'
]}
/pay/miandan/
${
code
}
`
,
{}).
then
(
res
=>
{
}).
then
(
res
=>
{
const
data
=
res
.
data
const
data
=
res
.
data
if
(
data
.
errno
===
200
)
{
if
(
data
.
errno
===
200
)
{
this
.
setState
({
this
.
setState
({
courseCouponExchange
:
true
,
courseCouponExchange
:
true
,
courseCouponData
:
res
.
data
.
data
courseCouponData
:
res
.
data
.
data
})
})
this
.
getMyCoupons
()
this
.
getMyCoupons
()
}
else
{
}
else
{
...
...
src/components/passport/index.js
View file @
9f3a7d5a
...
@@ -46,13 +46,13 @@ class Passport extends Component {
...
@@ -46,13 +46,13 @@ class Passport extends Component {
{
{
logo
:
qq
,
logo
:
qq
,
text
:
'QQ'
,
text
:
'QQ'
,
url
:
`
${
API
[
"passport-api"
]}
/mob/qqlogin?redirect_url=
${
this
.
redirectURL
}
`
,
url
:
`
${
API
[
"passport-api"
]}
/mob/qqlogin?redirect_url=
${
encodeURIComponent
(
this
.
redirectURL
)
}
`
,
id
:
'qq'
id
:
'qq'
},
},
{
{
logo
:
sina
,
logo
:
sina
,
text
:
'新浪'
,
text
:
'新浪'
,
url
:
`
${
API
[
'passport-api'
]}
/mob/sinalogin?redirect_url=
${
this
.
redirectURL
}
`
,
url
:
`
${
API
[
'passport-api'
]}
/mob/sinalogin?redirect_url=
${
encodeURIComponent
(
this
.
redirectURL
)
}
`
,
id
:
'sina'
id
:
'sina'
}
}
]
]
...
...
src/components/study/freeCourses/index.js
View file @
9f3a7d5a
...
@@ -70,7 +70,7 @@ class FreeCourse extends PureComponent {
...
@@ -70,7 +70,7 @@ class FreeCourse extends PureComponent {
toLive
=
live
=>
{
toLive
=
live
=>
{
const
{
room_id
,
live_status
}
=
live
const
{
room_id
,
live_status
}
=
live
if
(
live_status
)
{
if
(
live_status
)
{
window
.
location
.
assign
(
`http://www
-test
.julyedu.com/live/m_room/
${
room_id
}
`
)
window
.
location
.
assign
(
`http://www.julyedu.com/live/m_room/
${
room_id
}
`
)
}
else
{
}
else
{
Toast
.
info
(
'直播即将开始,敬请期待'
,
2
,
null
,
false
)
Toast
.
info
(
'直播即将开始,敬请期待'
,
2
,
null
,
false
)
}
}
...
...
src/components/video/index.js
View file @
9f3a7d5a
...
@@ -591,6 +591,9 @@ class Video extends Component {
...
@@ -591,6 +591,9 @@ class Video extends Component {
let
url
=
''
;
let
url
=
''
;
if
(
getParam
(
'video_id'
))
{
if
(
getParam
(
'video_id'
))
{
url
=
`
${
API
.
home
}
/m/course/play/
${
this
.
courseID
+
'?video_id='
+
getParam
(
'video_id'
)}
`
url
=
`
${
API
.
home
}
/m/course/play/
${
this
.
courseID
+
'?video_id='
+
getParam
(
'video_id'
)}
`
http
.
post
(
`
${
API
[
'base-api'
]}
/sys/get_class_audition`
,
{
video_id
:
getParam
(
'video_id'
)
})
}
else
{
}
else
{
url
=
`
${
API
.
home
}
/m/course/play/
${
this
.
courseID
}
`
url
=
`
${
API
.
home
}
/m/course/play/
${
this
.
courseID
}
`
}
}
...
...
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