diff --git a/Application/Admin/Controller/GameController.class.php b/Application/Admin/Controller/GameController.class.php index e78b40125..5638da792 100644 --- a/Application/Admin/Controller/GameController.class.php +++ b/Application/Admin/Controller/GameController.class.php @@ -347,6 +347,7 @@ class GameController extends ThinkController $phone['dow_icon'] = $sibling['dow_icon']; $phone['back_map'] = $sibling['back_map']; $phone['flooring_page_video'] = $sibling['flooring_page_video']; + $phone['flooring_page_video_cover'] = $sibling['flooring_page_video_cover']; $phone['supersign_status'] = $sibling['supersign_status']; M('Game', 'tab_')->data($phone)->where(array('id' => $another['id']))->save(); //同时修改代充游戏折扣 diff --git a/Application/Admin/View/Game/edit.html b/Application/Admin/View/Game/edit.html index 9bfe4fbee..6b1023d97 100644 --- a/Application/Admin/View/Game/edit.html +++ b/Application/Admin/View/Game/edit.html @@ -384,6 +384,26 @@ + + 落地页视频封面 + + + +
+
+
+
上传封面
+
+
+ +
+
+
+
+ + + + ios视频是否置顶: @@ -1272,6 +1292,118 @@ $( '#'+file.id ).find('.progress').fadeOut(); }); + //上传落地页视频封面 + var uploaderFlooringVideoPageCover = WebUploader.create({ + // 选完文件后,是否自动上传。 + auto: true, + // swf文件路径 + swf: '__STATIC__/webuploader/Uploader.swf', + // 文件接收服务端。 + server: "{:U('File/uploadPicture',array('session_id'=>session_id(),'flag'=>true))}", + // 选择文件的按钮。可选。 + // 内部根据当前运行是创建,可能是input元素,也可能是flash. + pick: { + id:'#flooring_page_video_cover', + multiple:true + }, + // dnd: false, + paste: document.body, + accept: { + title: '图片', + extensions: 'png,gif,jpg,jpeg,bmp', + mimeTypes: '.png,.gif,.jpg,.jpeg,.bmp', + }, + // 不压缩image, 默认如果是jpeg,文件上传前会压缩一把再上传! + resize: false, + disableGlobalDnd: true, + fileNumLimit:1, + threads:1, + thumb:true, + compress:false, + prepareNextFile: true, + formData: function(){return $.extend(true, {}, userInfo);}, + chunked:false, + duplicate: true + }); + + // 当有文件被添加进队列的时候 + uploaderFlooringVideoPageCover.on( 'fileQueued', function( file ) { + var html = ''; + var imgList = $("#flooring_page_video_cover_thelist"); + html += '
'; + html += ''; + html += '

' + file.name + '

'; + html += '

等待上传...

'; + html += '
'; + + imgList.html(html); + imgList.css('margin-top','10px'); + + var img2 = imgList.children('#'+file.id).find('img'); + uploaderFlooringVideoPageCover.makeThumb(file, function (error, src) { + if (error) { + return; + } + img2.attr('src', src); + }, 300, 300); + }); + + // 文件上传过程中创建进度条实时显示。 + uploaderFlooringVideoPageCover.on( 'uploadProgress', function(file, percentage) { + var $li = $( '#'+file.id ), + $percent = $li.find('.progress .progress-bar'); + // 避免重复创建 + if ( !$percent.length ) { + $percent = $('
' + + '
' + + '
' + + '
').appendTo( $li ).find('.progress-bar'); + } + $li.find('p.state').text('上传中'); + $percent.css( 'width', percentage * 100 + '%' ); + $percent.text( (percentage * 100).toFixed(0) + '%' ); + }); + + uploaderFlooringVideoPageCover.on( 'uploadSuccess', function( file , response) { + $( '#'+file.id ).find('p.state').text('已上传').fadeOut(800); + $('#'+file.id).find('h4.info').append('删除'); + console.log(response); + + var cover = response.id; + $("input[name=flooring_page_video_cover]").val(cover); + $('#'+file.id).find('.jsdelvideo').on('click',function() { + console.log(file); + $("input[name=flooring_page_video_cover]").val(''); + $('#'+file.id).remove(); + uploaderFlooringVideoPageCover.removeFile( file.id ); + return false; + }); + }); + + var flooringVideoPageCover = []; + + var html = ''; + + html += '
'; + html += '" style="width: 150px;height: 84px;cursor: move;">'; + html += '

'; + html += '删除'; + html += '

