Index.html 4.08 KB
<%include '../../common/__ui/header'%>
<%include '../../common/__partail/ListHeader'%>

<div id="wrap-content" class="contentpanel" role="<%type%>" url="<%url%>">
    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h4 class="panel-title">生成链接</h4>
                </div><!-- panel-heading -->
                <div class="panel-body" id="generate-content">

                </div><!-- panel-body -->
                <div class="panel-footer">
                    <div class="row">
                        <div class="col-sm-9 col-sm-offset-3">
                            <a class="btn btn-primary mr5" id="submitsearch">生成</a>
                            <a class="btn btn-primary mr5" id="exportsearch">导出</a>
                        </div>

                    </div>
                </div><!-- panel-footer -->
            </div><!-- panel -->
        </div>
    </div>
</div>

<script type="text/template" id="content-template">
    <div class="row">
        <div class="form-group">
            <label>选择导出类型</label>
            <%if notSingle%>
            <select class="form-control input-form observe" data-field="channelId" value="[[channelId]]">
                <option value="1">SKN</option>
                <option value="2">品牌</option>
            </select>
            <%/if%>
            <%if isSingle%>
            <select class="form-control input-form observe" data-field="action" value="[[action]]" required>
                [[layout action_template]]
            </select>
            <%/if%>
        </div><!-- form-group -->
        <div class="form-group">
            <%if notSingle%>
                <label>要转换的内容</label>
                <textarea rows="3" cols="4" style="vertical-align: middle;width: 300px;" data-field="content" class="form-control input-form observe" placeholder="请输入SKN或者品牌ID,需要用英文,分隔" required>[[content]]</textarea>
            <%/if%>
            <%if isSingle%>
                <label>要转换的内容</label>
                <input type="text" class="form-control observe input-form" data-field="link" placeholder="输入要转换的链接" required style="width:350px;" value="[[link.replace(/"/g,"&quot;")]]">
            <%/if%>
        </div><!-- form-group -->
        <div class="form-group">
            <label>生成链接</label>&emsp;&emsp;
            <label class="radio-inline"><input type="radio" name="linkType" value="app">APP链接</label>
            <label class="radio-inline"><input type="radio" name="linkType" value="h5">H5链接</label>
            <input type="hidden" value="[[linkType]]" id="linkType" for="radio" required>
        </div>
        <div class="form-group">
            <label>跳转链接</label>&emsp;&emsp;
            <%if notSingle%>
                [[if data]]
                    [[each data as item index]]
                        [[if index != 0]]
                            &emsp;&emsp;&emsp;&emsp;&emsp;&emsp;
                        [[/if]]
                        <i style="margin-right:10px;">[[item.id]]</i>
                        <input type="text" class="form-control input-form link-area" style="margin-top: 5px;width:70%;display: inline;cursor: text" id="link[[item.id]]" value="[[item.url.replace(/"/g,"&quot;")]]" readonly>
                        <a href="javascript:void(0);" class="copy btn" data-link="link[[item.id]]">复制</a>
                        <br>
                    [[/each]]
                [[/if]]
            <%/if%>
            <%if isSingle%>
                [[if data]]
                    <input type="text" class="form-control input-form link-area" style="margin-top: 5px;width:70%;display: inline;cursor: text" id="link[[item.id]]" value="[[data.replace(/"/g,"&quot;")]]" readonly>
                    <a href="javascript:void(0);" class="copy btn" data-link="link[[item.id]]">复制</a>
                [[/if]]
            <%/if%>
        </div><!-- form-group -->
    </div><!-- row -->
</script>

<%include '../../resource/__partail/actions'%>