完善web一些功能
This commit is contained in:
@@ -24,7 +24,11 @@
|
||||
<script type="text/html" id="toolDemo">
|
||||
<div class="layui-clear-space">
|
||||
<a class="layui-btn layui-btn-xs" lay-event="del">删除</a>
|
||||
<a class="layui-btn layui-btn-xs" lay-event="input">导入关注</a>
|
||||
<!-- <a class="layui-btn layui-btn-xs" lay-event="input">导入关注</a> -->
|
||||
<a class="layui-btn layui-btn-xs" lay-event="more">
|
||||
导入
|
||||
<i class="layui-icon layui-icon-down"></i>
|
||||
</a>
|
||||
</div>
|
||||
</script>
|
||||
<script>
|
||||
@@ -143,8 +147,28 @@
|
||||
var checkStatus = table.checkStatus(id);
|
||||
var othis = lay(this);
|
||||
switch (obj.event) {
|
||||
case 'input':
|
||||
onClickInput(data.uid)
|
||||
case 'more':
|
||||
dropdown.render({
|
||||
elem: this, // 触发事件的 DOM 对象
|
||||
show: true, // 外部事件触发即显示
|
||||
data: [{
|
||||
title: '关注列表',
|
||||
id: 'follow'
|
||||
}, {
|
||||
title: '正在开播',
|
||||
id: 'live'
|
||||
}],
|
||||
click: function (menudata) {
|
||||
if (menudata.id === 'follow') {
|
||||
onClickInput(data.uid)
|
||||
} else if (menudata.id === 'live') {
|
||||
onClickFollow(data.uid)
|
||||
}
|
||||
},
|
||||
align: 'right', // 右对齐弹出
|
||||
style: 'box-shadow: 1px 1px 10px rgb(0 0 0 / 12%);' // 设置额外样式
|
||||
})
|
||||
|
||||
break;
|
||||
};
|
||||
});
|
||||
@@ -172,10 +196,33 @@
|
||||
window.location.href = url.toString();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function onClickFollow(uid) {
|
||||
layer.open({
|
||||
type: 2, // page 层类型
|
||||
area: ['650px', '400px'],
|
||||
title: '选择主播',
|
||||
shade: 0.6, // 遮罩透明度
|
||||
shadeClose: false, // 点击遮罩区域,关闭弹层
|
||||
maxmin: true, // 允许全屏最小化
|
||||
anim: 1, // 0-6 的动画形式,-1 不开启
|
||||
// btn: ['确定', '取消'],
|
||||
content: '/html/ui/userFollowLive.html?uid=' + uid,
|
||||
yes: function (index, layero) {
|
||||
var iframeWin = window[layero.find('iframe')[0]['name']];
|
||||
var anchorRoomId = iframeWin.$('#anchorRoomId')[0].value;
|
||||
if (!hasString(anchorRoomId)) {
|
||||
layer.msg("请选择")
|
||||
return
|
||||
}
|
||||
let url = new URL(window.location.href);
|
||||
url.searchParams.set('roomId', anchorRoomId);
|
||||
window.location.href = url.toString();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user