Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
提交
议题看板
打开侧边栏
jingqi.liu
pica.cloud.web-education-admin
提交
25107180
提交
25107180
编写于
6月 21, 2020
作者:
alex.zhang
浏览文件
操作
浏览文件
下载
差异文件
fix conflict
上级
7b0c59e1
1c84f454
变更
3
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
715 行增加
和
749 行删除
+715
-749
create-live.vue
src/views/yqrange/create-live.vue
+687
-726
live-manage.vue
src/views/yqrange/live-manage.vue
+14
-11
yq-range.vue
src/views/yqrange/yq-range.vue
+14
-12
未找到文件。
src/views/yqrange/create-live.vue
浏览文件 @
25107180
<
template
>
<
template
>
<div
class=
"yqrange-index-wrapper"
>
<div
class=
"yqrange-index-wrapper"
>
<bread-crumb
:curmbFirst=
"curmbFirst"
:curmbSecond=
"curmbSecond"
:
curmbThird=
"curmbThird"
></bread-crumb>
<bread-crumb
:curmbFirst=
"curmbFirst"
:curmbSecond=
"curmbSecond"
curmbThird=
"curmbThird"
></bread-crumb>
<div
class=
"yqrange-index-content screenSet"
id=
"screenSet"
>
<div
class=
"yqrange-index-content screenSet"
id=
"screenSet"
>
<el-row
class=
"step-content"
>
<el-row
class=
"step-content"
>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
...
@@ -17,15 +17,14 @@
...
@@ -17,15 +17,14 @@
</el-col>
</el-col>
</el-row>
</el-row>
<div
class=
"first-step"
>
<div
class=
"first-step"
>
<!--
<p
class=
"p-title"
>
基础信息
</p>
-->
<!--
<p
class=
"p-title"
>
基础信息
</p>
-->
<el-form
<el-form
ref=
"formData"
ref=
"formData"
:model=
"formData"
:model=
"formData"
:rules=
"rules"
:rules=
"rules"
label-width=
"150px"
label-width=
"150px"
label-suffix=
":"
label-suffix=
":"
class=
"basic-form"
class=
"basic-form"
>
>
<el-form-item
label=
"直播标题"
prop=
"name"
>
<el-form-item
label=
"直播标题"
prop=
"name"
>
<el-col
:span=
"13"
>
<el-col
:span=
"13"
>
<el-input
<el-input
...
@@ -67,14 +66,7 @@
...
@@ -67,14 +66,7 @@
<el-form-item
label=
"直播简介:"
class=
"required-label"
>
<el-form-item
label=
"直播简介:"
class=
"required-label"
>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<div
style=
"color:#666666;font-size:10px;"
>
直播图片可选择仅文字版,仅图片版或文字版+图片版
</div>
<div
style=
"color:#666666;font-size:10px;"
>
直播图片可选择仅文字版,仅图片版或文字版+图片版
</div>
<el-input
<el-input
type=
"textarea"
v-model=
"formData.textContent"
placeholder=
"请输入直播简介"
maxlength=
"30"
rows=
"3"
style=
"width:80%;"
></el-input>
type=
"textarea"
v-model=
"formData.textContent"
placeholder=
"请输入直播简介"
maxlength=
"30"
rows=
"3"
style=
"width:80%;"
></el-input>
<span
class=
"word-num"
>
{{
(
formData
.
textContent
).
replace
(
/
\s
+/g
,
""
).
length
}}
/300
</span>
<span
class=
"word-num"
>
{{
(
formData
.
textContent
).
replace
(
/
\s
+/g
,
""
).
length
}}
/300
</span>
<div
style=
"color:#666666;font-size:12px;"
>
文字版
</div>
<div
style=
"color:#666666;font-size:12px;"
>
文字版
</div>
</el-col>
</el-col>
...
@@ -129,7 +121,11 @@
...
@@ -129,7 +121,11 @@
@
mouseover
.
stop=
"imgMouseOver2=true"
@
mouseover
.
stop=
"imgMouseOver2=true"
class=
"bg-img"
class=
"bg-img"
/>
/>
<img
v-if=
"!formData.cover"
class=
"bg-img"
src=
"../../assets/image/small.png"
/>
<img
v-if=
"!formData.cover"
class=
"bg-img"
src=
"../../assets/image/small.png"
/>
<div
<div
class=
"img-delete"
class=
"img-delete"
v-show=
"imgMouseOver2"
v-show=
"imgMouseOver2"
...
@@ -162,7 +158,11 @@
...
@@ -162,7 +158,11 @@
@
mouseover
.
stop=
"imgMouseOver3=true"
@
mouseover
.
stop=
"imgMouseOver3=true"
class=
"bg-img"
class=
"bg-img"
/>
/>
<img
v-if=
"!formData.preImage"
class=
"bg-img"
src=
"../../assets/image/small.png"
/>
<img
v-if=
"!formData.preImage"
class=
"bg-img"
src=
"../../assets/image/small.png"
/>
<div
<div
class=
"img-delete"
class=
"img-delete"
v-show=
"imgMouseOver3"
v-show=
"imgMouseOver3"
...
@@ -194,8 +194,7 @@
...
@@ -194,8 +194,7 @@
</el-col>
</el-col>
<el-col
:span=
"13"
>
<el-col
:span=
"13"
>
<el-form-item
label=
"手机"
prop=
"lecturesPhone"
>
<el-form-item
label=
"手机"
prop=
"lecturesPhone"
>
<el-input
<el-input
maxlength=
"11"
maxlength=
"11"
size=
"small"
size=
"small"
v-model=
"formData.lecturesPhone"
v-model=
"formData.lecturesPhone"
placeholder=
"请输入手机号"
placeholder=
"请输入手机号"
...
@@ -219,15 +218,14 @@
...
@@ -219,15 +218,14 @@
</el-col>
</el-col>
<el-col
:span=
"13"
>
<el-col
:span=
"13"
>
<el-form-item
label=
"手机"
>
<el-form-item
label=
"手机"
>
<el-input
<el-input
maxlength=
"11"
maxlength=
"11"
size=
"small"
size=
"small"
v-model=
"item.phone"
v-model=
"item.phone"
placeholder=
"请输入手机号"
placeholder=
"请输入手机号"
style=
"width:70%;"
style=
"width:70%;"
></el-input>
></el-input>
<img
<img
@
click=
"addGuest(index)"
@
click=
"addGuest(index)"
class=
"edit-img"
class=
"edit-img"
src=
"../../assets/image/plus.png"
src=
"../../assets/image/plus.png"
...
@@ -252,19 +250,19 @@
...
@@ -252,19 +250,19 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
BreadCrumb
from
"@/components/breadcrumb.vue"
;
import
BreadCrumb
from
"@/components/breadcrumb.vue"
;
import
{
openLoading
,
closeLoading
}
from
"../../utils/utils"
;
import
{
openLoading
,
closeLoading
}
from
"../../utils/utils"
;
import
{
doUpload
,
getFilePath
}
from
"../../utils/qiniu-util"
;
import
{
doUpload
,
getFilePath
}
from
"../../utils/qiniu-util"
;
import
{
checkMobile
}
from
"../../utils/patients/checkValid"
;
import
{
checkMobile
}
from
'../../utils/patients/checkValid'
;
import
{
getRtcInfo
}
from
"../../utils/yqrange/yqrangeApi"
;
import
{
getRtcInfo
}
from
"../../utils/yqrange/yqrangeApi"
;
// import { checkPhone } from "../login.vue";
// import { checkPhone } from "../login.vue";
let
vm
=
null
;
let
vm
=
null
;
export
default
{
export
default
{
components
:
{
components
:
{
BreadCrumb
BreadCrumb
},
},
data
()
{
data
()
{
let
checkProjectStr
=
(
rule
,
value
,
callback
)
=>
{
let
checkProjectStr
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
.
indexOf
(
"
\
\"
) != -1) {
if
(
value
.
indexOf
(
"
\
\"
) != -1) {
//存在
//存在
...
@@ -275,76 +273,71 @@ export default {
...
@@ -275,76 +273,71 @@ export default {
callback();
callback();
}
}
};
};
return
{
return
{
curmbFirst: "
云鹊小圈
"
,
curmbFirst: '云鹊小圈'
,
curmbSecond: "
直播管理
"
,
curmbSecond: '直播管理'
,
curmbThird: "
新建直播
"
,
curmbThird: '新建直播'
,
//页面展示位置
//页面展示位置
isCollectShow: false,
isCollectShow: false,
formData: {
formData: {
circleId: "
1
", // 圈子ID
circleId: "
1
",// 圈子ID
name: "", // 直播名称
name: '',// 直播名称
scope: "
1
", // 直播范围 1-非公开 2-公开
scope: "
1
",// 直播范围 1-非公开 2-公开
infoCollect: "
0
", // 是否采集用户信息 0-否 1-是
infoCollect: "
0
",// 是否采集用户信息 0-否 1-是
openTime: "", // 直播开始时间
openTime: '',// 直播开始时间
rtcIntroduces: [
rtcIntroduces:[{
{
seqNo: "",
seqNo: "",
content:
""
,
content:
''
,
type: "
1
" // 文字
type: "
1
" // 文字
},
},
{
{
seqNo: "",
seqNo: "",
content: ""
,
content: ''
,
type: "
2
" // 图片
type: "
2
" // 图片
}
}
],
// 直播简介
],
// 直播简介
cover: ""
, // 直播封面url 直播第一帧图片
cover: ''
, // 直播封面url 直播第一帧图片
preImage: ""
, // 直播预告图url
preImage: ''
, // 直播预告图url
textContent: ""
, // 直播简介文字版
textContent: ''
, // 直播简介文字版
imageContent: "",
// 直播简介图片版
imageContent: '',
// 直播简介图片版
// imgUrl2: '',
// imgUrl2: '',
// imgUrl2More: {},
// imgUrl2More: {},
// imgUrl3: '',
// imgUrl3: '',
// imgUrl3More: {},
// imgUrl3More: {},
intro: "",
intro:'',
hostName: "",
hostName: '',
guestName: "",
guestName: '',
hostMobile: "",
hostMobile: '',
guestMobile: "",
guestMobile: '',
mobile1: "",
mobile1: '',
lecturesUserName: "",
lecturesUserName: '',
lecturesPhone: "",
lecturesPhone: '',
lecturers: [
lecturers: [{
{
username: '',
username: "",
phone: ''
phone: ""
}],// 讲师
}
guests: [{
], // 讲师
phone: '',
guests: [
username: ''
{
}] // 嘉宾
phone: "",
username: ""
}
] // 嘉宾
},
},
// imgUrl1: '',
// imgUrl1: '',
imgUrl1More: {},
imgUrl1More: {},
guestErrFlag: false,
guestErrFlag: false,
guestErrText: "
嘉宾最多
5
位!
"
,
guestErrText: '嘉宾最多5位!'
,
isPreview: 0,
isPreview: 0,
imgMouseOver1: false,
imgMouseOver1: false,
uploadImgMessage1: false,
//未上传图片,校验提示语
uploadImgMessage1: false,
//未上传图片,校验提示语
imgMouseOver2: false,
imgMouseOver2: false,
uploadImgMessage2: false,
uploadImgMessage2: false,
imgMouseOver3: false,
imgMouseOver3: false,
uploadImgMessage3:
false,
uploadImgMessage3:
false,
pickerOptions0: {
pickerOptions0: {
disabledDate: time => {
disabledDate: time => {
// 在科学计数法中,为了使公式简便,可以用带“E”的格式表示。例如1.03乘10的8次方,可简写为“1.03e8”的形式
// 在科学计数法中,为了使公式简便,可以用带“E”的格式表示。例如1.03乘10的8次方,可简写为“1.03e8”的形式
// 一天是24*60*60*1000 = 86400000 = 8.64e7
// 一天是24*60*60*1000 = 86400000 = 8.64e7
// console.log('this.maxDate',this.maxDate)
// console.log('this.maxDate',this.maxDate)
return time.getTime() < Date.now() - 8.64e7;
return time.getTime() < Date.now() - 8.64e7
}
}
},
},
rules: {
rules: {
...
@@ -358,31 +351,29 @@ export default {
...
@@ -358,31 +351,29 @@ export default {
},
},
{ validator: checkProjectStr, trigger: "
blur
" }
{ validator: checkProjectStr, trigger: "
blur
" }
],
],
scope: [{ required: true }],
scope:[
{required: true}
],
infoCollect: [
infoCollect: [
{ required: true, message: "
请选择是否收集用户信息
", trigger: "
blur
"
}
{required: true, message: "
请选择是否收集用户信息
", trigger: "
blur
"
}
],
],
openTime: [
openTime: [
{ required: true, message: "
请选择直播开始时间
", trigger: "
blur
"
}
{required: true, message: "
请选择直播开始时间
", trigger: "
blur
"
}
],
],
// // 直播简介
// // 直播简介
// introduce: [
// introduce: [
// {required: true, message: "
请选择文字版或图片版
", trigger: "
blur
"}
// {required: true, message: "
请选择文字版或图片版
", trigger: "
blur
"}
// ],
// ],
lecturesUserName: [
lecturesUserName: [
{ required: true, message: "
请输入姓名
", trigger: "
blur
" }
{required: true, message: "
请输入姓名
", trigger: "
blur
"},
],
],
// guestName: [
// guestName: [
// {required: true, message: "
请输入姓名
", trigger: "
blur
"},
// {required: true, message: "
请输入姓名
", trigger: "
blur
"},
// ],
// ],
lecturesPhone: [
lecturesPhone: [
{
{required: true, message: "
请输入手机号
", trigger: ['change','blur']},
required: true,
{validator: checkMobile, trigger: ['change','blur']}
message: "
请输入手机号
",
],
trigger: ["
change
", "
blur
"]
},
{ validator: checkMobile, trigger: ["
change
", "
blur
"] }
]
// introduce: [
// introduce: [
// { required: true, message: "
请输入
", trigger: "
blur
" },
// { required: true, message: "
请输入
", trigger: "
blur
" },
...
@@ -394,25 +385,25 @@ export default {
...
@@ -394,25 +385,25 @@ export default {
// },
// },
// { validator: checkProjectStr, trigger: "
blur
" }
// { validator: checkProjectStr, trigger: "
blur
" }
// ],
// ],
},
}
circleId: null,
}
};
},
},
created() {
created() {
// 区分内部用户和外部用户
// 区分内部用户和外部用户
let idType = localStorage.getItem("
storageIdType
"
);
let idType = localStorage.getItem('storageIdType'
);
// vm = this;
// vm = this;
// vm.entryId = vm.getUrlSearch(window.location.href, "
entryId
");
// vm.entryId = vm.getUrlSearch(window.location.href, "
entryId
");
// vm.peopleLevel = vm.getUrlSearch(window.location.href, "
level
");
// vm.peopleLevel = vm.getUrlSearch(window.location.href, "
level
");
// vm.init();
// vm.init();
this.circleId = this.$route.query.circleId;
},
},
mounted() {
mounted() {
const rtcId = this.$route.query.rtcId;
const rtcId = this.$route.query.rtcId;
// if(rtcId){
// if(rtcId){
// this.curmbThird = "
编辑直播
";
// this.curmbThird = "
编辑直播
";
// }
// }
if (rtcId)
{
if(rtcId)
{
this.curmbThird = "
编辑直播
";
this.curmbThird = "
编辑直播
";
this.initRtcInfo(rtcId);
this.initRtcInfo(rtcId);
}
}
...
@@ -420,30 +411,28 @@ export default {
...
@@ -420,30 +411,28 @@ export default {
methods: {
methods: {
checkPhone(val) {
checkPhone(val) {
if (!/^1[3456789]
\
d{9}$/.test(val
)) {
if(!(/^1[3456789]
\
d{9}$/.test(val)
)) {
return false;
return false;
} else {
} else {
return true;
return true;
}
}
},
},
// 初始化直播
// 初始化直播
initRtcInfo(rtcId)
{
initRtcInfo(rtcId)
{
getRtcInfo({
getRtcInfo({
rtcId
rtcId
})
}).then((data) => {
.then(data => {
if(data.code == "
000000
") {
if (data.code == "
000000
") {
this.formData = data.data;
this.formData = data.data;
this.initFormData();
this.initFormData();
console.log(this.formData);
console.log(this.formData);
}
}
})
}).catch((error) => {
.catch(error => {
this.$message({
this.$message({
message: error,
message: error,
type: "
error
"
type: 'error'
});
});
});
})
},
},
//上传直播简介
//上传直播简介
beforeUploadPic1(file) {
beforeUploadPic1(file) {
...
@@ -506,33 +495,22 @@ export default {
...
@@ -506,33 +495,22 @@ export default {
image.onload = function() {
image.onload = function() {
let _this = this;
let _this = this;
if (
if(fileLimit.key == "
imageContent
" & _this.width != fileLimit.width){
(fileLimit.key == "
imageContent
") &
(_this.width != fileLimit.width)
) {
vm.$message.error("
图片尺寸不符合规范,请根据规范上传图片
");
vm.$message.error("
图片尺寸不符合规范,请根据规范上传图片
");
} else if (
}
(fileLimit.key != "
imageContent
") &
else if (fileLimit.key != "
imageContent
" & (_this.width != fileLimit.width || _this.height != fileLimit.height)) {
(_this.width != fileLimit.width || _this.height != fileLimit.height)
) {
vm.$message.error("
图片尺寸不符合规范,请根据规范上传图片
");
vm.$message.error("
图片尺寸不符合规范,请根据规范上传图片
");
} else {
} else {
openLoading(vm);
openLoading(vm);
doUpload(
doUpload(vm, file, getFilePath(file, null), "
preview4
", "
progress1
", 1).then(function(path) {
vm,
file,
getFilePath(file, null),
"
preview4
",
"
progress1
",
1
).then(function(path) {
closeLoading(vm);
closeLoading(vm);
console.log("
上传成功后路径
",
path);
console.log('上传成功后路径',
path);
if (fileLimit.show == "
uploadImgMessage1
") {
if (fileLimit.show == "
uploadImgMessage1
") {
vm.uploadImgMessage1 = false;
vm.uploadImgMessage1 = false;
} else if (fileLimit.show == "
uploadImgMessage2
") {
} else if (fileLimit.show == "
uploadImgMessage2
") {
vm.uploadImgMessage2 = false;
vm.uploadImgMessage2 = false;
} else if (fileLimit.show == "
uploadImgMessage3
") {
}
else if (fileLimit.show == "
uploadImgMessage3
") {
vm.uploadImgMessage3 = false;
vm.uploadImgMessage3 = false;
}
}
vm.formData[fileLimit.key] = path.fullPath;
vm.formData[fileLimit.key] = path.fullPath;
...
@@ -549,27 +527,24 @@ export default {
...
@@ -549,27 +527,24 @@ export default {
return isJPG && isLt2M;
return isJPG && isLt2M;
},
},
// 是否公开
// 是否公开
changeScope(value)
{
changeScope(value)
{
if (value == 2)
{
if(value == 2)
{
this.isCollectShow = true;
this.isCollectShow = true;
} else {
}
else {
this.isCollectShow = false;
this.isCollectShow = false;
}
}
},
},
// 校验直播简介文字版或图片版
// 校验直播简介文字版或图片版
checkIntroduce()
{
checkIntroduce()
{
// console.log(this.formData.rtcIntroduces[0].content);
// console.log(this.formData.rtcIntroduces[0].content);
console.log(this.formData.rtcIntroduces[1].content);
console.log(this.formData.rtcIntroduces[1].content);
let flag = true;
let flag = true;
if (
if(this.formData.textContent == ""
(this.formData.textContent == "") &
& this.formData.imageContent == ""){
(this.formData.imageContent == "")
) {
flag = false;
flag = false;
this.$message.error(
this.$message.error("
直播简介中可选择仅文字版,仅图片版或文字版
+
图片版
");
"
直播简介中可选择仅文字版,仅图片版或文字版
+
图片版
"
);
}
}
return flag;
return flag;
},
},
...
@@ -578,18 +553,20 @@ export default {
...
@@ -578,18 +553,20 @@ export default {
if (type == 1) {
if (type == 1) {
this.imageContent = "";
this.imageContent = "";
this.imgMouseOver1 = false;
this.imgMouseOver1 = false;
} else if (type == 2) {
}
else if (type == 2) {
this.formData.cover = "";
this.formData.cover = "";
this.imgMouseOver2 = false;
this.imgMouseOver2 = false;
} else if (type == 3) {
}
else if (type == 3) {
this.formData.preImage = "";
this.formData.preImage = "";
this.imgMouseOver3 = false;
this.imgMouseOver3 = false;
}
}
},
},
// 校验直播封面
// 校验直播封面
checkCover()
{
checkCover()
{
let flag = true;
let flag = true;
if (this.formData.cover == "")
{
if(this.formData.cover == "")
{
flag = false;
flag = false;
this.$message.error("
请上传直播封面!
");
this.$message.error("
请上传直播封面!
");
}
}
...
@@ -597,9 +574,9 @@ export default {
...
@@ -597,9 +574,9 @@ export default {
return flag;
return flag;
},
},
// 校验直播预告图
// 校验直播预告图
checkPreImage()
{
checkPreImage()
{
let flag = true;
let flag = true;
if (this.formData.preImage == "")
{
if(this.formData.preImage == "")
{
flag = false;
flag = false;
this.$message.error("
请上传直播预告图!
");
this.$message.error("
请上传直播预告图!
");
}
}
...
@@ -607,65 +584,42 @@ export default {
...
@@ -607,65 +584,42 @@ export default {
return flag;
return flag;
},
},
// 校验嘉宾姓名和手机号
// 校验嘉宾姓名和手机号
checkGuests()
{
checkGuests()
{
let flag = true;
let flag = true;
if ((this.formData.guests != null) & (this.formData.guests.length >= 1)) {
if(this.formData.guests != null & this.formData.guests.length >= 1){
for (let i = 0; i < this.formData.guests.length; i++) {
for(let i=0;i<this.formData.guests.length;i++) {
if (
if(this.formData.guests[i].username != "" & this.formData.guests[i].phone == ""){
(this.formData.guests[i].username != "") &
this.$message.error("
请输入嘉宾
'" + this.formData.guests[i].username + "'
的手机号
");
(this.formData.guests[i].phone == "")
) {
this.$message.error(
"
请输入嘉宾
'" + this.formData.guests[i].username + "'
的手机号
"
);
flag = false;
flag = false;
break;
break;
} else if (
}
(this.formData.guests[i].username != "") &
else if(this.formData.guests[i].username != "" & this.formData.guests[i].phone != ""){
(this.formData.guests[i].phone != "")
) {
if(!this.checkPhone(this.formData.guests[i].phone)){
if (!this.checkPhone(this.formData.guests[i].phone)) {
this.$message.error("
请输入嘉宾
'" + this.formData.guests[i].username + "'
的正确手机号
");
this.$message.error(
"
请输入嘉宾
'" +
this.formData.guests[i].username +
"'
的正确手机号
"
);
flag = false;
flag = false;
break;
break;
}
}
// 检查讲师和嘉宾手机号是否相同
// 检查讲师和嘉宾手机号是否相同
if (
if(!this.checkUniquePhone(this.formData.lecturesPhone, this.formData.guests[i].phone)){
!this.checkUniquePhone(
this.formData.lecturesPhone,
this.formData.guests[i].phone
)
) {
this.$message.error("
请输入不同的手机号
");
this.$message.error("
请输入不同的手机号
");
flag = false;
flag = false;
break;
break;
}
}
// 检查嘉宾手机号是否相同
// 检查嘉宾手机号是否相同
if (this.formData.guests.length > 1) {
if(this.formData.guests.length > 1){
for (let j = i + 1; j < this.formData.guests.length; j++) {
for(let j= i + 1;j<this.formData.guests.length;j++) {
if (
if(!this.checkUniquePhone(this.formData.guests[i].phone, this.formData.guests[j].phone)){
!this.checkUniquePhone(
this.formData.guests[i].phone,
this.formData.guests[j].phone
)
) {
this.$message.error("
请输入不同的手机号
");
this.$message.error("
请输入不同的手机号
");
flag = false;
flag = false;
break;
break;
}
}
}
}
}
}
}
} else if (
else if(this.formData.guests[i].username == "" & this.formData.guests[i].phone != ""){
(this.formData.guests[i].username == "") &
this.$message.error("
请输入手机号为
'" + this.formData.guests[i].phone + "'
嘉宾的姓名
");
(this.formData.guests[i].phone != "")
) {
this.$message.error(
"
请输入手机号为
'" + this.formData.guests[i].phone + "'
嘉宾的姓名
"
);
flag = false;
flag = false;
break;
break;
}
}
...
@@ -675,9 +629,9 @@ export default {
...
@@ -675,9 +629,9 @@ export default {
return flag;
return flag;
},
},
checkUniquePhone(phone1, phone2)
{
checkUniquePhone(phone1, phone2)
{
let flag = true;
let flag = true;
if ((phone1 != "") & (phone2 != "") & (phone1 == phone2))
{
if(phone1 != "" & phone2 != "" & phone1 == phone2)
{
flag = false;
flag = false;
}
}
...
@@ -685,17 +639,19 @@ export default {
...
@@ -685,17 +639,19 @@ export default {
},
},
// 增加嘉宾
// 增加嘉宾
addGuest(index) {
addGuest(index) {
if (!this.checkGuests()) {
if(!this.checkGuests()){
return;
return;
}
}
if ((this.formData.guests != null) & (this.formData.guests.length >= 5))
{
if(this.formData.guests != null & this.formData.guests.length >= 5)
{
this.$message.error("
嘉宾最多
5
位!
");
this.$message.error("
嘉宾最多
5
位!
");
// this.guestErrFlag = true;
// this.guestErrFlag = true;
// setTimeout(function () {
// setTimeout(function () {
// this.guestErrFlag = false;
// this.guestErrFlag = false;
// }, 3000)
// }, 3000)
} else {
}
this.formData.guests.push({ username: "", phone: "" });
else {
this.formData.guests.push({username: "", phone: ""});
// this.formData.guests.splice(index + 1, 0, "");
// this.formData.guests.splice(index + 1, 0, "");
}
}
},
},
...
@@ -705,38 +661,40 @@ export default {
...
@@ -705,38 +661,40 @@ export default {
this.formData.guests.splice(index, 1);
this.formData.guests.splice(index, 1);
},
},
// 封装数据
// 封装数据
initFormData()
{
initFormData()
{
this.formData.scope = String(this.formData.scope);
this.formData.scope = String(this.formData.scope);
if (this.formData.scope == "
2
")
{
if(this.formData.scope == "
2
")
{
this.isCollectShow = true;
this.isCollectShow = true;
}
}
this.formData.infoCollect = String(this.formData.infoCollect);
this.formData.infoCollect = String(this.formData.infoCollect);
if (this.formData.rtcIntroduces != null)
{
if(this.formData.rtcIntroduces != null)
{
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;
} 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;
}
}
}
}
}
}
// 设置讲师
// 设置讲师
if (this.formData.lecturers != null)
{
if(this.formData.lecturers != null)
{
this.formData.lecturesUserName = this.formData.lecturers[0].username;
this.formData.lecturesUserName = this.formData.lecturers[0].username;
this.formData.lecturesPhone = this.formData.lecturers[0].phone;
this.formData.lecturesPhone = this.formData.lecturers[0].phone;
}
}
},
},
// 封装数据
// 封装数据
setFormData()
{
setFormData()
{
if (!this.formData.circleId)
{
if(!this.formData.circleId)
{
this.formData.circleId = 1;
// 测试用
this.formData.circleId = 1;
// 测试用
}
}
if (this.formData.textContent)
{
if(this.formData.textContent)
{
this.formData.rtcIntroduces[0].type = 1;
this.formData.rtcIntroduces[0].type = 1;
this.formData.rtcIntroduces[0].content = this.formData.textContent;
this.formData.rtcIntroduces[0].content = this.formData.textContent;
}
}
// 直播简介图片版
// 直播简介图片版
if (this.formData.imageContent)
{
if(this.formData.imageContent)
{
this.formData.rtcIntroduces[1].type = 2;
this.formData.rtcIntroduces[1].type = 2;
this.formData.rtcIntroduces[1].content = this.formData.imageContent;
this.formData.rtcIntroduces[1].content = this.formData.imageContent;
}
}
...
@@ -749,17 +707,18 @@ export default {
...
@@ -749,17 +707,18 @@ export default {
// this.formData.lecturers.push({username: this.formData.lecturesUserName, phone: this.formData.lecturesPhone});
// this.formData.lecturers.push({username: this.formData.lecturesUserName, phone: this.formData.lecturesPhone});
// }
// }
this.formData.lecturers[0].username = this.formData.lecturesUserName;
this.formData.lecturers[0].username = this.formData.lecturesUserName;
this.formData.lecturers[0].phone = this.formData.lecturesPhone;
this.formData.lecturers[0].phone = this.formData.lecturesPhone;
},
},
complete(formName) {
complete(formName) {
console.log(this.formData);
console.log(this.formData);
this.$refs[formName].validate(valid
=> {
this.$refs[formName].validate((valid)
=> {
if (valid) {
if (valid) {
this.submit();
this.submit();
} else {
} else {
console.log("
error
submit
!!
"
);
console.log('error submit!!'
);
return false;
return false;
}
}
});
});
...
@@ -769,42 +728,44 @@ export default {
...
@@ -769,42 +728,44 @@ export default {
submit() {
submit() {
this.setFormData();
this.setFormData();
// 校验直播简介文字版或图片版
// 校验直播简介文字版或图片版
if (!this.checkIntroduce())
{
if(!this.checkIntroduce())
{
return;
return;
}
}
// 校验直播封面、预告图
// 校验直播封面、预告图
if (!this.checkCover() || !this.checkPreImage())
{
if(!this.checkCover() || !this.checkPreImage())
{
return;
return;
}
}
// 校验嘉宾姓名和手机号
// 校验嘉宾姓名和手机号
if (!this.checkGuests())
{
if(!this.checkGuests())
{
return;
return;
}
}
let req = this.formData;
let req = this.formData;
openLoading(this);
openLoading(this);
this.POST("
rtc
/
liveAdmin
", req).then(res
=> {
this.POST('rtc/liveAdmin', req).then((res)
=> {
closeLoading(this);
closeLoading(this);
if (res.code == "
000000
"
) {
if( res.code == '000000'
) {
this.$message.success("
操作成功
");
this.$message.success("
操作成功
");
this.$router.push({
this.$router.push({
// path: '/live-manage',
path: '/live-manage',
path: "
/
live
-
manage
?
id
=
" + this.circleId
})
});
} else {
this.$message.error("
操作失败,请重试
");
}
}
});
else {
this.$message.error("
操作失败,请重试
");
}
}
})
},
},
}
}
};
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.yqrange-index-wrapper
{
.yqrange-index-wrapper
{
.yqrange-index-content
{
.yqrange-index-content
{
background
:
#fff
;
background
:
#fff
;
padding
:
10px
;
padding
:
10px
;
.step-content
{
.step-content
{
overflow
:
hidden
;
overflow
:
hidden
;
height
:
60px
;
height
:
60px
;
padding
:
15px
0
50px
0
;
padding
:
15px
0
50px
0
;
...
@@ -842,9 +803,9 @@ export default {
...
@@ -842,9 +803,9 @@ export default {
border
:
1px
solid
#449284
!
important
;
border
:
1px
solid
#449284
!
important
;
}
}
}
}
.first-step
{
.first-step
{
margin-top
:
20px
;
margin-top
:
20px
;
.p-title
{
.p-title
{
padding-left
:
10px
;
padding-left
:
10px
;
margin-bottom
:
15px
;
margin-bottom
:
15px
;
}
}
...
@@ -911,10 +872,10 @@ export default {
...
@@ -911,10 +872,10 @@ export default {
}
}
}
}
}
}
}
}
.
required-label
.
el-form-item__label
:
:
before
{
.
required-label
.
el-form-item__label
:
:
before
{
content
:
"*"
;
content
:
'*'
;
color
:
#f56c6c
;
color
:
#F56C6C
;
margin-right
:
4px
;
margin-right
:
4px
;
}
}
</
style
>
</
style
>
src/views/yqrange/live-manage.vue
浏览文件 @
25107180
...
@@ -163,15 +163,15 @@ export default {
...
@@ -163,15 +163,15 @@ export default {
}
}
],
],
tableData
:
[
tableData
:
[
{
//
{
liveName
:
"浙江医学大会第二场"
,
//
liveName: "浙江医学大会第二场",
liveScope
:
1
,
//直播范围 1-非公开 2-公开
//
liveScope: 1, //直播范围 1-非公开 2-公开
liveStatus
:
1
,
//直播状态 1-未开始 2-直播中 3-暂停中 4-已结束 5-回放中目前只能用到1,2,4
//
liveStatus: 1, //直播状态 1-未开始 2-直播中 3-暂停中 4-已结束 5-回放中目前只能用到1,2,4
createTime
:
""
,
//
createTime: "",
startTime
:
""
,
//
startTime: "",
endTime
:
""
,
//
endTime: "",
rtcId
:
0
//
rtcId: 0
}
//
}
],
],
dialogStatisticsData
:
[
dialogStatisticsData
:
[
{
{
...
@@ -210,7 +210,10 @@ export default {
...
@@ -210,7 +210,10 @@ export default {
//新建直播
//新建直播
createLive
()
{
createLive
()
{
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
"/create-live?circleId="
+
this
.
circleId
,
path
:
"/create-live"
,
query
:
{
circleId
:
this
.
circleId
}
});
});
},
},
//弹出直播链接弹窗
//弹出直播链接弹窗
...
...
src/views/yqrange/yq-range.vue
浏览文件 @
25107180
...
@@ -49,12 +49,14 @@
...
@@ -49,12 +49,14 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
min-width=
"370"
align=
"center"
>
<el-table-column
label=
"操作"
min-width=
"370"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
@
click=
"publishRange(scope.row)"
v-if=
"scope.row.status == 2"
type=
"text"
size=
"small"
>
上线
</el-button>
<div
v-if=
"scope.row.status != 50"
>
<el-button
@
click=
"unPublishRange(scope.row)"
v-if=
"scope.row.status == 1"
type=
"text"
size=
"small"
>
下线
</el-button>
<el-button
@
click=
"publishRange(scope.row)"
v-if=
"scope.row.status != 30"
type=
"text"
size=
"small"
>
上线
</el-button>
<el-button
@
click=
"unPublishRange(scope.row)"
v-if=
"scope.row.status == 30"
type=
"text"
size=
"small"
>
下线
</el-button>
<el-button
@
click=
"liveManage(scope.row)"
type=
"text"
size=
"small"
>
直播管理
</el-button>
<el-button
@
click=
"liveManage(scope.row)"
type=
"text"
size=
"small"
>
直播管理
</el-button>
<el-button
@
click=
"roleManage(scope.row)"
type=
"text"
size=
"small"
>
成员管理
</el-button>
<el-button
@
click=
"roleManage(scope.row)"
type=
"text"
size=
"small"
>
成员管理
</el-button>
<el-button
@
click=
"editRange(scope.row)"
type=
"text"
size=
"small"
>
编辑
</el-button>
<el-button
@
click=
"editRange(scope.row)"
type=
"text"
size=
"small"
>
编辑
</el-button>
<el-button
@
click=
"deleteRange(scope.row)"
type=
"text"
size=
"small"
v-if=
"showAllFlag"
>
解散圈子
</el-button>
<el-button
@
click=
"deleteRange(scope.row)"
type=
"text"
size=
"small"
v-if=
"showAllFlag"
>
解散圈子
</el-button>
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -211,7 +213,7 @@ export default {
...
@@ -211,7 +213,7 @@ export default {
customClass
:
'range-make-box'
,
customClass
:
'range-make-box'
,
}).
then
(()
=>
{
}).
then
(()
=>
{
// confirm
// confirm
this
.
updateStatus
(
row
.
id
,
"3"
);
this
.
updateStatus
(
row
.
id
,
"3
0
"
);
this
.
$message
.
success
(
"上线成功"
);
this
.
$message
.
success
(
"上线成功"
);
}).
catch
(()
=>
{
}).
catch
(()
=>
{
// cancel
// cancel
...
@@ -226,7 +228,7 @@ export default {
...
@@ -226,7 +228,7 @@ export default {
type
:
'warning'
,
type
:
'warning'
,
customClass
:
'range-make-box'
,
customClass
:
'range-make-box'
,
}).
then
(()
=>
{
}).
then
(()
=>
{
this
.
updateStatus
(
row
.
id
,
"
1
"
);
this
.
updateStatus
(
row
.
id
,
"
40
"
);
// confirm
// confirm
}).
catch
(()
=>
{
}).
catch
(()
=>
{
// cancel
// cancel
...
@@ -239,17 +241,17 @@ export default {
...
@@ -239,17 +241,17 @@ export default {
updateRangeStatus
(
params
).
then
((
res
)
=>
{
updateRangeStatus
(
params
).
then
((
res
)
=>
{
closeLoading
(
this
);
closeLoading
(
this
);
if
(
res
.
code
==
"000000"
)
{
if
(
res
.
code
==
"000000"
)
{
if
(
status
==
"
1
"
){
if
(
status
==
"
40
"
){
this
.
$message
.
success
(
"下线成功"
);
this
.
$message
.
success
(
"下线成功"
);
}
}
else
if
(
status
==
"
2
"
)
{
else
if
(
status
==
"
30
"
)
{
this
.
$message
.
success
(
"上线成功"
);
this
.
$message
.
success
(
"上线成功"
);
}
}
}
else
{
}
else
{
if
(
status
==
"
1
"
){
if
(
status
==
"
40
"
){
this
.
$message
.
success
(
"下线失败,请重试"
);
this
.
$message
.
success
(
"下线失败,请重试"
);
}
}
else
if
(
status
==
"
2
"
)
{
else
if
(
status
==
"
30
"
)
{
this
.
$message
.
success
(
"上线失败,请重试"
);
this
.
$message
.
success
(
"上线失败,请重试"
);
}
}
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录