'; + html += ''; + html += '
'; + + $('#flooring_page_video_cover_thelist').css('margin-top','10px'); + $('#flooring_page_video_cover_thelist').html(html); + + $('#flooring_page_video_cover_thelist').children().children('h4').children('.jsdelzip').on('click', function() { + $(this).parent().parent().remove(); + + $("input[name=flooring_page_video_cover]").val(''); + }); + + var uploaderFile = WebUploader.create({ // 选完文件后,是否自动上传。 auto: true, diff --git a/Application/Home/Controller/HomeController.class.php b/Application/Home/Controller/HomeController.class.php index 6470429ae..8d79381f1 100644 --- a/Application/Home/Controller/HomeController.class.php +++ b/Application/Home/Controller/HomeController.class.php @@ -179,6 +179,7 @@ class HomeController extends Controller 'game_size', 'introduction', 'flooring_page_video', + 'flooring_page_video_cover', 'supersign_status', 'ios_video_top' ]; @@ -209,6 +210,7 @@ class HomeController extends Controller $imageUrls[] = get_cover($imageId, 'path'); } $game['flooring_page_imgs'] = $imageUrls; + $game['flooring_page_video_cover'] = get_cover($game['flooring_page_video_cover'], 'path'); $screenshotIds = explode(',', $game['screenshot']) ?? []; $screenshotUrls = []; diff --git a/Application/Home/View/default/Home/landingPage2.html b/Application/Home/View/default/Home/landingPage2.html index dbb0b66af..30619db53 100644 --- a/Application/Home/View/default/Home/landingPage2.html +++ b/Application/Home/View/default/Home/landingPage2.html @@ -58,15 +58,10 @@
-
- - - @@ -87,93 +82,7 @@ var myPlayer = videojs('example_video_1'); myPlayer.ready(function(){ - var myPlayer = this; - myPlayer.play(); - }); - - //设置中文 - videojs.addLanguage('zh-CN', { - "Play": "播放", - "Pause": "暂停", - "Current Time": "当前时间", - "Duration": "时长", - "Remaining Time": "剩余时间", - "Stream Type": "媒体流类型", - "LIVE": "直播", - "Loaded": "加载完毕", - "Progress": "进度", - "Fullscreen": "全屏", - "Non-Fullscreen": "退出全屏", - "Mute": "静音", - "Unmute": "取消静音", - "Playback Rate": "播放速度", - "Subtitles": "字幕", - "subtitles off": "关闭字幕", - "Captions": "内嵌字幕", - "captions off": "关闭内嵌字幕", - "Chapters": "节目段落", - "Close Modal Dialog": "关闭弹窗", - "Descriptions": "描述", - "descriptions off": "关闭描述", - "Audio Track": "音轨", - "You aborted the media playback": "视频播放被终止", - "A network error caused the media download to fail part-way.": "网络错误导致视频下载中途失败。", - "The media could not be loaded, either because the server or network failed or because the format is not supported.": "视频因格式不支持或者服务器或网络的问题无法加载。", - "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "由于视频文件损坏或是该视频使用了你的浏览器不支持的功能,播放终止。", - "No compatible source was found for this media.": "无法找到此视频兼容的源。", - "The media is encrypted and we do not have the keys to decrypt it.": "视频已加密,无法解密。", - "Play Video": "播放视频", - "Close": "关闭", - "Modal Window": "弹窗", - "This is a modal window": "这是一个弹窗", - "This modal can be closed by pressing the Escape key or activating the close button.": "可以按ESC按键或启用关闭按钮来关闭此弹窗。", - ", opens captions settings dialog": ", 开启标题设置弹窗", - ", opens subtitles settings dialog": ", 开启字幕设置弹窗", - ", opens descriptions settings dialog": ", 开启描述设置弹窗", - ", selected": ", 选择", - "captions settings": "字幕设定", - "Audio Player": "音频播放器", - "Video Player": "视频播放器", - "Replay": "重播", - "Progress Bar": "进度小节", - "Volume Level": "音量", - "subtitles settings": "字幕设定", - "descriptions settings": "描述设定", - "Text": "文字", - "White": "白", - "Black": "黑", - "Red": "红", - "Green": "绿", - "Blue": "蓝", - "Yellow": "黄", - "Magenta": "紫红", - "Cyan": "青", - "Background": "背景", - "Window": "视窗", - "Transparent": "透明", - "Semi-Transparent": "半透明", - "Opaque": "不透明", - "Font Size": "字体尺寸", - "Text Edge Style": "字体边缘样式", - "None": "无", - "Raised": "浮雕", - "Depressed": "压低", - "Uniform": "均匀", - "Dropshadow": "下阴影", - "Font Family": "字体库", - "Proportional Sans-Serif": "比例无细体", - "Monospace Sans-Serif": "单间隔无细体", - "Proportional Serif": "比例细体", - "Monospace Serif": "单间隔细体", - "Casual": "舒适", - "Script": "手写体", - "Small Caps": "小型大写字体", - "Reset": "重启", - "restore all settings to the default values": "恢复全部设定至预设值", - "Done": "完成", - "Caption Settings Dialog": "字幕设定视窗", - "Beginning of dialog window. Escape will cancel and close the window.": "开始对话视窗。离开会取消及关闭视窗", - "End of dialog window.": "结束对话视窗" + this.play(); }); $('.down-link').on('click', function () { diff --git a/Data/update.sql b/Data/update.sql index 8036ae36a..a2e574e6b 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -705,3 +705,8 @@ ADD COLUMN `pay_way` int NOT NULL DEFAULT 0 AFTER `ip`; -- 菜单(游戏充值预下单) INSERT INTO `sys_menu`(`title`, `pid`, `sort`, `url`, `hide`, `tip`, `group`, `is_dev`, `status`) VALUES ('游戏充值预下单', 16, 0, 'BehaviorLog/game', 0, '', '行为日志', 0, 1); + +--2019-12-13 +--游戏添加落地页视频封面 +ALTER TABLE `tab_game` +ADD COLUMN `flooring_page_video_cover` int(11) NOT NULL DEFAULT 0 COMMENT '落地页视频封面'; \ No newline at end of file