mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-07 01:46:42 +08:00
Compare commits
26 Commits
20250421_h
...
zcwy_0806_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
de88a75aaa | ||
|
|
b6bc60d8b9 | ||
|
|
22668d756f | ||
|
|
041643a135 | ||
|
|
885c7f9242 | ||
|
|
3d4d3f4d25 | ||
|
|
b386681aab | ||
|
|
4649580e6a | ||
|
|
9eaf352cc3 | ||
|
|
fd73a396d5 | ||
|
|
ab39bb3cf5 | ||
|
|
6ab1d86c53 | ||
|
|
5ef39ae9dc | ||
|
|
45fb650b1b | ||
|
|
3aa2229dbd | ||
|
|
0ebbb0399f | ||
|
|
14a94d1fb1 | ||
|
|
dc01a523f7 | ||
|
|
daf6d5fa23 | ||
|
|
32c43ada27 | ||
|
|
b80690d07d | ||
|
|
5321716653 | ||
|
|
8d4a6800d8 | ||
|
|
7ceb605844 | ||
|
|
26f2d3f9d3 | ||
|
|
f193857ec7 |
@@ -3,6 +3,7 @@
|
||||
* 下载课件,一期是直接在新的窗口打开文件的地址就可以了。不采用流的方式下载
|
||||
*/
|
||||
import ajax from '@/utils/xajax.js'
|
||||
import ajax2 from '@/utils/xajax2.js'
|
||||
|
||||
/**
|
||||
* 分页查询,课件的管理列表
|
||||
@@ -49,6 +50,9 @@ const findList = function(data) {
|
||||
const saveUpload = function(data) {
|
||||
return ajax.post('/xboe/m/course/file/upload/save', data);
|
||||
}
|
||||
const saveUpload2 = function(data) {
|
||||
return ajax2.post('/xboe/m/course/file/upload/save', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量更新,上传时,一个一个上传,下面的列表的保存,使用此方法
|
||||
@@ -85,6 +89,7 @@ const detail = function(id) {
|
||||
export default {
|
||||
pageList,
|
||||
saveUpload,
|
||||
saveUpload2,
|
||||
batchUpdate,
|
||||
detail,
|
||||
delFile
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
:show-file-list="showList"
|
||||
:data="data"
|
||||
:headers="headers"
|
||||
:on-remove="handleRemove"
|
||||
class="upload-file-uploader"
|
||||
ref="upload"
|
||||
>
|
||||
@@ -142,6 +143,9 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
handleRemove(file, fileList){
|
||||
this.$emit('isTrue',false)
|
||||
},
|
||||
// 上传前校检格式和大小
|
||||
handleBeforeUpload(file) {
|
||||
if(this.beforeMsg){
|
||||
@@ -186,6 +190,8 @@ export default {
|
||||
if(this.loading) {
|
||||
this.isLoading = true;
|
||||
}
|
||||
this.$emit('isTrue',true)
|
||||
this.$emit('isFalse',true)
|
||||
return true;
|
||||
},
|
||||
// 文件个数超出
|
||||
@@ -195,6 +201,7 @@ export default {
|
||||
// 上传失败
|
||||
handleUploadError(err) {
|
||||
this.isLoading = false;
|
||||
this.$emit('isTrue',false)
|
||||
this.$message({message:"上传失败, 请重试",type:'error',offset:100});
|
||||
},
|
||||
// 上传成功回调
|
||||
|
||||
@@ -356,6 +356,17 @@ export default {
|
||||
this.isCursorStatic = false;
|
||||
this.timeoutControlsHint = 2000;
|
||||
});
|
||||
this.videoDom.addEventListener('loadstart', function(){
|
||||
console.log('\x1b[34m%s\x1b[0m','*****************视频加载中**************')
|
||||
})
|
||||
|
||||
this.videoDom.addEventListener('loadeddata', function(){
|
||||
console.log('\x1b[32m%s\x1b[0m','*****************加载完毕*************')
|
||||
})
|
||||
|
||||
this.videoDom.addEventListener('error', function(){
|
||||
console.log('\x1b[31m%s\x1b[0m','*****************加载失败**********')
|
||||
})
|
||||
// 监听全屏事件的变化,保存数据
|
||||
window.addEventListener("fullscreenchange", () => {
|
||||
this.isFullscreen = this.isFullScreen();
|
||||
|
||||
@@ -423,6 +423,7 @@ export function translate(field) {
|
||||
let name = '';
|
||||
switch (field) {
|
||||
case 'total':name = '累计'; break;
|
||||
case 'now':name = '当前'; break;
|
||||
case 'weeks':name = '本周'; break;
|
||||
case 'months':name = '本月'; break;
|
||||
case 'years':name = '本年'; break;
|
||||
|
||||
233
src/utils/xajax2.js
Normal file
233
src/utils/xajax2.js
Normal file
@@ -0,0 +1,233 @@
|
||||
import axios from 'axios'
|
||||
import qs from 'qs'
|
||||
import { Notification, MessageBox, Message } from 'element-ui'
|
||||
import store from '@/store'
|
||||
import { getToken } from '@/utils/token'
|
||||
import errorCode from '@/utils/errorCode'
|
||||
/**
|
||||
*request请求 axios.request(config)
|
||||
*requestJson请求 axios.request(config)
|
||||
*get请求 axios.get(url[, config])
|
||||
*post请求 axios.post(url[, data[, config]])
|
||||
*postJson请求 axios.post(url[, data[, config]])
|
||||
*put请求 axios.put(url[, data[, config]])
|
||||
*putJson请求 axios.put(url[, data[, config]])
|
||||
*patch请求 axios.patch(url[, data[, config]])
|
||||
*patchJson请求 axios.patch(url[, data[, config]])
|
||||
*delete请求 axios.delete(url[, config])
|
||||
*/
|
||||
|
||||
//const ReLoginUrl="/login";
|
||||
|
||||
const ReLoginUrl=process.env.VUE_APP_LOGIN_URL;
|
||||
|
||||
const TokenName='XBOE-Access-Token';
|
||||
/**axios.defaults.headers['Content-Type'] = 'application/x-www-form-urlencoded'**/
|
||||
//只是用于发送json对象数据时使用post,put,patch
|
||||
const jsonRequest=axios.create({
|
||||
headers:{'Content-Type':'application/json;charset=utf-8'},
|
||||
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
||||
baseURL: process.env.VUE_APP_BASE_API,
|
||||
//超时
|
||||
timeout: 60000,
|
||||
});
|
||||
//发送json对象的拦截器
|
||||
jsonRequest.interceptors.request.use(config => {
|
||||
//是否需要设置 token
|
||||
const isToken = (config.headers || {}).isToken === false
|
||||
if (getToken() && !isToken) {
|
||||
config.headers[TokenName] = getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
|
||||
}
|
||||
return config
|
||||
}, error => {
|
||||
console.log(error)
|
||||
Promise.reject(error)
|
||||
})
|
||||
|
||||
// 响应拦截器
|
||||
jsonRequest.interceptors.response.use(res => {
|
||||
|
||||
const code = res.data.status || 200;
|
||||
if(code===200){
|
||||
return res.data
|
||||
}else{
|
||||
if(code == 6001){ //针对于老系统的处理
|
||||
store.dispatch('LogOut').then(() => {
|
||||
location.href = ReLoginUrl;
|
||||
})
|
||||
}else if(code === 401){
|
||||
store.dispatch('LogOut').then(() => {
|
||||
location.href = ReLoginUrl;
|
||||
})
|
||||
}else if(code === 402){
|
||||
store.dispatch('LogOut').then(() => {
|
||||
location.href = ReLoginUrl;
|
||||
})
|
||||
}else if(code===403){
|
||||
var msg='当前操作没有权限';
|
||||
Message({message: msg, type: 'error'});
|
||||
return Promise.reject(new Error(msg))
|
||||
//return res.data;
|
||||
}else if(code===302){
|
||||
location.href = ReLoginUrl;
|
||||
}else{
|
||||
//Message({message: res.data.message, type: 'error'});
|
||||
//console.log('err:' + res.data.error);
|
||||
//return Promise.reject(new Error(res.data.message))
|
||||
return res.data;
|
||||
}
|
||||
}
|
||||
},
|
||||
error => {
|
||||
console.log('err' + error)
|
||||
let { message } = error;
|
||||
if (message == "Network Error") {
|
||||
message = "网络异常,请稍后重试";
|
||||
}
|
||||
else if (message.includes("timeout")) {
|
||||
message = "系统接口请求超时";
|
||||
//location.href = this.webBaseUrl + ReLoginUrl;
|
||||
}
|
||||
else if (message.includes("Request failed with status code")) {
|
||||
message = "系统接口" + message.substr(message.length - 3) + "异常";
|
||||
}
|
||||
Message({
|
||||
message: message,
|
||||
type: 'error',
|
||||
duration: 5 * 1000
|
||||
})
|
||||
return Promise.reject(error)
|
||||
}
|
||||
)
|
||||
|
||||
//用于普通的发送请求
|
||||
const formRequest=axios.create({
|
||||
headers:{'Content-Type':'application/x-www-form-urlencoded'},
|
||||
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
||||
baseURL: process.env.VUE_APP_BASE_API,
|
||||
//超时
|
||||
timeout: 10000,
|
||||
})
|
||||
//发送json对象的拦截器
|
||||
formRequest.interceptors.request.use(config => {
|
||||
//是否需要设置 token
|
||||
const isToken = (config.headers || {}).isToken === false
|
||||
if (getToken() && !isToken) {
|
||||
config.headers[TokenName] = getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
|
||||
}
|
||||
return config
|
||||
}, error => {
|
||||
console.log(error)
|
||||
Promise.reject(error)
|
||||
});
|
||||
formRequest.interceptors.response.use(res => {
|
||||
const code = res.data.status || 200;
|
||||
if(code===200){
|
||||
return res.data
|
||||
}else{
|
||||
if(code == 6001){ //针对于老系统的处理,因为老系统是字符串,所以这里不使用三等于号
|
||||
store.dispatch('LogOut').then(() => {
|
||||
location.href = ReLoginUrl;
|
||||
})
|
||||
}else if(code === 401){
|
||||
store.dispatch('LogOut').then(() => {
|
||||
location.href = ReLoginUrl;
|
||||
})
|
||||
}else if(code === 402){
|
||||
store.dispatch('LogOut').then(() => {
|
||||
location.href = ReLoginUrl;
|
||||
})
|
||||
}else if(code===403){
|
||||
var msg='当前操作没有权限';
|
||||
Message({message: msg, type: 'error'});
|
||||
return Promise.reject(new Error(msg))
|
||||
}else if(code===302){
|
||||
location.href = ReLoginUrl;
|
||||
}else{
|
||||
//Message({message: res.data.message, type: 'error'});
|
||||
//console.log('err' + res.data.error);
|
||||
//return Promise.reject(new Error(res.data.message))
|
||||
return res.data;//返回给用户做业务处理
|
||||
}
|
||||
}
|
||||
},
|
||||
error => {
|
||||
console.log('err' + error)
|
||||
let { message } = error;
|
||||
if (message == "Network Error") {
|
||||
message = "网络异常,请稍后重试";
|
||||
}
|
||||
else if (message.includes("timeout")) {
|
||||
message = "接口超时,请检查是否上传成功";
|
||||
//location.href = this.webBaseUrl + ReLoginUrl;
|
||||
}
|
||||
else if (message.includes("Request failed with status code")) {
|
||||
message = "系统接口" + message.substr(message.length - 3) + "异常";
|
||||
}
|
||||
Message({
|
||||
message: message,
|
||||
type: 'error',
|
||||
duration: 5 * 1000
|
||||
})
|
||||
return Promise.reject(error)
|
||||
}
|
||||
)
|
||||
|
||||
//request请求
|
||||
const request=function(cfg){
|
||||
if(cfg.data){
|
||||
cfg.data=qs.stringify(cfg.data);
|
||||
}
|
||||
};
|
||||
//requestJson请求
|
||||
const requestJson=jsonRequest.request;
|
||||
//get请求
|
||||
const get=formRequest.request;
|
||||
//post请求
|
||||
const post=function(url,data,config){
|
||||
if(data){
|
||||
data=qs.stringify(data);
|
||||
}
|
||||
return formRequest.post(url,data,config);
|
||||
}
|
||||
//post请求
|
||||
const postForm=function(url,data,config){
|
||||
return formRequest.post(url,data,config);
|
||||
}
|
||||
//postJson请求
|
||||
const postJson=jsonRequest.post;
|
||||
//put请求
|
||||
const put=function(url,data,config){
|
||||
if(data){
|
||||
data=qs.stringify(data);
|
||||
}
|
||||
return formRequest.put(url,data,config);
|
||||
}
|
||||
//putJson请求
|
||||
const putJson=jsonRequest.put;
|
||||
//patch请求
|
||||
const patch=function(url,data,config){
|
||||
if(data){
|
||||
data=qs.stringify(data);
|
||||
}
|
||||
return formRequest.patch(url,data,config);
|
||||
}
|
||||
//patchJson请求
|
||||
const patchJson=jsonRequest.patch;
|
||||
//delete请求
|
||||
const del=formRequest.delete;
|
||||
|
||||
|
||||
export default {
|
||||
request,
|
||||
requestJson,
|
||||
get,
|
||||
post,
|
||||
postJson,
|
||||
put,
|
||||
putJson,
|
||||
patch,
|
||||
patchJson,
|
||||
del,
|
||||
postForm
|
||||
}
|
||||
@@ -149,7 +149,7 @@
|
||||
<el-checkbox v-model="deviceMobile" @change="isVisible(1)" label="移动端可见" border></el-checkbox>
|
||||
<el-checkbox v-model="devicePc" @change="isVisible(2)" label="pc端可见" border></el-checkbox>
|
||||
</div>
|
||||
<file-upload scorm="zip" dir="files" :beforeMsg="needOrg" :showList="true" :value="imageShowUrl" :limit="5" @success="handleUploadSuccess" @remove="handleRemoveSuccess"></file-upload>
|
||||
<file-upload scorm="zip" dir="files" @isFalse="isFalseChange" @isTrue="isTrueChange" :beforeMsg="needOrg" :showList="true" :value="imageShowUrl" :limit="5" @success="handleUploadSuccess" @remove="handleRemoveSuccess"></file-upload>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -159,7 +159,7 @@
|
||||
<el-table-column prop="fileName" label="文件名称"></el-table-column>
|
||||
<el-table-column prop="name" label="课件名称">
|
||||
<template slot-scope="scope">
|
||||
<el-input type="text" v-model="scope.row.name"></el-input>
|
||||
<el-input type="text" maxlength="50" v-model="scope.row.name"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="resType" label="类型" width="80">
|
||||
@@ -169,7 +169,8 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="duration" label="时长(分)" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-input type="number" size="small" v-model="scope.row.minute"></el-input>
|
||||
<!-- <el-input type="number" :stpe="1" min="0" size="small" step-strictly v-model="scope.row.minute"></el-input> -->
|
||||
<el-input-number style="width: 78px;" :max="999" controls-position="right" size="small" :min="0" v-model="scope.row.minute" :step="1" step-strictly></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="可见性" width="100">
|
||||
@@ -194,7 +195,7 @@
|
||||
<span slot="footer">
|
||||
<!-- <el-button type="infor" @click="isVisible(1)">移动端可见</el-button>
|
||||
<el-button type="infor" @click="isVisible(2)">pc端可见</el-button> -->
|
||||
<el-button type="primary" @click="saveUpload()">保存</el-button>
|
||||
<el-button type="primary" @click="saveUpload()" :loading="isTrue">保存</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog v-if="coursewareShow" title="预览课件" :close-on-click-modal="false" width="800px" :visible.sync="coursewareShow" custom-class="g-dialog">
|
||||
@@ -280,6 +281,8 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isTrue: false,
|
||||
isFalse: false,
|
||||
resOwnerListMap: [],
|
||||
//fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
|
||||
fileBaseUrl:this.$xpage.constants.fileBaseUrl, //获成动态获取的处理
|
||||
@@ -392,6 +395,12 @@ export default {
|
||||
this.search();
|
||||
},
|
||||
methods: {
|
||||
isTrueChange(val){
|
||||
this.isTrue = val
|
||||
},
|
||||
isFalseChange(val){
|
||||
this.isFalse = val
|
||||
},
|
||||
beforeCheck(){
|
||||
if(!this.upload.orgId ||!this.upload.orgName){
|
||||
return false;
|
||||
@@ -555,7 +564,7 @@ export default {
|
||||
// remark: 备注说明,可以为空,不填
|
||||
};
|
||||
//try {
|
||||
coueseFile.saveUpload(data).then(res=>{
|
||||
coueseFile.saveUpload2(data).then(res=>{
|
||||
if(res.status==200){
|
||||
//console.log('上传文件成功:'+rs.result.displayName);
|
||||
res.result.device1 = true;
|
||||
@@ -564,12 +573,18 @@ export default {
|
||||
if(res.result.duration){
|
||||
res.result.minute=Math.round(res.result.duration/60); //四舍五入
|
||||
}
|
||||
if(res.result.duration==0){
|
||||
this.$message.error('上传的视频时长不能为0,请手动编辑时长');
|
||||
}
|
||||
this.fileList.push(res.result);
|
||||
this.isTrue = false;
|
||||
}else{
|
||||
this.$message.error(res.message);
|
||||
this.isFalse = false
|
||||
}
|
||||
}).catch (error=>{
|
||||
console.log(error,'error')
|
||||
this.isFalse = false
|
||||
//this.$message.error(error);
|
||||
});
|
||||
// const { result, status } = coueseFile.saveUpload(data);
|
||||
@@ -598,16 +613,26 @@ export default {
|
||||
},
|
||||
handleCloseCheck(done){
|
||||
//console.log('关闭的处理aaaaa');
|
||||
if(this.isTrue&&this.isFalse){
|
||||
this.$message.error('文件正在上传中,请耐心等待');
|
||||
return false;
|
||||
}
|
||||
if(this.fileList.length>0){
|
||||
this.$message.error('有待保存的上传文件,请执行保存操作');
|
||||
return false;
|
||||
}else{
|
||||
this.isTrue = false
|
||||
this.isFalse = false
|
||||
return done(true);
|
||||
}
|
||||
|
||||
},
|
||||
// 文件上传保存
|
||||
saveUpload() {
|
||||
if(this.fileList.length<=0){
|
||||
this.$message.error('请上传文件');
|
||||
return;
|
||||
}
|
||||
if(!this.upload.orgName){
|
||||
this.$message.success('请选择资源归属');
|
||||
return;
|
||||
@@ -628,6 +653,20 @@ export default {
|
||||
item.duration = item.minute ? parseFloat(item.minute) * 60 : 1800;
|
||||
});
|
||||
this.loading = true;
|
||||
const messageD = this.fileList.some(item =>{
|
||||
if(item.name == ''){
|
||||
this.$message.error('课件名称不能为空');
|
||||
return true;
|
||||
}else if(!item.minute||item.minute == undefined){
|
||||
this.$message.error('时长不能为空并且不能为0');
|
||||
return true;
|
||||
}else{
|
||||
return false
|
||||
}
|
||||
})
|
||||
if(messageD){
|
||||
return
|
||||
}
|
||||
coueseFile.batchUpdate(this.fileList).then(rs => {
|
||||
if (rs.status === 200) {
|
||||
this.$message.success('保存成功');
|
||||
@@ -793,6 +832,16 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .el-input-number.is-controls-right .el-input__inner{
|
||||
padding-right: 20px;
|
||||
padding-left: 8px;
|
||||
}
|
||||
::v-deep .el-input-number__decrease{
|
||||
width: 16px;
|
||||
}
|
||||
::v-deep .el-input-number__increase{
|
||||
width: 16px;
|
||||
}
|
||||
.butpost{
|
||||
position: absolute;
|
||||
right: 1%;
|
||||
|
||||
@@ -64,7 +64,7 @@ export default {
|
||||
})
|
||||
},
|
||||
addTeacher() {
|
||||
addTeacher({pageNo: 1, pageSize: 10, keyword: this.form.teacherNo}).then(res => {
|
||||
addTeacher({pageNo: 1, pageSize: 10, userNo: this.form.teacherNo}).then(res => {
|
||||
this.getProgress(res.data[0].id)
|
||||
})
|
||||
},
|
||||
|
||||
@@ -100,7 +100,7 @@ export default {
|
||||
})
|
||||
},
|
||||
addTeacher() {
|
||||
addTeacher({pageNo: 1, pageSize: 10, keyword: this.form.teacherNo}).then(res => {
|
||||
addTeacher({pageNo: 1, pageSize: 10, userNo: this.form.teacherNo}).then(res => {
|
||||
this.getProgress(res.data[0].id)
|
||||
})
|
||||
},
|
||||
|
||||
@@ -56,7 +56,7 @@ export default {
|
||||
})
|
||||
},
|
||||
addTeacher(){
|
||||
addTeacher({pageNo:1,pageSize:10,keyword:this.form.teacherNo}).then(res=>{
|
||||
addTeacher({pageNo:1,pageSize:10,userNo:this.form.teacherNo}).then(res=>{
|
||||
this.getProgress(res.data[0].id)
|
||||
})
|
||||
},
|
||||
|
||||
@@ -87,7 +87,7 @@ export default {
|
||||
})
|
||||
},
|
||||
addTeacher(){
|
||||
addTeacher({pageNo:1,pageSize:10,keyword:this.form.teacherNo}).then(res=>{
|
||||
addTeacher({pageNo:1,pageSize:10,userNo:this.form.teacherNo}).then(res=>{
|
||||
this.getProgress(res.data[0].id)
|
||||
})
|
||||
},
|
||||
|
||||
@@ -25,7 +25,7 @@ export default {
|
||||
},
|
||||
methods:{
|
||||
getTeacherList() {
|
||||
addTeacher({pageNo:1,pageSize:100,keyword:''}).then(res=>{
|
||||
addTeacher({pageNo:1,pageSize:100,userNo:''}).then(res=>{
|
||||
this.options = res.data.map(item => {
|
||||
return { value: item.realName, label: item.realName };
|
||||
});
|
||||
|
||||
@@ -90,7 +90,7 @@ export default {
|
||||
})
|
||||
},
|
||||
addTeacher(){
|
||||
addTeacher({pageNo:1,pageSize:10,keyword:this.form.teacherNo}).then(res=>{
|
||||
addTeacher({pageNo:1,pageSize:10,userNo:this.form.teacherNo}).then(res=>{
|
||||
this.getProgress(res.data[0].id)
|
||||
})
|
||||
},
|
||||
|
||||
@@ -95,7 +95,7 @@ export default {
|
||||
})
|
||||
},
|
||||
addTeacher(){
|
||||
addTeacher({pageNo:1,pageSize:10,keyword:this.form.teacherNo}).then(res=>{
|
||||
addTeacher({pageNo:1,pageSize:10,userNo:this.form.teacherNo}).then(res=>{
|
||||
this.getProgress(res.data[0].id)
|
||||
})
|
||||
},
|
||||
|
||||
@@ -640,16 +640,17 @@
|
||||
createPlayUrl(fid, u) {
|
||||
let nowDate = new Date();
|
||||
let ctime = parseInt(nowDate.getTime() / 1000);
|
||||
let beforeUrl = parseInt(nowDate.getTime() / 1000) + '/' + fid;
|
||||
const userNo = this.userInfo.userNo
|
||||
let beforeUrl = parseInt(nowDate.getTime() / 1000) + '/' + fid + '/' + userNo;
|
||||
//console.log(beforeUrl,'beforeUrl');
|
||||
let urlSign = encodeURIComponent(encrypt(beforeUrl));
|
||||
//console.log(urlSign,'urlSign');
|
||||
// console.log(urlSign,'urlSign');
|
||||
cookies.set('PLAYSIGN_TIME', ctime); //写客户端的cookie保存
|
||||
//以下判断是为了区分本地环境和服务器环境
|
||||
if (process.env.NODE_ENV == 'development') {
|
||||
this.blobUrl = process.env.VUE_APP_FILE_BASE_URL + u;
|
||||
} else {
|
||||
this.blobUrl = process.env.VUE_APP_BASE_API + '/xboe/m/course/cware/resource?sign=' + urlSign;
|
||||
this.blobUrl = process.env.VUE_APP_BASE_API + '/xboe/m/course/cware/resource?sign=' + urlSign ;
|
||||
}
|
||||
//console.log(this.blobUrl,'this.blobUrl');
|
||||
},
|
||||
@@ -752,7 +753,7 @@
|
||||
if (this.contentData.status < 2) {
|
||||
// this.contentData.status = 2; //进行中
|
||||
if(r.contentType != 61&&r.contentType != 20 && r.contentType != 10){
|
||||
setTimeout(() => {
|
||||
setTimeout(() => {
|
||||
this.isContentTypeTwo = r.contentType
|
||||
$this.isShowTime()
|
||||
}, 2000);
|
||||
@@ -1500,7 +1501,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
progress(val) {
|
||||
progress(val) {
|
||||
const progressValue = parseFloat(val) * 100;
|
||||
this.sendEventProgress = Number(progressValue.toFixed(2));
|
||||
},
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user