|
|
@@ -3,7 +3,7 @@
|
|
|
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
|
|
layout:decorate="~{admin/common/common}">
|
|
|
<head>
|
|
|
- <title>活动管理新增</title>
|
|
|
+ <title>活动管理编辑</title>
|
|
|
<style>
|
|
|
.push-names span {
|
|
|
display: inline-block;
|
|
|
@@ -54,6 +54,19 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="row cl">
|
|
|
+ <label class="form-label col-xs-4 col-sm-2">视频:</label>
|
|
|
+ <div class="formControls col-xs-8 col-sm-9">
|
|
|
+ <div class="uploader-thum-container">
|
|
|
+ <div id="videoList" class="uploader-list"></div>
|
|
|
+ <div id="videoPicker" class="margin-right-10">选择视频</div>
|
|
|
+ <input type="hidden" th:value="${review.video_url}" th:id="video_url" th:name="video_url"/>
|
|
|
+ <div id="videoListPre">
|
|
|
+ <video id="videoElement" class="centeredVideo" controls autoplay width="450" height="400">Your browser is too old which doesn't support HTML5 video.</video>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div class="row cl">
|
|
|
<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>内容:</label>
|
|
|
<div class="formControls col-xs-8 col-sm-9">
|
|
|
@@ -75,6 +88,17 @@
|
|
|
<script type="text/javascript" th:src="@{/h-ui/lib/webuploader/0.1.5/webuploader.min.js}"></script>
|
|
|
<script th:inline="javascript">
|
|
|
|
|
|
+ var player = document.getElementById('videoElement');
|
|
|
+ var video_url = $('#video_url').val();
|
|
|
+ if (flvjs.isSupported()) {
|
|
|
+ var flvPlayer = flvjs.createPlayer({
|
|
|
+ type: 'flv',
|
|
|
+ url: video_url
|
|
|
+ });
|
|
|
+ flvPlayer.attachMediaElement(videoElement);
|
|
|
+ flvPlayer.load(); //加载
|
|
|
+ }
|
|
|
+
|
|
|
//富文本kindeditor初始化
|
|
|
var editor;
|
|
|
KindEditor.ready(function (K) {
|
|
|
@@ -113,6 +137,28 @@
|
|
|
};
|
|
|
var webUploadPicture = new $WebUploadPicture(options);
|
|
|
webUploadPicture.init();
|
|
|
+
|
|
|
+ // 初始视频上传
|
|
|
+ var options2 = {
|
|
|
+ auto: false,
|
|
|
+ uploadBtnId: '#videoPicker',
|
|
|
+ docPreId: 'videoListPre',
|
|
|
+ //serverUrl: '/government/slides/uploadImg',
|
|
|
+ hiddenDocUrl: 'videoDown.file_id',
|
|
|
+ hiddenPictureName: 'videoName',
|
|
|
+ accept: {
|
|
|
+ title: 'video',
|
|
|
+ extensions: 'flv',
|
|
|
+ mimeTypes: 'flv-application/octet-stream'
|
|
|
+ },
|
|
|
+ width: 81,
|
|
|
+ height: 81,
|
|
|
+ fileSizeLimit: 300 * 1024 * 1024,
|
|
|
+ fileSingleSizeLimit: 300 * 1024 * 1024
|
|
|
+// fileNumLimit: 1
|
|
|
+ };
|
|
|
+ var webUploadPicture2 = new $WebUploadDoc(options2);
|
|
|
+ webUploadPicture2.init();
|
|
|
$("#is_quota").change(function () {
|
|
|
if ($('#is_quota option:selected').val() == "1") {
|
|
|
$("#quota").show()
|