41 lines
1.3 KiB
HTML
41 lines
1.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<link rel="stylesheet" href="/layui/css/layui.css">
|
|
</head>
|
|
|
|
<body>
|
|
<form class="layui-form" action="">
|
|
<div class="layui-form-item" id="anchroList">
|
|
</div>
|
|
</form>
|
|
</body>
|
|
<script src="/layui/layui.js"></script>
|
|
<script src="/js/jquery-3.2.1.js"></script>
|
|
<script src="/js/CommonConfig.js"></script>
|
|
<script src="/js/httpUtils.js"></script>
|
|
|
|
<script id="anchorListModel" type="text/html">
|
|
<select id="anchorRoomId" name="modules" lay-verify="required" lay-search>
|
|
<option value="">直接选择或搜索选择</option>
|
|
{{# layui.each(d.data, function(index, item){ }}
|
|
<option value="{{= item.live_room_id }}">[{{= item.live_room_id}}]{{= item.anchorName}}</option>
|
|
{{# }); }}
|
|
</select>
|
|
</script>
|
|
<script>
|
|
layui.use(['laytpl', 'form'], function () {
|
|
var laytpl = layui.laytpl;
|
|
var form = layui.form;
|
|
getAllConfig(-1, -1)
|
|
.then(data => {
|
|
console.log(data)
|
|
var view = $("#anchroList").get(0);
|
|
laytpl($('#anchorListModel').get(0).innerHTML).render(data, function (html) {
|
|
view.innerHTML = html;
|
|
form.render('select');
|
|
});
|
|
})
|
|
})
|
|
</script> |