Commit 7036cb18 by xuzhenghua

pull

parent 7dc3f6ae
.college-banner { .college-banner {
height: 100px; height: 100px;
background-image: url('https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/college-plan/college-banner.png'); // background-image: url('https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/college-plan/college-banner.png');
background-image: url('https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/college-plan/m-banner.png');
background-size: cover; background-size: cover;
} }
\ No newline at end of file
...@@ -18,7 +18,6 @@ class CollegeCourse extends Component { ...@@ -18,7 +18,6 @@ class CollegeCourse extends Component {
componentDidMount() { componentDidMount() {
this.fetchCourseList(); this.fetchCourseList();
document.title = `助力高校在线教学计划之中科大软院(苏州)专区 - 七月在线`
} }
fetchCourseList = () => { fetchCourseList = () => {
...@@ -31,6 +30,7 @@ class CollegeCourse extends Component { ...@@ -31,6 +30,7 @@ class CollegeCourse extends Component {
header: data.name, header: data.name,
courseList: data.data courseList: data.data
}); });
document.title = `助力高校在线教学计划之${data.name}专区 - 七月在线`
} }
}); });
} }
......
...@@ -31,12 +31,15 @@ ...@@ -31,12 +31,15 @@
} }
.college-course__title { .college-course__title {
display: -webkit-box;
margin: 8px 0 0; margin: 8px 0 0;
padding-left: 5px; padding-left: 5px;
font-size: 14px; font-size: 14px;
color: #525C65; color: #525C65;
line-height: 16px; line-height: 16px;
// text-overflow: ellipsis; overflow: hidden;
// white-space: nowrap; text-overflow: ellipsis;
// overflow: hidden; -webkit-line-clamp: 2;
/* autoprefixer: ignore next */
-webkit-box-orient: vertical;
} }
\ No newline at end of file
...@@ -12,12 +12,12 @@ class CollegePage extends Component { ...@@ -12,12 +12,12 @@ class CollegePage extends Component {
sectionInfo: [ sectionInfo: [
{ {
title: '系统赞助', title: '系统赞助',
desc: '免费提供在线直播系统(屏幕实时演示),支持视频回放、互动答疑。', desc: '免费提供在线直播系统,支持电脑屏幕实时演示,以及视频回放、互动答疑。',
icon: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/college-plan/system.png', icon: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/college-plan/system.png',
}, },
{ {
title: '内容赞助 ', title: '课程赞助 ',
desc: '免费开放相关课程的视频、课件、作业、考试、项目云平台(在线编译、在线批改)。', desc: '免费开放相关课程的视频、课件、作业、考试、代码、项目、云平台(在线编译、在线批改)。',
icon: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/college-plan/content.png', icon: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/college-plan/content.png',
}, },
], ],
...@@ -31,11 +31,12 @@ class CollegePage extends Component { ...@@ -31,11 +31,12 @@ class CollegePage extends Component {
} }
fetchSchoolList = () => { fetchSchoolList = () => {
const { schoolList } = this.state;
http.get(`${API['home']}/sys/school/list`).then(res => { http.get(`${API['home']}/sys/school/list`).then(res => {
const { code, data } = res.data; const { code, data } = res.data;
if(code === 200) { if(code === 200) {
this.setState({ this.setState({
schoolList: data, schoolList: data.concat(schoolList),
}); });
} }
}); });
...@@ -43,7 +44,9 @@ class CollegePage extends Component { ...@@ -43,7 +44,9 @@ class CollegePage extends Component {
toCollegeCourse = (id) => { toCollegeCourse = (id) => {
const { history } = this.props; const { history } = this.props;
history.push(`/college/${id}`); if(id) {
history.push(`/college/${id}`);
}
} }
render() { render() {
...@@ -58,7 +61,6 @@ class CollegePage extends Component { ...@@ -58,7 +61,6 @@ class CollegePage extends Component {
marginTop: '20px' marginTop: '20px'
}} }}
title="助力高校在线教学计划" title="助力高校在线教学计划"
/> />
<p className="college-page__contact">免费入驻联系周先生:18910848502(微信同)</p> <p className="college-page__contact">免费入驻联系周先生:18910848502(微信同)</p>
{ {
...@@ -76,9 +78,8 @@ class CollegePage extends Component { ...@@ -76,9 +78,8 @@ class CollegePage extends Component {
headerStyle={{ headerStyle={{
marginTop: '20px' marginTop: '20px'
}} }}
isDecorate={false} isDecorate={false}
title="入驻学院" title="入驻院校"
/> />
<div className="college-page__college"> <div className="college-page__college">
{ {
...@@ -93,13 +94,6 @@ class CollegePage extends Component { ...@@ -93,13 +94,6 @@ class CollegePage extends Component {
</div> </div>
)) ))
} }
<div
className="college__item"
>
<i className="college__iamge college__iamge-add"></i>
<p className="college__name">东华理工大学软件学院</p>
</div>
</div> </div>
</> </>
) )
......
...@@ -43,12 +43,12 @@ ...@@ -43,12 +43,12 @@
} }
.college-page__college { .college-page__college {
display: flex; // display: flex;
flex-wrap: wrap; // flex-wrap: wrap;
padding: 4px 10px 0; padding: 4px 10px 0;
.college__item { .college__item {
width: 166px; // width: 166px;
margin: 0 5px 10px; margin: 0 5px 10px;
cursor: pointer; cursor: pointer;
} }
...@@ -58,16 +58,11 @@ ...@@ -58,16 +58,11 @@
height: 60px; height: 60px;
border: 1px solid #ECECEC; border: 1px solid #ECECEC;
border-radius: 1px; border-radius: 1px;
background-size: auto 100%; background-size: auto 95%;
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
} }
.college__iamge-add {
background-image: url('https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/college-plan/donghua.png');
background-size: 100%;
}
.college__name { .college__name {
margin: 6px 0 0;; margin: 6px 0 0;;
font-size: 12px; font-size: 12px;
......
...@@ -149,6 +149,7 @@ class CampTest extends Component { ...@@ -149,6 +149,7 @@ class CampTest extends Component {
data.answer_record = this.answerList; data.answer_record = this.answerList;
http.post(`${API.home}/m/aist/submit`, data).then((res) => { http.post(`${API.home}/m/aist/submit`, data).then((res) => {
if(res.data.code === 200) { if(res.data.code === 200) {
this.body = document.getElementsByTagName('body')[0];
this.body.style.position = 'static'; this.body.style.position = 'static';
this.props.history.push(`/campResolve?keshi_id=${this.keshi_id}&qid=${this.qid}`, {from: this.props.location.state.from}) this.props.history.push(`/campResolve?keshi_id=${this.keshi_id}&qid=${this.qid}`, {from: this.props.location.state.from})
}else{ }else{
......
...@@ -13,7 +13,6 @@ import { Modal } from "antd-mobile" ...@@ -13,7 +13,6 @@ import { Modal } from "antd-mobile"
import { Loading } from '@/common' import { Loading } from '@/common'
import { connect } from "react-redux" import { connect } from "react-redux"
import jsCookie from 'js-cookie' import jsCookie from 'js-cookie'
import io from 'socket.io-client'
import Single from "@/components/detail/single"; import Single from "@/components/detail/single";
import SingleSuccess from "../detail/single/singleSuccess"; import SingleSuccess from "../detail/single/singleSuccess";
import './CustomPlayButton' import './CustomPlayButton'
...@@ -83,8 +82,6 @@ class Video extends Component { ...@@ -83,8 +82,6 @@ class Video extends Component {
isCurrentVideoFirstPlay = true isCurrentVideoFirstPlay = true
WATCHTIME = "watch_time"
COUNTSCHEDULE = "count_schedule"
RECENTLEARN = "recent_learn" RECENTLEARN = "recent_learn"
state = { state = {
...@@ -136,7 +133,6 @@ class Video extends Component { ...@@ -136,7 +133,6 @@ class Video extends Component {
this.token = jsCookie.get('token') this.token = jsCookie.get('token')
this.getVideoList() this.getVideoList()
this.getDatumCatalog() this.getDatumCatalog()
this.setupRecord()
} }
// 直接购买 // 直接购买
...@@ -341,40 +337,6 @@ class Video extends Component { ...@@ -341,40 +337,6 @@ class Video extends Component {
}) })
} }
setupRecord = () => {
this.recordSocket = io(API.record, {
transports: ['websocket'],
forceNew: true
})
// this.recordSocket = io(API.record)
// this.recordSocket.on('seek', time => {
// this.player.currentTime(time)
// })
// 开启定时器 每5秒发送一次学习记录 --删除
this.recordTimer = setInterval(() => {
this.sendRecord()
}, 5000)
}
// 发送学习记录
sendRecord = () => {
if (this.recordSocket && this.player) {
this.recordSocket.emit('addRecord', this.recordUserInfo())
}
}
// 返回学习记录的数据
recordUserInfo = () => {
let {uid} = this.props.user.data
return {
uid,
course_id: this.courseID,
video_id: this.state.videoList[this.state.activeIndex]['id'],
video_time: parseInt(this.player.currentTime()),
plat: 5
}
}
// 9502 初始化 监听事件 // 9502 初始化 监听事件
setupWS = () => { setupWS = () => {
this.ws = new WebSocket(API["process-api"]); this.ws = new WebSocket(API["process-api"]);
...@@ -524,9 +486,6 @@ class Video extends Component { ...@@ -524,9 +486,6 @@ class Video extends Component {
} }
}) })
this.player.addChild('CustomPlayButtonCover') this.player.addChild('CustomPlayButtonCover')
this.player.on('ready', () => {
this.recordSocket.emit('load', this.recordUserInfo())
})
this.player.on('play', () => { this.player.on('play', () => {
const {videoList, activeIndex, vCourseId, course = {}} = this.state const {videoList, activeIndex, vCourseId, course = {}} = this.state
// 当视频播放时 看是否是第一次播放(初次进入页面 刷新页面 切换视频 都是第一次播放 需要获取上次的播放时间) // 当视频播放时 看是否是第一次播放(初次进入页面 刷新页面 切换视频 都是第一次播放 需要获取上次的播放时间)
...@@ -566,9 +525,6 @@ class Video extends Component { ...@@ -566,9 +525,6 @@ class Video extends Component {
clearInterval(this.timer); clearInterval(this.timer);
this.timer = null; this.timer = null;
}) })
this.player.on('seeked', () => {
this.sendRecord()
})
} }
sendLastRecord = () => { sendLastRecord = () => {
...@@ -895,6 +851,7 @@ class Video extends Component { ...@@ -895,6 +851,7 @@ class Video extends Component {
activeIndex={this.state.activeIndex} activeIndex={this.state.activeIndex}
selectVideo={this.selectVideo} selectVideo={this.selectVideo}
videoCatalog={videoList} videoCatalog={videoList}
isAist={course.is_aist}
{...props} {...props}
/> />
); );
......
...@@ -34,7 +34,8 @@ class VideoCatalog extends Component { ...@@ -34,7 +34,8 @@ class VideoCatalog extends Component {
)}/> )}/>
</div> </div>
{ {
(item.practice && item.practice.qid) this.props.isAist ? (
(item.practice && item.practice.qid)
? <Link to={{ ? <Link to={{
pathname: item.practice.is_tested ? '/campResolve' : '/campTest', pathname: item.practice.is_tested ? '/campResolve' : '/campTest',
search: `?keshi_id=${item.id}&qid=${item.practice.qid}`, search: `?keshi_id=${item.id}&qid=${item.practice.qid}`,
...@@ -46,6 +47,22 @@ class VideoCatalog extends Component { ...@@ -46,6 +47,22 @@ class VideoCatalog extends Component {
</div> </div>
</Link> </Link>
: null : null
) : (
item.practice_common.map((commonItem, index) => {
return (
<Link to={{
pathname: commonItem.is_tested ? '/campResolve' : '/campTest',
search: `?keshi_id=${item.id}&qid=${commonItem.qid}`,
state: {from: `/play/video${window.location.search}`}
}} key={index}>
<div className="exercise">
课后练习:{commonItem.title}
<i className={classnames('iconfont',!item.video_auth ? 'iconiconfront-74' : commonItem.is_tested ? 'iconiconfront-3' : '')}/>
</div>
</Link>
)
})
)
} }
</li> </li>
) )
......
...@@ -33,11 +33,16 @@ ...@@ -33,11 +33,16 @@
} }
} }
a:last-child {
.exercise {
margin-bottom: 15px;
}
}
.exercise { .exercise {
padding-left: 15px; padding-left: 15px;
height: 35px; height: 35px;
background: #F5FBFF; background: #F5FBFF;
margin-bottom: 15px;
line-height: 35px; line-height: 35px;
font-size: $font_12; font-size: $font_12;
color: #000; color: #000;
......
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