jiangming.html 17.2 KB
<!-- 添加图标、楼层 -->
<script type="text/template" id="icon-template">
    <div class="panel-body">
        <div>
            <table class="table table-hover table-bordered responsive dataTable no-footer">
                <thead>
                <tr>
                    <th>序号</th>
                    <th>图标</th>
                    <th>选项</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                [[each contentData.data as item index]]
                <tr>
                    <td>
                        [[index+1]]
                    </td>
                    <td><input type="file" name="file" value="[[item.src]]" class="observe" data-field="[[index]].src"/>
                    </td>
                    <td>
                        <div class="form-group ">
                            <select name="goTo" class="form-control  observe" value="[[item.url.action]]"
                                    data-field="[[index]].url.action">
                                [[layout action_template]]
                            </select>
                        </div>
                        <div class="form-group ">
                            <input value="[[item.url.url]]" class="form-control  observe" required="required"
                                   data-field="[[index]].url.url" placeholder="图片链接"/>

                            <p style="color:#999;margin-top: 5px;">链接中不能有英文单引号</p>
                        </div>
                        <div class="form-group ">
                            <input value="[[item.alt]]" class="form-control  observe"
                                   data-field="[[index]].alt" placeholder="图片描述"/>

                        </div>
                        [[if contentData.template_name=='addfloor']]
                        <div class="form-group ">
                            <input value="[[item.altEn]]" class="form-control  observe"
                                   data-field="[[index]].altEn" placeholder="英文描述"/>
                        </div>
                        [[/if]]
                    </td>
                    <td>
                        <a class="btn btn-danger delBtn" data-event="icon.data" data-index="[[index]]">删除</a>
                    </td>
                </tr>
                [[/each]]
                </tbody>
            </table>
        </div>
        <a href="JavaScript:;" data-event="icon.data" class="btn btn-primary btn-xs addBtn">添加一个</a>
    </div>
