jiangming.html 15 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]]
                        <!--<input type="hidden" value="[[index]]" data-field="[[index]].imgId">-->
                    </td>
                    <td><input type="file" name="file" value="[[item.src]]" class="observe" data-field="[[index]].src"/>
                    </td>
                    <td>
                        <div class="form-group col-sm-12">
                            <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 col-sm-12">
                            <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 col-sm-12">
                            <input value="[[item.alt]]" class="form-control  observe" required="required"
                                   data-field="[[index]].alt" placeholder="图片描述"/>

                        </div>
                        [[if contentData.template_name=='addfloor']]
                        <div class="form-group col-sm-12">
                            <input value="[[item.altEn]]" class="form-control  observe" required="required"
                                   data-field="[[index]].altEn" placeholder="英文描述"/>
                        </div>
                        [[/if]]
                    </td>
                    <td>
                        <a class="btn btn-danger" id="icon-delOne" data_index="[[index]]">删除</a>
                    </td>
                </tr>
                [[/each]]
                </tbody>
            </table>
        </div>
        <a href="JavaScript:;" id="icon-addOne" class="btn btn-primary btn-xs">添加一个</a>
    </div>
</script>
<!-- 推荐品牌-->
<script type="text/template" id="brands-template">
    <div class="rows">
        [[if contentData.template_name=='appHotBrands']]
        <div class="form-group">
            <label class="col-sm-1 control-label">标题</label>

            <div class="col-sm-4">
                <input class="form-control observe" type="text" value="[[contentData.data.title.title]]"
                       data-field="title.title" placeholder="推荐品牌">
            </div>
            <label class="col-sm-1 control-label">显示名称</label>

            <div class="col-sm-4 is_show_name_brand ">
                <label style="cursor: pointer;"><input type="radio" name="is_show_name" value="Y"></label>
                <label style="cursor: pointer;"><input type="radio" name="is_show_name" value="N"></label>
            </div>
            <input type="hidden" id="is_show_name" value="[[contentData.data.is_show_name]]" for="radio"/>
        </div>
        [[/if]]
        [[if contentData.template_name=='customBrands']]
        <div class="form-group ">
            <label class="col-sm-1 control-label">标题</label>

            <div class="col-sm-4">
                <input class="form-control observe" type="text" value="[[contentData.data.title.title]]"
                       data-field="title.title" placeholder="自定义品牌">
            </div>
        </div>
        <div class="form-group ">
            <label class="col-sm-1 control-label">附加参数</label>

            <div class="col-sm-4">
                <select class="form-control  observe" value="[[contentData.data.title.param]]" data-field="title.param">
                    [[layout parm1_template]]
                </select>
            </div>
            <label class="col-sm-2 control-label">附加参数值</label>

            <div class="col-sm-4">
                <input class="form-control observe" 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 ">
            <label class="col-sm-1 control-label">标题</label>

            <div class="col-sm-4 ">
                <input class="form-control observe" type="text" value="[[contentData.data.params.title]]"
                       data-field="params.title">
            </div>
        </div>
        <div class="form-group ">
            <label class="col-sm-1 control-label">分类</label>

            <div class="col-sm-4 ">
                <select class="form-control observe" value="[[contentData.data.params.param]]"
                        data-field="params.param">
                    [[layout parm2_template]]
                </select>
            </div>
            <label class="col-sm-1 control-label">附加参数值</label>

            <div class="col-sm-4 ">
                <input class="form-control observe" type="text" value="[[contentData.data.params.paramValue]]"
                       data-field="params.paramValue" placeholder="附加参数值">
            </div>
        </div>
        <div class="form-group ">
            <label class="col-sm-1 control-label">更多名称</label>

            <div class="col-sm-4 ">
                <input class="form-control observe" type="text" value="[[contentData.data.params.more]]"
                       data-field="params.more" placeholder="更多名称">
            </div>
        </div>
        <div class="form-group ">
            <label class="col-sm-1 control-label">跳转目的</label>

            <div class="col-sm-4 ">
                <select name="goTo" class="form-control observe" value="[[contentData.data.params.more_url.action]]"
                        data-field="params.more_url.action">
                    [[layout action_template]]
                </select>
            </div>
            <label class="col-sm-1 control-label">链接</label>

            <div class="col-sm-4 ">
                <input value="[[contentData.data.params.more_url.url]]" class="form-control observe" required="required"
                       data-field="params.more_url.url"/>

                <p style="color:#999;margin-top: 5px;">注:链接中不能有英文单引号</p>
            </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" id="remove_brand" 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 col-sm-12">
            <label class="col-sm-1 control-label">标题名称</label>
            <input class="col-sm-2 observe" type="text" value="[[contentData.data.title_name]]"
                   data-field="title_name">
            <label class="col-sm-1 control-label">更多名称</label>
            <input class="col-sm-2 observe" type="text" value="[[contentData.data.more_name]]"
                   data-field="more_name">
        </div>
        <div class="form-group col-sm-12">
            <label class="col-sm-1 control-label">跳转目的</label>
            <select name="goTo" class="col-sm-2 observe" value="[[contentData.data.more_link.action]]"
                    data-field="more_link.action">
                [[layout action_template]]
            </select>
            <label class="col-sm-1 control-label">链接</label>
            <input value="[[contentData.data.more_link.url]]" class="col-sm-2 observe" required="required"
                   data-field="more_link.url"/>

            <p style="color:#999;margin-top: 5px;">注:链接中不能有英文单引号</p>
        </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>
                        <input value="[[item.name]]" class="col-sm-6  observe" required="required"
                               data-field="nav.[[index]].name" placeholder="标签名称"/>
                    </td>
                    <td>
                        <div class="col-sm-12">
                            <select name="goTo" class="col-sm-4  observe" value="[[item.url.action]]"
                                    data-field="nav.[[index]].url.action">
                                [[layout action_template]]
                            </select>

                            <div class="col-sm-1"></div>
                            <input value="[[item.url.url]]" class=" col-sm-4  observe" required="required"
                                   data-field="nav.[[index]].url.url" placeholder="链接"/>

                            <p style="color:#999;margin-top: 5px;">链接中不能有英文单引号</p>
                        </div>
                    </td>
                </tr>
                [[/each]]
                </tbody>
            </table>
        </div>
        <a href="JavaScript:;" id="nav-addOne" class="btn btn-primary btn-xs">添加一个</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>
                </tr>
                </thead>
                <tbody>
                [[each contentData.data as item index]]
                <tr>
                    <td>
                        <div class="form-group">
                            <input type="file" name="file" value="[[item.image.src]]" class="form-control observe"
                                   data-field="[[index]].image.src"/>
                        </div>
                    </td>
                    <td>
                        <div class="form-group">
                            <input value="[[item.couponID]]" class="form-control observe" required="required"
                                   data-field="[[index]].couponID" placeholder="领券码"/>

                            <p style="color:#999;margin-top: 5px;">多个领券码以英文逗号隔开</p>
                        </div>
                        <div class="form-group">
                            <select name="goTo" class="form-control observe" value="[[item.image.url.action]]"
                                    data-field="[[index]].image.url.action">
                                [[layout action_template]]
                            </select>
                        </div>
                        <div class="form-group">
                            <input value="[[item.image.url.url]]" class="form-control observe" required="required"
                                   data-field="[[index]].image.url.url" placeholder="图片链接"/>

                            <p style="color:#999;margin-top: 5px;">链接中不能有英文单引号</p>
                        </div>
                    </td>
                </tr>
                [[/each]]
                </tbody>
            </table>
        </div>
        <a href="JavaScript:;" id="coupon-addOne" class="btn btn-primary btn-xs">添加一个</a>
    </div>
</script>