mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 12:26:44 +08:00
提交scorm的修改
This commit is contained in:
@@ -47,7 +47,7 @@ const formRequest=axios.create({
|
|||||||
Promise.reject(error)
|
Promise.reject(error)
|
||||||
});
|
});
|
||||||
formRequest.interceptors.response.use(res => {
|
formRequest.interceptors.response.use(res => {
|
||||||
console.log(res);
|
//console.log(res);
|
||||||
const code = res.data.status || 200;
|
const code = res.data.status || 200;
|
||||||
if(code===200){
|
if(code===200){
|
||||||
return res.data
|
return res.data
|
||||||
|
|||||||
@@ -79,6 +79,10 @@ export default {
|
|||||||
type: Number,
|
type: Number,
|
||||||
default: 1024,
|
default: 1024,
|
||||||
},
|
},
|
||||||
|
scorm:{
|
||||||
|
type:String,
|
||||||
|
default:''
|
||||||
|
},
|
||||||
// 文件类型, 例如['png', 'jpg', 'jpeg']
|
// 文件类型, 例如['png', 'jpg', 'jpeg']
|
||||||
fileType: {
|
fileType: {
|
||||||
type: Array,
|
type: Array,
|
||||||
@@ -156,6 +160,13 @@ export default {
|
|||||||
//this.$message.error(`文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`);
|
//this.$message.error(`文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//console.log(this.scorm,fileExtension,'upload');
|
||||||
|
if(this.scorm && this.scorm==fileExtension){
|
||||||
|
this.data.dir="scorm";
|
||||||
|
}
|
||||||
|
//console.log(this.data,'this.data');
|
||||||
|
|
||||||
}
|
}
|
||||||
// 校检文件大小
|
// 校检文件大小
|
||||||
if (this.fileSize) {
|
if (this.fileSize) {
|
||||||
@@ -166,6 +177,7 @@ export default {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.loading) {
|
if(this.loading) {
|
||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -146,7 +146,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- <div style="margin-top: 10px" v-if="isUpload"><el-button type="primary" size="mini" @click="isUploadHandle()">选择文件并上传</el-button></div> -->
|
<!-- <div style="margin-top: 10px" v-if="isUpload"><el-button type="primary" size="mini" @click="isUploadHandle()">选择文件并上传</el-button></div> -->
|
||||||
<div style="margin-top: 10px">
|
<div style="margin-top: 10px">
|
||||||
<file-upload dir="files" :beforeMsg="needOrg" :showList="true" :value="imageShowUrl" :limit="5" @success="handleUploadSuccess" @remove="handleRemoveSuccess"></file-upload>
|
<file-upload scorm="zip" dir="files" :beforeMsg="needOrg" :showList="true" :value="imageShowUrl" :limit="5" @success="handleUploadSuccess" @remove="handleRemoveSuccess"></file-upload>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 10px">
|
<div style="margin-top: 10px">
|
||||||
@@ -687,9 +687,10 @@ export default {
|
|||||||
//console.log(scorm,'scorm')
|
//console.log(scorm,'scorm')
|
||||||
if(scorm.index){
|
if(scorm.index){
|
||||||
//这里需要提取的到配置文件中,实际中只需要传 rowId就可以了
|
//这里需要提取的到配置文件中,实际中只需要传 rowId就可以了
|
||||||
this.scormUrl='http://localhost:9083/scorm-player?scormId='+row.id;//播放的首页
|
this.scormUrl='http://localhost:9083/scorm-player?mode=preview&courseId='+row.courseId+'scormId='+row.id+'&sco='+scorm.index;//播放的首页
|
||||||
}else{
|
}else{
|
||||||
this.scormUrl='http://localhost:9083/scorm-player?scormId='+row.id;//播放的首页
|
//这种情况代表无播放页
|
||||||
|
//this.scormUrl='http://localhost:9083/scorm-player?scormId='+row.id;//播放的首页
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user