</script>
<!-- 推荐品牌-->
<script type="text/template" id="brands-template">
    <div class="panel-body">
        [[if contentData.template_name=='appHotBrands']]
        <div class="form-group">
            <div class="col-sm-10">
                <label>标题</label>
                <input class="form-control observe input-form" type="text" value="[[contentData.data.title.title]]" data-field="title.title" placeholder="推荐品牌">
                &emsp;&emsp;&emsp;&emsp;<label>显示名称</label>
                <label style="cursor: pointer;"><input type="radio" name="is_show_name_brand" class="is_show_name_brand" value="Y"></label>
                <label style="cursor: pointer;"><input type="radio" name="is_show_name_brand" class="is_show_name_brand" value="N"></label>
                <input type="hidden" id="is_show_name_brand" value="[[contentData.data.is_show_name]]" for="radio"/>
            </div>
        </div>
        <div class="form-group">
            <table class="table table-hover table-bordered responsive dataTable no-footer">
                <tbody>
                <tr>
                    <td>
                        <input type="file" name="file" value="[[contentData.data.image.src]]" class="observe" data-field="image.src"/>
                    </td>
                    <td>
                        <div class="form-group ">
                            <select name="goTo" class="form-control  observe" value="[[contentData.data.image.url.action]]" data-field="image.url.action">
                                [[layout action_template]]
                            </select>
                        </div>
                        <div class="form-group ">
                            <input value="[[contentData.data.image.url.url]]" class="form-control  observe"
                                   data-field="image.url.url" placeholder="图片链接"/>

                            <p style="color:#999;margin-top: 5px;">链接中不能有英文单引号</p>
                        </div>
                        <div class="form-group ">
                            <input value="[[contentData.data.image.alt]]" class="form-control  observe"
                                   data-field="image.alt" placeholder="图片描述"/>
                        </div>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>

        [[/if]]
        [[if contentData.template_name=='customBrands']]
        <div class="form-group">
            <div class="col-sm-6">
                <label>标题</label>&emsp;&emsp;&emsp;&emsp;
                <input class="form-control observe input-form" type="text" value="[[contentData.data.title.title]]" data-field="title.title" placeholder="自定义品牌">
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-6">
                <label>附加参数</label>&emsp;&emsp;
                <select class="form-control observe input-form" value="[[contentData.data.title.param]]" data-field="title.param">
                    [[layout parm1_template]]
                </select>
            </div>
            <div class="col-sm-6">
                <label>附加参数值</label>&emsp;
                <input class="form-control observe input-form" type="text" value="[[contentData.data.title.param_value]]" data-field="title.param_value" placeholder="附加参数值">
            </div>
        </div>
        [[/if]]
        [[if contentData.template_name=='kidsBrands']]
        <div class="form-group">
            <div class="col-sm-6">
                <label>标题</label>&emsp;&emsp;&emsp;&emsp;
                <input class="form-control observe input-form" required type="text" value="[[contentData.data.params.title]]" data-field="params.title" placeholder="请输入标题" prompt="标题">
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-6">
                <label>分类</label>&emsp;&emsp;&emsp;&emsp;
                <select class="form-control observe input-form" value="[[contentData.data.params.param]]" data-field="params.param">
                    [[layout parm2_template]]
                </select>
            </div>
            <div class="col-sm-6">
                <label>附加参数值</label>&emsp;
                <input class="form-control observe input-form" type="text" value="[[contentData.data.params.paramValue]]" data-field="params.paramValue" placeholder="附加参数值">
            </div>
        </div>
        <div class="form-group ">
            <div class="col-sm-6">
                <label>更多名称</label>&emsp;&emsp;
                <input class="form-control observe input-form" type="text" value="[[contentData.data.params.more]]" data-field="params.more" placeholder="更多名称">
            </div>
        </div>
        <div class="form-group ">
            <div class="col-sm-6">
                <label>跳转目的</label>&emsp;&emsp;
                <select name="goTo" class="form-control observe input-form" value="[[contentData.data.params.more_url.action]]"
                        data-field="params.more_url.action">
                    [[layout action_template]]
                </select>
            </div>
            <div class="col-sm-6">
                <label>链接</label>&emsp;&emsp;&emsp;&emsp;
                <input placeholder="url" value="[[contentData.data.params.more_url.url]]" class="form-control observe input-form"
                       data-field="params.more_url.url"/>
                <br>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;
                <label style="color:#999;margin-top: 5px;">注:链接中不能有英文单引号</label>
            </div>
        </div>
        [[/if]]
    </div>
    <div class="panel-body">
        <div>
            <table class="table table-hover table-bordered responsive dataTable no-footer">
                <thead>
                <tr>
                    <th>品牌图标</th>
                    <th>品牌名称</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                [[each contentData.data.list as item index]]
                <tr>
                    <td>
                        <input type="file" name="file" value="[[item.src]]" class="observe" data-field="list.[[index]].src"/>
                    </td>
                    <td>
                        <div class="form-group">
                            [[if contentData.template_name=='kidsBrands']]
                            <input class="form-control observe" type="text" value="[[item.title]]" data-field="list.[[index]].title">
                            [[else]]
                            <input class="form-control observe" type="text" value="[[item.name]]" data-field="list.[[index]].name">
                            [[/if]]
                        </div>
                    </td>
                    <td>
                        <a class="btn btn-danger delBtn" data-event="brands.list" data-index="[[index]]">删除</a>
                    </td>
                </tr>
                [[/each]]
                </tbody>
            </table>
        </div>
        <a href="JavaScript:;" id="addBrands" class="btn btn-primary btn-xs">添加品牌</a>
    </div>
    <div id="brandLists">

    </div>

</script>
<!--品牌选择模态-->
<script type="text/template" id="template5">
    <div class="row" id="brandForm">
        <div class="form-group">
            [[each Brands as brand index]]
            <a class="btn brand-index" href="#[[brand.name]]">[[brand.name]]</a>
            [[/each]]
        </div>
        <div class="form-group brand-wrap" style="height: 400px;overflow: auto;">
            [[each Brands as brand index]]
            <div class="form-group" name="[[brand.name]]">
                [[each brand.items as item __index ]]
                <a class="btn">
                    <input type="checkbox" value="[[item.id]]" name="brandCheckBox">
                    <label>[[item.brand_name]]</label>
                </a>
                [[/each]]
            </div>
            [[/each]]
        </div>
        <input type="hidden" id="brandCheckBox" for="checkbox" value="[[Brdata]]"/>
    </div>
</script>
<!--自定义品牌附加参数-->
<script type="text/template" id="parm1_template">
    <option value="">请选择附加参数</option>
    <option value="msort">大分类</option>
</script>
<!--kids品牌分类参数-->
<script type="text/template" id="parm2_template">
    <option value="promotion">促销id</option>
    <option value="msort">大分类ID</option>
