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
c156b663
Commit
c156b663
authored
Jun 24, 2020
by
xuzhenghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
caf05f78
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
5 deletions
+21
-5
src/App.js
+1
-1
src/components/Index/index.js
+3
-2
src/components/my/index.js
+17
-2
No files found.
src/App.js
View file @
c156b663
...
...
@@ -220,7 +220,7 @@ class App extends Component {
}
else
{
http
.
get
(
`
${
API
.
home
}
/m/user_info`
).
then
(
res
=>
{
http
.
get
(
`
${
API
.
home
}
/m/user_info
_sample/0
`
).
then
(
res
=>
{
this
.
props
.
setCurrentUser
(
this
.
transformUser
(
res
))
})
}
...
...
src/components/Index/index.js
View file @
c156b663
...
...
@@ -11,7 +11,7 @@ import { Link } from "react-router-dom"
import
{
Toast
}
from
'antd-mobile'
import
{
connect
}
from
"react-redux"
;
import
TopSwiper
from
'./TopSwiper'
import
ExpandActiveToast
from
'./expandActiveToast'
//
import ExpandActiveToast from './expandActiveToast'
import
AllCourseNavigation
from
"./all-course"
// const animateTypes = Swiper.animateTypes
...
...
@@ -131,7 +131,8 @@ class Index extends Component {
<
div
className
=
'zw_height'
><
/div
>
<
ExpandActiveToast
/>
{
/*支付尾款提示*/
}
{
/*<ExpandActiveToast/>*/
}
<
div
className
=
'index-swiper'
>
{
...
...
src/components/my/index.js
View file @
c156b663
...
...
@@ -7,6 +7,7 @@ import {WithTab} from '@/HOCs'
import
{
Link
}
from
"react-router-dom"
import
{
connect
}
from
"react-redux"
import
{
HeaderBar
}
from
"@/common"
import
{
http
}
from
"@/utils"
import
{
getCourses
}
from
'./../detail/actions'
;
const
Item
=
List
.
Item
;
...
...
@@ -19,10 +20,23 @@ class My extends PureComponent {
constructor
(
props
)
{
super
(
props
)
this
.
state
=
{
data
:
[]
data
:
[],
isVip
:
0
,
}
}
componentDidMount
()
{
http
.
get
(
`
${
API
.
home
}
/m/user_info_sample/1`
).
then
(
res
=>
{
const
{
data
,
code
}
=
res
.
data
if
(
code
===
200
)
{
this
.
setState
({
isVip
:
data
.
is_vip
})
}
})
}
// 去登录
toLogin
=
()
=>
{
this
.
props
.
history
.
push
(
'/passport'
)
...
...
@@ -41,7 +55,8 @@ class My extends PureComponent {
const
uid
=
user
&&
user
.
data
&&
user
.
data
.
uid
const
username
=
user
&&
user
.
data
&&
user
.
data
.
username
const
avatar
=
user
&&
user
.
data
&&
user
.
data
.
avatar
const
isVIP
=
user
&&
user
.
data
&&
user
.
data
.
isVIP
// const isVIP = user && user.data && user.data.isVIP
const
isVIP
=
this
.
state
.
isVip
let
list
if
(
!
uid
)
{
...
...
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