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
434cb9ad
Commit
434cb9ad
authored
Aug 31, 2020
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eslint prettier
parent
34103119
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
88 changed files
with
133 additions
and
180 deletions
+133
-180
src/App.js
+2
-2
src/common/Course/index.js
+1
-3
src/common/OrderList/index.js
+0
-1
src/common/addressPopup/index.js
+1
-1
src/common/bindPhone/index.js
+1
-0
src/components/Index/expandActiveToast/index.js
+1
-1
src/components/Index/index.js
+1
-1
src/components/activity/1111/index.js
+2
-4
src/components/activity/1111/prize-winner-list/index.js
+1
-1
src/components/activity/2020-717/activity/index.js
+4
-3
src/components/activity/give-courses/assistance/index.js
+2
-1
src/components/activity/give-courses/index.js
+2
-2
src/components/activity/newyear-2019/common/prizes/index.js
+1
-0
src/components/activity/newyear-2019/landing/index.js
+2
-3
src/components/activity/newyear-2019/myTreasure/index.js
+0
-1
src/components/activity/newyear-2019/myTreasure/prize.js
+1
-0
src/components/activity/newyear-2019/myTreasure/team.js
+1
-1
src/components/activity/newyear-2019/preheat/LiveRoom/index.js
+5
-5
src/components/activity/newyear-2019/preheat/nav.js
+0
-5
src/components/activity/newyear-2019/year-wish/index.js
+1
-0
src/components/activity/treasure-box/common/prizes/index.js
+1
-0
src/components/activity/treasure-box/landing/index.js
+2
-3
src/components/activity/treasure-box/myTreasure/index.js
+0
-1
src/components/activity/treasure-box/myTreasure/prize.js
+1
-0
src/components/activity/treasure-box/myTreasure/team.js
+1
-1
src/components/activity/treasure-box/preheat/LiveRoom/index.js
+5
-5
src/components/activity/treasure-box/preheat/YearCourse/index.js
+3
-17
src/components/activity/treasure-box/preheat/index.js
+4
-6
src/components/ai-test/common/question/index.js
+0
-1
src/components/ai-test/report/index.js
+1
-0
src/components/ai-test/scores/index.js
+1
-8
src/components/ai-test/share/index.js
+2
-2
src/components/bargainMiddlePage/barcode/index.js
+1
-1
src/components/blessingPreheat/addressPopup/index.js
+1
-2
src/components/blessingPreheat/collectBlessing/index.js
+1
-2
src/components/blessingPreheat/courseItem/index.js
+1
-0
src/components/blessingPreheat/courseList/index.js
+1
-1
src/components/blessingPreheat/coursePopup/index.js
+1
-0
src/components/blessingPreheat/formal-draw/index.js
+2
-1
src/components/blessingPreheat/levelTest/index.js
+4
-3
src/components/blessingPreheat/live/index.js
+2
-2
src/components/blessingPreheat/recordPopup/index.js
+1
-1
src/components/blessingPreheat/sharePopup/index.js
+1
-0
src/components/blessingPreheat/toAppDemo.js
+2
-2
src/components/classify/courselist.js
+2
-3
src/components/classify/index.js
+2
-1
src/components/country/index.js
+1
-0
src/components/coupons/myCoupons/index.js
+1
-1
src/components/coupons/myPatch/index.js
+1
-2
src/components/detail/actions.js
+1
-1
src/components/detail/btnstatus/index.js
+2
-3
src/components/detail/followQRcode/index.js
+2
-2
src/components/detail/group/index.js
+3
-6
src/components/detail/group/togroup.js
+2
-2
src/components/detail/index.js
+3
-9
src/components/expand/callback.js
+2
-2
src/components/intelligent-recommend/index.js
+2
-0
src/components/limit-free/index.js
+2
-1
src/components/ml/pythomDes/Description/index.js
+1
-0
src/components/ml/pythomDes/Study/index.js
+1
-1
src/components/ml/pythomDes/index.js
+1
-0
src/components/ml/pythonStudy/index.js
+1
-0
src/components/my/index.js
+1
-0
src/components/myOrders/index.js
+1
-0
src/components/order/deposit/deposit-order/index.js
+2
-3
src/components/passport/bindingTel/index.js
+1
-1
src/components/passport/forgotPassword/index.js
+1
-1
src/components/passport/forgotPasswordEmail/index.js
+1
-1
src/components/passport/login/index.js
+1
-0
src/components/passport/setPassword/index.js
+2
-14
src/components/preferential/index.js
+3
-4
src/components/purchased/index.js
+2
-3
src/components/python/index.js
+2
-2
src/components/python/pythomDes/Description/index.js
+1
-0
src/components/python/pythomDes/index.js
+1
-0
src/components/scholarship/CategoryItem/CategoryItem.js
+1
-4
src/components/scholarship/SortItem/SortItem.js
+1
-3
src/components/shopCart/cartItem.js
+0
-1
src/components/study/myCourses/actions.js
+2
-2
src/components/ts-test/index.tsx
+1
-0
src/components/video/camp/campResolve.js
+2
-2
src/components/video/camp/campTest.js
+2
-2
src/components/video/camp/common/common.js
+1
-1
src/components/video/index.js
+0
-0
src/components/video/recommendation/index.js
+1
-4
src/components/vip/index.js
+3
-2
src/router/route-middle-page.js
+1
-1
src/utils/app.js
+1
-1
No files found.
src/App.js
View file @
434cb9ad
...
...
@@ -246,7 +246,7 @@ class App extends Component {
)
.
then
((
res
)
=>
{
let
data
=
res
.
data
if
(
data
.
errno
==
200
)
{
if
(
data
.
errno
==
=
200
)
{
if
(
data
.
data
.
is_check
)
{
this
.
props
.
updateCaptchaState
({
isNeedValidation
:
true
,
...
...
@@ -412,7 +412,7 @@ class App extends Component {
transformWxUser
=
(
res
)
=>
{
let
data
=
res
.
data
if
(
data
.
errno
==
200
)
{
if
(
data
.
errno
==
=
200
)
{
//移除红包统计cookie
this
.
removeShareCodeCookie
()
let
{
uid
,
token
,
avatar_file
:
avatar
,
uname
:
username
}
=
data
.
data
...
...
src/common/Course/index.js
View file @
434cb9ad
/* eslint-disable jsx-a11y/anchor-is-valid */
import
React
from
"react"
import
"./course.scss"
import
{
Link
}
from
"react-router-dom"
const
Course
=
(
props
)
=>
{
return
(
<
li
className
=
{
`course-item
${
props
.
className
}
`
}
>
{
props
.
top
}
<
a
onClick
=
{()
=>
props
.
toDetail
(
props
.
id
)}
>
{
/* <Link to={`/detail?id=${props.id}`}> */
}
<
img
src
=
{
props
.
img
}
alt
=
""
/>
{
props
.
status
}
<
p
className
=
{
`course-title
${
props
.
className
}
`
}
>
{
props
.
title
}
<
/p
>
{
/* </Link> */
}
<
/a
>
{
props
.
bottom
}
<
/li
>
...
...
src/common/OrderList/index.js
View file @
434cb9ad
import
React
from
"react"
import
"./orderlist.scss"
import
{
Link
}
from
"react-router-dom"
/**
* @OrderList 组件内容
...
...
src/common/addressPopup/index.js
View file @
434cb9ad
...
...
@@ -25,7 +25,7 @@ class AddressPopup extends Component {
fetchUserAddress
=
()
=>
{
const
{
addressInfo
}
=
this
.
state
http
.
get
(
`
${
API
.
home
}
/sys/user_address_info`
).
then
((
res
)
=>
{
const
{
code
,
data
,
msg
}
=
res
.
data
const
{
code
,
data
}
=
res
.
data
if
(
code
===
200
)
{
this
.
setState
({
addressInfo
:
Object
.
assign
({},
addressInfo
,
{
...
...
src/common/bindPhone/index.js
View file @
434cb9ad
/* eslint-disable jsx-a11y/anchor-is-valid */
import
React
,
{
Component
}
from
"react"
import
{
Formik
,
Form
,
Field
}
from
"formik"
import
{
Toast
}
from
"antd-mobile"
...
...
src/components/Index/expandActiveToast/index.js
View file @
434cb9ad
...
...
@@ -15,7 +15,7 @@ class ExpandActiveToast extends Component {
componentDidMount
()
{
http
.
get
(
`
${
API
[
"base-api"
]}
/sys/deposit/notice`
).
then
((
res
)
=>
{
if
(
res
.
data
.
errno
==
200
)
{
if
(
res
.
data
.
errno
==
=
200
)
{
const
{
data
}
=
res
.
data
this
.
setState
({
expandLength
:
data
.
num
,
...
...
src/components/Index/index.js
View file @
434cb9ad
/* eslint-disable eqeqeq */
import
React
,
{
Component
}
from
"react"
import
{
CallApp
}
from
"../../common"
import
"./index.scss"
import
{
WithTab
}
from
"src/HOCs"
// import Swiper from 'react-mobile-swiper'
...
...
src/components/activity/1111/index.js
View file @
434cb9ad
import
React
,
{
Component
}
from
"react"
import
{
connect
}
from
"react-redux"
import
{
http
,
getParam
}
from
"src/utils"
import
cookie
from
"js-cookie"
import
{
getParam
}
from
"src/utils"
import
"./index.scss"
import
{
Toast
}
from
"antd-mobile"
import
jsCookie
from
"js-cookie"
class
Activity
extends
Component
{
...
...
@@ -23,7 +21,7 @@ class Activity extends Component {
domain
:
".julyedu.com"
,
expires
:
30
,
})
if
(
c
ookie
.
get
(
"uid"
))
{
if
(
jsC
ookie
.
get
(
"uid"
))
{
this
.
setState
(()
=>
({
butText
:
"已领取,去使用"
,
}))
...
...
src/components/activity/1111/prize-winner-list/index.js
View file @
434cb9ad
...
...
@@ -14,7 +14,7 @@ class PrizeWinnerList extends Component {
.
get
(
`
${
API
.
home
}
/sys/activity/lottery_names/
${
getParam
(
"tid"
)}
`
)
.
then
((
res
)
=>
{
const
{
data
}
=
res
if
(
data
.
code
==
200
)
{
if
(
data
.
code
==
=
200
)
{
const
{
data
:
response
}
=
data
this
.
setState
({
title
:
response
.
title
,
...
...
src/components/activity/2020-717/activity/index.js
View file @
434cb9ad
/* eslint-disable jsx-a11y/anchor-is-valid, no-script-url, jsx-a11y/heading-has-content, eqeqeq, default-case */
import
React
,
{
Component
}
from
"react"
import
{
debounce
,
groupBy
,
isEmpty
}
from
"lodash"
import
{
http
}
from
"src/utils"
...
...
@@ -347,7 +348,7 @@ class Anniversary2020 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
,
...
...
@@ -401,8 +402,8 @@ class Anniversary2020 extends Component {
`
${
API
[
"base-api"
]}
/wx/user_temporary_qrcode/
${
this
.
props
.
user
.
data
.
uid
}
`
)
.
then
((
res
)
=>
{
const
{
errno
,
msg
,
data
}
=
res
.
data
if
(
errno
==
0
)
{
const
{
errno
,
data
}
=
res
.
data
if
(
errno
==
=
0
)
{
this
.
setState
({
qrcode
:
data
.
qr_image
,
})
...
...
src/components/activity/give-courses/assistance/index.js
View file @
434cb9ad
/* global _czc */
/* eslint-disable eqeqeq */
import
React
,
{
Component
}
from
"react"
import
{
browser
,
getParam
,
http
}
from
"src/utils"
import
{
Toast
}
from
"antd-mobile"
...
...
@@ -130,7 +131,7 @@ class GiveCourseAssistance extends Component {
code
:
this
.
state
.
code
,
})
.
then
((
res
)
=>
{
const
{
errno
,
msg
}
=
res
.
data
const
{
errno
}
=
res
.
data
let
success
=
errno
==
200
this
.
setState
({
successOneStatus
:
success
,
...
...
src/components/activity/give-courses/index.js
View file @
434cb9ad
/*
globals _czc
*/
/*
eslint-disable jsx-a11y/anchor-is-valid, no-script-url
*/
import
React
,
{
Component
}
from
"react"
import
"./give-courses.scss"
import
{
getParam
,
http
}
from
"src/utils"
...
...
@@ -116,7 +116,7 @@ class GiveCourses extends Component {
animate
,
marqueeList
,
}
=
this
.
state
var
_czc
=
_czc
||
[]
var
_czc
=
window
.
_czc
||
[]
return
(
<
div
id
=
{
"give-courses"
}
>
<
div
className
=
"banner"
>
...
...
src/components/activity/newyear-2019/common/prizes/index.js
View file @
434cb9ad
/* eslint-disable eqeqeq, jsx-a11y/anchor-is-valid, no-script-url */
import
React
,
{
Component
}
from
"react"
import
{
http
}
from
"src/utils"
import
"./prizes.scss"
...
...
src/components/activity/newyear-2019/landing/index.js
View file @
434cb9ad
/* eslint-disable eqeqeq, jsx-a11y/anchor-is-valid, no-script-url */
import
React
,
{
Component
}
from
"react"
import
BoxContainer
from
"../box-container/container"
import
{
Toast
,
WhiteSpace
}
from
"antd-mobile"
...
...
@@ -216,7 +217,6 @@ class Landing extends Component {
}
handleToMyTreasure
=
(
id
)
=>
{
const
{
history
}
=
this
.
props
this
.
joinSuccessPopup
&&
this
.
joinSuccessPopup
.
remove
()
if
(
getParam
(
"version"
))
{
window
.
location
.
assign
(
...
...
@@ -291,7 +291,7 @@ class Landing extends Component {
}
inviteMembers
=
(
treasure_code
)
=>
{
const
{
history
,
match
,
user
,
location
}
=
this
.
props
const
{
history
,
match
,
location
}
=
this
.
props
if
(
getParam
(
"version"
))
{
let
data
=
{
title
:
this
.
shareTitle
,
...
...
@@ -524,7 +524,6 @@ class Landing extends Component {
}
toSquare
=
()
=>
{
const
{
history
}
=
this
.
props
if
(
!
getParam
(
"version"
))
{
window
.
location
.
assign
(
"https://m.julyedu.com/year/yearindex"
)
}
else
{
...
...
src/components/activity/newyear-2019/myTreasure/index.js
View file @
434cb9ad
...
...
@@ -361,7 +361,6 @@ class MyTreasure extends Component {
// 邀请好友
handleToInvite
=
(
treasure_code
)
=>
{
const
{
history
}
=
this
.
props
if
(
getParam
(
"version"
))
{
window
.
location
.
assign
(
`https://h5.julyedu.com/activity/newyear-2019/landing?treasure_code=
${
treasure_code
}
&origin=1&version=
${
getParam
(
...
...
src/components/activity/newyear-2019/myTreasure/prize.js
View file @
434cb9ad
/* eslint-disable jsx-a11y/anchor-is-valid */
import
React
from
"react"
import
"./prize.scss"
...
...
src/components/activity/newyear-2019/myTreasure/team.js
View file @
434cb9ad
/* eslint-disable eqeqeq */
import
React
,
{
Component
}
from
"react"
import
classnames
from
"classnames"
import
{
Link
}
from
"react-router-dom"
import
"./team.scss"
import
{
getParam
}
from
"src/utils"
...
...
src/components/activity/newyear-2019/preheat/LiveRoom/index.js
View file @
434cb9ad
/* eslint-disable eqeqeq */
import
React
,
{
Component
}
from
"react"
import
"./index.scss"
import
{
Toast
}
from
"antd-mobile"
import
{
Link
,
withRouter
}
from
"react-router-dom"
import
{
withRouter
}
from
"react-router-dom"
import
{
getParam
,
http
,
SendMessageToApp
,
browser
}
from
"src/utils"
import
CommonContainer
from
"./../../common/commonContainer/index"
import
CommonPopup
from
"./../../common/commonPopup/index"
import
{
connect
}
from
"react-redux"
import
{
Popup
}
from
"src/common/index"
import
QRCode
from
"qrcode"
@
connect
((
state
)
=>
({
user
:
state
.
user
,
...
...
@@ -47,7 +47,7 @@ class LiveRoom extends Component {
// 预约直播
subscribe
=
(
id
)
=>
{
// 检查是否已登录
const
{
hasError
,
data
=
{}
}
=
this
.
props
.
user
const
{
hasError
}
=
this
.
props
.
user
if
(
hasError
)
{
this
.
toLogin
()
}
else
{
...
...
@@ -73,7 +73,7 @@ class LiveRoom extends Component {
}
// 去直播间
toLivingRoom
=
(
id
)
=>
{
const
{
hasError
,
data
=
{}
}
=
this
.
props
.
user
const
{
hasError
}
=
this
.
props
.
user
if
(
hasError
)
{
this
.
toLogin
()
}
else
{
...
...
@@ -82,7 +82,7 @@ class LiveRoom extends Component {
}
// 查看回放
checkVideo
=
(
url
)
=>
{
const
{
hasError
,
data
=
{}
}
=
this
.
props
.
user
const
{
hasError
}
=
this
.
props
.
user
if
(
hasError
)
{
this
.
toLogin
()
}
else
{
...
...
src/components/activity/newyear-2019/preheat/nav.js
View file @
434cb9ad
import
React
,
{
Component
}
from
"react"
import
classnames
from
"classnames"
import
{
http
}
from
"src/utils"
import
"./nav.scss"
class
TreasureNav
extends
Component
{
...
...
@@ -27,10 +26,6 @@ class TreasureNav extends Component {
id
:
"year-course"
,
name
:
"重磅好课"
,
},
// {
// id: 'year-free',
// name: '免费学'
// },
{
id
:
"year-group"
,
name
:
"1分拼团"
,
...
...
src/components/activity/newyear-2019/year-wish/index.js
View file @
434cb9ad
/* eslint-disable jsx-a11y/anchor-is-valid, eqeqeq */
import
React
,
{
Component
}
from
"react"
import
"./index.scss"
import
{
http
,
SendMessageToApp
,
getParam
}
from
"src/utils"
...
...
src/components/activity/treasure-box/common/prizes/index.js
View file @
434cb9ad
/* eslint-disable eqeqeq, jsx-a11y/anchor-is-valid, no-script-url */
import
React
,
{
Component
}
from
"react"
import
{
http
}
from
"src/utils"
import
"./prizes.scss"
...
...
src/components/activity/treasure-box/landing/index.js
View file @
434cb9ad
/* eslint-disable eqeqeq, jsx-a11y/anchor-is-valid, no-script-url */
import
React
,
{
Component
}
from
"react"
import
BoxContainer
from
"../box-container/container"
import
{
Toast
,
WhiteSpace
}
from
"antd-mobile"
...
...
@@ -236,7 +237,6 @@ class Landing extends Component {
}
handleToMyTreasure
=
(
id
)
=>
{
const
{
history
}
=
this
.
props
this
.
joinSuccessPopup
&&
this
.
joinSuccessPopup
.
remove
()
if
(
getParam
(
"version"
))
{
window
.
location
.
assign
(
...
...
@@ -311,7 +311,7 @@ class Landing extends Component {
}
inviteMembers
=
(
treasure_code
)
=>
{
const
{
history
,
match
,
user
,
location
}
=
this
.
props
const
{
history
,
match
,
location
}
=
this
.
props
if
(
getParam
(
"version"
))
{
let
data
=
{
title
:
this
.
shareTitle
,
...
...
@@ -546,7 +546,6 @@ class Landing extends Component {
}
toSquare
=
()
=>
{
const
{
history
}
=
this
.
props
if
(
!
getParam
(
"version"
))
{
window
.
location
.
assign
(
"https://m.julyedu.com/"
)
}
else
{
...
...
src/components/activity/treasure-box/myTreasure/index.js
View file @
434cb9ad
...
...
@@ -361,7 +361,6 @@ class MyTreasure extends Component {
// 邀请好友
handleToInvite
=
(
treasure_code
)
=>
{
const
{
history
}
=
this
.
props
if
(
getParam
(
"version"
))
{
window
.
location
.
assign
(
`https://h5.julyedu.com/box/landing?treasure_code=
${
treasure_code
}
&origin=1&version=
${
getParam
(
...
...
src/components/activity/treasure-box/myTreasure/prize.js
View file @
434cb9ad
/* eslint-disable jsx-a11y/anchor-is-valid */
import
React
from
"react"
import
"./prize.scss"
...
...
src/components/activity/treasure-box/myTreasure/team.js
View file @
434cb9ad
/* eslint-disable eqeqeq */
import
React
,
{
Component
}
from
"react"
import
classnames
from
"classnames"
import
{
Link
}
from
"react-router-dom"
import
"./team.scss"
import
{
getParam
}
from
"src/utils"
...
...
src/components/activity/treasure-box/preheat/LiveRoom/index.js
View file @
434cb9ad
/* eslint-disable eqeqeq */
import
React
,
{
Component
}
from
"react"
import
"./index.scss"
import
{
Toast
}
from
"antd-mobile"
import
{
Link
,
withRouter
}
from
"react-router-dom"
import
{
withRouter
}
from
"react-router-dom"
import
{
getParam
,
http
,
SendMessageToApp
,
browser
}
from
"src/utils"
import
CommonContainer
from
"./../../common/commonContainer/index"
import
CommonPopup
from
"./../../common/commonPopup/index"
import
{
connect
}
from
"react-redux"
import
{
Popup
}
from
"src/common/index"
import
QRCode
from
"qrcode"
@
connect
((
state
)
=>
({
user
:
state
.
user
,
...
...
@@ -47,7 +47,7 @@ class LiveRoom extends Component {
// 预约直播
subscribe
=
(
id
)
=>
{
// 检查是否已登录
const
{
hasError
,
data
=
{}
}
=
this
.
props
.
user
const
{
hasError
}
=
this
.
props
.
user
if
(
hasError
)
{
this
.
toLogin
()
}
else
{
...
...
@@ -73,7 +73,7 @@ class LiveRoom extends Component {
}
// 去直播间
toLivingRoom
=
(
id
)
=>
{
const
{
hasError
,
data
=
{}
}
=
this
.
props
.
user
const
{
hasError
}
=
this
.
props
.
user
if
(
hasError
)
{
this
.
toLogin
()
}
else
{
...
...
@@ -82,7 +82,7 @@ class LiveRoom extends Component {
}
// 查看回放
checkVideo
=
(
url
)
=>
{
const
{
hasError
,
data
=
{}
}
=
this
.
props
.
user
const
{
hasError
}
=
this
.
props
.
user
if
(
hasError
)
{
this
.
toLogin
()
}
else
{
...
...
src/components/activity/treasure-box/preheat/YearCourse/index.js
View file @
434cb9ad
/* eslint-disable eqeqeq */
import
React
,
{
Component
}
from
"react"
import
"./index.scss"
import
{
http
,
SendMessageToApp
,
getParam
,
browser
}
from
"src/utils"
import
CommonContainer
from
"./../../common/commonContainer/index"
import
CourseItem
from
"../../../../blessingPreheat/courseItem/index"
import
{
http
,
SendMessageToApp
,
getParam
}
from
"src/utils"
import
{
withRouter
}
from
"react-router-dom"
import
CommonPopup
from
"./../../common/commonPopup/index"
import
{
Toast
}
from
"antd-mobile"
import
QRCode
from
"qrcode"
import
{
connect
}
from
"react-redux"
import
dateFns
from
"date-fns"
@
connect
((
state
)
=>
({
user
:
state
.
user
,
...
...
@@ -638,18 +635,7 @@ class YearCourse extends Component {
}
render
()
{
const
{
bigcourse
,
freecourse
,
groupcourse
,
basic
,
advanced
,
higher
,
expand
,
removable
,
sum
,
}
=
this
.
state
const
{
stage
,
treasureStage
}
=
this
.
props
const
{
removable
}
=
this
.
state
return
(
<
div
className
=
{
"year-index-course"
}
>
{
removable
>
0
&&
(
...
...
src/components/activity/treasure-box/preheat/index.js
View file @
434cb9ad
/* eslint-disable eqeqeq */
import
React
,
{
Component
}
from
"react"
import
"./index.scss"
import
LiveRoom
from
"./LiveRoom/index"
import
YearCourse
from
"./YearCourse/index"
import
TreasureBox
from
"./../treasure-box/index"
import
TreasureNav
from
"./nav"
import
CommonPopup
from
"./../common/commonPopup/index"
import
cookie
from
"js-cookie"
import
{
setCurrentUser
,
startFetchUser
}
from
"src/store/userAction"
import
{
SendMessageToApp
,
getParam
,
http
}
from
"src/utils"
import
{
http
}
from
"src/utils"
import
{
addDays
}
from
"date-fns"
import
{
connect
}
from
"react-redux"
import
{
Toast
}
from
"antd-mobile"
import
{
compose
}
from
"redux"
@
connect
(
(
state
)
=>
({
...
...
@@ -61,7 +59,7 @@ class index extends Component {
// 保存cookie
appLogin
=
()
=>
{
let
expires
=
addDays
(
new
Date
(),
90
)
this
.
state
.
userInfoList
.
map
((
item
,
index
)
=>
{
this
.
state
.
userInfoList
.
forEach
((
item
,
index
)
=>
{
cookie
.
set
(
"token"
,
item
.
token
,
{
expires
,
path
:
"/"
,
...
...
@@ -100,7 +98,7 @@ class index extends Component {
transformUser
=
(
res
)
=>
{
let
payload
res
.
map
((
item
,
index
)
=>
{
res
.
forEach
((
item
,
index
)
=>
{
payload
=
{
hasError
:
false
,
data
:
{
...
...
src/components/ai-test/common/question/index.js
View file @
434cb9ad
import
React
,
{
Component
}
from
"react"
import
"./index.scss"
import
{
html
}
from
"src/utils"
import
classnames
from
"classnames"
class
Question
extends
Component
{
...
...
src/components/ai-test/report/index.js
View file @
434cb9ad
/* eslint-disable eqeqeq */
import
React
,
{
Component
}
from
"react"
import
{
HeaderBar
}
from
"src/common"
import
{
getParam
,
http
}
from
"src/utils"
...
...
src/components/ai-test/scores/index.js
View file @
434cb9ad
/* eslint-disable jsx-a11y/anchor-is-valid */
/* eslint-disable jsx-a11y/anchor-is-valid
, no-script-url
*/
import
React
,
{
Component
}
from
"react"
import
"./index.scss"
import
{
Tabs
,
Toast
}
from
"antd-mobile"
...
...
@@ -20,13 +20,6 @@ class Scores extends Component {
],
rankList
:
[],
rankListTabs
:
[{
title
:
"日榜"
},
{
title
:
"总榜"
}],
/*
rankListTabs: [
{title: '日榜'},
{title: '周榜'},
{title: '总榜'},
],
*/
isExpandRankList
:
false
,
icons
:
[
require
(
"./rank-1.png"
),
...
...
src/components/ai-test/share/index.js
View file @
434cb9ad
...
...
@@ -38,7 +38,7 @@ class aiTestHelp extends Component {
handleFetchInfo
=
()
=>
{
http
.
get
(
`
${
API
.
home
}
/sys/aitest/invitation`
).
then
((
res
)
=>
{
const
{
code
,
data
,
msg
}
=
res
.
data
const
{
code
,
data
}
=
res
.
data
if
(
code
===
200
)
{
this
.
setState
({
total_num
:
data
.
total_num
,
...
...
@@ -49,7 +49,7 @@ class aiTestHelp extends Component {
getAssist
=
()
=>
{
http
.
get
(
`
${
API
.
home
}
/sys/aitest/assist`
).
then
((
res
)
=>
{
const
{
code
,
data
,
msg
}
=
res
.
data
const
{
code
,
data
}
=
res
.
data
if
(
code
===
200
)
{
this
.
setState
({
dec
:
data
.
ques
,
...
...
src/components/bargainMiddlePage/barcode/index.js
View file @
434cb9ad
...
...
@@ -23,7 +23,7 @@ class FollowBarcode extends Component {
.
then
((
res
)
=>
{
const
{
errno
,
data
}
=
res
.
data
console
.
log
(
res
)
if
(
errno
==
0
)
{
if
(
errno
==
=
0
)
{
this
.
setState
({
url
:
data
.
url
,
})
...
...
src/components/blessingPreheat/addressPopup/index.js
View file @
434cb9ad
import
React
,
{
Component
}
from
"react"
import
{
isEmpty
}
from
"lodash"
import
{
http
}
from
"src/utils"
import
{
Formik
,
Form
,
Field
}
from
"formik"
import
{
Toast
}
from
"antd-mobile"
...
...
@@ -26,7 +25,7 @@ class AddressPopup extends Component {
fetchUserAddress
=
()
=>
{
const
{
addressInfo
}
=
this
.
state
http
.
get
(
`
${
API
.
home
}
/sys/user_address_info`
).
then
((
res
)
=>
{
const
{
code
,
data
,
msg
}
=
res
.
data
const
{
code
,
data
}
=
res
.
data
if
(
code
===
200
)
{
this
.
setState
({
addressInfo
:
Object
.
assign
({},
addressInfo
,
{
...
...
src/components/blessingPreheat/collectBlessing/index.js
View file @
434cb9ad
import
React
,
{
Component
}
from
"react"
import
{
connect
}
from
"react-redux"
import
{
Link
}
from
"react-router-dom"
import
{
http
,
getParam
,
SendMessageToApp
}
from
"src/utils"
import
{
Toast
}
from
"antd-mobile"
import
ListFrame
from
"./../listFrame/index"
...
...
@@ -237,7 +236,7 @@ class CollectBlessing extends Component {
toLogin
,
toSection
,
}
=
this
.
props
const
{
rules
,
welfareRuleList
,
seconds
}
=
this
.
state
const
{
rules
,
welfareRuleList
}
=
this
.
state
return
(
<
div
className
=
"collect-blessing"
>
{
isLogin
?
(
...
...
src/components/blessingPreheat/courseItem/index.js
View file @
434cb9ad
/* eslint-disable eqeqeq */
import
React
,
{
Component
}
from
"react"
import
"./index.scss"
...
...
src/components/blessingPreheat/courseList/index.js
View file @
434cb9ad
...
...
@@ -314,7 +314,7 @@ class CourseList extends Component {
// 开始使用
toCourse2
=
(
courseId
)
=>
{
const
{
history
}
=
this
.
props
var
_czc
=
_czc
||
[]
var
_czc
=
window
.
_czc
||
[]
var
name
=
"课程id="
+
courseId
_czc
.
push
([
"_trackEvent"
,
name
,
"m端双十一开始使用优惠券"
])
...
...
src/components/blessingPreheat/coursePopup/index.js
View file @
434cb9ad
/* eslint-disable eqeqeq */
import
React
,
{
Component
}
from
"react"
import
classnames
from
"classnames"
import
{
http
,
SendMessageToApp
}
from
"src/utils"
...
...
src/components/blessingPreheat/formal-draw/index.js
View file @
434cb9ad
/* eslint-disable eqeqeq */
import
React
,
{
Component
}
from
"react"
import
{
http
}
from
"src/utils"
import
{
Toast
,
Tabs
}
from
"antd-mobile"
...
...
@@ -190,7 +191,7 @@ class FormalDraw extends Component {
}
subscribe
=
(
id
)
=>
{
var
_czc
=
_czc
||
[]
var
_czc
=
window
.
_czc
||
[]
_czc
.
push
([
"_trackEvent"
,
"预约抽奖"
,
"m端双十一正式页-立即预约"
])
if
(
this
.
subscribePopupInstance
)
{
return
...
...
src/components/blessingPreheat/levelTest/index.js
View file @
434cb9ad
/* eslint-disable jsx-a11y/alt-text */
import
React
,
{
Component
}
from
"react"
import
"./index.scss"
import
listFrame
from
"./../listFrame/index"
import
{
http
,
SendMessageToApp
,
getParam
}
from
"src/utils"
import
{
http
,
getParam
}
from
"src/utils"
class
LevelTest
extends
Component
{
constructor
(
props
)
{
...
...
@@ -75,8 +76,8 @@ class LevelTest extends Component {
}
render
()
{
let
{
testNumber
,
number
,
prizeListUrl
}
=
this
.
state
const
{
isLogin
,
testSum
}
=
this
.
props
let
{
testNumber
,
prizeListUrl
}
=
this
.
state
const
{
testSum
}
=
this
.
props
return
(
<>
<
div
className
=
"level__test_module"
>
...
...
src/components/blessingPreheat/live/index.js
View file @
434cb9ad
/*
global _czc
*/
/*
eslint-disable eqeqeq
*/
import
React
,
{
Component
}
from
"react"
import
"./index.scss"
import
{
Tabs
,
Toast
}
from
"antd-mobile"
...
...
@@ -52,7 +52,7 @@ class Live extends Component {
toLiveRoom
=
(
id
)
=>
{
const
{
history
,
isLogin
}
=
this
.
props
var
_czc
=
_czc
||
[]
var
_czc
=
window
.
_czc
||
[]
var
name
=
"直播间id="
+
id
_czc
.
push
([
"_trackEvent"
,
name
,
"m端双十一大咖直播-正在直播"
])
if
(
this
.
state
.
isApp
)
{
...
...
src/components/blessingPreheat/recordPopup/index.js
View file @
434cb9ad
/* eslint-disable jsx-a11y/anchor-is-valid */
import
React
,
{
Component
}
from
"react"
import
"./index.scss"
import
{
http
,
getParam
}
from
"src/utils"
...
...
@@ -26,7 +27,6 @@ export default class RecordPopup extends Component {
handleToTestRecord
=
(
e
,
id
)
=>
{
e
.
preventDefault
()
const
{
history
}
=
this
.
props
if
(
!
getParam
(
"version"
))
{
window
.
location
.
href
=
`
${
API
.
m
}
/levelTest/report?id=
${
id
}
`
}
else
{
...
...
src/components/blessingPreheat/sharePopup/index.js
View file @
434cb9ad
/* eslint-disable jsx-a11y/alt-text */
import
React
,
{
Component
}
from
"react"
import
{
browser
}
from
"src/utils"
import
"./index.scss"
...
...
src/components/blessingPreheat/toAppDemo.js
View file @
434cb9ad
...
...
@@ -37,7 +37,7 @@ class ToAppDemo extends Component {
// 保存cookie
appLogin
=
()
=>
{
let
expires
=
addDays
(
new
Date
(),
90
)
this
.
state
.
userInfoList
.
map
((
item
,
index
)
=>
{
this
.
state
.
userInfoList
.
forEach
((
item
,
index
)
=>
{
Toast
.
info
(
item
.
version
,
3
)
cookie
.
set
(
"token"
,
item
.
token
,
{
expires
,
...
...
@@ -71,7 +71,7 @@ class ToAppDemo extends Component {
transformUser
=
(
res
)
=>
{
let
payload
res
.
map
((
item
,
index
)
=>
{
res
.
forEach
((
item
,
index
)
=>
{
payload
=
{
hasError
:
false
,
data
:
{
...
...
src/components/classify/courselist.js
View file @
434cb9ad
/* eslint-disable default-case */
import
React
,
{
Component
}
from
"react"
import
{
VList
}
from
"../../common"
import
{
Tabs
,
WhiteSpace
,
Toast
}
from
"antd-mobile"
...
...
@@ -130,10 +131,8 @@ class Classify extends Component {
}
toCourseDetail
=
(
id
)
=>
{
const
{
dispatch
,
history
}
=
this
.
props
// dispatch(getCourses(id, () => {
const
{
history
}
=
this
.
props
history
.
push
(
`/detail?id=
${
id
}
`
)
// }));
}
toClassify
=
()
=>
{
...
...
src/components/classify/index.js
View file @
434cb9ad
/* eslint-disable jsx-a11y/anchor-is-valid */
import
React
,
{
Component
}
from
"react"
import
{
WithTab
}
from
"src/HOCs"
import
"./index.scss"
...
...
@@ -50,7 +51,7 @@ class Classify extends Component {
}
toCourseDetail
=
(
id
)
=>
{
const
{
dispatch
,
history
}
=
this
.
props
const
{
history
}
=
this
.
props
history
.
push
(
`/detail?id=
${
id
}
`
)
return
false
}
...
...
src/components/country/index.js
View file @
434cb9ad
/* eslint-disable jsx-a11y/anchor-is-valid */
import
React
,
{
Component
}
from
"react"
import
{
connect
}
from
"react-redux"
import
{
bindActionCreators
}
from
"redux"
...
...
src/components/coupons/myCoupons/index.js
View file @
434cb9ad
/* eslint-disable no-sequences, eqeqeq, jsx-a11y/anchor-is-valid */
import
React
,
{
PureComponent
}
from
"react"
import
"./index.scss"
import
RedeemBar
from
"../RedeemBar"
import
Coupon
from
"../Coupon"
import
{
http
,
getParam
}
from
"src/utils"
...
...
src/components/coupons/myPatch/index.js
View file @
434cb9ad
import
React
,
{
PureComponent
}
from
"react"
import
"./index.scss"
import
{
http
,
getParam
}
from
"src/utils"
import
{
http
}
from
"src/utils"
import
{
WithFullSize
}
from
"src/HOCs"
import
{
Toast
}
from
"antd-mobile"
import
{
HeaderBar
}
from
"src/common"
class
UsePatch
extends
PureComponent
{
constructor
(
props
)
{
...
...
src/components/detail/actions.js
View file @
434cb9ad
import
{
api
,
getParam
,
http
}
from
"src/utils"
import
{
getParam
,
http
}
from
"src/utils"
export
const
RECEIVE_COURSES_DETAIL
=
"RECEIVE_COURSES_DETAIL"
export
const
ADD_COURSES_TO_CART
=
"ADD_COURSES_TO_CART"
...
...
src/components/detail/btnstatus/index.js
View file @
434cb9ad
/* eslint-disable */
import
React
,
{
Component
}
from
"react"
import
{
getParam
,
http
}
from
"src/utils"
import
{
Toast
}
from
"antd-mobile"
...
...
@@ -262,8 +263,6 @@ class BtnStatus extends Component {
//获取砍价信息
getBargainInfo
=
()
=>
{
const
{
user
}
=
this
.
props
const
uid
=
user
&&
user
.
data
&&
user
.
data
.
uid
let
data
=
{
courseId
:
getParam
(
"id"
),
}
...
...
@@ -281,7 +280,7 @@ class BtnStatus extends Component {
// 付定金 付尾款
expandPay
=
(
info
,
type
)
=>
{
// type 等于1是定金 等于2是尾款
const
{
user
,
history
}
=
this
.
props
const
{
user
}
=
this
.
props
const
uid
=
user
&&
user
.
data
&&
user
.
data
.
uid
if
(
!
uid
)
{
this
.
props
.
history
.
push
(
"/passport/login"
)
...
...
src/components/detail/followQRcode/index.js
View file @
434cb9ad
import
React
,
{
Component
}
from
"react"
import
"./index.scss"
import
{
http
,
getParam
}
from
"src/utils"
import
{
http
}
from
"src/utils"
import
QRCode
from
"qrcode"
import
{
connect
}
from
"react-redux"
import
{
Toast
}
from
"antd-mobile"
...
...
@@ -20,7 +20,7 @@ class FollowQRcode extends Component {
http
.
get
(
`
${
API
[
"base-api"
]}
/wx/user_temporary_qrcode/
${
uid
}
`
)
.
then
((
res
)
=>
{
if
(
res
.
data
.
errno
==
0
)
{
if
(
res
.
data
.
errno
==
=
0
)
{
_this
.
setState
({
src
:
res
.
data
.
data
.
url
,
})
...
...
src/components/detail/group/index.js
View file @
434cb9ad
/* eslint-disable eqeqeq */
import
React
,
{
Component
}
from
"react"
import
"./index.scss"
import
{
getParam
,
http
}
from
"src/utils"
import
{
connect
}
from
"react-redux"
import
{
getParam
}
from
"src/utils"
import
{
Flex
}
from
"antd-mobile"
import
{
browser
}
from
"src/utils"
import
{
Toast
}
from
"antd-mobile"
class
Group
extends
Component
{
constructor
(
props
)
{
...
...
@@ -18,7 +16,6 @@ class Group extends Component {
countdown
:
props
.
countdown
,
now_groupon_list
:
[],
}
// console.log(props);
}
// 查看更多
...
...
@@ -137,7 +134,7 @@ class Group extends Component {
render
()
{
const
{
courseInfo
}
=
this
.
props
const
{
alreadyIn
,
countdown
,
now_groupon_list
}
=
this
.
state
const
{
alreadyIn
,
countdown
}
=
this
.
state
let
groupInfo
=
""
,
groupon_member
=
""
,
group_status
=
-
1
,
...
...
src/components/detail/group/togroup.js
View file @
434cb9ad
/* eslint-disable eqeqeq, jsx-a11y/anchor-is-valid, no-script-url */
import
React
,
{
Component
}
from
"react"
import
"./togroup.scss"
import
{
HeaderBar
,
VList
}
from
"../../../common"
...
...
@@ -298,10 +299,9 @@ function GorupContent(props) {
if
(
groupon_member
&&
groupon_member
.
length
>
0
)
{
let
flag
=
false
!
userInfo
.
hasError
&&
groupon_member
.
map
((
item
)
=>
{
groupon_member
.
forEach
((
item
)
=>
{
if
(
item
.
uid
==
userInfo
.
data
.
uid
)
{
flag
=
true
return
}
})
if
(
flag
)
{
...
...
src/components/detail/index.js
View file @
434cb9ad
/* eslint-disable eqeqeq, jsx-a11y/alt-text */
import
React
,
{
Component
}
from
"react"
import
"./index.scss"
import
Bargain
from
"./bargain"
...
...
@@ -676,7 +677,6 @@ class Detail extends Component {
render
()
{
const
{
course
:
{
course_info
=
{}
},
barInfo
,
singleBox
,
singleType
,
isRedPacket
,
...
...
@@ -685,18 +685,12 @@ class Detail extends Component {
const
{
d
,
h
,
m
}
=
this
.
formatTime
(
course_info
.
limit_free_time
)
let
courseInfo
=
""
,
service
=
""
,
number
=
0
,
endTime
=
0
// if (this.props.courseInfo.course_info) {
// courseInfo = this.props.courseInfo.course_info;
// service = courseInfo.service;
let
number
=
0
if
(
course_info
.
group_status
===
3
||
course_info
.
group_status
===
4
)
{
number
=
course_info
.
pdd_group_info
.
groupon_member
.
number
}
// }
const
{
share
,
countdown
,
list
,
outList
}
=
this
.
state
const
{
share
,
countdown
}
=
this
.
state
let
href
=
""
const
{
location
:
{
state
=
{}
},
...
...
src/components/expand/callback.js
View file @
434cb9ad
...
...
@@ -20,7 +20,7 @@ class ExpandCallback extends Component {
order_id
:
getParam
(
"order_id"
),
})
.
then
((
res
)
=>
{
if
(
res
.
data
.
errno
==
200
)
{
if
(
res
.
data
.
errno
==
=
200
)
{
const
{
data
}
=
res
.
data
this
.
setState
({
data
:
data
,
...
...
@@ -33,7 +33,7 @@ class ExpandCallback extends Component {
// 邀请好友助力
invitation
=
(
url
)
=>
{
const
{
user
,
history
}
=
this
.
props
const
{
user
}
=
this
.
props
const
uid
=
user
&&
user
.
data
&&
user
.
data
.
uid
if
(
!
uid
)
{
this
.
props
.
history
.
push
(
"/passport/login"
)
...
...
src/components/intelligent-recommend/index.js
View file @
434cb9ad
/* eslint-disable default-case */
import
React
,
{
Component
}
from
"react"
import
"./index.scss"
import
{
Link
}
from
"react-router-dom"
...
...
@@ -166,6 +167,7 @@ class IntelligentRecommend extends Component {
<
/div
>
<
div
className
=
"dialog-box"
>
{
!!
processing
.
length
&&
// eslint-disable-next-line array-callback-return
processing
.
map
((
item
,
index
)
=>
{
switch
(
item
.
type
)
{
case
messageType
.
SYSTEM_MESSAGE
:
...
...
src/components/limit-free/index.js
View file @
434cb9ad
/* eslint-disable eqeqeq, default-case */
import
React
,
{
Component
}
from
"react"
import
{
http
}
from
"src/utils"
import
"./index.scss"
...
...
@@ -39,7 +40,7 @@ class LimitFree extends Component {
code
:
coursesCode
,
msg
:
coursesMsg
,
}
=
courses
.
data
if
(
tabCode
==
200
)
{
if
(
tabCode
==
=
200
)
{
this
.
setState
({
tab
:
tabData
,
})
...
...
src/components/ml/pythomDes/Description/index.js
View file @
434cb9ad
/* eslint-disable jsx-a11y/alt-text */
import
React
,
{
Component
}
from
"react"
import
"./index.scss"
...
...
src/components/ml/pythomDes/Study/index.js
View file @
434cb9ad
...
...
@@ -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/ml/pythomDes/index.js
View file @
434cb9ad
/* eslint-disable jsx-a11y/alt-text */
import
React
,
{
Component
}
from
"react"
import
"./index.scss"
import
Description
from
"./Description/index.js"
...
...
src/components/ml/pythonStudy/index.js
View file @
434cb9ad
/* eslint-disable */
import
React
,
{
Component
}
from
"react"
import
{
Accordion
,
Toast
}
from
"antd-mobile"
import
{
HeaderBar
,
CallApp
}
from
"src/common"
...
...
src/components/my/index.js
View file @
434cb9ad
/* eslint-disable jsx-a11y/anchor-is-valid, jsx-a11y/anchor-has-content, no-script-url */
import
React
,
{
PureComponent
}
from
"react"
import
{
Flex
,
WhiteSpace
,
List
}
from
"antd-mobile"
import
"./index.scss"
...
...
src/components/myOrders/index.js
View file @
434cb9ad
/* eslint-disable eqeqeq */
import
React
,
{
Component
}
from
"react"
import
"./index.scss"
import
{
HeaderBar
}
from
"../../common"
...
...
src/components/order/deposit/deposit-order/index.js
View file @
434cb9ad
...
...
@@ -15,7 +15,6 @@ function OrderList(props) {
<
div
>
{
listData
.
map
((
item
,
index
)
=>
{
const
{
is_coupon
,
course_id
,
image_name
,
sale_price
,
...
...
@@ -148,7 +147,7 @@ class Order extends Component {
})
.
then
((
res
)
=>
{
const
{
data
}
=
res
if
(
data
.
errno
==
200
)
{
if
(
data
.
errno
==
=
200
)
{
if
(
data
.
data
[
"pay_jump"
])
{
this
.
props
.
history
.
replace
(
`/expand/callback?order_id=
${
data
.
data
[
"order_id"
]}
`
...
...
@@ -178,7 +177,7 @@ class Order extends Component {
})
.
then
((
res
)
=>
{
const
{
data
}
=
res
if
(
data
.
errno
==
200
)
{
if
(
data
.
errno
==
=
200
)
{
this
.
setState
({
orderList
:
[
data
.
data
.
course
],
depositPrice
:
data
.
data
.
course
[
"sale_price"
],
...
...
src/components/passport/bindingTel/index.js
View file @
434cb9ad
...
...
@@ -159,7 +159,7 @@ const formikConfig = {
}
http
.
post
(
`
${
API
[
"passport-api"
]}
/bind_mobile`
,
params
).
then
((
res
)
=>
{
const
data
=
res
.
data
if
(
data
.
errno
==
200
)
{
if
(
data
.
errno
==
=
200
)
{
const
{
history
}
=
props
if
(
data
.
data
[
"is_set_pwd"
])
{
history
.
replace
(
`/passport/set-password`
,
{
...
...
src/components/passport/forgotPassword/index.js
View file @
434cb9ad
...
...
@@ -130,7 +130,7 @@ const formikConfig = {
area_code
:
"00"
+
props
.
country
.
num
,
})
.
then
((
res
)
=>
{
if
(
res
.
data
.
errno
==
0
)
{
if
(
res
.
data
.
errno
==
=
0
)
{
props
.
history
.
push
(
"/passport/set-password"
,
{
from
:
props
.
location
,
})
...
...
src/components/passport/forgotPasswordEmail/index.js
View file @
434cb9ad
...
...
@@ -129,7 +129,7 @@ const formikConfig = {
code
:
values
.
veriCode
,
})
.
then
((
res
)
=>
{
if
(
res
.
data
.
errno
==
0
)
{
if
(
res
.
data
.
errno
==
=
0
)
{
props
.
history
.
push
(
"/passport/set-password"
,
{
from
:
props
.
location
,
})
...
...
src/components/passport/login/index.js
View file @
434cb9ad
/* eslint-disable jsx-a11y/anchor-is-valid */
import
React
,
{
Component
}
from
"react"
import
"./wechatLogin.scss"
import
Input
from
"../common/inputWithCountryCodes"
...
...
src/components/passport/setPassword/index.js
View file @
434cb9ad
...
...
@@ -127,7 +127,7 @@ function forgotPasswordReset(values, props) {
password
:
encrypt
(
values
.
password
),
})
.
then
((
res
)
=>
{
if
(
res
.
data
.
errno
==
200
)
{
if
(
res
.
data
.
errno
==
=
200
)
{
Toast
.
info
(
"密码设置成功"
)
setTimeout
(
function
()
{
props
.
history
.
replace
(
"/passport/account-login"
)
...
...
@@ -146,22 +146,10 @@ function bindMobileSetPassword(values, props) {
password
:
encrypt
(
values
.
password
),
})
.
then
((
res
)
=>
{
if
(
res
.
data
.
errno
==
200
)
{
if
(
res
.
data
.
errno
==
=
200
)
{
const
{
location
,
history
}
=
props
Toast
.
info
(
"密码设置成功"
)
let
from
=
(
location
.
state
&&
location
.
state
.
from
)
||
{
pathname
:
"/"
}
let
local_redirect_url
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
"binding_redirect"
)
)
// setTimeout(function () {
// if (local_redirect_url) {
// const {pathname, search, hash} = local_redirect_url
// history.replace(pathname + search + hash)
// } else {
// history.replace(from.pathname)
// }
// }, 1000)
let
HistoryUrl
=
window
.
localStorage
.
getItem
(
"HistoryUrl"
)
setTimeout
(()
=>
{
...
...
src/components/preferential/index.js
View file @
434cb9ad
/* eslint-disable jsx-a11y/anchor-is-valid */
import
React
,
{
Component
}
from
"react"
import
{
VList
}
from
"../../common"
import
{
Tabs
,
WhiteSpace
,
Toast
}
from
"antd-mobile"
...
...
@@ -42,7 +43,7 @@ class Preferential extends Component {
http
.
get
(
`
${
API
.
home
}
/m/home/bargainZone`
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
200
)
{
this
.
setState
({
dataList
:
JSON
.
stringify
(
res
.
data
.
data
)
==
"{}"
?
[]
:
res
.
data
.
data
,
dataList
:
JSON
.
stringify
(
res
.
data
.
data
)
==
=
"{}"
?
[]
:
res
.
data
.
data
,
isLoading
:
false
,
})
}
else
{
...
...
@@ -82,10 +83,8 @@ class Preferential extends Component {
}
toCourseDetail
=
(
id
)
=>
{
const
{
dispatch
,
history
}
=
this
.
props
// dispatch(getCourses(id, () => {
const
{
history
}
=
this
.
props
history
.
push
(
`/detail?id=
${
id
}
`
)
// }));
}
render
()
{
...
...
src/components/purchased/index.js
View file @
434cb9ad
/* eslint-disable eqeqeq */
import
React
,
{
Component
}
from
"react"
import
"./index.scss"
import
{
HeaderBar
,
VList
}
from
"../../common"
...
...
@@ -35,10 +36,8 @@ class Purchased extends Component {
}
toCourseDetail
=
(
id
)
=>
{
const
{
dispatch
,
history
}
=
this
.
props
// dispatch(getCourses(id, () => {
const
{
history
}
=
this
.
props
history
.
push
(
`/detail?id=
${
id
}
`
)
// }));
}
render
()
{
const
{
user
}
=
this
.
props
...
...
src/components/python/index.js
View file @
434cb9ad
...
...
@@ -53,7 +53,7 @@ class Python extends Component {
// 保存cookie
appLogin
=
()
=>
{
let
expires
=
addDays
(
new
Date
(),
90
)
this
.
state
.
userInfoList
.
map
((
item
,
index
)
=>
{
this
.
state
.
userInfoList
.
forEach
((
item
,
index
)
=>
{
cookie
.
set
(
"token"
,
item
.
token
,
{
expires
,
path
:
"/"
,
...
...
@@ -94,7 +94,7 @@ class Python extends Component {
transformUser
=
(
res
)
=>
{
let
payload
res
.
map
((
item
,
index
)
=>
{
res
.
forEach
((
item
,
index
)
=>
{
payload
=
{
hasError
:
false
,
data
:
{
...
...
src/components/python/pythomDes/Description/index.js
View file @
434cb9ad
/* eslint-disable jsx-a11y/alt-text */
import
React
,
{
Component
}
from
"react"
import
"./index.scss"
...
...
src/components/python/pythomDes/index.js
View file @
434cb9ad
/* eslint-disable eqeqeq, jsx-a11y/alt-text */
import
React
,
{
Component
}
from
"react"
import
"./index.scss"
import
Description
from
"./Description/index.js"
...
...
src/components/scholarship/CategoryItem/CategoryItem.js
View file @
434cb9ad
/* eslint-disable jsx-a11y/alt-text */
import
React
,
{
Component
}
from
"react"
import
{
Flex
,
WingBlank
}
from
"antd-mobile"
import
{
Link
}
from
"react-router-dom"
import
"./CategoryItem.scss"
export
default
class
CategoryItem
extends
Component
{
constructor
(
props
)
{
super
(
props
)
}
render
()
{
const
{
course_title
,
...
...
src/components/scholarship/SortItem/SortItem.js
View file @
434cb9ad
/* eslint-disable jsx-a11y/alt-text */
import
React
,
{
Component
}
from
"react"
import
{
Flex
}
from
"antd-mobile"
import
"./SortItem.scss"
...
...
@@ -11,9 +12,6 @@ const THIRD =
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/order/PC/tong_icon.png"
export
default
class
SortItem
extends
Component
{
constructor
(
props
)
{
super
(
props
)
}
render
()
{
const
{
sortNum
,
avatar_file
,
user_name
,
total_account
}
=
this
.
props
let
sortImgSrc
=
""
...
...
src/components/shopCart/cartItem.js
View file @
434cb9ad
import
React
,
{
Component
}
from
"react"
import
{
Checkbox
}
from
"antd-mobile"
import
OrderList
from
"src/common/OrderList"
import
{
Link
}
from
"react-router-dom"
class
CartItem
extends
Component
{
// 构造函数
...
...
src/components/study/myCourses/actions.js
View file @
434cb9ad
...
...
@@ -27,11 +27,11 @@ export const getMyCourses = (payload) => (dispatch) => {
.
get
(
`
${
API
.
home
}
/m/my_course/
${
payload
.
page
}
/
${
payload
.
num
}
`
)
.
then
((
res
)
=>
{
const
{
data
,
code
,
msg
}
=
res
.
data
if
(
code
==
200
&&
data
.
length
===
0
)
{
if
(
code
==
=
200
&&
data
.
length
===
0
)
{
dispatch
(
nomoreCourse
())
return
}
if
(
code
==
200
&&
data
.
length
%
10
!==
0
)
{
if
(
code
==
=
200
&&
data
.
length
%
10
!==
0
)
{
dispatch
(
nomoreCourse
())
}
dispatch
(
...
...
src/components/ts-test/index.tsx
View file @
434cb9ad
...
...
@@ -18,4 +18,5 @@ const TSTest: React.FC = () => {
</
div
>
)
}
export
default
withRouter
(
TSTest
)
src/components/video/camp/campResolve.js
View file @
434cb9ad
import
React
,
{
Component
}
from
"react"
import
{
getParam
,
http
,
browser
}
from
"src/utils"
import
{
getParam
,
http
}
from
"src/utils"
import
"./camp.scss"
import
{
CampTitle
,
...
...
@@ -82,7 +82,7 @@ class CampResolve extends Component {
this
.
course_id
=
data
.
course_id
_this
.
answerList
=
[]
this
.
rightNumber
=
0
data
.
list
.
map
((
item
)
=>
{
data
.
list
.
forEach
((
item
)
=>
{
if
(
item
.
compare
===
1
)
{
this
.
rightNumber
++
}
...
...
src/components/video/camp/campTest.js
View file @
434cb9ad
import
React
,
{
Component
}
from
"react"
import
{
getParam
,
http
,
browser
}
from
"src/utils"
import
{
getParam
,
http
}
from
"src/utils"
import
"./camp.scss"
import
{
connect
}
from
"react-redux"
import
{
Header
,
CampTitle
,
TestItem
,
ChangeQuestion
}
from
"./common/common"
...
...
@@ -47,7 +47,7 @@ class CampTest extends Component {
currentExam
:
data
.
list
[
0
],
})
_this
.
answerList
=
[]
data
.
list
.
map
((
item
)
=>
{
data
.
list
.
forEach
((
item
)
=>
{
let
obj
=
{}
obj
.
questionId
=
item
.
id
obj
.
answerId
=
0
...
...
src/components/video/camp/common/common.js
View file @
434cb9ad
...
...
@@ -124,7 +124,7 @@ function Resolve(props) {
let
{
currentExam
}
=
props
let
Test
=
currentExam
.
compare
===
0
?
"错误"
:
"正确"
let
UserIndex
,
rightIndex
currentExam
.
options
.
map
((
item
,
index
)
=>
{
currentExam
.
options
.
forEach
((
item
,
index
)
=>
{
if
(
currentExam
.
answer_id
===
item
.
opt_id
)
{
rightIndex
=
index
}
...
...
src/components/video/index.js
View file @
434cb9ad
This diff is collapsed.
Click to expand it.
src/components/video/recommendation/index.js
View file @
434cb9ad
import
React
,
{
PureComponent
}
from
"react"
import
{
connect
}
from
"react-redux"
import
{
getCourses
}
from
"./../../detail/actions"
import
"./recommendation.scss"
import
{
http
}
from
"src/utils"
import
{
Toast
}
from
"antd-mobile"
...
...
@@ -45,10 +44,8 @@ class Recommendation extends PureComponent {
}
toCourseDetail
=
(
id
)
=>
{
const
{
dispatch
,
history
}
=
this
.
props
// dispatch(getCourses(id, () => {
const
{
history
}
=
this
.
props
history
.
push
(
`/detail?id=
${
id
}
`
)
// }));
}
render
()
{
...
...
src/components/vip/index.js
View file @
434cb9ad
/* eslint-disable eqeqeq, jsx-a11y/anchor-is-valid */
import
React
,
{
Component
}
from
"react"
import
"./index.scss"
import
{
http
,
SendMessageToApp
,
getParam
}
from
"src/utils"
...
...
@@ -178,7 +179,7 @@ class NewVip extends Component {
// 保存cookie
appLogin
=
()
=>
{
let
expires
=
addDays
(
new
Date
(),
90
)
this
.
state
.
userInfoList
.
map
((
item
,
index
)
=>
{
this
.
state
.
userInfoList
.
forEach
((
item
,
index
)
=>
{
cookie
.
set
(
"token"
,
item
.
token
,
{
expires
,
path
:
"/"
,
...
...
@@ -215,7 +216,7 @@ class NewVip extends Component {
}
transformUser
=
(
res
)
=>
{
let
payload
res
.
map
((
item
,
index
)
=>
{
res
.
forEach
((
item
,
index
)
=>
{
payload
=
{
hasError
:
false
,
data
:
{
...
...
src/router/route-middle-page.js
View file @
434cb9ad
...
...
@@ -23,7 +23,7 @@ function RouteMiddlePage(props) {
}
}
}
},
[
props
.
user
.
isFetching
])
},
[
props
,
props
.
user
.
isFetching
])
return
(
<
div
className
=
{
"loading-route"
}
>
...
...
src/utils/app.js
View file @
434cb9ad
...
...
@@ -27,7 +27,7 @@ export default function SendMessageToApp() {
window
[
fun_name
]
=
callback
}
if
(
window
.
webkit
!=
undefined
)
{
if
(
window
.
webkit
!=
=
undefined
)
{
sendToIOS
(
messageName
,
params
)
}
else
{
//貌似安卓传的参数,不能是数组和对象,所以这里json一下
...
...
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