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
2057bf98
Commit
2057bf98
authored
Aug 28, 2020
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
视频安全问题
parent
4eb766ab
Show whitespace changes
Inline
Side-by-side
Showing
41 changed files
with
221 additions
and
270 deletions
+221
-270
package.json
+1
-1
src/common/WxLogin/index.js
+0
-4
src/components/Index/liveRoom.js
+1
-1
src/components/activity/2020-717/question/index.js
+2
-1
src/components/activity/give-courses/index.js
+152
-110
src/components/activity/newyear-2019/common/commonContainer/index.js
+0
-3
src/components/activity/newyear-2019/common/commonPopup/index.js
+0
-3
src/components/activity/newyear-2019/common/user-bullet-screen/index.js
+1
-1
src/components/activity/newyear-2019/myTreasure/index.js
+1
-0
src/components/activity/newyear-2019/preheat/YearCourse/index.js
+1
-1
src/components/activity/newyear-2019/treasure-box/index.js
+0
-3
src/components/activity/treasure-box/common/commonContainer/index.js
+0
-3
src/components/activity/treasure-box/common/commonPopup/index.js
+0
-3
src/components/activity/treasure-box/common/user-bullet-screen/index.js
+1
-1
src/components/activity/treasure-box/myTreasure/index.js
+1
-0
src/components/activity/treasure-box/treasure-box/index.js
+0
-3
src/components/ai-test/scores/index.js
+3
-2
src/components/bargainMiddlePage/index.js
+9
-30
src/components/blessingPreheat/ReserveCourse/index.js
+5
-4
src/components/blessingPreheat/courseList/index.js
+0
-1
src/components/blessingPreheat/luckDraw/index.js
+2
-1
src/components/blessingPreheat/rankList/index.js
+1
-0
src/components/college/banner.js
+1
-11
src/components/coupons/Coupon/index.js
+6
-5
src/components/coupons/myCoupons/index.js
+4
-3
src/components/detail/audition/index.js
+0
-4
src/components/detail/group/togroup.js
+1
-6
src/components/detail/redPacket/index.js
+2
-2
src/components/detail/single/index.js
+2
-3
src/components/detail/single/singleSuccess.js
+1
-2
src/components/ml/pythomDes/index.js
+6
-24
src/components/order/orderinfo.js
+0
-4
src/components/python/pythomDes/Study/index.js
+1
-1
src/components/python/pythomDes/Test/index.js
+1
-1
src/components/python/pythonStudy/index.js
+2
-2
src/components/share-page/aist-share/index.js
+1
-2
src/components/sharePoster/index.js
+1
-16
src/components/study/myCourses/index.js
+3
-3
src/components/ts-test/index.tsx
+5
-3
src/components/video/video-catalog/index.js
+1
-0
src/router/privateRoute.js
+2
-2
No files found.
package.json
View file @
2057bf98
...
...
@@ -138,7 +138,7 @@
"API"
:
"readonly"
,
"NoCaptcha"
:
"readonly"
,
"WeixinJSBridge"
:
"readonly"
,
"_czc"
:
"
readonly
"
,
"_czc"
:
"
writable
"
,
"wx"
:
"readonly"
}
},
...
...
src/common/WxLogin/index.js
View file @
2057bf98
...
...
@@ -2,10 +2,6 @@ import React, { Component } from "react"
import
"./index.scss"
class
WxLogin
extends
Component
{
constructor
(
props
)
{
super
(
props
)
}
// 提示微信登录还是账号登录,微信授权登录不需要绑定手机号
wxLogin
=
()
=>
{
let
url
=
window
.
location
.
href
...
...
src/components/Index/liveRoom.js
View file @
2057bf98
...
...
@@ -132,7 +132,7 @@ class LiveRoom extends Component {
// 服务号预约
serverStep
=
()
=>
{
if
(
this
.
state
.
isfollow
==
2
)
{
if
(
Number
(
this
.
state
.
isfollow
)
=
==
2
)
{
window
.
location
.
href
=
"https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzIyMzMzMTIwNA==&scene=124#wechat_redirect"
}
else
{
...
...
src/components/activity/2020-717/question/index.js
View file @
2057bf98
/* eslint-disable eqeqeq */
import
React
,
{
Component
}
from
"react"
import
"./index.scss"
import
{
Toast
}
from
"antd-mobile"
import
classnames
from
"classnames"
import
{
browser
,
http
}
from
"src/utils"
import
{
http
}
from
"src/utils"
import
{
WithFullSize
}
from
"src/HOCs"
import
{
Link
}
from
"react-router-dom"
import
{
compose
}
from
"redux"
...
...
src/components/activity/give-courses/index.js
View file @
2057bf98
import
React
,
{
Component
}
from
'react'
import
'./give-courses.scss'
/* globals _czc */
import
React
,
{
Component
}
from
"react"
import
"./give-courses.scss"
import
{
getParam
,
http
}
from
"src/utils"
import
{
Toast
}
from
"antd-mobile"
import
{
Link
}
from
"react-router-dom"
function
showToast
(
text
)
{
Toast
.
info
(
text
,
2
,
null
,
false
)
}
class
GiveCourses
extends
Component
{
state
=
{
banner
:
''
,
banner
:
""
,
courses
:
[],
rule
:
''
,
awardstext
:
''
,
rule
:
""
,
awardstext
:
""
,
rankList
:
{},
isShow
:
false
,
animate
:
false
,
marqueeList
:
[]
marqueeList
:
[]
,
}
componentDidMount
()
{
document
.
title
=
'AI攻城狮超车季,呼朋唤友免费学爆款AI好课!VIP会员、机械键盘、AI经典纸质书等免费送!--七月在线'
document
.
title
=
"AI攻城狮超车季,呼朋唤友免费学爆款AI好课!VIP会员、机械键盘、AI经典纸质书等免费送!--七月在线"
http
.
get
(
`
${
API
[
"base-api"
]}
/assistance/detail`
)
.
then
(
res
=>
{
const
{
data
,
errno
,
msg
}
=
res
.
data
http
.
get
(
`
${
API
[
"base-api"
]}
/assistance/detail`
).
then
((
res
)
=>
{
const
{
data
,
errno
,
msg
}
=
res
.
data
if
(
errno
===
200
)
{
this
.
setState
({
banner
:
data
[
"active_info"
][
"m_banner"
],
courses
:
data
.
course_info
,
rule
:
data
[
"active_info"
][
"rule"
],
awardstext
:
data
[
"active_info"
][
"awards_text"
].
split
(
'
\
n
\
n'
),
query
:
data
[
"active_info"
][
"activity_name"
]
awardstext
:
data
[
"active_info"
][
"awards_text"
].
split
(
"
\
n
\
n"
),
query
:
data
[
"active_info"
][
"activity_name"
],
})
this
.
isRouter
(
data
[
"active_info"
][
"activity_name"
])
}
else
{
showToast
(
msg
)
}
...
...
@@ -52,9 +49,8 @@ class GiveCourses extends Component {
}
getRankList
=
()
=>
{
http
.
get
(
`
${
API
[
"base-api"
]}
/assistance/ranking_list/50`
)
.
then
(
res
=>
{
const
{
data
,
errno
,
msg
}
=
res
.
data
http
.
get
(
`
${
API
[
"base-api"
]}
/assistance/ranking_list/50`
).
then
((
res
)
=>
{
const
{
data
,
errno
,
msg
}
=
res
.
data
if
(
errno
===
200
)
{
this
.
setState
({
rankList
:
{
...
...
@@ -64,8 +60,8 @@ class GiveCourses extends Component {
third
:
data
.
list
[
2
],
other
:
data
.
list
.
slice
(
3
,
50
),
isMyList
:
data
[
"nickname"
],
myList
:
data
[
"nickname"
]
&&
data
}
myList
:
data
[
"nickname"
]
&&
data
,
},
})
}
else
{
showToast
(
msg
)
...
...
@@ -74,15 +70,12 @@ class GiveCourses extends Component {
}
getMarqueeList
=
()
=>
{
http
.
get
(
`
${
API
[
"base-api"
]}
/assistance/roll_tip`
)
.
then
(
res
=>
{
const
{
errno
,
msg
,
data
}
=
res
.
data
http
.
get
(
`
${
API
[
"base-api"
]}
/assistance/roll_tip`
).
then
((
res
)
=>
{
const
{
errno
,
msg
,
data
}
=
res
.
data
if
(
errno
===
200
)
{
this
.
setState
({
marqueeList
:
data
marqueeList
:
data
,
})
}
else
{
showToast
(
msg
)
}
...
...
@@ -90,26 +83,28 @@ class GiveCourses extends Component {
}
showMarquee
=
()
=>
{
this
.
setState
({
animate
:
true
},
()
=>
{
this
.
setState
(
{
animate
:
true
,
},
()
=>
{
setTimeout
(()
=>
{
const
[
first
,
second
]
=
this
.
state
.
marqueeList
this
.
setState
({
animate
:
false
,
marqueeList
:
[
second
,
first
]
marqueeList
:
[
second
,
first
],
})
},
500
)
})
}
)
}
isRouter
=
param
=>
{
if
(
decodeURIComponent
(
getParam
(
'activename'
))
!
=
param
)
{
this
.
props
.
history
.
push
(
'/'
)
isRouter
=
(
param
)
=>
{
if
(
decodeURIComponent
(
getParam
(
"activename"
))
!=
=
param
)
{
this
.
props
.
history
.
push
(
"/"
)
}
}
render
()
{
const
{
banner
,
...
...
@@ -119,76 +114,99 @@ class GiveCourses extends Component {
rankList
,
isShow
,
animate
,
marqueeList
marqueeList
,
}
=
this
.
state
var
_czc
=
_czc
||
[]
return
(
<
div
id
=
{
'give-courses'
}
>
<
div
id
=
{
"give-courses"
}
>
<
div
className
=
"banner"
>
<
img
src
=
{
banner
}
alt
=
""
/>
<
img
src
=
{
banner
}
alt
=
""
/>
<
/div
>
<
div
className
=
'give-box'
>
{
courses
.
map
(
course
=>
{
<
div
className
=
"give-box"
>
{
courses
.
map
((
course
)
=>
{
return
(
<
div
className
=
'give-course'
key
=
{
course
.
id
}
>
<
Link
className
=
'give-course-img'
to
=
{
`/detail?id=
${
course
.
course_id
}
`
}
>
<
img
src
=
{
course
.
image_name
}
alt
=
""
/>
<
div
className
=
"give-course"
key
=
{
course
.
id
}
>
<
Link
className
=
"give-course-img"
to
=
{
`/detail?id=
${
course
.
course_id
}
`
}
>
<
img
src
=
{
course
.
image_name
}
alt
=
""
/>
<
/Link
>
<
ul
className
=
"give-course-mess"
>
<
li
className
=
'course-title'
>
<
li
className
=
"course-title"
>
<
a
href
=
"javascript:"
>
{
course
.
course_title
}
<
/a
>
<
/li
>
<
li
className
=
'course-teacher'
><
span
className
=
'tag'
>
讲师
<
/span>{course
[
"teachers"
]
}</
li
>
<
li
className
=
'course-time'
><
span
className
=
'tag'
>
开课时间
<
/span>{course
[
"start_time"
]
}</
li
>
<
li
className
=
'toreceive'
onClick
=
{()
=>
{
_czc
&&
_czc
.
push
([
"_trackEvent"
,
`课程id=
${
course
.
course_id
}
`
,
'免费领取课程'
])
<
li
className
=
"course-teacher"
>
<
span
className
=
"tag"
>
讲师
<
/span
>
{
course
[
"teachers"
]}
<
/li
>
<
li
className
=
"course-time"
>
<
span
className
=
"tag"
>
开课时间
<
/span
>
{
course
[
"start_time"
]}
<
/li
>
<
li
className
=
"toreceive"
onClick
=
{()
=>
{
_czc
&&
_czc
.
push
([
"_trackEvent"
,
`课程id=
${
course
.
course_id
}
`
,
"免费领取课程"
,
])
console
.
log
(
course
.
course_id
)
this
.
setState
({
isShow
:
true
})
}}
>
免费领取课程
this
.
setState
({
isShow
:
true
})
}}
>
免费领取课程
<
/li
>
<
/ul
>
<
/div
>
)
})
}
})}
<
p
className
=
"rule-title"
>
活动规则
<
/p
>
<
div
className
=
"rule-list"
dangerouslySetInnerHTML
=
{{
__html
:
rule
}}
/
>
<
div
className
=
"rule-list"
dangerouslySetInnerHTML
=
{{
__html
:
rule
}}
/
>
<
div
className
=
"marquee_box"
>
<
ul
className
=
{
`marquee_list
${
animate
?
'marquee_top'
:
''
}
`
}
>
{
marqueeList
.
length
?
marqueeList
.
map
((
item
,
index
)
=>
{
<
ul
className
=
{
`marquee_list
${
animate
?
"marquee_top"
:
""
}
`
}
>
{
marqueeList
.
length
?
marqueeList
.
map
((
item
,
index
)
=>
{
return
(
<
li
key
=
{
index
}
>
<
img
src
=
{
item
.
head_img
}
alt
=
""
/>
<
img
src
=
{
item
.
head_img
}
alt
=
""
/>
<
span
>
{
item
[
"nickname"
]}
<
/span
>
{
item
[
"word"
]}
<
/li
>
)
})
:
null
}
:
null
}
<
/ul
>
<
/div
>
<
/div
>
<
div
className
=
"set-prize"
>
<
p
className
=
"set-prize-title"
>
<
img
src
=
"//julyedu-cdn.oss-cn-beijing.aliyuncs.com/2018_1111/jpsz_icon.png"
alt
=
""
/>
奖品设置
<
img
src
=
"//julyedu-cdn.oss-cn-beijing.aliyuncs.com/2018_1111/jpsz_icon.png"
alt
=
""
/>
奖品设置
<
/p
>
<
div
className
=
"set-prize-content"
>
{
awardstext
&&
awardstext
.
length
&&
awardstext
.
map
((
item
,
index
)
=>
<
p
key
=
{
index
}
>
{
item
}
<
/p>
)
}
{
awardstext
&&
awardstext
.
length
&&
awardstext
.
map
((
item
,
index
)
=>
<
p
key
=
{
index
}
>
{
item
}
<
/p>
)
}
<
/div
>
<
/div
>
<
div
className
=
"ranking-list"
>
<
div
className
=
"ranking_title"
>
<
img
src
=
"//julyedu-cdn.oss-cn-beijing.aliyuncs.com/2018_1111/jbei_icon.png"
alt
=
""
/>
<
img
src
=
"//julyedu-cdn.oss-cn-beijing.aliyuncs.com/2018_1111/jbei_icon.png"
alt
=
""
/>
<
span
>
排行榜
<
/span
>
<
p
>
数据实时更新
只显示
Top50
<
/p
>
<
/div
>
...
...
@@ -201,83 +219,107 @@ class GiveCourses extends Component {
<
/tr
>
<
/thead
>
<
tbody
>
{
rankList
.
list
&&
rankList
.
list
.
length
>
0
?
{
rankList
.
list
&&
rankList
.
list
.
length
>
0
?
(
<
tr
>
<
td
><
img
src
=
"//julyedu-cdn.oss-cn-beijing.aliyuncs.com/2018_1111/jin1_icon.png"
alt
=
""
/><
/td
>
<
td
><
img
src
=
{
rankList
.
first
.
head_img
}
alt
=
""
/><
span
>
{
rankList
.
first
.
name
}
<
/span></
td
>
<
td
>
<
img
src
=
"//julyedu-cdn.oss-cn-beijing.aliyuncs.com/2018_1111/jin1_icon.png"
alt
=
""
/>
<
/td
>
<
td
>
<
img
src
=
{
rankList
.
first
.
head_img
}
alt
=
""
/>
<
span
>
{
rankList
.
first
.
name
}
<
/span
>
<
/td
>
<
td
>
{
rankList
.
first
.
num
}
<
/td
>
<
/tr
>
:
null
}
)
:
null
}
{
rankList
.
list
&&
rankList
.
list
.
length
>
1
?
{
rankList
.
list
&&
rankList
.
list
.
length
>
1
?
(
<
tr
>
<
td
><
img
src
=
"//julyedu-cdn.oss-cn-beijing.aliyuncs.com/2018_1111/yin2_icon.png"
alt
=
""
/><
/td
>
<
td
><
img
src
=
{
rankList
.
second
.
head_img
}
alt
=
""
/><
span
>
{
rankList
.
second
.
name
}
<
/span></
td
>
<
td
>
<
img
src
=
"//julyedu-cdn.oss-cn-beijing.aliyuncs.com/2018_1111/yin2_icon.png"
alt
=
""
/>
<
/td
>
<
td
>
<
img
src
=
{
rankList
.
second
.
head_img
}
alt
=
""
/>
<
span
>
{
rankList
.
second
.
name
}
<
/span
>
<
/td
>
<
td
>
{
rankList
.
second
.
num
}
<
/td
>
<
/tr
>
:
null
}
)
:
null
}
{
rankList
.
list
&&
rankList
.
list
.
length
>
2
?
{
rankList
.
list
&&
rankList
.
list
.
length
>
2
?
(
<
tr
>
<
td
><
img
src
=
"//julyedu-cdn.oss-cn-beijing.aliyuncs.com/2018_1111/tong_icon.png"
alt
=
""
/><
/td
>
<
td
><
img
src
=
{
rankList
.
third
.
head_img
}
alt
=
""
/><
span
>
{
rankList
.
third
.
name
}
<
/span></
td
>
<
td
>
<
img
src
=
"//julyedu-cdn.oss-cn-beijing.aliyuncs.com/2018_1111/tong_icon.png"
alt
=
""
/>
<
/td
>
<
td
>
<
img
src
=
{
rankList
.
third
.
head_img
}
alt
=
""
/>
<
span
>
{
rankList
.
third
.
name
}
<
/span
>
<
/td
>
<
td
>
{
rankList
.
third
.
num
}
<
/td
>
<
/tr
>
:
null
}
)
:
null
}
{
rankList
.
list
&&
rankList
.
list
.
length
&&
rankList
.
list
.
length
>
3
?
rankList
.
other
.
map
((
item
,
index
)
=>
{
{
rankList
.
list
&&
rankList
.
list
.
length
&&
rankList
.
list
.
length
>
3
?
rankList
.
other
.
map
((
item
,
index
)
=>
{
return
(
<
tr
key
=
{
index
}
>
<
td
>
{
index
+
4
}
<
/td
>
<
td
><
img
src
=
{
item
.
head_img
}
alt
=
""
/><
span
>
{
item
.
name
}
<
/span></
td
>
<
td
>
<
img
src
=
{
item
.
head_img
}
alt
=
""
/>
<
span
>
{
item
.
name
}
<
/span
>
<
/td
>
<
td
>
{
item
.
num
}
<
/td
>
<
/tr
>
)
})
:
null
}
:
null
}
{
rankList
.
isMyList
&&
{
rankList
.
isMyList
&&
(
<
tr
className
=
"ismylist"
>
<
td
>
{
rankList
.
myList
[
"ranking"
]}
<
/td
>
<
td
><
img
src
=
{
rankList
.
myList
.
head_img
}
alt
=
""
/><
span
>
{
rankList
.
myList
[
"nickname"
]}
<
/span></
td
>
<
td
>
<
img
src
=
{
rankList
.
myList
.
head_img
}
alt
=
""
/>
<
span
>
{
rankList
.
myList
[
"nickname"
]}
<
/span
>
<
/td
>
<
td
>
{
rankList
.
myList
[
"inviter_num"
]}
<
/td
>
<
/tr
>
}
)}
<
/tbody
>
<
/table
>
<
p
className
=
"btm"
/>
<
p
className
=
"btm"
/>
<
/div
>
<
p
className
=
"julynotice"
>*
本活动最终解释权归七月在线所有
*<
/p
>
{
isShow
&&
{
isShow
&&
(
<
div
className
=
"code-mbc"
>
<
div
className
=
"code-box"
>
<
p
className
=
"code-title"
>
进入服务号回复
<
i
>
77
<
/i>免费领取课程</
p
>
<
img
id
=
"qrCodeWpay"
src
=
"//julyedu-cdn.oss-cn-beijing.aliyuncs.com/2018christyear/h5/qrcode.jpg"
alt
=
""
/>
<
p
className
=
"code-title"
>
进入服务号回复
<
i
>
77
<
/i>免费领取课
程
<
/p
>
<
img
id
=
"qrCodeWpay"
src
=
"//julyedu-cdn.oss-cn-beijing.aliyuncs.com/2018christyear/h5/qrcode.jpg"
alt
=
""
/>
<
p
className
=
"btmmess"
>
长按扫码进入服务号
<
/p
>
<
/div
>
<
i
className
=
"close iconfont iconiconfront-2"
onClick
=
{()
=>
{
this
.
setState
({
isShow
:
false
})
}}
/
>
<
i
className
=
"close iconfont iconiconfront-2"
onClick
=
{()
=>
{
this
.
setState
({
isShow
:
false
})
}}
/
>
<
/div
>
}
)}
<
/div
>
)
}
...
...
src/components/activity/newyear-2019/common/commonContainer/index.js
View file @
2057bf98
...
...
@@ -2,9 +2,6 @@ import React, { Component } from "react"
import
"./index.scss"
export
default
class
CommonContainer
extends
Component
{
constructor
(
props
)
{
super
(
props
)
}
render
()
{
const
{
id
}
=
this
.
props
return
(
...
...
src/components/activity/newyear-2019/common/commonPopup/index.js
View file @
2057bf98
...
...
@@ -2,9 +2,6 @@ import React, { Component } from "react"
import
"./index.scss"
export
default
class
index
extends
Component
{
constructor
(
props
)
{
super
(
props
)
}
computedStyle
=
()
=>
{
return
{
top
:
`
${
this
.
props
.
top
}
px`
,
...
...
src/components/activity/newyear-2019/common/user-bullet-screen/index.js
View file @
2057bf98
...
...
@@ -64,7 +64,7 @@ class UserBulletScreen extends Component {
getBulletScreenData
=
(
initializeSwiper
=
false
)
=>
{
return
http
.
get
(
`
${
API
.
home
}
/sys/barrage_data`
).
then
((
res
)
=>
{
const
{
data
,
code
}
=
res
.
data
if
(
code
==
200
)
{
if
(
code
==
=
200
)
{
if
(
initializeSwiper
)
{
this
.
setState
(
{
...
...
src/components/activity/newyear-2019/myTreasure/index.js
View file @
2057bf98
/* eslint-disable eqeqeq */
import
React
,
{
Component
}
from
"react"
import
{
connect
}
from
"react-redux"
import
{
HeaderBar
}
from
"src/common"
...
...
src/components/activity/newyear-2019/preheat/YearCourse/index.js
View file @
2057bf98
/* eslint-disable jsx-a11y/anchor-is-valid */
/* eslint-disable jsx-a11y/anchor-is-valid
, eqeqeq
*/
import
React
,
{
Component
}
from
"react"
import
"./index.scss"
import
{
http
,
SendMessageToApp
,
getParam
,
browser
}
from
"src/utils"
...
...
src/components/activity/newyear-2019/treasure-box/index.js
View file @
2057bf98
...
...
@@ -7,9 +7,6 @@ import Prizes from "src/components/activity/newyear-2019/common/prizes"
import
UserBulletScreen
from
"src/components/activity/newyear-2019/common/user-bullet-screen"
class
TreasureBox
extends
Component
{
constructor
(
props
)
{
super
(
props
)
}
render
()
{
return
(
<
CommonContainer
id
=
"year-treasure"
title
=
{
"组队开宝箱"
}
>
...
...
src/components/activity/treasure-box/common/commonContainer/index.js
View file @
2057bf98
...
...
@@ -2,9 +2,6 @@ import React, { Component } from "react"
import
"./index.scss"
export
default
class
CommonContainer
extends
Component
{
constructor
(
props
)
{
super
(
props
)
}
render
()
{
const
{
id
}
=
this
.
props
return
(
...
...
src/components/activity/treasure-box/common/commonPopup/index.js
View file @
2057bf98
...
...
@@ -2,9 +2,6 @@ import React, { Component } from "react"
import
"./index.scss"
export
default
class
index
extends
Component
{
constructor
(
props
)
{
super
(
props
)
}
computedStyle
=
()
=>
{
return
{
top
:
`
${
this
.
props
.
top
}
px`
,
...
...
src/components/activity/treasure-box/common/user-bullet-screen/index.js
View file @
2057bf98
...
...
@@ -64,7 +64,7 @@ class UserBulletScreen extends Component {
getBulletScreenData
=
(
initializeSwiper
=
false
)
=>
{
return
http
.
get
(
`
${
API
.
home
}
/sys/barrage_data`
).
then
((
res
)
=>
{
const
{
data
,
code
}
=
res
.
data
if
(
code
==
200
)
{
if
(
code
==
=
200
)
{
if
(
initializeSwiper
)
{
this
.
setState
(
{
...
...
src/components/activity/treasure-box/myTreasure/index.js
View file @
2057bf98
/* eslint-disable eqeqeq */
import
React
,
{
Component
}
from
"react"
import
{
connect
}
from
"react-redux"
import
{
HeaderBar
}
from
"src/common"
...
...
src/components/activity/treasure-box/treasure-box/index.js
View file @
2057bf98
...
...
@@ -7,9 +7,6 @@ import Prizes from "src/components/activity/treasure-box/common/prizes"
import
UserBulletScreen
from
"src/components/activity/treasure-box/common/user-bullet-screen"
class
TreasureBox
extends
Component
{
constructor
(
props
)
{
super
(
props
)
}
render
()
{
return
(
<
CommonContainer
id
=
"year-treasure"
title
=
{
"组队开宝箱"
}
>
...
...
src/components/ai-test/scores/index.js
View file @
2057bf98
/* eslint-disable jsx-a11y/anchor-is-valid */
import
React
,
{
Component
}
from
"react"
import
"./index.scss"
import
{
Tabs
,
Toast
}
from
"antd-mobile"
...
...
@@ -118,7 +119,7 @@ class Scores extends Component {
getUserAddress
=
()
=>
{
http
.
get
(
`
${
API
.
home
}
/sys/user_address_info`
).
then
((
res
)
=>
{
const
{
code
,
msg
,
data
}
=
res
.
data
const
{
code
,
data
}
=
res
.
data
if
(
code
===
200
)
{
this
.
setState
({
userAddress
:
data
,
...
...
@@ -150,7 +151,7 @@ class Scores extends Component {
return
}
http
.
post
(
`
${
API
.
home
}
/sys/update_address`
,
userAddress
).
then
((
res
)
=>
{
const
{
code
,
msg
,
data
}
=
res
.
data
const
{
code
,
msg
}
=
res
.
data
if
(
code
===
200
)
{
Toast
.
success
(
"提交成功"
,
2
,
null
,
false
)
this
.
setState
({
...
...
src/components/bargainMiddlePage/index.js
View file @
2057bf98
/* eslint-disable jsx-a11y/anchor-is-valid */
import
React
,
{
Component
}
from
"react"
import
"./bargain-middle-page.scss"
import
{
HeaderBar
,
VList
}
from
"src/common"
import
{
Course
}
from
"src/common"
import
{
api
,
getParam
,
http
,
browser
,
wxShare
}
from
"src/utils"
import
{
getParam
,
http
,
browser
,
wxShare
}
from
"src/utils"
import
{
Toast
}
from
"antd-mobile"
import
{
Link
,
withRouter
}
from
"react-router-dom"
import
Ranking
from
"./ranking"
...
...
@@ -13,9 +14,7 @@ import {
differenceInDays
,
}
from
"date-fns"
import
Overlay
from
"../detail/overlay"
import
{
compose
}
from
"redux"
import
{
connect
}
from
"react-redux"
import
{
getCourses
}
from
"./../detail/actions"
import
classnames
from
"classnames"
import
FollowBarcode
from
"./barcode/index"
...
...
@@ -159,7 +158,7 @@ class BargainMiddlePage extends Component {
list
:
res
.
data
.
data
.
list
,
outList
:
newList
,
})
}
else
if
(
res
.
data
.
code
==
4030
||
res
.
data
.
code
==
4040
)
{
}
else
if
(
res
.
data
.
code
==
=
4030
||
res
.
data
.
code
=
==
4040
)
{
}
else
{
Toast
.
info
(
res
.
data
.
msg
,
2
)
}
...
...
@@ -317,7 +316,7 @@ class BargainMiddlePage extends Component {
this
.
getBargainInfo
()
this
.
getBargainRankList
(
getParam
(
"id"
),
1
)
}
else
if
(
res
.
data
.
code
==
4030
||
res
.
data
.
code
==
4040
)
{
}
else
if
(
res
.
data
.
code
==
=
4030
||
res
.
data
.
code
=
==
4040
)
{
if
(
browser
.
isWeixin
)
{
let
redirectURI
=
window
.
location
.
href
if
(
...
...
@@ -390,15 +389,12 @@ class BargainMiddlePage extends Component {
}
toCourseDetail
=
(
id
)
=>
{
const
{
dispatch
,
history
}
=
this
.
props
// dispatch(getCourses(id, () => {
const
{
history
}
=
this
.
props
history
.
push
(
`/detail?id=
${
id
}
`
)
return
false
// }));
}
render
()
{
// console.log(this.props);
let
thirdRow
,
btn
// is_artifact 0-再邀请多少人可以使用 1-可以使用未领取 2-已领取 3-已使用
if
(
this
.
state
.
bargainData
.
is_artifact
===
0
)
{
...
...
@@ -513,8 +509,8 @@ class BargainMiddlePage extends Component {
/
>
<
/ul
>
<
div
className
=
"bargain-detail"
>
{(
this
.
state
.
data
.
bargain_status
==
0
||
this
.
state
.
data
.
bargain_status
==
1
)
&&
(
{(
Number
(
this
.
state
.
data
.
bargain_status
)
=
==
0
||
Number
(
this
.
state
.
data
.
bargain_status
)
=
==
1
)
&&
(
<
div
>
<
div
className
=
"top"
>
<
div
>
...
...
@@ -746,12 +742,12 @@ function CourseDes(props) {
<
div
className
=
"price-bar"
>
<
span
className
=
{
"discount-price"
}
>
¥
{
course
.
course_price
}
<
/span
>
{
/* is_originator 是否发起人 0-否 1-是 */
}
{
is_originator
==
1
&&
bargain_status
!
=
3
&&
(
{
Number
(
is_originator
)
===
1
&&
Number
(
bargain_status
)
!=
=
3
&&
(
<
button
className
=
{
"purchase-btn"
}
onClick
=
{
toCart
}
>
¥
{
course
.
pay_price
}
去支付
<
/button
>
)}
{
is_originator
==
1
&&
bargain_status
==
3
&&
(
{
Number
(
is_originator
)
===
1
&&
Number
(
bargain_status
)
=
==
3
&&
(
<
span
className
=
"course-button__buy--done"
>
已购买
<
/span
>
)}
<
/div
>
...
...
@@ -849,23 +845,6 @@ function CourseBottom(props) {
)
}
function
PublicNumber
(
props
)
{
return
(
<
div
className
=
"bargain-public-number"
>
<
img
className
=
"avait"
src
=
{
props
.
avatar
}
alt
=
""
/>
{
props
.
firendBaigainPrice
&&
(
<
p
className
=
"status-title ff4"
>
谢谢你帮我砍了
{
props
.
money
}
元!
<
/p
>
)}
<
p
className
=
"status-dec"
>
关注公众号,可以再砍一刀哦
~<
/p
>
<
img
className
=
"public-number-img"
src
=
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/tinypng-common/right_weixin.png"
alt
=
""
/>
<
/div
>
)
}
function
BargainFirst
(
props
)
{
return
(
<
div
className
=
"bargain-first"
>
...
...
src/components/blessingPreheat/ReserveCourse/index.js
View file @
2057bf98
...
...
@@ -4,7 +4,7 @@ import listFrame from "./../listFrame/index"
import
"./index.scss"
import
{
Toast
}
from
"antd-mobile"
import
{
connect
}
from
"react-redux"
import
{
Link
,
withRouter
}
from
"react-router-dom"
import
{
withRouter
}
from
"react-router-dom"
class
ReserveCourse
extends
Component
{
constructor
(
props
)
{
...
...
@@ -33,7 +33,7 @@ class ReserveCourse extends Component {
if
(
code
===
200
)
{
this
.
setState
({
courseData
:
JSON
.
stringify
(
data
)
==
"{}"
JSON
.
stringify
(
data
)
==
=
"{}"
?
[]
:
data
.
filter
((
item
,
index
)
=>
index
<
4
),
courseDataAll
:
data
,
...
...
@@ -46,7 +46,7 @@ class ReserveCourse extends Component {
// 立即付定金
expandPaydj
=
(
courseId
)
=>
{
const
{
user
,
history
}
=
this
.
props
const
{
user
}
=
this
.
props
const
uid
=
user
&&
user
.
data
&&
user
.
data
.
uid
if
(
!
uid
)
{
if
(
!
getParam
(
"version"
))
{
...
...
@@ -68,7 +68,7 @@ class ReserveCourse extends Component {
}
// 立即付尾款
expandPaywk
=
(
courseId
,
time
,
day
)
=>
{
const
{
user
,
history
}
=
this
.
props
const
{
user
}
=
this
.
props
const
uid
=
user
&&
user
.
data
&&
user
.
data
.
uid
if
(
!
uid
)
{
if
(
!
getParam
(
"version"
))
{
...
...
@@ -137,6 +137,7 @@ function CourseList(props) {
{
courseData
.
map
((
item
,
index
)
=>
{
return
(
<
li
className
=
"course-item-box"
key
=
{
index
}
>
{
/* eslint-disable-next-line jsx-a11y/anchor-is-valid */
}
<
a
onClick
=
{()
=>
tostudy
(
item
.
course_id
)}
>
<
div
className
=
"top"
>
<
div
className
=
"square"
>
...
...
src/components/blessingPreheat/courseList/index.js
View file @
2057bf98
...
...
@@ -7,7 +7,6 @@ import ListFrame from "./../listFrame/index"
import
CourseItem
from
"./../courseItem/index"
import
ListHeader
from
"./../listHeader"
import
"./index.scss"
import
cookie
from
"js-cookie"
class
CourseList
extends
Component
{
constructor
(
props
)
{
...
...
src/components/blessingPreheat/luckDraw/index.js
View file @
2057bf98
...
...
@@ -64,7 +64,8 @@ class LuckDraw extends Component {
key
=
{
`
${
val
.
id
}
-
${
k
}
`
}
>
<
div
className
=
"prize__image"
>
<
img
src
=
{
v
.
img
}
alt
=
"image"
/>
{
/* eslint-disable-next-line jsx-a11y/alt-text */
}
<
img
src
=
{
v
.
img
}
/
>
<
/div
>
<
p
className
=
"prize__desc"
>
{
v
.
name
}
<
/p
>
<
p
className
=
"prize__desc"
>
(
*
{
v
.
num
}
)
<
/p
>
...
...
src/components/blessingPreheat/rankList/index.js
View file @
2057bf98
/* eslint-disable jsx-a11y/alt-text */
import
React
,
{
Component
}
from
"react"
import
"./index.scss"
import
{
http
}
from
"src/utils"
...
...
src/components/college/banner.js
View file @
2057bf98
import
React
from
"react"
import
"./banner.scss"
export
default
(
props
)
=>
{
const
{
banner
=
""
}
=
props
const
style
=
()
=>
{
if
(
banner
)
{
return
{
backgroundImage
:
`url(
${
banner
}
)`
,
}
}
return
{}
}
export
default
()
=>
{
return
<
div
className
=
"college-banner"
><
/div
>
}
src/components/coupons/Coupon/index.js
View file @
2057bf98
...
...
@@ -58,7 +58,7 @@ class Coupon extends PureComponent {
})
.
then
((
res
)
=>
{
const
{
data
}
=
res
if
(
data
.
code
==
200
)
{
if
(
data
.
code
==
=
200
)
{
this
.
props
.
endExpansion
(
id
,
data
.
data
.
coupon_id
)
}
else
{
Toast
.
info
(
data
.
msg
)
...
...
@@ -82,7 +82,7 @@ class Coupon extends PureComponent {
}
=
this
.
props
let
top
,
bottom
/* eslint-disable default-case */
switch
(
ctype
)
{
case
this
.
VOUCHER
:
top
=
(
...
...
@@ -96,11 +96,11 @@ class Coupon extends PureComponent {
bottom
=
(
<>
<
span
className
=
{
"limit"
}
>
{
limit_course
==
0
{
Number
(
limit_course
)
=
==
0
?
"可用于大于代金券金额的课程"
:
`仅适用于《
${
course_title
}
》`
}
<
/span
>
{
showUseButton
&&
ctype
==
this
.
VOUCHER
&&
(
{
showUseButton
&&
Number
(
ctype
)
=
==
this
.
VOUCHER
&&
(
<
button
className
=
"use"
onClick
=
{
this
.
GoToUse
}
>
立即使用
<
/button
>
...
...
@@ -118,7 +118,7 @@ class Coupon extends PureComponent {
bottom
=
(
<>
<
span
className
=
{
"limit"
}
>
{
`仅适用于《
${
course_title
}
》`
}
<
/span
>
{
showUseButton
&&
ctype
==
this
.
FREE
&&
(
{
showUseButton
&&
Number
(
ctype
)
=
==
this
.
FREE
&&
(
<
button
className
=
"use"
onClick
=
{(
e
)
=>
this
.
ExchangeCourse
(
e
)}
>
立即兑换
<
/button
>
...
...
@@ -176,6 +176,7 @@ class Coupon extends PureComponent {
)
break
}
/* eslint-enable default-case */
return
(
<
BaseCoupon
...
...
src/components/coupons/myCoupons/index.js
View file @
2057bf98
...
...
@@ -67,7 +67,7 @@ class UseCoupon extends PureComponent {
const
coupon
=
data
.
data
if
(
state
.
from
===
"/my"
)
{
if
(
coupon
[
"ctype"
]
==
2
)
{
if
(
Number
(
coupon
[
"ctype"
])
=
==
2
)
{
this
.
setState
({
courseCouponData
:
coupon
,
courseCouponExchange
:
true
,
...
...
@@ -119,16 +119,17 @@ class UseCoupon extends PureComponent {
const
[
expansionCoupons
,
allCoupons
]
=
coupons
const
{
data
:
all
}
=
allCoupons
const
{
data
:
expansion
}
=
expansionCoupons
if
(
expansion
.
code
==
200
)
{
if
(
expansion
.
code
==
=
200
)
{
Array
.
isArray
(
expansion
.
data
)
&&
(
expansion
.
data
=
expansion
.
data
.
map
(
/* eslint-disable-next-line no-sequences */
(
item
)
=>
((
item
.
ctype
=
4
),
item
)
))
&&
(
myCoupons
=
myCoupons
.
concat
(
expansion
.
data
))
}
else
{
Toast
.
info
(
expansion
.
msg
)
}
if
(
all
.
code
==
200
)
{
if
(
all
.
code
==
=
200
)
{
Array
.
isArray
(
all
.
data
)
&&
(
myCoupons
=
myCoupons
.
concat
(
all
.
data
))
}
else
{
Toast
.
info
(
all
.
msg
)
...
...
src/components/detail/audition/index.js
View file @
2057bf98
...
...
@@ -3,10 +3,6 @@ import "./index.scss"
import
{
CallApp
}
from
"../../../common"
class
Audition
extends
Component
{
constructor
(
props
)
{
super
(
props
)
}
colse
=
()
=>
{
this
.
props
.
boxHide
(
false
)
}
...
...
src/components/detail/group/togroup.js
View file @
2057bf98
...
...
@@ -143,18 +143,13 @@ class ToGroup extends Component {
render
()
{
const
{
data
:
{
course_id
,
course_title
,
simpledescription
,
price0
,
price1
},
pdd_price
,
is_success
,
person_num
,
groupon_member
,
course_list
,
}
=
this
.
state
const
Info
=
(
<
div
className
=
"info"
>
<
p
className
=
"title"
onClick
=
{()
=>
this
.
toCourseDetail
(
course_id
)}
>
{
/* <Link to={`/detail?id=${course_id}`}> */
}
{
course_title
}
{
/* </Link> */
}
<
/p
>
<
p
className
=
"contact text-overflow-2"
>
{
simpledescription
}
<
/p
>
<
div
className
=
"des"
>
...
...
@@ -253,7 +248,7 @@ class ToGroup extends Component {
}
function
GorupContent
(
props
)
{
let
tip
,
btn
,
dec
,
groupTip
,
shareTip
,
groupSuccessMbc
let
tip
,
btn
,
dec
,
groupTip
const
{
pdd_price
,
data
,
...
...
src/components/detail/redPacket/index.js
View file @
2057bf98
...
...
@@ -3,7 +3,7 @@ import { CopyToClipboard } from "react-copy-to-clipboard"
import
classnames
from
"classnames"
import
{
isEmpty
}
from
"lodash"
import
{
browser
}
from
"src/utils"
import
{
http
,
getParam
,
validateTel
}
from
"src/utils"
import
{
http
,
getParam
}
from
"src/utils"
import
{
Formik
,
Form
,
Field
}
from
"formik"
import
{
Toast
}
from
"antd-mobile"
import
CaptchaAli
from
"src/common/Captcha-ali"
...
...
@@ -662,7 +662,7 @@ class RedPacket extends PureComponent {
{
type
!==
0
&&
(
<
div
className
=
{
cls
}
onClick
=
{
this
.
clickMask
}
>
{
/* wechat */
}
{
type
==
2
&&
(
{
type
==
=
2
&&
(
<
div
className
=
"pupup-wechat"
>
<
h4
className
=
"popup-wechat__title"
>
当前环境不支持领红包活动
...
...
src/components/detail/single/index.js
View file @
2057bf98
...
...
@@ -2,7 +2,7 @@ import React, { Component } from "react"
import
"./index.scss"
import
{
getParam
,
http
,
browser
}
from
"src/utils"
import
{
Toast
}
from
"antd-mobile"
import
{
Link
,
withRouter
}
from
"react-router-dom"
import
{
withRouter
}
from
"react-router-dom"
import
{
compose
}
from
"redux"
import
{
connect
}
from
"react-redux"
import
{
...
...
@@ -143,7 +143,7 @@ class Single extends Component {
paySign
:
data
.
paySign
,
//微信签名
},
function
(
res
)
{
if
(
res
.
err_msg
==
"get_brand_wcpay_request:ok"
)
{
if
(
res
.
err_msg
==
=
"get_brand_wcpay_request:ok"
)
{
Toast
.
info
(
"支付成功"
,
2
)
_this
.
intervalPayStatus
=
setInterval
(
function
()
{
http
...
...
@@ -354,7 +354,6 @@ class Single extends Component {
}
render
()
{
const
{
showSingleBox
}
=
this
.
state
if
(
this
.
state
.
endTime
)
{
let
date
=
this
.
state
.
endTime
*
1000
let
now
=
Date
.
now
()
...
...
src/components/detail/single/singleSuccess.js
View file @
2057bf98
...
...
@@ -2,7 +2,7 @@ import React, { Component } from "react"
import
"./index.scss"
import
{
getParam
,
http
,
browser
}
from
"src/utils"
import
{
Toast
}
from
"antd-mobile"
import
{
Link
,
withRouter
}
from
"react-router-dom"
import
{
withRouter
}
from
"react-router-dom"
import
{
compose
}
from
"redux"
import
{
connect
}
from
"react-redux"
import
{
...
...
@@ -193,7 +193,6 @@ class Single extends Component {
}
render
()
{
let
{
singleBox
}
=
this
.
state
if
(
this
.
state
.
endTime
)
{
let
date
=
this
.
state
.
endTime
*
1000
let
now
=
Date
.
now
()
...
...
src/components/ml/pythomDes/index.js
View file @
2057bf98
...
...
@@ -58,7 +58,7 @@ class PythonDes extends Component {
}
creatOid
=
(
type
)
=>
{
let
url
=
""
if
(
type
==
3
)
{
if
(
Number
(
type
)
=
==
3
)
{
url
=
`
${
API
[
"base-api"
]}
/sys/it_baoming/create`
}
else
{
url
=
`
${
API
[
"base-api"
]}
/sys/trial_create`
...
...
@@ -115,7 +115,7 @@ class PythonDes extends Component {
})
.
then
((
res
)
=>
{
const
{
code
,
msg
}
=
res
.
data
if
(
code
==
200
)
{
if
(
code
==
=
200
)
{
if
(
!
getParam
(
"version"
))
{
// H5
this
.
setState
({
...
...
@@ -230,7 +230,7 @@ class PythonDes extends Component {
)
.
then
((
res
)
=>
{
const
{
code
,
data
,
msg
}
=
res
.
data
if
(
code
==
200
)
{
if
(
code
==
=
200
)
{
this
.
setState
({
syllabus
:
data
.
syllabus
.
slice
(
0
,
2
),
allSyllabus
:
data
.
syllabus
,
...
...
@@ -319,7 +319,9 @@ class PythonDes extends Component {
<
/div
>
)}
{
this
.
state
.
isShowChannel
==
1
&&
<
CallApp
className
=
"toapp"
/>
}
{
Number
(
this
.
state
.
isShowChannel
)
===
1
&&
(
<
CallApp
className
=
"toapp"
/>
)}
{
/* 课程介绍 */
}
<
Description
/>
...
...
@@ -358,24 +360,4 @@ class PythonDes extends Component {
}
}
function
DefineItem
(
props
)
{
const
{
item
,
item
:
{
desInfo
},
}
=
props
return
(
<
div
className
=
{
"number_one"
}
>
<
img
className
=
{
"trophy"
}
src
=
{
item
.
titleUrl
}
><
/img
>
<
p
className
=
{
"item__title"
}
>
{
item
.
title
}
<
/p
>
<
p
className
=
{
"item__subtitle"
}
style
=
{{
width
:
item
.
subWidth
}}
>
{
item
.
subTitle
}
<
/p
>
<
img
style
=
{{
width
:
desInfo
.
width
,
height
:
desInfo
.
height
}}
src
=
{
item
.
bottomUrl
}
><
/img
>
<
/div
>
)
}
export
default
PythonDes
src/components/order/orderinfo.js
View file @
2057bf98
...
...
@@ -120,10 +120,6 @@ const MyForm = withFormik({
})(
InnerForm
)
class
Orderinfo
extends
Component
{
constructor
(
props
)
{
super
(
props
)
}
render
()
{
return
(
<
div
>
...
...
src/components/python/pythomDes/Study/index.js
View file @
2057bf98
...
...
@@ -10,7 +10,7 @@ export default class Study extends Component {
let
cs
=
Math
.
floor
(
Number
(
str
)
/
10
)
let
cv
=
""
if
(
str
.
length
>
1
)
{
if
(
cs
==
1
)
{
if
(
cs
==
=
1
)
{
cv
=
ci
>=
1
?
cn
[
9
]
+
cn
[
ci
-
1
]
:
cn
[
9
]
}
else
{
cv
=
ci
>
1
?
cn
[
cs
-
1
]
+
cn
[
9
]
+
cn
[
ci
-
1
]
:
cn
[
cs
-
1
]
+
cn
[
9
]
...
...
src/components/python/pythomDes/Test/index.js
View file @
2057bf98
...
...
@@ -10,7 +10,7 @@ export default class Test extends Component {
let
cs
=
Math
.
floor
(
Number
(
str
)
/
10
)
let
cv
=
""
if
(
str
.
length
>
1
)
{
if
(
cs
==
1
)
{
if
(
cs
==
=
1
)
{
cv
=
ci
>=
1
?
cn
[
9
]
+
cn
[
ci
-
1
]
:
cn
[
9
]
}
else
{
cv
=
ci
>
1
?
cn
[
cs
-
1
]
+
cn
[
9
]
+
cn
[
ci
-
1
]
:
cn
[
cs
-
1
]
+
cn
[
9
]
...
...
src/components/python/pythonStudy/index.js
View file @
2057bf98
/* eslint-disable eqeqeq */
import
React
,
{
Component
}
from
"react"
import
{
Accordion
,
Toast
}
from
"antd-mobile"
import
{
HeaderBar
,
CallApp
}
from
"src/common"
import
{
http
,
getParam
}
from
"src/utils"
import
"./index.scss"
import
{
Link
}
from
"react-router-dom"
import
{
connect
}
from
"react-redux"
import
Mask
from
"./../poup/index.js"
import
ShareRank
from
"src/components/detail/shareRank"
...
...
@@ -49,7 +49,7 @@ class PythonStudy extends Component {
let
cs
=
Math
.
floor
(
Number
(
str
)
/
10
)
let
cv
=
""
if
(
str
.
length
>
1
)
{
if
(
cs
==
1
)
{
if
(
cs
==
=
1
)
{
cv
=
ci
>=
1
?
cn
[
9
]
+
cn
[
ci
-
1
]
:
cn
[
9
]
}
else
{
cv
=
ci
>
1
?
cn
[
cs
-
1
]
+
cn
[
9
]
+
cn
[
ci
-
1
]
:
cn
[
cs
-
1
]
+
cn
[
9
]
...
...
src/components/share-page/aist-share/index.js
View file @
2057bf98
...
...
@@ -2,7 +2,6 @@ import React, { PureComponent } from "react"
import
"./aist-share.scss"
import
withFullSize
from
"src/HOCs/WithFullSize"
import
{
http
,
wxShare
}
from
"src/utils"
import
{
getWXObject
}
from
"src/utils/wechat/base"
import
{
Link
}
from
"react-router-dom"
class
AistShare
extends
PureComponent
{
...
...
@@ -34,7 +33,7 @@ class AistShare extends PureComponent {
)}
/
${
search
.
get
(
"vId"
)}
`
)
.
then
((
res
)
=>
{
if
(
res
.
data
.
errno
==
200
)
{
if
(
res
.
data
.
errno
==
=
200
)
{
const
data
=
res
.
data
.
data
this
.
setState
({
course
:
{
...
...
src/components/sharePoster/index.js
View file @
2057bf98
...
...
@@ -56,17 +56,9 @@ class SharePoster extends Component {
let
qrCodePositionX
=
imgList
[
index
].
qr_code_x
*
$width
// 二维码x轴位置
let
qrCodePositionY
=
imgList
[
index
].
qr_code_y
*
$height
+
7
// 二维码y轴位置
let
qrCodeWidth
=
imgList
[
index
].
qr_code_width
*
$width
// 二维码宽度
let
qrCodeHeight
=
imgList
[
index
].
qr_code_height
*
$height
-
avatarHeight
/
2
// 二维码高度
let
qrCodeLink
=
`https://m.julyedu.com/detail?id=
${
getParam
(
"courseId"
)}
&dist_code
${
getParam
(
"dist_code"
)}
`
var
canvas
=
document
.
getElementById
(
"canvas"
),
context
=
canvas
.
getContext
(
"2d"
)
// console.log(_this);
_this
.
getBase64
(
imgSrc1
)
// 背景图片合成
...
...
@@ -74,11 +66,6 @@ class SharePoster extends Component {
let
bgImage
=
new
Image
()
bgImage
.
src
=
img
let
qrCodeImg
=
document
.
getElementById
(
"qrcode"
)
let
ua
=
navigator
.
userAgent
.
toLowerCase
()
// Android终端
let
isAndroid
=
ua
.
indexOf
(
"Android"
)
>
-
1
||
ua
.
indexOf
(
"Adr"
)
>
-
1
// Ios终端
let
isiOS
=
!!
ua
.
match
(
/
\(
i
[^
;
]
+;
(
U;
)?
CPU.+Mac OS X/
)
if
(
/
(
iPhone|iPad|iPod|iOS
)
/i
.
test
(
navigator
.
userAgent
))
{
qrCodeImg
=
document
.
getElementById
(
"qrcode"
)
}
else
if
(
/
(
Android
)
/i
.
test
(
navigator
.
userAgent
))
{
...
...
@@ -167,7 +154,6 @@ class SharePoster extends Component {
// 合成图片位置
imgPosition
=
(
ctx
,
img
,
x
,
y
,
r
)
=>
{
ctx
.
save
()
var
d
=
2
*
r
var
cx
=
x
+
r
var
cy
=
y
+
r
ctx
.
beginPath
()
...
...
@@ -229,8 +215,7 @@ class SharePoster extends Component {
let
ctx
=
canvas
.
getContext
(
"2d"
)
ctx
.
drawImage
(
img
,
0
,
0
,
img
.
width
,
img
.
height
)
let
ext
=
img
.
src
.
substring
(
img
.
src
.
lastIndexOf
(
"."
)
+
1
).
toLowerCase
()
let
dataURL
=
canvas
.
toDataURL
(
"image/"
+
ext
)
return
dataURL
return
canvas
.
toDataURL
(
"image/"
+
ext
)
}
// canvas转换成img图片
...
...
src/components/study/myCourses/index.js
View file @
2057bf98
...
...
@@ -76,7 +76,7 @@ class MyCourses extends Component {
handleClick
=
(
id
,
item
)
=>
{
const
{
history
}
=
this
.
props
const
{
mode
,
course_id
}
=
item
if
(
mode
&&
mode
==
6
)
{
if
(
mode
&&
Number
(
mode
)
=
==
6
)
{
history
.
push
(
`/python?id=
${
course_id
}
`
)
return
}
...
...
@@ -131,13 +131,13 @@ class MyCourses extends Component {
)}
{
!
item
.
is_restricted
&&
!
item
.
is_aist
&&
item
.
contact_type
==
1
&&
Number
(
item
.
contact_type
)
=
==
1
&&
item
.
course_qq
&&
(
<
div
className
=
"contact"
>
QQ
群:
{
item
.
course_qq
}
<
/div
>
)}
{
!
item
.
is_restricted
&&
!
item
.
is_aist
&&
item
.
contact_type
==
2
&&
Number
(
item
.
contact_type
)
=
==
2
&&
item
.
course_qq
&&
(
<
div
className
=
"contact"
>
班主任微信:
{
item
.
course_qq
}
...
...
src/components/ts-test/index.tsx
View file @
2057bf98
...
...
@@ -2,9 +2,7 @@ import React, { useState } from "react"
import
{
withRouter
}
from
"react-router-dom"
const
TSTest
:
React
.
FC
=
()
=>
{
const
[
count
,
setCount
]
=
useState
(
0
)
const
[
count
,
setCount
]
=
useState
(
0
)
function
handleAlertClick
()
{
setTimeout
(()
=>
{
...
...
@@ -22,4 +20,8 @@ const TSTest: React.FC = () => {
)
}
function
C
(
a
=
2
,
b
=
3
,
c
=
4
,
d
=
5
,
e
=
6
)
{
return
d
}
export
default
withRouter
(
TSTest
)
src/components/video/video-catalog/index.js
View file @
2057bf98
/* eslint-disable jsx-a11y/anchor-is-valid, no-script-url */
import
React
,
{
Component
}
from
"react"
import
"./video-catalog.scss"
import
{
Link
}
from
"react-router-dom"
...
...
src/router/privateRoute.js
View file @
2057bf98
...
...
@@ -9,11 +9,11 @@ const PrivateRoute = ({ component: Component, path, user, ...rest }) => {
const
[
authenticated
,
setAuthorization
]
=
useState
(
false
)
useEffect
(()
=>
{
let
_auth
=
!
user
.
hasError
&&
user
.
code
!=
4040
let
_auth
=
!
user
.
hasError
&&
user
.
code
!=
=
4040
// eslint-disable-next-line no-unused-expressions
typeof
_auth
!==
"undefined"
&&
(
setAuthorization
(
_auth
),
setLoadingState
(
false
))
},
[
user
.
hasError
])
},
[
user
.
hasError
,
user
.
code
])
return
(
<
Route
...
...
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