update
This commit is contained in:
@@ -32,20 +32,20 @@
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">录制日期</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="checkbox" name="2" title="周一" lay-skin="tag">
|
||||
<input type="checkbox" name="3" title="周二" lay-skin="tag">
|
||||
<input type="checkbox" name="4" title="周三" lay-skin="tag">
|
||||
<input type="checkbox" name="5" title="周四" lay-skin="tag">
|
||||
<input type="checkbox" name="6" title="周五" lay-skin="tag">
|
||||
<input type="checkbox" name="7" title="周六" lay-skin="tag">
|
||||
<input type="checkbox" name="1" title="周日" lay-skin="tag">
|
||||
<input type="checkbox" checked name="week_1" title="周一" lay-skin="tag">
|
||||
<input type="checkbox" checked name="week_2" title="周二" lay-skin="tag">
|
||||
<input type="checkbox" checked name="week_3" title="周三" lay-skin="tag">
|
||||
<input type="checkbox" checked name="week_4" title="周四" lay-skin="tag">
|
||||
<input type="checkbox" checked name="week_5" title="周五" lay-skin="tag">
|
||||
<input type="checkbox" checked name="week_6" title="周六" lay-skin="tag">
|
||||
<input type="checkbox" checked name="week_7" title="周日" lay-skin="tag">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">弹幕录制时间</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="recordDanmuDate" id="recordDanmuDate" lay-verify="required" autocomplete="off"
|
||||
class="layui-input">
|
||||
<input type="text" name="recordDanmuDate" id="recordDanmuDate" value="00:00:00 - 23:59:59"
|
||||
lay-verify="required" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
<div class="layui-form-mid layui-text-em" onclick="timeTips(this)"><i
|
||||
class="layui-icon layui-icon-help"></i> </div>
|
||||
@@ -53,8 +53,8 @@
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">视频录制时间</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="recordLiveDate" id="recordLiveDate" lay-verify="required"
|
||||
autocomplete="off" class="layui-input">
|
||||
<input type="text" name="recordLiveDate" id="recordLiveDate" value="00:00:00 - 23:59:59"
|
||||
lay-verify="required" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
<div class="layui-form-mid layui-text-em" onclick="timeTips(this)"><i
|
||||
class="layui-icon layui-icon-help"></i> </div>
|
||||
@@ -90,7 +90,7 @@
|
||||
<script src="/js/CommonConfig.js"></script>
|
||||
<script>
|
||||
function timeTips(that) {
|
||||
layer.tips('填写[分钟][小时][星期],空格分割,例如预定每周6晚上8点之后才开始录制则填写:* 8 6', that);
|
||||
layer.tips('是从开始到结束时间范围内,主播开播会启动录制,超过结束范围不会中断正在录制的任务', that);
|
||||
}
|
||||
var roomId = getParam("roomId");
|
||||
|
||||
@@ -109,16 +109,24 @@
|
||||
|
||||
// 此处可执行 Ajax 等操作
|
||||
// …
|
||||
var weeks = [
|
||||
]
|
||||
for (let i = 1; i <= 7; i++) {
|
||||
if (field[`week_${i}`] === 'on') {
|
||||
weeks.push(i.toString());
|
||||
}
|
||||
}
|
||||
field.weeks = weeks;
|
||||
console.log(field)
|
||||
// addRoomConfig(field)
|
||||
// .then(json => {
|
||||
// layer.msg(json.message, function () {
|
||||
// if (json.status == 100) {
|
||||
// close()
|
||||
// }
|
||||
// })
|
||||
addRoomConfig(field)
|
||||
.then(json => {
|
||||
layer.msg(json.message, function () {
|
||||
if (json.status == 100) {
|
||||
close()
|
||||
}
|
||||
})
|
||||
|
||||
// })
|
||||
})
|
||||
|
||||
return false; // 阻止默认 form 跳转
|
||||
});
|
||||
@@ -159,13 +167,19 @@
|
||||
.then(data => {
|
||||
if (data.status === 100) {
|
||||
var json = data.data;
|
||||
form.val('form-filter', {
|
||||
var result = {
|
||||
'url': 'https://live.bilibili.com/' + json.live_room_id,
|
||||
'recordLive': json.recordLive,
|
||||
'recordDanmu': json.recordDanmu,
|
||||
'recordDanmuDate': json.recordDanmuDate,
|
||||
'recordLiveDate': json.recordLiveDate
|
||||
});
|
||||
'recordLiveDate': json.recordLiveDate,
|
||||
};
|
||||
|
||||
for (let i = 0; i < json.weeks.length; i++) {
|
||||
result[`week_${json.weeks[i]}`] = true;
|
||||
}
|
||||
form.val('form-filter',result);
|
||||
|
||||
$('#url').get(0).disabled = true;
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user