Commit 4300408b by wangshuo

特训营返现标签

parent df12fe0d
import React, {Component} from 'react';
import {api, getParam, http, browser} from "@/utils";
class CampResolve extends Component {
constructor(props) {
super(props);
this.state = {
}
}
componentDidMount() {
console.log(getParam('id'));
}
render() {
return (
<div>
</div>
);
}
}
export default CampResolve;
\ No newline at end of file
import React, {Component} from 'react';
import {api, getParam, http, browser} from "@/utils";
class CampTest extends Component {
constructor(props) {
super(props);
this.state = {
}
}
componentDidMount() {
console.log(getParam('id'));
}
render() {
return (
<div>
</div>
);
}
}
export default CampTest;
\ No newline at end of file
import React, {Component} from 'react'
import {Link} from 'react-router-dom'
import {Tabs, WhiteSpace} from 'antd-mobile'
import './index.scss'
import {api, getParam, http} from "@/utils"
......@@ -80,43 +81,58 @@ class OutLine extends Component {
6-可试听但无试听权限
*/}
{ // 试听
item.class_status === 7 &&
!introduce.is_aist && item.class_status === 7 &&
<span className='btn-right-10 audition'
onClick={this.props.toAudition}>试听
<i className='iconfont iconcelluar'></i>
</span>
}
{ // 未购买未开单集购买:上锁标志,点击提示购买
item.class_status === 0 &&
!introduce.is_aist && item.class_status === 0 &&
<i className='iconfont iconiconfront-74 icon-right-22'></i>
}
{ // 未购买已开单集购买:显示单集价格,点击购买单集
item.class_status === 1 &&
!introduce.is_aist && item.class_status === 1 &&
<span className='btn-right-10 singleset'
onClick={e => this.props.toSingleset(item)}>¥ {item.class_price}</span>
}
{
item.class_status === 4 &&
!introduce.is_aist && item.class_status === 4 &&
item.video_auth === 1 && item.is_video === 4 &&
<span className='live icon-right-22'>正在直播<i
className='iconfont icondanseshixintubiao-23'></i></span>
}
{
// 已购买直播结束已上传视频:正常播放按钮,点击播放课程
item.class_status === 2 &&
!introduce.is_aist && item.class_status === 2 &&
<i className='iconfont icondanseshixintubiao-23 icon-right-22'></i>
}
{
// 返现课程 是返现课程 未开课 已开课 是返现课程 未开课 已开课 已练习
introduce.is_aist && item.isopen &&
<i className='aist aist_open'></i>
}
{
// 返现课程 是返现课程 未开课 已开课 是返现课程 未开课 已开课 已练习
introduce.is_aist && !item.isopen &&
<i className='aist aist_close'></i>
}
</h2>
{
item.point && item.point.length > 0 && item.point.map((item, index) => {
const type = (
<span>
{item.type === 1 &&
<span>知识点{index + 1}</span>
} {item.type === 2 &&
<span className='red'>实战项目:</span>
}
</span>
{
item.type === 1 &&
<span>知识点{index + 1}</span>
}
{
item.type === 2 &&
<span className='red'>实战项目:</span>
}
</span>
)
return (
......@@ -126,6 +142,30 @@ class OutLine extends Component {
})
}
{
<>
{
introduce.is_aist && item.practice.title !== "" && !item.isopen &&
<span className='camp camp_test' key={index}>
<span>课后练习:{item.practice.title}</span>
<i className='exam exam_close' />
</span>
}
{
introduce.is_aist && item.practice.title !== "" && item.isopen && !item.is_tested &&
<Link to={`/campTest?id=${item.video_id}`} className='camp camp_test' key={index}>
<span>课后练习:{item.practice.title}</span>
</Link>
}
{
introduce.is_aist && item.practice.title !== "" && item.isopen && item.is_tested &&
<Link to={`/campResolve?id=${item.video_id}`} className='camp camp_test' key={index}>
<span>课后练习:{item.practice.title}</span>
<i className='exam exam_open' />
</Link>
}
</>
}
</ul>
)
})
......@@ -143,4 +183,4 @@ class OutLine extends Component {
}
export default OutLine;
export default OutLine;
\ No newline at end of file
......@@ -76,6 +76,37 @@
color: $color_666;
margin-left: 10px;
margin-top: 10px;
position: relative;
}
.camp {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
position: relative;
margin-left: 10px;
margin-top: 8px;
color: #000;
font-size: 12px;
}
.exam {
display: inline-block;
width: 18px;
height: 18px;
position: absolute;
right: 22px;
top: 50%;
transform: translateY(-50%);
margin-right: 2px;
}
.exam_open {
background: url("../image/open.png") no-repeat;
background-size: 100% 100%;
}
.exam_close {
background: url("../image/close.png") no-repeat;
background-size: 100% 100%;
}
.red {
......@@ -110,6 +141,24 @@
font-size: 12px;
}
.aist {
display: inline-block;
position: absolute;
width: 22px;
height: 22px;
right: 22px;
top: 50%;
transform: translateY(-50%);
}
.aist_open {
background: url("../image/aist_open.png") no-repeat;
background-size: 100% 100%;
}
.aist_close {
background: url("../image/close.png") no-repeat;
background-size: 100% 100%;
}
.btn-right-10 {
position: absolute;
right: 10px;
......
......@@ -11,7 +11,7 @@ function Loading(props) {
useEffect(() => {
console.group('middle')
console.log(Object.values(user.data).every(item => !!item).length !== 0)
// console.log(Object.values(user.data).every(item => !!item).length !== 0)
console.groupEnd()
let {user, location, history} = props
......
......@@ -27,6 +27,8 @@ const Order = loadable(() => import(/* webpackChunkName: 'Order'*/'@/components/
const CourseList = loadable(() => import(/* webpackChunkName: 'CourseList'*/'@/components/classify/courselist'))
const MyEdit = loadable(() => import(/* webpackChunkName: 'MyEdit'*/'@/components/my/edit'))
const Classify = loadable(() => import(/* webpackChunkName: 'Classify'*/'@/components/classify'))
const CampTest = loadable(() => import(/* webpackChunkName: 'Classify'*/'@/components/detail/campTest/campTest'))
const CampResolve = loadable(() => import(/* webpackChunkName: 'Classify'*/'@/components/detail/campTest/campResolve'))
export default [
{
path: '/',
......@@ -134,6 +136,14 @@ export default [
component: PayOrder
},
{
path: '/campTest',
component: CampTest
},
{
path: '/campResolve',
component: CampResolve
},
{
path: '/togroup',
component: ToGroup,
isPrivate: true
......
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