<!DOCTYPE html>
<!--解决idea thymeleaf 表达式模板报红波浪线-->
<!--suppress ALL -->
<html xmlns:th="http://www.thymeleaf.org">
<head>

    <!--    <link th:href="@{/common/step-lay/step.css}" rel="stylesheet" type="text/css"/>-->
    <!-- 引入公用部分 -->
    <script th:replace="common/head::static"></script>

    <style type="text/css">
        /*.layui-form-label {*/
        /*    width: 380px !important;*/
        /*}*/
        .layui-table-cell {
            height: 60px;
            line-height: 60px
        }
    </style>
</head>
<body>
<div class="layui-row layui-col-space15">
    <!-- 树 -->
    <div class="layui-col-md12">
        <div class="layui-card">
            <div class="layui-card-body" id="cardBody">
                <!-- 表格主体 -->
                <table class="layui-hide" id="mainTable" lay-filter="test"></table>
                <!-- 模板 -->
                <script type="text/html" id="mainTableToolbarDemo">
                    <div class="layui-btn-container" style="display: flex;align-items: center; margin-bottom: 10px;">
                        <!--                        <button class="layui-btn layui-btn-sm " style="margin-bottom: 0;" lay-event="addNewRow">新增<i class="layui-icon layui-icon-add-1"></i></button>-->
                        <input type="text" id="queryByLoginName" name="queryByLoginName" autocomplete="off"
                               placeholder="输入电话或者邮箱查询" class="layui-input layui-btn-sm "
                               style="width: 300px;margin-right: 10px;">
                        <button class="layui-btn layui-btn-sm " style="margin-bottom: 0;" lay-event="query">查询<i
                                class="layui-icon layui-icon-search"></i></button>
                    </div>
                </script>


                <script type="text/html" id="mainTableBarDemo">
                    <a class="layui-btn layui-btn-xs" lay-event="detail">用户详情</a>
                    {{# if(d.status !== 1){}}
                    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">预删除</a>
                    {{#}else{}}
                    <a class="layui-btn layui-btn-disabled layui-btn-xs" >已删除</a>
                    {{#}}}
                </script>
                <script type="text/html" id="bindButton">
                    {{# if(d.bluetoothStatus == 1){}}
                    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="unBind">解除绑定用户</a>
                    {{#}else{}}
                    <a class="layui-btn layui-btn-disabled layui-btn-xs">尚未绑定用户</a>
                    {{#}}}
                </script>

                <script type="text/html" id="avatarPicture">
                    <img src="{{domainName}}{{d.avatarUrl}}" style="" width="60" height="60" alt="">
                </script>
                <script type="text/html" id="gameIcon">
                    <img src="{{domainName}}{{d.gameIcon}}" style="" width="60" height="60" alt="">
                </script>


                <!--                <script type="text/html" id="gameTypeScript">-->
                <!--                    <select id="demoCity1" class="layui-border" lay-ignore>-->
                <!--                        <option th:each="item,iterStat : ${categoryList}"  th:value="${item.categoryType}" th:text="${item.categoryName }">-->
                <!--                        </option>-->
                <!--                    </select>-->
                <!--                </script>-->
            </div>
        </div>

    </div>
    <!-- 操作表单 -->
    <div class="layui-col-md12" style="display:none;" id="show_user_detail">
        <div class="layui-card">
            <div class="layui-card-body">
                <form id="userDetailForm" class="layui-form layui-form-pane" lay-filter="userDetailForm">
                    <div class="layui-form-item">
                        <label class="layui-form-label">用户ID</label>
                        <div class="layui-input-block">
                            <input type="text" id="userId" name="userId" autocomplete="off" placeholder="userId"
                                   class="layui-input" readonly="readonly">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">用户名称</label>
                        <div class="layui-input-block">
                            <input type="text" name="username" autocomplete="off" placeholder="username"
                                   class="layui-input" readonly="readonly">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">性别</label>
                        <div class="layui-input-block">
                            <input type="text" name="gender" autocomplete="off" placeholder="gender"
                                   class="layui-input" readonly="readonly">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">城市代码</label>
                        <div class="layui-input-block">
                            <input type="text" name="cityCode" autocomplete="off" placeholder="cityCode"
                                   class="layui-input" readonly="readonly">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">生日</label>
                        <div class="layui-input-block">
                            <input type="text" name="birthday" autocomplete="off" placeholder="birthday"
                                   class="layui-input" readonly="readonly">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">签名</label>
                        <div class="layui-input-block">
                            <input type="text" name="signature" autocomplete="off" placeholder="signature"
                                   class="layui-input" readonly="readonly">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">头像</label>
                        <div class="layui-input-block">
                            <div class="layui-upload">
                                <div class="layui-upload-list">
                                    <img class="layui-upload-img" id="avatar">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">身高</label>
                        <div class="layui-input-block">
                            <input type="text" name="height" autocomplete="off" placeholder="height"
                                   class="layui-input" readonly="readonly">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">体重</label>
                        <div class="layui-input-block">
                            <input type="text" name="weight" autocomplete="off" placeholder="weight"
                                   class="layui-input" readonly="readonly">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">状态</label>
                        <div class="layui-input-block">
                            <input type="text" name="status" autocomplete="off" placeholder="status"
                                   class="layui-input" readonly="readonly">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">注册时间</label>
                            <div class="layui-input-block">
                                <input type="text" name="registerTime" autocomplete="off" placeholder="registerTime"
                                       class="layui-input" readonly="readonly">
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item" id="tableUpdateTime">
                        <div class="layui-inline">
                            <label class="layui-form-label">更新时间</label>
                            <div class="layui-input-block">
                                <input type="text" name="updateTime" autocomplete="off" class="layui-input"
                                       readonly="readonly">
                            </div>
                        </div>
                    </div>
                </form>

            </div>
        </div>
    </div>
    <div class="layui-col-md12" style="display:none;" id="show_div">
        <div class="layui-card">
            <div class="layui-card-body">
                <form id="comForm" class="layui-form layui-form-pane" lay-filter="comForm">
                    <div class="layui-form-item">
                        <label class="layui-form-label">游戏ID</label>
                        <div class="layui-input-block">
                            <input type="text" id="modifyGameId" name="gameId" autocomplete="off" placeholder="gameId"
                                   class="layui-input" readonly="readonly">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">名字</label>
                        <div class="layui-input-block">
                            <input type="text" name="gameName" autocomplete="off" placeholder="gameName"
                                   class="layui-input" lay-verify="required">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">状态</label>
                        <div class="layui-input-block">
                            <select name="gameStatus" id="gameStatus" lay-verify="required"
                                    lay-filter="xmFilter">
                                <option value="">请选择</option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">所属分类</label>
                        <div class="layui-input-block">
                            <select name="gameType" id="gameType" lay-verify="required"
                                    lay-filter="xmFilter">
                                <option value="">请选择</option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">展示平台</label>
                        <div class="layui-input-block">
                            <select name="platform" id="platform" lay-verify="required" lay-filter="xmFilter">
                                <option value="">请选择</option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">模式类型</label>
                        <div class="layui-input-block">
                            <div id="multiselectTag" style="width: 600px;"></div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">简介</label>
                        <div class="layui-input-block">
                            <textarea name="gameDescription" placeholder="请输入内容" class="layui-textarea"></textarea>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">地址</label>
                        <div class="layui-input-block">
                            <input type="text" name="gameWebUrl" autocomplete="off" placeholder="gameWebUrl"
                                   class="layui-input">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">图标</label>
                        <div class="layui-input-block">
                            <div class="layui-upload">
                                <button type="button" class="layui-btn" id="icon">上传图标</button>
                                <div class="layui-upload-list">
                                    <img class="layui-upload-img" id="iconImage">
                                    <p id="iconText"></p>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">封面</label>
                        <div class="layui-input-block">
                            <div class="layui-upload">
                                <button type="button" class="layui-btn" id="picture">上传封面</button>
                                <div class="layui-upload-list">
                                    <img class="layui-upload-img" id="pictureImage">
                                    <p id="pictureText"></p>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">轮播图</label>
                        <div class="layui-input-block">
                            <div class="layui-upload">
                                <button type="button" class="layui-btn" id="scroll">多图片上传</button>
                                <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
                                    预览图：
                                    <div class="layui-upload-list" id="scrollImageList"></div>
                                </blockquote>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">END时间</label>
                        <div class="layui-input-block">
                            <input type="text" name="showTime" id="showTimeDate" autocomplete="off"
                                   placeholder="showTime"
                                   class="layui-input" readonly="readonly">
                        </div>
                    </div>
                    <div class="layui-form-item" id="tableTime">
                        <div class="layui-inline">
                            <label class="layui-form-label">创建时间</label>
                            <div class="layui-input-block">
                                <input type="text" name="createTime" autocomplete="off" class="layui-input"
                                       readonly="readonly">
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item" id="tableUpdateTime">
                        <div class="layui-inline">
                            <label class="layui-form-label">更新时间</label>
                            <div class="layui-input-block">
                                <input type="text" name="updateTime" autocomplete="off" class="layui-input"
                                       readonly="readonly">
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <a id="saveBtn" class="layui-btn" type="submit" lay-submit lay-filter="comFilter">保存数据修改</a>
                    </div>
                </form>

            </div>
        </div>
    </div>

    <div class="layui-col-md12" style="display:none;" id="show_add_div">
        <div class="layui-card">
            <div class="layui-card-body">
                <div class="layui-carousel" id="stepForm" lay-filter="stepForm" style="margin: 0 auto;">
                    <div carousel-item>
                        <div>
                            <form class="layui-form layui-form-pane" id="addForm" lay-filter="addForm"
                                  style="margin: 0 auto;padding-top: 40px;">
                                <input type="text" id="newGameId" name="gameId" hidden="hidden"/>-
                                <div class="layui-form-item">
                                    <label class="layui-form-label">名字</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="gameName" autocomplete="off" placeholder="gameName"
                                               class="layui-input" lay-verify="required">
                                    </div>
                                </div>
                                <!--                                <div class="layui-form-item">-->
                                <!--                                    <label class="layui-form-label">显示时间</label>-->
                                <!--                                    <div class="layui-input-block">-->
                                <!--                                        <input type="text" name="showTime" id="AddShowTimeDate" autocomplete="off" placeholder="showTime"-->
                                <!--                                               class="layui-input">-->
                                <!--                                    </div>-->
                                <!--                                </div>-->
                                <div class="layui-form-item">
                                    <label class="layui-form-label">状态</label>
                                    <div class="layui-input-block">
                                        <select name="gameStatus" id="gameStatusAdd" lay-verify="required"
                                                lay-filter="xmFilter">
                                            <option value="">请选择</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">所属分类</label>
                                    <div class="layui-input-block">
                                        <select name="gameType" id="gameTypeAdd" lay-verify="required"
                                                lay-filter="xmFilter">
                                            <option value="">请选择</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">展示平台</label>
                                    <div class="layui-input-block">
                                        <select name="platform" id="platformAdd" lay-verify="required"
                                                lay-filter="xmFilter">
                                            <option value="">请选择</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">模式类型</label>
                                    <div class="layui-input-block">
                                        <div id="multiselectTagAdd" style="width: 600px;"></div>
                                    </div>
                                </div>

                                <div class="layui-form-item">
                                    <label class="layui-form-label">简介</label>
                                    <div class="layui-input-block">
                                        <textarea name="gameDescription" placeholder="请输入内容"
                                                  class="layui-textarea"></textarea>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">地址</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="gameWebUrl" autocomplete="off" placeholder="gameWebUrl"
                                               class="layui-input">
                                    </div>
                                </div>

                                <div class="layui-form-item">
                                    <div class="layui-input-block">
                                        <button class="layui-btn" lay-submit lay-filter="formStep">
                                            &emsp;下一步&emsp;
                                        </button>
                                    </div>
                                </div>
                            </form>
                        </div>
                        <div>
                            <form class="layui-form layui-form-pane" style="margin: 0 auto;padding-top: 40px;">

                                <div class="layui-form-item">
                                    <label class="layui-form-label">图标</label>
                                    <div class="layui-input-block">
                                        <div class="layui-upload">
                                            <button type="button" class="layui-btn" id="iconAdd">上传图标</button>
                                            <div class="layui-upload-list">
                                                <img class="layui-upload-img" id="iconImageAdd">
                                                <p id="iconTextAdd"></p>
                                            </div>
                                            <!--                                            <div style="width: 95px;">-->
                                            <!--                                                <div class="layui-progress layui-progress-big" lay-showpercent="yes" lay-filter="iconProgress">-->
                                            <!--                                                    <div class="layui-progress-bar" lay-percent=""></div>-->
                                            <!--                                                </div>-->
                                            <!--                                            </div>-->
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">封面</label>
                                    <div class="layui-input-block">
                                        <div class="layui-upload">
                                            <button type="button" class="layui-btn" id="pictureAdd">上传封面</button>
                                            <div class="layui-upload-list">
                                                <img class="layui-upload-img" id="pictureImageAdd">
                                                <p id="pictureTextAdd"></p>
                                            </div>
                                            <!--                                            <div style="width: 95px;">-->
                                            <!--                                                <div class="layui-progress layui-progress-big" lay-showpercent="yes" lay-filter="pictureProgress">-->
                                            <!--                                                    <div class="layui-progress-bar" lay-percent=""></div>-->
                                            <!--                                                </div>-->
                                            <!--                                            </div>-->
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">轮播图</label>
                                    <div class="layui-input-block">
                                        <div class="layui-upload">
                                            <button type="button" class="layui-btn" id="scrollAdd">多图片上传</button>
                                            <blockquote class="layui-elem-quote layui-quote-nm"
                                                        style="margin-top: 10px;">
                                                预览图：
                                                <div class="layui-upload-list" id="scrollImageListAdd"></div>
                                            </blockquote>
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <div class="layui-input-block">
                                        <button type="button" class="layui-btn layui-btn-primary pre">上一步</button>
                                        <button class="layui-btn" lay-submit lay-filter="formStep2">
                                            &emsp;确认
                                        </button>
                                    </div>
                                </div>
                            </form>
                        </div>
                        <div>
                            <div style="text-align: center;margin-top: 90px;">
                                <i class="layui-icon layui-circle"
                                   style="color: white;font-size:30px;font-weight:bold;background: #52C41A;padding: 20px;line-height: 80px;">&#xe605;</i>
                                <div style="font-size: 24px;color: #333;font-weight: 500;margin-top: 30px;">
                                    添加游戏信息成功
                                </div>
                                <!--                                <div style="font-size: 14px;color: #666;margin-top: 20px;">预计两小时到账</div>-->
                            </div>
                            <div style="text-align: center;margin-top: 50px;">
                                <button class="layui-btn newGameInfo">再添加一个</button>
                                <button class="layui-btn layui-btn-primary updateGameInfo">查看已有游戏</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script type="text/javascript" th:inline="javascript">
    //新增数据表单
    // defaultBLEData = {"bluetoothName": [[${defaultName}]],"bluetoothMac": [[${defaultMac}]]};
    categoryList = [[${categoryList}]];
    allCustomTags = [[${allCustomTags}]];
</script>
<script th:src="@{/client/js/userInfo.js}"></script>
</html>