<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('搜索设置')" />
    <style>
        .home_page {
            display: flex;
            justify-content: center;
            padding: 20px;
        }
        .right_content {
            font-size: 16px;
            font-weight: 600;
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 50%;
        }
        .left_content {
            flex: 1;
        }
        .left_title, .right_title {
            margin-bottom: 12px;
        }
        .function_btn {
            display: flex;
            align-items: center;
            margin-bottom: 20px;
        }
        .function_btn .hot_title {
            font-size: 16px;
            font-weight: 600;
        }
        .function_btn .tags {
            display: flex;
        }
        .function_btn .tags .tag {
            padding: 6px 12px 4px;
            border: 1px solid #ccc;
            border-radius: 5px;
            position: relative;
            margin-right: 12px;
        }
        .function_btn .tags .tag span {
            display: inline-block;
            position: absolute;
            top: -8px;
            right: -8px;
            width: 18px;
            height: 18px;
            line-height: 16px;
            border: 1px solid #aaa;
            border-radius: 50%;
            background: #fff;
            text-align: center;
            cursor: pointer;
        }
        .add_tags {
            padding-left: 68px;
        }
        .add_tags div {
            display: flex;
        }
        .hot_set {
            font-size: 16px;
            font-weight: 600;
        }
        .hot_set p {
            margin-top: 12px;
            display: flex;
            padding-left: 68px;
            display: flex;
            align-items: center;
        }
        .hot_set p input {
            width: 120px;
            margin-right: 10px;
        }
    </style>
</head>
<body>
    <div class="home_page">
        <div class="left_content">
            <div class="left_title">
                
            </div>
            <div class="function_btn">
                <div class="hot_title">
                    搜索热词：
                </div>
                <div class="tags">
                    <!-- <div class="tag">
                        新裤子
                        <span>x</span>
                    </div> -->
                </div>
            </div>
            <div class="add_tags">
                <div>
                    <input type="text" class="layui-input form-control" id="test1"  style="margin-left: 10px;" placeholder="请选择时间"><button type="button" class="btn btn-success" onclick="addItems()">添加</button>
                </div>
                <p style="margin-left: 10px;">允许添加多个关键词，默认显示第一个</p>
            </div>
            <div class="hot_set">
                热词设置：滚动
                <p><input type="text" class="layui-input form-control" id="test1"  style="margin-left: 10px;" placeholder="请选择时间">M</p>
            </div>
            <div class="footer_btn">
                <button type="button" class="btn btn-success" onclick="save()">保存</button>
            </div>
        </div>
        <div class="right_content">
            <div class="right_title">
                
            </div>
            <div class="function_area">
                <iframe src="http://m.zhengzai.tv" width="375" height="896" frameborder="0"></iframe>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer"/>
    <script th:inline="javascript">
        var prefix2 = ctx + "local";
        let num = 0;
        function goArea (num) {
            console.log(num)
            switch(num) {
                case 5:
                $.modal.openTab('商品搜索', prefix2 + "/searchStore?id=" + 1212)
                break;
            }
        }
        function addItems () {
            if (!$("#test1").val()) {
                return layer.msg('输入内容不能为空！')
            }
            num++
            let str = `<div class="tag">${$("#test1").val()}<span onclick="delTags('${num}')">x</span></div>`;
            $(".tags").append(str);
            $("#test1").val('');
        }
        function save () {
            refreshItem()
        }
    </script>
</body>
</html>