<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('修改演出')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-qrcode-add">
        <div class="form-group" style="display: none">
            <label class="col-sm-3 control-label is-required">mid：</label>
            <div class="col-sm-8">
                <input name="mid" class="form-control" type="text" required readonly>
            </div>
        </div>
        <div class="form-group" style="display: none">
            <label class="col-sm-3 control-label is-required">type：</label>
            <div class="col-sm-8">
                <input name="type" th:value="${type}" class="form-control" type="text" required readonly>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label is-required">生成数量：</label>
            <div class="col-sm-8">
                <input name="count" class="form-control" type="number" required>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label is-required">图片地址：</label>
            <div class="col-sm-8">
                <input name="url" class="form-control" type="text" required>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var prefix = ctx + "sweet/active";
    $("#form-roadShow-edit").validate({
        focusCleanup: true
    });

    $("#fileinput-demo-1").fileinput({
        'theme': 'explorer-fas',
        // 'uploadUrl': "/kylin/banners/upload3",
        // 'uploadUrl': "http://127.0.0.1:9003" + "/platform/basicServices/alOss/upload",
        // 'uploadUrl': "https://devplatform.zhengzai.tv/platform/basicServices/alOss/upload",
        'uploadUrl': platformUrl + "/platform/basicServices/alOss/upload",
        "uploadExtraData": {
            "pathName" : "banner",
            "buckType" : 1
        },
        // overwriteInitial: false,
        // initialPreviewAsData: true,
        autoReplace: true,
        dropZoneTitle: "请上传文件",
        maxFileCount: 1
    });
    $("#fileinput-demo-1").on("fileuploaded", function (event, data, previewId, index) {
        $('.coverCon').val('https://img.zhengzai.tv/' + data.response.data.ossPath);
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/addQrCode", $('#form-qrcode-add').serialize());
        }
    }
</script>
</body>
</html>