update 调整弹幕按批次加载,防止过多
This commit is contained in:
@@ -29,16 +29,26 @@
|
||||
<input type="checkbox" name="recordLive" lay-skin="switch" lay-filter="switchTest" title="启用|禁用">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">录制视频时<br>同步录制弹幕</label>
|
||||
<div class="layui-input-block"><br>
|
||||
<input type="checkbox" name="syncDanmuForLive" lay-skin="switch" lay-filter="switchSync" title="启用|禁用">
|
||||
<i class="layui-icon layui-icon-help layui-text-em " onclick="timeTips2(this)"></i>
|
||||
<br>
|
||||
<br>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">录制日期</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="checkbox" name="week_1" title="周一" lay-skin="tag">
|
||||
<input type="checkbox" name="week_2" title="周二" lay-skin="tag">
|
||||
<input type="checkbox" name="week_3" title="周三" lay-skin="tag">
|
||||
<input type="checkbox" name="week_4" title="周四" lay-skin="tag">
|
||||
<input type="checkbox" name="week_5" title="周五" lay-skin="tag">
|
||||
<input type="checkbox" name="week_6" title="周六" lay-skin="tag">
|
||||
<input type="checkbox" name="week_7" title="周日" lay-skin="tag">
|
||||
<input type="checkbox" name="week_1" title="周一" lay-skin="tag">
|
||||
<input type="checkbox" name="week_2" title="周二" lay-skin="tag">
|
||||
<input type="checkbox" name="week_3" title="周三" lay-skin="tag">
|
||||
<input type="checkbox" name="week_4" title="周四" lay-skin="tag">
|
||||
<input type="checkbox" name="week_5" title="周五" lay-skin="tag">
|
||||
<input type="checkbox" name="week_6" title="周六" lay-skin="tag">
|
||||
<input type="checkbox" name="week_7" title="周日" lay-skin="tag">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
@@ -96,6 +106,10 @@
|
||||
layer.tips('仅在当前时间范围内录制,如遇到正在直播,则延迟到下播时停止录制', that);
|
||||
}
|
||||
|
||||
}
|
||||
function timeTips2(that) {
|
||||
layer.tips('启用后,录制视频时会同步录制弹幕,下播后会同步停止录制.同时上面录制弹幕按钮将失效', that);
|
||||
|
||||
}
|
||||
var roomId = getParam("roomId");
|
||||
var editArray = getParam("array")
|
||||
@@ -125,7 +139,7 @@
|
||||
field.weeks = weeks;
|
||||
console.log(field)
|
||||
if (editArray === null) {
|
||||
var loadIndex=showLoadingDialog();
|
||||
var loadIndex = showLoadingDialog();
|
||||
addRoomConfig(field)
|
||||
.then(json => {
|
||||
layer.close(loadIndex)
|
||||
@@ -141,7 +155,7 @@
|
||||
editArray.split(',').forEach(element => {
|
||||
array.push(element)
|
||||
});
|
||||
var loadIndex=showLoadingDialog();
|
||||
var loadIndex = showLoadingDialog();
|
||||
setArrayRoomConfig(array, field)
|
||||
.then(json => {
|
||||
layer.close(loadIndex)
|
||||
@@ -170,6 +184,14 @@
|
||||
type: 'time',
|
||||
range: true
|
||||
});
|
||||
form.on('switch(switchSync)', function (data) {
|
||||
if (form.val('form-filter').syncDanmuForLive === 'on') {
|
||||
$("[name='recordDanmu']").prop("disabled", true);
|
||||
} else {
|
||||
$("[name='recordDanmu']").prop("disabled", false);
|
||||
}
|
||||
form.render();
|
||||
});
|
||||
function init() {
|
||||
getUserInfo();
|
||||
if (roomId !== null) {
|
||||
@@ -202,13 +224,18 @@
|
||||
'recordDanmu': json.recordDanmu,
|
||||
'recordDanmuDate': json.recordDanmuDate,
|
||||
'recordLiveDate': json.recordLiveDate,
|
||||
'syncDanmuForLive': json.syncDanmuForLive,
|
||||
};
|
||||
|
||||
for (let i = 0; i < json.weeks.length; i++) {
|
||||
result[`week_${json.weeks[i]}`] = true;
|
||||
}
|
||||
form.val('form-filter', result);
|
||||
|
||||
if (json.syncDanmuForLive) {
|
||||
$("[name='recordDanmu']").prop("disabled", true);
|
||||
} else {
|
||||
$("[name='recordDanmu']").prop("disabled", false);
|
||||
}
|
||||
$('#url').get(0).disabled = true;
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user