Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
fcd2dddc
提交
fcd2dddc
编写于
7月 08, 2020
作者:
bo.dang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新建直播新增图片修改
上级
fcf718bd
变更
2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
66 行增加
和
33 行删除
+66
-33
create-live.vue
src/views/yqrange/create-live.vue
+36
-20
live-manage.vue
src/views/yqrange/live-manage.vue
+30
-13
未找到文件。
src/views/yqrange/create-live.vue
浏览文件 @
fcd2dddc
...
@@ -145,7 +145,7 @@
...
@@ -145,7 +145,7 @@
</el-col>
</el-col>
<el-col
:span=
"16"
>
<el-col
:span=
"16"
>
<!--
<div
v-for=
"(item, index) in formData.rtcIntroduces.filter(obj=> obj.type === 2)"
:key=
"index"
style=
"margin-left:0px;min-width: 380px;display: flex;align-items: center"
>
-->
<!--
<div
v-for=
"(item, index) in formData.rtcIntroduces.filter(obj=> obj.type === 2)"
:key=
"index"
style=
"margin-left:0px;min-width: 380px;display: flex;align-items: center"
>
-->
<div
v-for=
"(item, index) in
formData.
rtcIntroducesImages"
:key=
"index"
style=
"margin-left:0px;min-width: 380px;display: flex;align-items: center"
>
<div
v-for=
"(item, index) in rtcIntroducesImages"
:key=
"index"
style=
"margin-left:0px;min-width: 380px;display: flex;align-items: center"
>
<el-upload
<el-upload
class=
"bg-uploader"
class=
"bg-uploader"
action=
"#"
action=
"#"
...
@@ -163,8 +163,8 @@
...
@@ -163,8 +163,8 @@
@
click=
"getIndexIntroduce(index)"
/>
@
click=
"getIndexIntroduce(index)"
/>
</el-upload>
</el-upload>
<div
class=
"limit-text"
style=
"font-size: 12px;color: #999;margin-left: 10px;margin-top: -10px;"
>
<div
class=
"limit-text"
style=
"font-size: 12px;color: #999;margin-left: 10px;margin-top: -10px;"
>
<p>
限制大小:
100k
b
</p>
<p>
限制大小:
2M
b
</p>
<p>
尺寸:750*(
不限高度
)
</p>
<p>
尺寸:750*(
高度
<3000
)
</p>
<p>
支持jpeg, png格式
</p>
<p>
支持jpeg, png格式
</p>
</div>
</div>
<!--
<img-->
<!--
<img-->
...
@@ -401,7 +401,6 @@
...
@@ -401,7 +401,6 @@
preImage: '', // 直播预告图url
preImage: '', // 直播预告图url
textContent: '', // 直播简介文字版
textContent: '', // 直播简介文字版
imageContent: '',// 直播简介图片版
imageContent: '',// 直播简介图片版
rtcIntroducesImages: [],
// imgUrl2: '',
// imgUrl2: '',
// imgUrl2More: {},
// imgUrl2More: {},
// imgUrl3: '',
// imgUrl3: '',
...
@@ -424,6 +423,7 @@
...
@@ -424,6 +423,7 @@
}] // 嘉宾
}] // 嘉宾
},
},
introTextNum: 0,
introTextNum: 0,
rtcIntroducesImages: [],
// imgUrl1: '',
// imgUrl1: '',
imgUrl1More: {},
imgUrl1More: {},
guestErrFlag: false,
guestErrFlag: false,
...
@@ -585,9 +585,9 @@
...
@@ -585,9 +585,9 @@
beforeUploadPic1(file) {
beforeUploadPic1(file) {
let fileLimit = {
let fileLimit = {
width: 750,
width: 750,
height:
""
,
height:
3000
,
size:
0.1
,
size:
2
,
sizeText: "
100
k
",
sizeText: "
2
Mb
",
key: "
imageContent
",
key: "
imageContent
",
more: "
imgUrl1More
",
more: "
imgUrl1More
",
show: "
uploadImgMessage1
"
show: "
uploadImgMessage1
"
...
@@ -684,14 +684,14 @@
...
@@ -684,14 +684,14 @@
vm.$message.info('开始上传');
vm.$message.info('开始上传');
const isJPG = file.type === 'image/jpeg'
const isJPG = file.type === 'image/jpeg'
const isPNG = file.type === 'image/png'
const isPNG = file.type === 'image/png'
const isLt
100kb = file.size / 1024 < 100
const isLt
2M = file.size / 1024 / 1024 < fileLimit.size
if (!isJPG && !isPNG) {
if (!isJPG && !isPNG) {
vm.$message.error('上传直播简介图片只能是 JPEG或者png 格式!')
vm.$message.error('上传直播简介图片只能是 JPEG或者png 格式!')
// vm.isDisabledIns = false;
// vm.isDisabledIns = false;
return;
return;
}
}
if (!isLt
100kb
) {
if (!isLt
2M
) {
vm.$message.error('
上传图片大小不能超过 100kb
')
vm.$message.error('
图片大小不符合规范,请根据规范上传图片
')
// vm.isDisabledIns = false;
// vm.isDisabledIns = false;
return;
return;
}
}
...
@@ -710,8 +710,8 @@
...
@@ -710,8 +710,8 @@
}else {
}else {
doUpload(vm,file, getFilePath(file,null), 'preview4', 'progress1', 1).then(function (path) {
doUpload(vm,file, getFilePath(file,null), 'preview4', 'progress1', 1).then(function (path) {
// vm.cleatBroadcast.liveIntroduceModel[vm.introduceIndex].content = path.fullPath;
// vm.cleatBroadcast.liveIntroduceModel[vm.introduceIndex].content = path.fullPath;
vm.
formData.rtcIntroduc
es[vm.introduceIndex].content = path.fullPath;
vm.
rtcIntroducesImag
es[vm.introduceIndex].content = path.fullPath;
vm.
formData.rtcIntroduc
es[vm.introduceIndex].seqNo = vm.introduceIndex+1;
vm.
rtcIntroducesImag
es[vm.introduceIndex].seqNo = vm.introduceIndex+1;
vm.$message.success('上传成功');
vm.$message.success('上传成功');
// vm.isDisabledIns = false;
// vm.isDisabledIns = false;
});
});
...
@@ -805,13 +805,20 @@
...
@@ -805,13 +805,20 @@
// 公开直播,两个拉流地址都需要
// 公开直播,两个拉流地址都需要
if(this.formData.scope == "
2
"){
if(this.formData.scope == "
2
"){
if(this.formData.pullStreamRtmp == "" && this.formData.pullStreamHttp == ""){
this.$message.warning("
请输入
APP
拉流地址和
H5
拉流地址
");
flag = false;
return flag;
}
if(this.formData.pullStreamRtmp == ""){
if(this.formData.pullStreamRtmp == ""){
this.$message.warning("
请输入
APP
拉流地址
");
this.$message.warning("
请输入
APP
拉流地址
");
flag = false;
flag = false;
return flag;
}
}
if(this.formData.pullStreamHttp == ""){
if(this.formData.pullStreamHttp == ""){
this.$message.warning("
请输入
H5
拉流地址
");
this.$message.warning("
请输入
H5
拉流地址
");
flag = false;
flag = false;
return flag;
}
}
}
}
else {
else {
...
@@ -841,7 +848,7 @@
...
@@ -841,7 +848,7 @@
},
},
// 增加直播简介
// 增加直播简介
addIntroImage(){
addIntroImage(){
let length = this.
formData.rtcIntroduc
es.length;
let length = this.
rtcIntroducesImag
es.length;
if(length > 5){
if(length > 5){
...
@@ -849,18 +856,18 @@
...
@@ -849,18 +856,18 @@
return;
return;
}
}
this.showIntroImageFlag = true;
this.showIntroImageFlag = true;
const
item = {
const item = {
seqNo: length + 1,
seqNo: length + 1,
content:
''
,
content:
""
,
type: 2 // 文字
type: 2 // 文字
};
};
this.
formData.rtcIntroduc
es.push(item);
this.
rtcIntroducesImag
es.push(item);
},
},
// 删除直播简介
// 删除直播简介
delIntroImage(index, item){
delIntroImage(index, item){
this.
formData.rtcIntroduc
es.splice(index, 1);
this.
rtcIntroducesImag
es.splice(index, 1);
},
},
...
@@ -1003,7 +1010,7 @@
...
@@ -1003,7 +1010,7 @@
this.formData.infoCollect = String(this.formData.infoCollect);
this.formData.infoCollect = String(this.formData.infoCollect);
this.$set(this.formData, 'textContent', "");
this.$set(this.formData, 'textContent', "");
if(this.formData.rtcIntroduces != null){
if(this.formData.rtcIntroduces != null){
this.
formData.
rtcIntroducesImages = [];
this.rtcIntroducesImages = [];
for(let i=0;i<this.formData.rtcIntroduces.length;i++) {
for(let i=0;i<this.formData.rtcIntroduces.length;i++) {
if(this.formData.rtcIntroduces[i].type == "
1
"){
if(this.formData.rtcIntroduces[i].type == "
1
"){
// this.formData.textContent = this.formData.rtcIntroduces[i].content;
// this.formData.textContent = this.formData.rtcIntroduces[i].content;
...
@@ -1011,13 +1018,22 @@
...
@@ -1011,13 +1018,22 @@
// break;
// break;
}
}
else {
else {
this.formData.rtcIntroducesImages.push(this.formData.rtcIntroduces[i]);
// this.$set(this.formData, "
rtcIntroducesImages
", )
this.rtcIntroducesImages.push(this.formData.rtcIntroduces[i]);
}
}
// else if(this.formData.rtcIntroduces[i].type == "
2
"){
// else if(this.formData.rtcIntroduces[i].type == "
2
"){
// // this.formData.imageContent = this.formData.rtcIntroduces[i].content;
// // this.formData.imageContent = this.formData.rtcIntroduces[i].content;
// this.$set(this.formData, 'imageContent', this.formData.rtcIntroduces[i].content);
// this.$set(this.formData, 'imageContent', this.formData.rtcIntroduces[i].content);
// }
// }
}
}
// this.rtcIntroducesImages = this.formData.rtcIntroduces.filter(function (item) {
// return item.type == "
2
";
// });
}
}
// (formData.textContent).replace(/
\
s+/g,"").length
// (formData.textContent).replace(/
\
s+/g,"").length
...
@@ -1047,7 +1063,7 @@
...
@@ -1047,7 +1063,7 @@
}
}
// 直播简介图片版
// 直播简介图片版
this.formData.rtcIntroduces = this.
formData.
rtcIntroducesImages;
this.formData.rtcIntroduces = this.rtcIntroducesImages;
// 直播简介文字版
// 直播简介文字版
if(this.formData.textContent != null && this.formData.textContent != ""){
if(this.formData.textContent != null && this.formData.textContent != ""){
this.formData.rtcIntroduces.push({type:1,content:this.formData.textContent});
this.formData.rtcIntroduces.push({type:1,content:this.formData.textContent});
...
...
src/views/yqrange/live-manage.vue
浏览文件 @
fcd2dddc
...
@@ -173,17 +173,17 @@
...
@@ -173,17 +173,17 @@
</el-radio-group>
</el-radio-group>
</div>
</div>
<div
v-if=
"uploadFlag"
>
<div
v-if=
"uploadFlag"
style=
"line-height: 40px;"
>
<div
v-if=
"numberShowFlag"
>
<div
v-if=
"numberShowFlag"
>
<span>
存在"{{videoNumber}}段"直播原视频,请下载合并后上传
</span>
<span>
存在"{{videoNumber}}段"直播原视频,请下载合并后上传
</span>
</div>
</div>
<div
style=
"margin-left:30px;"
>
<div
style=
"margin-left:30px;"
>
<span>
①下载原视频
</span>
<span>
①下载原视频
</span>
<!--<el-col :span="1">-->
<!--<el-col :span="1">-->
<!--<img style="vertical-align: middle" src="../../assets/image/icon_download.png" />-->
<!--</el-col>-->
<!--</el-col>-->
<el-button
@
click=
"download('model')"
s
tyle=
"margin-left: 190px;"
size=
"small"
type=
"text"
>
下载
</el-button>
<el-button
@
click=
"download('model')"
s
ize=
"small"
type=
"text"
><img
style=
"vertical-align: middle;margin-left: 150px"
src=
"../../assets/image/icon_download.png"
/
>
下载
</el-button>
</div>
</div>
<div
style=
"margin-left:30px;"
>
<div
style=
"margin-left:30px;"
>
...
@@ -195,22 +195,22 @@
...
@@ -195,22 +195,22 @@
:limit=
"1"
:limit=
"1"
:before-upload=
"beforeVideoUpload"
>
:before-upload=
"beforeVideoUpload"
>
<!--<el-col :span="1">-->
<!--<el-col :span="1">-->
<!--<img style="vertical-align: middle" src="../../assets/image/icon_upload.png" />-->
<!--</el-col>-->
<!--</el-col>-->
<el-button
type=
"text"
size=
"small"
v-if=
"fileFlag"
>
上传(仅支持mp4)
</el-button>
<el-button
type=
"text"
size=
"small"
v-if=
"fileFlag"
>
<img
style=
"vertical-align: middle;margin-left: 120px;"
src=
"../../assets/image/icon_upload.png"
/>
上传(仅支持mp4)
</el-button>
<!--<video class="video-mg-url" controls preload :src="cleatBroadcast.liveInfo.mgUrl"></video>-->
<!--<video class="video-mg-url" controls preload :src="cleatBroadcast.liveInfo.mgUrl"></video>-->
<!-- <img v-if="!cleatBroadcast.liveInfo.mgUrl" class="video-bg-img" src="../../../static/img/small.png"> -->
<!-- <img v-if="!cleatBroadcast.liveInfo.mgUrl" class="video-bg-img" src="../../../static/img/small.png"> -->
</el-upload>
</el-upload>
<el-progress
<el-progress
:text-inside=
"true"
:text-inside=
"true"
:stroke-width=
"
16
"
:stroke-width=
"
28
"
:percentage=
"uploadProgress1"
:percentage=
"uploadProgress1"
status=
"success"
status=
"success"
v-show=
"uploadProgress1 > 0 && uploadProgress1 < 100"
>
v-show=
"uploadProgress1 > 0 && uploadProgress1 < 100"
>
</el-progress>
</el-progress>
<div
v-if=
"deleteFileFlag"
>
<div
v-if=
"deleteFileFlag"
>
<span>
{{
playbackForm.videos[0].videoName
}}({{videoToSize(playbackForm.videos[0].videoSize, 1)}}M)
</span>
<span>
{{
videoToName(playbackForm.videos[0].videoName, 6)
}}({{videoToSize(playbackForm.videos[0].videoSize, 1)}}M)
</span>
<el-button
@
click=
"delVideo"
style=
"margin-left: 1
9
0px;"
size=
"small"
type=
"text"
>
删除
</el-button>
<el-button
@
click=
"delVideo"
style=
"margin-left: 1
0
0px;"
size=
"small"
type=
"text"
>
删除
</el-button>
</div>
</div>
<!--<div v-if="fileFlag">-->
<!--<div v-if="fileFlag">-->
<!---->
<!---->
...
@@ -550,9 +550,25 @@ export default {
...
@@ -550,9 +550,25 @@ export default {
return
(
fileSize
/
1024
/
1024
).
toFixed
(
number
);
return
(
fileSize
/
1024
/
1024
).
toFixed
(
number
);
},
},
videoToName
(
fileName
,
number
){
if
(
fileName
!=
""
){
const
index
=
fileName
.
indexOf
(
".mp4"
);
const
str
=
fileName
.
slice
(
0
,
index
);
if
(
str
.
length
>
number
){
return
str
.
slice
(
0
,
number
+
1
)
+
"..."
+
".mp4"
;
}
else
{
return
fileName
;
}
}
return
fileName
;
},
// 上传视频
// 上传视频
beforeVideoUpload
(
file
){
beforeVideoUpload
(
file
){
vm
.
fileFlag
=
true
;
vm
.
fileFlag
=
false
;
vm
.
deleteFileFlag
=
true
;
// vm.fileName = file.name;
// vm.fileName = file.name;
// if(file.size != null){
// if(file.size != null){
// vm.fileSize = vm.videoSize(file.size, 1);
// vm.fileSize = vm.videoSize(file.size, 1);
...
@@ -583,7 +599,7 @@ export default {
...
@@ -583,7 +599,7 @@ export default {
vm
.
deleteFileFlag
=
true
;
vm
.
deleteFileFlag
=
true
;
vm
.
$message
.
success
(
'上传成功'
)
vm
.
$message
.
success
(
'上传成功'
)
;
});
});
},
},
...
@@ -657,7 +673,8 @@ export default {
...
@@ -657,7 +673,8 @@ export default {
if
(
res
.
code
==
"000000"
)
{
if
(
res
.
code
==
"000000"
)
{
// if(canPlayback == 0){
// if(canPlayback == 0){
this
.
$message
.
success
(
"关闭成功"
);
vm
.
$message
.
success
(
"关闭成功"
);
vm
.
getLiveList
(
""
,
""
);
}
else
{
}
else
{
...
@@ -665,7 +682,7 @@ export default {
...
@@ -665,7 +682,7 @@ export default {
}
}
}).
catch
((
error
)
=>
{
}).
catch
((
error
)
=>
{
this
.
$message
.
error
(
"请重试"
);
vm
.
$message
.
error
(
"请重试"
);
})
})
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录