</script>
<!-- 9-1 标题标签 -->
<script type="text/template" id="title-template">
    <div class="rows">
        <div class="form-group ">
            <div class="col-sm-6">
                <label>标题名称</label>&emsp;&emsp;
                <input class="form-control observe input-form" placeholder="标题名称" type="text" value="[[contentData.data.title_name]]" data-field="title_name" required>
            </div>
            <div class="col-sm-6">
                <label>更多名称</label>&emsp;&emsp;
                <input class="form-control observe input-form" type="text" placeholder="更多名称" value="[[contentData.data.more_name]]" data-field="more_name">
            </div>
        </div>
        <div class="form-group ">
            <div class="col-sm-6">
                <label>跳转目的</label>&emsp;&emsp;
                <select name="goTo" class="form-control observe input-form" value="[[contentData.data.more_link.action]]" data-field="more_link.action">
                    [[layout action_template]]
                </select>
            </div>
            <div class="col-sm-6">
                <label>链接</label>&emsp;&emsp;&emsp;&emsp;
                <input value="[[contentData.data.more_link.url]]" class="form-control observe input-form" data-field="more_link.url" placeholder="url"/>
                <p style="color:#999;margin-top: 5px;">注:链接中不能有英文单引号</p>
            </div>
        </div>
    </div>
    <div class="panel-body">
        <div>
            <table class="table table-hover table-bordered responsive dataTable no-footer">
                <thead>
                <tr>
                    <th>序号</th>
                    <th>标签名称</th>
                    <th>导航链接</th>
                </tr>
                </thead>
                <tbody>
                [[each contentData.data.nav as item index]]
                <tr>
                    <td>
                        [[index+1]]
                    </td>
                    <td>
                        <div class="form-group">
                            <div class="col-sm-10">
                                <input value="[[item.name]]" class="form-control observe" required="required" data-field="nav.[[index]].name" placeholder="标签名称"/>
                            </div>
                        </div>

                    </td>
                    <td>
                        <div class="form-group">
                            <div class="col-sm-10">
                                <select name="goTo" class="form-control observe" value="[[item.url.action]]"
                                        data-field="nav.[[index]].url.action">
                                    [[layout action_template]]
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-10">
                                <input value="[[item.url.url]]" class=" form-control  observe" required="required"
                                       data-field="nav.[[index]].url.url" placeholder="链接"/>

                                <p style="color:#999;margin-top: 5px;">链接中不能有英文单引号</p>
                            </div>
                        </div>
                    </td>
                </tr>
                [[/each]]
                </tbody>
            </table>
        </div>
        <a href="JavaScript:;" data-event="title.nav" class="btn btn-primary btn-xs addBtn">添加一个</a>
    </div>
</script>
<!-- 领券频道 -->
<script type="text/template" id="getCoupon-template">
    <div class="panel-body">
        <div>
            <table class="table table-hover table-bordered responsive dataTable no-footer">
                <thead>
                <tr>
                    <th>序号</th>
                    <th>图片</th>
                    <th>选项</th>
                </tr>
                </thead>
                <tbody>
                [[each contentData.data as item index]]
                <tr>
                    <td>
                        [[index+1]]
                    </td>
                    <td>
                        <div class="form-group">
                            <div class="col-sm-10">
                                <input type="file" name="file" value="[[item.image.src]]" class="form-control observe" data-field="[[index]].image.src" required placeholder="图片"/>
                            </div>
                        </div>
                    </td>
                    <td>
                        <div class="form-group">
                            <div class="col-sm-10">
                                <input value="[[item.couponID]]" id="couponID" class="form-control observe" required="required" data-field="[[index]].couponID" placeholder="领券码"/>
                                <p style="color:#999;margin-top: 5px;">多个领券码以英文逗号隔开</p>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-10">
                                <select name="goTo" class="form-control observe" value="[[item.image.url.action]]" data-field="[[index]].image.url.action">
                                    [[layout action_template]]
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-10">
                                <input value="[[item.image.url.url]]" class="form-control observe" required="required" data-field="[[index]].image.url.url" placeholder="图片链接" type="text"/>
                                <p style="color:#999;margin-top: 5px;">链接中不能有英文单引号</p>
                            </div>
                        </div>
                    </td>
                </tr>
                [[/each]]
                </tbody>
            </table>
        </div>
        <a href="JavaScript:;" id="coupon-addOne" data-event="getCoupon.data"  class="btn btn-primary btn-xs addBtn">添加一个</a>
    </div>
</script>