Index.html 4.87 KB
<%include '../../../common/views/__ui/header'%>
<%include '../../../common/views/__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>
                            <a id="import-btn" href="/operations/link/batch" class="btn btn-primary">批量导入生成</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>
                <option value="3">店铺</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或者店铺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;")]]">
                (生成APP链接请输入H5原始链接)
            <%/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>
            <label class="radio-inline"><input type="radio" name="linkType" value="web">WEB链接</label>
            <input type="hidden" value="[[linkType]]" id="linkType" for="radio" required>
        </div>
        <div class="form-group">
            <label>url类型<span style="color:red">*</span></label></label>&emsp;&emsp;
            <label class="radio-inline"><input type="radio" name="urlType" value="1">http</label>
            <label class="radio-inline"><input type="radio" name="urlType" value="2" checked>https</label>
            <input type="hidden" value="[[urlType]]" id="urlType" 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/views/__partail/actions'%>