Commit c156b663 by xuzhenghua

优化

parent caf05f78
......@@ -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))
})
}
......
......@@ -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'>
{
......
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment