提交 37505ceb authored 作者: zhengyadong's avatar zhengyadong

Merge branch 'zyd' into dev

......@@ -23,7 +23,7 @@ module.exports = {
// Various Dev Server settings
host: '192.168.2.40', // can be overwritten by process.env.HOST
host: '192.168.2.39', // can be overwritten by process.env.HOST
port: 8082, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false,
errorOverlay: true,
......
File added
......@@ -16,3 +16,20 @@ export function getCollDetailAPI(params){
params
})
}
// 删除收藏试题
export function delColAPI(data){
return request({
url:`${requestPath.resource}/collection/batch/delete`,
method:'post',
data
})
}
// 删除错题
export function delWrongAPI(data){
return request({
url:`${requestPath.resource}/error-book/delete-error`,
method:'post',
data
})
}
\ No newline at end of file
......@@ -13,7 +13,7 @@ export function getMoonListAPI(params){
// 月月赛详情
export function getMatchDetailAPI(params){
return request({
url:`${requestPath.resource}/week-practise/get-exampaper-info`,
url:`${requestPath.resource}/week-practise/query/exam/info`,
method:'get',
params
})
......@@ -28,14 +28,6 @@ export function getMatchConDetailAPI(params){
})
}
// // 保存周周练
// export function saveWeekAPI(data){
// return request({
// url:`${requestPath.resource}/record/create-week`,
// method:'post',
// data
// })
// }
// 生成月月赛记录
export function createPaperAPI(data){
......@@ -65,15 +57,6 @@ export function createRecordAPI(data){
})
}
// // 查看解析
// export function getMatchViewAPI(params){
// return request({
// url:`${requestPath.resource}/record/get/question-statistics`,
// method:'get',
// params
// })
// }
// 查看解析
export function getMatchViewAPI(params){
return request({
......@@ -83,7 +66,28 @@ export function getMatchViewAPI(params){
})
}
// 查看收藏状态
export function getColStatusAPI(params){
return request({
url:`${requestPath.resource}/collection/check`,
method:'get',
params
})
}
// 添加收藏
export function addCollectionAPI(data){
return request({
url:`${requestPath.resource}/collection/add-member-collection`,
method:'post',
data
})
}
// 取消收藏
export function delCollectionAPI(data){
return request({
url:`${requestPath.resource}/collection/batch/delete`,
method:'post',
data
})
}
import request from '@/utils/request'
import { requestPath } from '@/utils/global.js'
// 根据视频id获取路径
export function getFilePathAPI(params) {
return request({
url: `${requestPath.file}/getFilePath?fileName=${params}`,
method: 'get',
})
}
// 获取视频详情
export function getVideoDetail(params) {
return request({
url: `${requestPath.resource}/course-library/get/${params}`,
method: 'get',
})
}
// // 查询当前用户最后观看记录
// export function lastVideo(params) {
// return request({
// url: `${requestPath.resource}/video-study-record/get/list`,
// method: 'get',
// params
// })
// }
// 保存视频浏览记录
export function saveRecordVideo(data) {
return request({
url: `${requestPath.resource}/video-study-record/save`,
method: 'post',
data
})
}
\ No newline at end of file
/**
* @Author: skyeGao
* @Email: yyjzp1314@126.com
* @DateTime: 2019-03-29 11:24:39
* @Description: video 配置
*/
export const playerConfig = {
container: '.ckplayerVideo',
variable: 'player',
loaded: 'loadedHandler', //当播放器加载后执行的函数
loop: false, //播放结束是否循环播放
autoplay: true, //是否自动播放
//duration: 500, //设置视频总时间
// cktrack: 'http://front-end.bjcnc.scs.sohucs.com/track-report-sit/ckplayer/material/srt.srt', //字幕文件
// poster: 'material/poster.jpg', //封面图片
/*preview: { //预览图片
file: [
'http://front-end.bjcnc.scs.sohucs.com/track-report-sit/ckplayer/material/mydream_en1800_1010_01.png',
'http://front-end.bjcnc.scs.sohucs.com/track-report-sit/ckplayer/material/mydream_en1800_1010_02.png'
],
scale: 2
},*/
config: '', //指定配置函数
debug: true, //是否开启调试模式
//flashplayer: true, //强制使用flashplayer
drag: 'start', //拖动的属性
seek: 0, //默认跳转的时间
//playbackrate:1,//默认速度的编号,只对html5有效,设置成-1则不显示倍速
//advertisements:'website:ad.json',
//front:'frontFun',//上一集的操作函数
//next:'nextFun',//下一集的操作函数
/****************** 广告部分开始 ******************/
adfront: 'http://www.ckplayer.com/yytf/swf/front001.swf,http://www.ckplayer.com/yytf/swf/front002.swf', //前置广告
adfronttime: '15,15',
adfrontlink: '',
adpause: 'http://www.ckplayer.com/yytf/swf/pause001.swf,http://www.ckplayer.com/yytf/swf/pause002.swf',
adpausetime: '5,5',
adpauselink: '',
adinsert: 'http://www.ckplayer.com/yytf/swf/insert001.swf,http://www.ckplayer.com/yytf/swf/insert002.swf',
adinserttime: '10,10',
adinsertlink: '',
inserttime: '10,80',
adend: 'http://www.ckplayer.com/yytf/swf/end001.swf,http://www.ckplayer.com/yytf/swf/end002.swf',
adendtime: '15,15',
adendlink: '',
/****************** 广告部分结束 ******************/
/*promptSpot: [ //提示点
{
words: '提示点文字01',
time: 30
},
{
words: '提示点文字02',
time: 150
}
],*/
//mobileCkControls:true,//是否在移动端(包括ios)环境中显示控制栏
//live:true,//是否是直播视频,true=直播,false=点播
/*video: [
['http://img.ksbbs.com/asset/Mon_1703/05cacb4e02f9d9e.mp4', 'video/mp4', '中文标清', 0],
['http://img.ksbbs.com/asset/Mon_1703/d0897b4e9ddd9a5.mp4', 'video/mp4', '中文高清', 0],
['http://img.ksbbs.com/asset/Mon_1703/eb048d7839442d0.mp4', 'video/mp4', '英文高清', 10],
['http://img.ksbbs.com/asset/Mon_1703/d30e02a5626c066.mp4', 'video/mp4', '英文超清', 0]
]*/
/*video: [
['http://test16.zhongdianyun.com:8709:8696/file/file/?fileName=aa515010032f48f9adbb3aa41ddb4a5d','video/mp4']
]*/
// video: [],
flashplayer: false, //设置成true则强制使用flashplayer
html5m3u8: true,//是否在pc端环境使用hls播放m3u8
hlsAutoPlay: true,
video: '',
crossorigin: '*',
logo: null
}
\ No newline at end of file
import coursePic from '@/assets/img/default/d-course.png' // 课程
const BASE_URL = process.env.VUE_APP_URL // 全局域名端口
export function getVideo(data){
return `${BASE_URL}/file/${data}/index.m3u8`
}
export function getImg(data){
return (data&&`${BASE_URL}/file/file/?fileName=${data}`)||coursePic
}
\ No newline at end of file
// @import '@/app.scss';
$topHeader: 86px;
$nameHeader: 44px;
$playButton: 50px;
$l1: 172px;
$l2: 60px;
.course-video-page{
overflow: hidden;
.top-header{
height: $topHeader;
line-height: $topHeader;
padding-left: 28px;
background-color: #303134;
display: flex;
align-items: center;
.video-back-btn{
width: 119px;
height: 39px;
display: block;
background-size: 100% 100%;
display: flex;
justify-content: center;
align-items: center;
font-size:13px;
font-family:MicrosoftYaHei;
font-weight:400;
color:rgba(255,255,255,1);
line-height:24px;
text-shadow:0px -1px 0px rgba(0, 0, 0, 0.4);
}
}
.center-video{
.name-header{
height: $nameHeader;
line-height: $nameHeader;
background-color: #2A2A2A;
span{
font-size: 14px;
font-family: MicrosoftYaHei;
font-weight: 400;
color: #5474CE;
margin-left: 30px;
}
}
.center-video-con{
font-size: 0px;
}
.left-video-con{
background: #303134;
height: calc(100vh - 86px - 50px - 44px) !important;
.xgplayer{
height: 100% !important;
padding: 0 !important;
}
.playButton{
width: 100%;
height: $playButton;
line-height: $playButton;
text-align: right;
background-color: #171717;
a{
width: 76px;
height: 31px;
line-height: 31px;
text-align: center;
display: inline-block;
margin-right: 16px;
color: #FFFFFF;
font-size: 13px;
background-color: #2C2C2C;
@include border-radius(3px);
i{
color: #fff;
font-size: 15px;
margin-right: 6px;
}
}
}
.no-ckplayerVideo{
height: calc(100vh - 86px - 50px - 44px) !important;
display: flex;
justify-content: center;
align-items: center;
font-size: 30px;
color: #666;
}
}
.right-video-catalogue{
height: -moz-calc(100vh - #{$topHeader});
height: -webkit-calc(100vh - #{$topHeader});
height: calc(100vh - #{$topHeader});
color: #fff;
background-color: #26262B;
border-bottom: 1px solid #ededed;
.top-course-info{
padding: 10px;
h3{
font-size: 20px;
color: #fff;
margin: 20px 0;
}
.course-info-con{
display: flex;
justify-content: space-between;
.icon{
display: inline-block;
width: 12px;
height: 12px;
margin: 3px 10px 0 0;
vertical-align: text-top;
}
.icon-jiangshi{
background: url('~@/assets/img/detail/detail-teacher.png') center center no-repeat;
background-size: 100% 100%;
}
.text{
display: flex;
flex-direction: column-reverse;
font-size: 14px;
color: #fff;
}
.img{
width: 120px;
height: 90px;
img{
width: 100%;
height: 100%;
}
}
}
}
.bottom-course-catalogue{
.el-header,
.el-main{
padding: 0;
}
h3{
border: 1px solid #323237;
border-left: none;
border-right: none;
margin: 10px 0;
padding: 10px;
span{
font-size: 18px;
padding-bottom: 10px;
border-bottom: 2px solid #5474CE;
}
}
ul{
/*height: 352px;*/
height: -moz-calc(100vh - #{$topHeader} - #{$l1} - #{$l2});
height: -webkit-calc(100vh - #{$topHeader} - #{$l1} - #{$l2});
height: calc(100vh - #{$topHeader} - #{$l1} - #{$l2});
overflow-y: auto;
}
li:nth-child(1){
margin-top: 15px;
}
li{
color: #fff;
padding: 0 15px 0;
font-size: 14px;
font-family: MicrosoftYaHei;
font-weight: 400;
display: flex;
justify-content: space-between;
align-items: center;
}
li.active,
li:hover{
background-color: #000000;
color: #5474CE;
.catalogue-item{
.title:before,
.title:after{
background: #000000;
}
}
}
.catalogue-item{
width: 100%;
line-height: 24px;
.title{
text-align: left;
/*@include text-more-ellipsis(1);*/
@include main-text-more-ellipsis(1, $bgColor:#26262B);
max-height: 24px;
/*padding: 5px 0;*/
}
.title.disabled{
color: #808080
}
.info{
text-align: right;
}
}
.icon{
display: inline-block;
width: 12px;
height: 12px;
vertical-align: text-top;
margin-right: 6px;
margin-top: 3px;
}
.icon-bofang{
background: url("~@/assets/img/detail/detail-play.png") center center no-repeat;
background-size: 100% 100%;
cursor: pointer;
}
.icon-suozhu{
background: url("~@/assets/img/detail/detail-lock.png") center center no-repeat;
background-size: 100% 100%;
}
}
}
}
}
\ No newline at end of file
差异被折叠。
import { Message } from 'element-ui'
import Cookies from 'js-cookie'
export function warningMessage(title, duration = 2000) {
Message({
message: title,
type: 'warning',
duration:duration
});
}
export function successMessage(title, duration = 2000) {
Message({
message: title,
type: 'success',
duration:duration
});
}
export function errorMessage(title, duration = 2000) {
Message({
message: title,
type: 'error',
duration:duration
});
}
export function isLogin() {
return Cookies.get('token') ? true:false
}
// 深拷贝
export const deepClone = obj => {
let newObj = Array.isArray(obj) ? [] : {}
if (obj && typeof obj === 'object') {
for (let key in obj) {
if (obj.hasOwnProperty(key)) {
if (obj[key] && typeof obj[key] === 'object') {
newObj[key] = deepClone(obj[key])
}
newObj[key] = obj[key]
}
}
}
return newObj
}
// 判断对象对否有某个元素,有的话返回该对象的值
export const hasOwnPro = function(obj,key){
return obj.hasOwnProperty(key) ? obj[key] : ''
}
差异被折叠。
export const playerConfig= {
id: "mse", // 挂载节点id
playsinline: true, // 是否在线播放
whitelist: [ // 白名单
""
],
url:'',
// url: "http://192.168.2.242:8501/file/2020/03/11/014a51f66a41416b84e2ca58b84665fd/index.m3u8", // 播放地址
// url:'http://192.168.2.242:8501/file/2020/05/09/991423a50f89441d874e6807426e3f39/index.m3u8',
// width: "400", // 宽度
// height: "300", // 高度
autoplay: false, // 自动播放
fluid: true, // 流式布局
useHls:true,
// playbackRate: [0.75, 1, 1.5], // 可选播放速度 [0.5, 0.75, 1, 1.5, 2]
volume: 0.6, // 预设音量 0 ~ 1
// fitVideoSize: 'auto', // 自适应视频内容宽高 'fixWidth' | 'fixHeight' | 'auto
// loop: true, // 循环播放
// videoInit: true, // 初始化显示视频首帧
poster: '' , // 封面图
// defaultPlaybackRate: 1, // 默认播放速度
// rotate: { // 视频旋转按钮配置项
// innerRotate: true, // 只旋转内部video
// clockwise: false // 旋转方向是否为顺时针
// },
// thumbnail: { // 预览
// pic_num: 44,
// width: 160,
// height: 90,
// col: 10,
// row: 10,
// urls: ['./xgplayer-demo-thumbnail-1.jpg','./xgplayer-demo-thumbnail-2.jpg'],
// },
// playNext: { // 下一集
// urlList: [
// 'url1',
// ],
// },
// download: true, //设置download控件显示
cssFullscreen: true, // 网页样式全屏
}
// 计算高度
export const autoHeight = function(height=0) {
return ((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-height)
}
<template>
<div class="no-data-tip">
<img src="@/assets/img/list/no-content.png" alt="">
</div>
</template>
<script>
export default {
name: 'noneData',
data() {
return {}
},
created() {
},
watch: {},
methods: {},
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss">
.no-data-tip{
padding-top: 2rem;
color: #A8A8A8;
text-align: center;
line-height: .36rem;
font-size: .16rem;
img{
margin: 0 auto;
}
}
</style>
<template>
<div class="type-completion">
<div v-html="dataObj.content"></div>
<div v-html="dataObj.filterContent"></div>
<div class="default-font" v-if="dataObj.content" v-html="dataObj.content"></div>
<div class="default-font" v-else v-html="dataObj.filterContent"></div>
<div class="answer-completion">
<p-input ref="input" :value="value" :show-answer="showAnswer" @change="inputChange"></p-input>
<p-input ref="input" :value="value" :show-answer="showAnswer" @change="inputChange" :disabled="disabled"></p-input>
</div>
</div>
</template>
......@@ -24,7 +24,8 @@ export default {
data() {
return {
value:'',
showAnswer:0
showAnswer:0,
disabled:false
}
},
created() {
......@@ -56,8 +57,9 @@ export default {
background: #fff;
padding: .185rem .15rem 0;
line-height: .2rem;
.answer-completion{
.default-font{
font-size: .16rem;
line-height: .24rem;
}
}
</style>
......@@ -8,6 +8,7 @@
:value="value"
@input="handleInput"
@change="handleChange"
:disabled="disabled"
>
<span class="p-input__suffix">
<img v-if="showAnswer ===1" src="@/assets/img/practice/input-right.png" alt="">
......@@ -27,6 +28,10 @@ export default {
type:String,
default:''
},
disabled:{
type:Boolean,
default:false
}
},
data(){
return{
......
<template>
<div class="type-single">
<div v-html="dataObj.content"></div>
<div v-html="dataObj.filterContent"></div>
<div class="default-font" v-if="dataObj.content" v-html="dataObj.content"></div>
<div class="default-font" v-else v-html="dataObj.filterContent"></div>
<div class="answer-single">
<div v-for="(item,index) in multipleType" :key="index" :class="item.class">
<div class="option-item" v-if="dataObj[item.name]" :class="{'option-right':(currentStatus[item.name] ==3)||activeName.indexOf(item.value) != -1,
......@@ -159,6 +159,10 @@ export default {
border-radius: .1rem .1rem 0 0 ;
background: #fff;
padding: .185rem .15rem 0;
.default-font{
font-size: .16rem;
line-height: .24rem;
}
.answer-single{
padding-top: .05rem;
}
......
<template>
<div class="type-single">
<div v-if="dataObj.content" v-html="dataObj.content"></div>
<div v-else v-html="dataObj.filterContent"></div>
<div class="default-font" v-if="dataObj.content" v-html="dataObj.content"></div>
<div class="default-font" v-else v-html="dataObj.filterContent"></div>
<div class="answer-single">
<div v-for="(item,index) in singleType" :key="index" :class="item.class">
<div class="option-item" v-if="dataObj[item.name]" :class="{'option-right':(currentStatus[item.name] ==1||currentStatus[item.name] ==3)||activeName ==item.value,
......@@ -149,6 +149,10 @@ export default {
border-radius: .1rem .1rem 0 0 ;
background: #fff;
padding: .185rem .15rem 0;
.default-font{
font-size: .16rem;
line-height: .24rem;
}
.answer-single{
padding-top: .05rem;
}
......
<template>
<div class="type-text">
<div class="answer-cnt" :style="{'paddingBottom':(open ? autoHeight:'.8rem')}" >
<div class="detail-cnt" v-html="dataObj.content"></div>
<div class="default-font" v-html="dataObj.content"></div>
<!-- <video class="video" v-if="dataObj.video" :src="videoUrl(dataObj.video)" controls="controls"
x5-playsinline="" playsinline="true" webkit-playsinline="true" x-webkit-airplay="true"
x5-video-player-type="h5-page" x5-video-player-fullscreen="" x5-video-orientation="portraint"></video> -->
......@@ -11,7 +11,7 @@
</div>
<div class="answer-text" :style="{'height':(open ? autoHeight:'.8rem')}">
<div class="icon-wrap" >
<div class="icon-wrap_inner" @click="open = !open">
<div class="icon-wrap_inner" @click="changeOpen">
<img v-if="open" src="@/assets/img/practice/p-down.png" alt="">
<img v-if="!open" src="@/assets/img/practice/p-up.png" alt="">
</div>
......@@ -60,6 +60,7 @@ export default {
this.slotHeight = this.autoHeigh(3.25)
},
mounted() {
if(!this.dataObj.video) return
getFilePathAPI(this.dataObj.video).then(res=>{
if(res.data.code == 0){
let data = res.data.data
......@@ -74,6 +75,10 @@ export default {
},
watch: {},
methods: {
changeOpen(){
this.open = !this.open
this.scrollTop()
},
scrollTop(){
document.getElementById('case').scrollTop=0
},
......@@ -97,8 +102,9 @@ export default {
.answer-cnt{
padding: 0 .15rem .2rem;
.detail-cnt{
// font-size: .3rem;
.default-font{
font-size: .16rem;
line-height: .24rem;
margin-bottom: .15rem;
}
.video{
......
......@@ -18,6 +18,9 @@ import comFoot from '@/components/Foot';
Vue.component('comFoot',comFoot);
import noBgHeader from '@/components/noBgHeader';
Vue.component('noBgHeader',noBgHeader);
import noneData from '@/components/none';
Vue.component('noneData',noneData);
import VeeValidate,{Validator} from 'vee-validate';
import zh_CN from 'vee-validate/dist/locale/zh_CN';
Validator.localize('zh_CN', zh_CN);
......
......@@ -203,6 +203,14 @@ let router = new Router({
component: () => import('@/views/moonMatch/viewMatch.vue'),
},
{
path: '/userView',
name: 'userView',
meta: {
title: "查看解析"
},
component: () => import('@/views/moonMatch/userView.vue'),
},
{
path: '/viewMatchReport',
name: 'viewMatchReport',
meta: {
......
......@@ -75,7 +75,7 @@
.answerLogs {
width: 3.75rem;
height: 100%;
background: url("./static/img/myAnswerlogs.jpg") no-repeat #f3f3f3;
// background: url("./static/img/myAnswerlogs.jpg") no-repeat #f3f3f3;
background-size: contain;
margin: 0;
padding: 0;
......
......@@ -7,7 +7,7 @@
<h1>{{total}}</h1>
<h2>试题数</h2>
</div>
<div class="allWrong">全部收藏<img src="../../assets/img/my/user_icon_jiantou_black.png" alt=""></div>
<div class="allWrong" @click="toView({code:''})">全部收藏<img src="../../assets/img/my/user_icon_jiantou_black.png" alt=""></div>
</div>
<div class="cont2">
......
......@@ -16,7 +16,7 @@
<ul class="cont2 homePublic">
<li @click="toMoon"><h1><img src="../../assets/img/home/icon_dati.png" alt=""></h1>
<li @click="toWeek"><h1><img src="../../assets/img/home/icon_dati.png" alt=""></h1>
<div class="other">
<h2>在线答题</h2>
<h3>GO<img src="../../assets/img/home/triangle.png" alt=""></h3>
......@@ -54,10 +54,13 @@
},
watch: {},
methods: {
toWeek(){
// Toast.fail('正在开发中');
this.$router.push({name:'weekPractice'})
},
toMoon(){
// Toast.fail('正在开发中');
this.$router.push({name:'moonMatch'})
}
},
}
......
......@@ -10,104 +10,115 @@
<span v-if="item.beginTime">{{item.beginTime}}-{{item.endTime}}</span>
</div>
<div class="item-btn">
<span v-if="item.examStatus === '3'||item.examStatus === '-2'" @click="view(item)">查看解析</span>
<span v-if="item.examStatus === '3'||item.examStatus === '-2'||item.examStatus === '-1'" @click="view(item)">查看解析</span>
<span :class="statusObj[item.examStatus]&&statusObj[item.examStatus].class" @click="linkTo(item)">{{statusObj[item.examStatus].label}}</span>
</div>
</div>
</div>
<list-footer title='这是我的底线'></list-footer>
<div>
<div v-if="list.length == 0">
<none-data></none-data>
</div>
<list-footer title='这是我的底线' v-if="list.length > 5"></list-footer>
</div>
</div>
</div>
</template>
<script>
import topHeader from "@/components/header/topHeader.vue";
import listFooter from '@/components/header/listFooter'
import { getMoonListAPI } from '@/api/moon'
import { Toast } from 'vant';
export default {
name: "moonMatch",
components: {
topHeader,
listFooter
},
data() {
return {
list:[],
listQuery:{
pageNum:1,
pageSize:100,
import topHeader from "@/components/header/topHeader.vue";
import listFooter from '@/components/header/listFooter'
import { getMoonListAPI } from '@/api/moon'
import { Toast } from 'vant';
export default {
name: "moonMatch",
components: {
topHeader,
listFooter
},
data() {
return {
list:[],
listQuery:{
pageNum:1,
pageSize:100,
},
statusObj:{ //答题状态 0未开始 1开始答题 2继续答题 3重新答题 -1已过期(无答题记录) -2(有答题记录)
'0':{
label:'未开始',
class:'no-begin',
},
'1':{
label:'开始答题',
class:'has-begin',
},
'2':{
label:'继续答题',
class:'continue',
},
statusObj:{ //答题状态 0未开始 1开始答题 2继续答题 3重新答题 -1已过期(无答题记录) -2(有答题记录)
'0':{
label:'未开始',
class:'no-begin',
},
'1':{
label:'开始答题',
class:'has-begin',
},
'2':{
label:'继续答题',
class:'continue',
},
'3':{
label:'重新答题',
class:'reset-begin',
},
'-1':{
label:'已过期',
class:'expired',
},
'-2':{
label:'已过期',
class:'expired',
},
'3':{
label:'重新答题',
class:'reset-begin',
},
'-1':{
label:'已过期',
class:'expired',
},
'-2':{
label:'已过期',
class:'expired',
},
},
toastPage:null,
};
},
created() {
this.getList()
},
watch: {},
methods: {
getList(){
this.toastPage = Toast.loading({
message: '加载中...',
forbidClick: true,
loadingType: 'spinner',
duration: 0
});
getMoonListAPI(this.listQuery).then(res=>{
this.toastPage.clear()
if(res.data.code == 0){
this.list = res.data.data.list
}
};
})
},
created() {
this.getList()
view(item){
this.$router.push({name:'viewMatch',query:{id:item.id, type:'match'}})
},
watch: {},
methods: {
getList(){
getMoonListAPI(this.listQuery).then(res=>{
console.log(res.data.data,22);
if(res.data.code == 0){
this.list = res.data.data.list
}
})
},
view(item){
this.$router.push({name:'viewMatch',query:{id:item.id, type:'match'}})
},
linkTo(item){
//答题状态 0未开始 1开始答题 2继续答题 3重新答题 -1已过期(无答题记录) -2(有答题记录)
let begin = ()=>{
this.$router.push({name:'match',query:{id:item.id, title:item.name}})
}
let conti = ()=>{
this.$router.push({name:'match',query:{id:item.id, title:item.name,type:'continue'}})
}
let again = ()=>{
this.$router.push({name:'match',query:{id:item.id, title:item.name}})
}
let status = {
'0':()=> false,
'1':begin,
'2':conti,
'3':again,
'-1':()=> false,
'-2':()=> false,
}
status[item.examStatus]()
// Toast.fail('功能开发中')
// this.$router.push({name:'match',query:{id:item.id, title:item.name}})
linkTo(item){
//答题状态 0未开始 1开始答题 2继续答题 3重新答题 -1已过期(无答题记录) -2(有答题记录)
let begin = ()=>{
this.$router.push({name:'match',query:{id:item.id, title:item.name}})
}
let conti = ()=>{
this.$router.push({name:'match',query:{id:item.id, title:item.name,type:'continue'}})
}
let again = ()=>{
this.$router.push({name:'match',query:{id:item.id, title:item.name}})
}
let status = {
'0':()=> false,
'1':begin,
'2':conti,
'3':again,
'-1':()=> false,
'-2':()=> false,
}
status[item.examStatus]()
// Toast.fail('功能开发中')
// this.$router.push({name:'match',query:{id:item.id, title:item.name}})
}
};
}
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
......
......@@ -13,13 +13,13 @@
<img src="@/assets/img/practice/prev-ques.png" alt="">
<span>上一题</span>
</div>
<div class="right-item" @click="openPost">
<div class="right-item" @click="openPost" v-if="list.length > 0">
<img src="@/assets/img/practice/post-paper.png" alt="">
<span>交卷</span>
</div>
</div>
</topHeader>
<div class="practice-item">
<div class="practice-item" v-if="list.length > 0">
<p-title :title='typeObj[currentObj.questionType]' :current-index="currentIndex+1" :all-num="list.length"></p-title>
<div v-if="qusType([1,2,3,4],currentObj.questionType)">
<component :ref="refObj[currentObj.questionType]" :is="componentName" :data-obj="currentObj" :current-Status="currentStatus" @changeSelect="changeSelect" :show-button="showButton" @input="completionChange"></component>
......@@ -30,7 +30,7 @@
<div v-if="qusType([5,6],currentObj.questionType)">
<child-title :title='typeObj[currentChildrenObj.questionType]' :current-index="currentChildrenIndex+1" :all-num="childrenList.length"></child-title>
<component :ref="refChildrenObj[currentChildrenObj.questionType]" :is="componentName" :data-obj="currentChildrenObj" :current-Status="currentStatus" @changeSelect="changeSelect" :show-button="showButton" @input="completionChange"></component>
<div>
<div style="minHeight:.05rem;">
<div style="display:flex">
<p-button name="上一题" @click="childrenPrevQuestion" class-type="prev" v-if="currentChildrenIndex != 0"></p-button>
<p-button name="下一题" @click="childrenNextQuestion" v-if="!(currentIndex === list.length -1&&currentChildrenIndex === childrenList.length - 1)"></p-button>
......@@ -42,11 +42,14 @@
</text-case>
</div>
</div>
<div v-if="qusType([1,2,3,4],currentObj.questionType)">
<div style="display:flex">
<div v-if="qusType([1,2,3,4],currentObj.questionType)" style="minHeight:.05rem;">
<div style="display:flex" >
<p-button name="下一题" @click="nextQuestion" v-if="currentIndex+1 != list.length"></p-button>
</div>
</div>
<div v-if="list.length == 0">
<none-data></none-data>
</div>
<p-dialog :isShow="isShow">
......@@ -102,7 +105,7 @@ import completion from "@/components/practice/completion.vue"; // 填空
import textCase from "@/components/practice/textCase.vue"; // 填空
import { getTimer } from "@/utils/function.js"
import { getMatchDetailAPI, createPaperAPI,createRecordAPI, getPaperStatusAPI,getMatchConDetailAPI } from '@/api/moon'
import { Toast } from 'vant';
export default {
beforeRouteLeave (to, from, next) {
if (this.backStatus) {
......@@ -146,7 +149,7 @@ export default {
list:[],
listQuery:{
id:1,
type:0, //1 周周练 2 月月赛
// type:0, //1 周周练 0 月月赛
},
conQuery:{
coverId:null
......@@ -224,6 +227,7 @@ export default {
'4':completion
},
componentName:'',
toastPage:null,
};
},
async created() {
......@@ -295,6 +299,12 @@ export default {
})
},
getDetail(status,time){
this.toastPage = Toast.loading({
message: '加载中...',
forbidClick: true,
loadingType: 'spinner',
duration: 0
});
let API
if(status){
API = getMatchConDetailAPI(this.conQuery)
......@@ -302,9 +312,11 @@ export default {
API = getMatchDetailAPI(this.listQuery)
}
API.then(res=>{
this.toastPage.clear()
if(res.data.code == 0){
if(res.data.data.length === 0) return
this.list = res.data.data
if(this.list.length == 0) return
this.answerRecordList = new Array(this.list.length)
if(status){ // true 继续答题 false 开始或者重新答题
......@@ -363,13 +375,21 @@ export default {
// 根据题目类型来确定渲染内容
_showDetail(startIndex){ // startIndex 0 代表大题,1代表小题
let currentObj = this.currentObj
if(currentObj.questionType === 5||currentObj.questionType === 6){
console.log(this.currentObj,4556);
let list = this.childrenList = this.currentObj.children
let index = startIndex === 0 ? 0 : list.length - 1
this.currentChildrenIndex = index
console.log(this.childrenList,11,index);
this.currentChildrenObj = this.childrenList[index]
this._showCom(this.currentChildrenObj)
console.log(this.currentChildrenObj,333);
this.changeAns('refChildrenObj',this.currentChildrenObj,'_getUserChildAnswer')
}else{
this._showCom(currentObj)
......
差异被折叠。
<template>
<!--在线练习-->
<div class="practice">
<topHeader @back="backTo"><template v-slot:title></template></topHeader>
<topHeader :header-title="topTitle" @back="backTo">
<template>
<div v-if="iconType === 'col'">
<img src="@/assets/img/practice/has-collection.png" alt="" v-if="collectionStatus" @click="changeCol(false)">
<img src="@/assets/img/practice/no-collection.png" alt="" v-if="!collectionStatus" @click="changeCol(true)">
</div>
<div v-if="iconType === 'delCol'||iconType === 'delWrong'">
<img src="@/assets/img/practice/delete-icon.png" alt="" @click="changeDel">
</div>
</template>
</topHeader>
<!-- 试题 单选 多选 填空 判断 -->
<div class="practice-item">
<div class="practice-item" v-if="list.length > 0">
<p-title :title='typeObj[currentObj.questionType]' :current-index="currentIndex+1" :all-num="list.length"></p-title>
<div v-if="qusType([1,2,3,4],currentObj.questionType)">
<component :ref="refObj[currentObj.questionType]" :is="componentName" :data-obj="currentObj" :current-Status="currentStatus" @changeSelect="changeSelect" :show-button="showButton" @input="completionChange"></component>
......@@ -14,7 +24,7 @@
<div v-if="qusType([5,6],currentObj.questionType)">
<child-title :title='typeObj[currentChildrenObj.questionType]' :current-index="currentChildrenIndex+1" :all-num="childrenList.length"></child-title>
<component :ref="refChildrenObj[currentChildrenObj.questionType]" :is="componentName" :data-obj="currentChildrenObj" :current-Status="currentStatus" @changeSelect="changeSelect" :show-button="showButton" @input="completionChange"></component>
<div>
<div style="minHeight:.05rem;">
<div style="display:flex">
<p-button name="上一题" @click="childrenPrevQuestion" class-type="prev"></p-button>
<p-button name="下一题" @click="childrenNextQuestion" v-if="!(currentIndex === list.length -1&&currentChildrenIndex === childrenList.length - 1)"></p-button>
......@@ -27,8 +37,11 @@
</text-case>
</div>
</div>
<div v-if="list.length == 0">
<none-data></none-data>
</div>
<!-- 切换题目 -->
<div v-if="qusType([1,2,3,4],currentObj.questionType)">
<div v-if="qusType([1,2,3,4],currentObj.questionType)" style="minHeight:.05rem;">
<div style="display:flex">
<p-button name="上一题" @click="preQuestion" v-if="currentIndex>0" class-type="prev"></p-button>
<p-button name="下一题" @click="nextQuestion" v-if="currentIndex+1 != list.length"></p-button>
......@@ -39,6 +52,7 @@
<div v-if="(qusType([1,2,3,4],currentObj.questionType))">
<right-answer :analysis='currentObj.analysis' :answer="currentObj.rightanswer" :show-ans="true" :ans-status="ansStatus"></right-answer>
</div>
</div>
</template>
......@@ -52,8 +66,9 @@ import single from "@/components/practice/single.vue"; // 单选
import pMultiple from "@/components/practice/pMultiple.vue"; // 多选
import completion from "@/components/practice/completion.vue"; // 填空
import textCase from "@/components/practice/textCase.vue"; // 视频案例 文字案例
import { getMatchViewAPI } from '@/api/moon'
import {getWeekDetailAPI, getCollDetailAPI} from '@/api/detail';
import { getMatchViewAPI, getColStatusAPI,addCollectionAPI,delCollectionAPI } from '@/api/moon'
import {getWeekDetailAPI, getCollDetailAPI,delColAPI,delWrongAPI} from '@/api/detail';
import { Toast } from 'vant';
export default {
name: "viewMatch",
components: {
......@@ -126,18 +141,24 @@ export default {
'match':{ // 月月赛
routerName:'moonMatch',
'API':getMatchViewAPI,
query:'listQuery'
query:'listQuery',
title:'',
iconType:'col'
},
'wrong':{ // 错题
routerName:'myWrongbook',
'API':getWeekDetailAPI,
query:'wrongQuery'
query:'wrongQuery',
title:'我的错题',
iconType:'delWrong'
},
'coll':{ // 收藏
routerName:'myCollection',
'API':getCollDetailAPI,
query:'collQuery'
}
query:'collQuery',
title:'我的收藏',
iconType:'delCol'
},
},
scoreObj: [ // 优化计算答案权重
{
......@@ -172,11 +193,19 @@ export default {
'4':completion
},
componentName:'',
toastPage:null,
topTitle:'', // 头部标题
iconType:'', // 头部图标类型
colQuery:{
goodsId:null,
goodsType:4,
},
collectionStatus:false,
};
},
created() {
let query = this.$route.query
if(query&&query.id){
if(query&&query.type){
this.id = query.id
this.listQuery.coverId = this.id
this.wrongQuery.code = this.id
......@@ -203,16 +232,26 @@ export default {
},
// 获取题目详情
getDetail(type){
this.toastPage = Toast.loading({
message: '加载中...',
forbidClick: true,
loadingType: 'spinner',
duration: 0
});
this.topTitle = this.viewType[type].title
this.iconType = this.viewType[type].iconType
let API = this.viewType[type]['API'](this[this.viewType[type].query])
API.then(res=>{
if(res.data.code == 0){
this.toastPage.clear()
if(res.data.data.length === 0) return
this.list = res.data.data
this.currentIndex = 0 // 当前选中索引值
this.currentObj = this.list[0] // 当前选中题目
this._showDetail(0)
}else{
}else{
this.toastPage.clear()
}
})
},
......@@ -231,6 +270,8 @@ export default {
this._showCom(currentObj)
this.changeScore(currentObj,this.refObj)
}
this.colQuery.goodsId = this.currentObj.questionid
this.getColStatus()
},
// 动态渲染组件
_showCom(currentObj){
......@@ -282,6 +323,7 @@ export default {
this.currentStatus[answer] = num
},
// 过滤答案
_filterAnswer(userAns,rightAns){
let status = true
rightAns = rightAns.replace(/,/g,'').split('')
......@@ -302,7 +344,7 @@ export default {
completionChange(value){
this.userAns = value
},
// 获取用户填写答案
_getUserAnswer(index){
let obj = this.answerRecordList[index]
return (obj&&obj.answer)||''
......@@ -358,6 +400,69 @@ export default {
this.nextQues()
}
},
changeDel(){
let API
if(this.iconType === 'delCol'){
let data = {
goodsId:this.currentObj.id,
goodsType:4
}
API = delColAPI(data)
}
if(this.iconType === 'delWrong'){
let data = {
'ids':[this.currentObj.id]
}
API = delWrongAPI(data)
}
API.then(res=>{
if(res.data.code == 0){
if(res.data.data == 1){
if(this.list.length > 1&&this.currentIndex + 1 < this.list.length){ // 当索引值比数组长
this.delData()
this.currentObj = this.list[this.currentIndex]
this._showDetail(0)
}else if(this.list.length == 1){ // 数组长度为1
this.delData()
this.backTo()
}else{ // 当索引值超过数组长度
this.delData()
this.currentIndex -= 1
this.currentObj = this.list[this.currentIndex]
this._showDetail(0)
}
}
}
})
console.log(this.currentIndex,this.currentObj,'当前对象');
},
delData(){
this.list.splice(this.currentIndex,1)
},
changeCol(status){
let addData = {
objectId:this.currentObj.questionid,
objectType:'试题'
}
let delData={
goodsId:this.currentObj.questionid,
objectType:'4'
}
let API = status ? addCollectionAPI(addData) : delCollectionAPI(delData)
API.then(res=>{
if(res.data.code == 0){
Toast.success(`${!status?'取消收藏':'收藏成功'}`);
this.getColStatus()
}
})
},
getColStatus(){
getColStatusAPI(this.colQuery).then(res=>{
if(res.data.code == 0){
this.collectionStatus = res.data.data
}
})
},
}
};
</script>
......
......@@ -13,7 +13,6 @@
import 'xgplayer'
/*import HlsJsPlayer from 'xgplayer-hls.js';*/
import HlsJsPlayer from 'xgplayer-hls.js';
import { playerConfig } from '../../components/CourseVideo/xiguaConfig';
import { Toast,Icon } from 'vant';
import { getCollectioncheckAPI,addCollectionAPI,delCollectionAPI,getFilePathAPI} from '@/api/xywApi';
import {getVideo} from '../../utils/global';
......@@ -22,7 +21,6 @@
data() {
return {
isColl:false,
playerConfig: playerConfig,// 西瓜视频的相关配置
player:null,
}
},
......
......@@ -16,7 +16,12 @@
</div>
</div>
</div>
<list-footer title='这是我的底线'></list-footer>
<div>
<div v-if="list.length == 0">
<none-data></none-data>
</div>
<list-footer title='这是我的底线' v-if="list.length > 5"></list-footer>
</div>
</div>
</div>
</template>
......@@ -24,7 +29,7 @@
<script>
import topHeader from "@/components/header/topHeader.vue";
import listFooter from '@/components/header/listFooter'
import { Toast } from 'vant';
import { getWeekListAPI } from '@/api/week'
export default {
name: "weekPractice",
......@@ -38,8 +43,8 @@ export default {
listQuery:{
pageNum:1,
pageSize:100,
}
},
toastPage:null,
};
},
created() {
......@@ -48,7 +53,14 @@ export default {
watch: {},
methods: {
getList(){
this.toastPage = Toast.loading({
message: '加载中...',
forbidClick: true,
loadingType: 'spinner',
duration: 0
});
getWeekListAPI(this.listQuery).then(res=>{
this.toastPage.clear()
if(res.data.code == 0){
this.list = res.data.data.map
}
......
......@@ -2,12 +2,12 @@
<!--在线练习-->
<div class="practice">
<topHeader :header-title="topTitle" @back="$router.push({name:'weekPractice'})">
<template>
<template v-if="list.length > 0">
<img src="@/assets/img/practice/has-collection.png" alt="" v-if="collectionStatus" @click="changeCol(false)">
<img src="@/assets/img/practice/no-collection.png" alt="" v-if="!collectionStatus" @click="changeCol(true)">
</template>
</topHeader>
<div class="practice-item">
<div class="practice-item" v-if="list.length > 0">
<p-title :title='typeObj[currentObj.questionType]' :current-index="currentIndex" :all-num="list.length"></p-title>
<!-- 单选 -->
<div v-if="currentObj.questionType === 1">
......@@ -66,7 +66,10 @@
<div v-if="showAnswer&&(currentObj.questionType === 1||currentObj.questionType ===2|| currentObj.questionType===3||currentObj.questionType ===4)">
<right-answer :analysis='currentObj.analysis' :answer="currentObj.rightanswer"></right-answer>
</div>
<div v-if="list.length == 0">
<none-data></none-data>
</div>
<p-dialog :isShow="isShow">
<template>
......@@ -223,7 +226,8 @@ export default {
name:'answer6',
value:'F'
}
]
],
toastPage:null,
};
},
created() {
......@@ -243,7 +247,14 @@ export default {
this.$router.push({name:'weekPractice'})
},
getDetail(){
this.toastPage = Toast.loading({
message: '加载中...',
forbidClick: true,
loadingType: 'spinner',
duration: 0
});
getWeekDetailAPI(this.listQuery).then(res=>{
this.toastPage.clear()
if(res.data.code == 0){
this.list = res.data.data
if(this.list.length === 0) return
......@@ -465,14 +476,7 @@ export default {
this.getColStatus()
}
})
},
getColStatus(){
getColStatusAPI(this.colQuery).then(res=>{
if(res.data.code == 0){
this.collectionStatus = res.data.data
}
})
},
}
}
}
</script>
......
......@@ -7,7 +7,7 @@
<h1>{{total}}</h1>
<h2>错题数</h2>
</div>
<div class="allWrong">全部错题 <img src="../../assets/img/my/user_icon_jiantou_black.png" alt=""></div>
<div class="allWrong" @click="toView({code:''})">全部错题 <img src="../../assets/img/my/user_icon_jiantou_black.png" alt=""></div>
</div>
<div class="cont2">
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
差异被折叠。
Copyright (c) 2017 Dailymotion (http://www.dailymotion.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
src/remux/mp4-generator.js and src/demux/exp-golomb.js implementation in this project
are derived from the HLS library for video.js (https://github.com/videojs/videojs-contrib-hls)
That work is also covered by the Apache 2 License, following copyright:
Copyright (c) 2013-2015 Brightcove
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="utf-8"?>
<language>
<adCountdown>[$second]</adCountdown><!--广告播放结束倒计时-->
<skipDelay>[$second]</skipDelay>
<buttonOver>
<play>点击播放</play>
<pause>暂停播放</pause>
<mute>静音</mute>
<escMute>恢复音量</escMute>
<full>全屏</full>
<escFull>退出全屏</escFull>
<previousPage>上一集</previousPage>
<nextPage>下一集</nextPage>
<definition>点击选择清晰度</definition>
<subtitle>选择字幕</subtitle>
</buttonOver>
<volumeSliderOver>
音量:[$volume]%
</volumeSliderOver>
<buffer>[$percentage]%</buffer>
<timeSliderOver><!--鼠标经过进度条显示的时间格式-->
[$timeh]:[$timei]:[$times]
</timeSliderOver>
<liveAndVod>
[$timeh]:[$timei]:[$times]
</liveAndVod>
<live>
直播中 [$liveTimeY]-[$liveTimem]-[$liveTimed] [$liveTimeh]:[$liveTimei]:[$liveTimes]
</live>
<m3u8Definition>
<name>流畅</name>
<name>低清</name>
<name>标清</name>
<name>高清</name>
<name>超清</name>
<name>蓝光</name>
<name>未知</name>
</m3u8Definition>
<error>
<cannotFindUrl>视频地址不存在</cannotFindUrl>
<streamNotFound>加载失败</streamNotFound>
<formatError>视频格式错误</formatError>
</error>
<definition>自动</definition>
<subtitle>默认</subtitle>
</language>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论