网站首页 网站源码
website
站点相关全部源代码,隐藏了一些关于服务器的信息
@{
    Layout = null;
}
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>发现</title>

    <link rel="stylesheet" href="/lib/lay/css/layui.css">
    <style>
    </style>
</head>

<body>

    <div class="layui-tab layui-tab-card">
        <ul class="layui-tab-title">
            <li class="layui-this">查找好友</li>
            <li>查找群组</li>
        </ul>
        <div class="layui-tab-content" style="height: 100px;">
            <div class="layui-tab-item layui-show">
                <div style="margin: 15px;">
                    <blockquote class="layui-elem-quote">
                        此为自定义的【查找】页面,因需求不一,所以官方暂不提供该模版结构与样式,实际使用时,可移至该文件到你的项目中,对页面自行把控。

                    </blockquote>
                    <form class="layui-form" action="">
                        <div class="layui-form-item">
                            <label class="layui-form-label">昵称/id</label>
                            <div class="layui-input-block">
                                <input type="text" name="title" required lay-verify="required" placeholder="昵称/id" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit lay-filter="findFriend">查找</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <div class="layui-tab-item">2</div>
        </div>
    </div>




    <script src="/lib/layui/layui.js"></script>
    <script>
        layui.use(['layim', 'laypage', 'element','form'], function () {
            var layim = layui.layim,
                layer = layui.layer,
                laytpl = layui.laytpl,
                $ = layui.jquery,
                laypage = layui.laypage,
                form = layui.form,
                element = layui.element;

            layim.add({
                type: 'friend' //friend:申请加好友、group:申请加群
                , username: 'xxx' //好友昵称,若申请加群,参数为:groupname
                , avatar: '/images/guest.png' //头像
                , submit: function (group, remark, index) { //一般在此执行Ajax和WS,以通知对方
                    console.log(group); //获取选择的好友分组ID,若为添加群,则不返回值
                    console.log(remark); //获取附加信息
                    layer.close(index); //关闭改面板
                }
            });
            //一些添加好友请求之类的交互参见文档

        });
    </script>
</body>

</html>
loading