Skip to content

Commit

Permalink
修复视频播放页报错的问题,
Browse files Browse the repository at this point in the history
修复留言评论表情无法加载的问题,
优化搜索弹出框显示效果,
修复切换验证码无法显示的问题,
修复非管理员也可以升级主题的问题,
修复短连接无效的问题,
修复轮播图链接错误的问题
  • Loading branch information
amujie committed Jun 7, 2020
1 parent 55a505f commit ebc1779
Show file tree
Hide file tree
Showing 40 changed files with 126 additions and 104 deletions.
9 changes: 9 additions & 0 deletions about/changelog.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
{
"1.0.4": [
"修复视频播放页报错的问题",
"修复留言评论表情无法加载的问题",
"优化搜索弹出框显示效果",
"修复切换验证码无法显示的问题",
"修复非管理员也可以升级主题的问题",
"修复短连接无效的问题",
"修复轮播图链接错误的问题"
],
"1.0.3": [
"主题架构调整",
"修复主题收不到更新提示的问题",
Expand Down
4 changes: 3 additions & 1 deletion asset/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@ input:-webkit-autofill:focus {background-clip: content-box !important;}
.mo-prmd-15px {padding-right: 0.9375rem}
.mo-ptmd-5px {padding-top: 0.3125rem}
.mo-ptmd-10px {padding-top: 0.625rem}
.mo-pbmd-5px {padding-bottom: 0.3125rem}
.mo-pbmd-10px {padding-bottom: 0.625rem}
.mo-mtmd-5px {margin-top: 0.3125rem}
.mo-mamd-10px {margin: 0.625rem}
Expand Down Expand Up @@ -741,7 +742,7 @@ input:-webkit-autofill:focus {background-clip: content-box !important;}
.mo-have-info .mo-have-body {position: relative;width: 100%;height: 100%;}
.mo-have-info .mo-have-main {top: 0;width: 100%;height: 100%;}
.mo-have-info .mo-have-right {top: 0;right: 0;}
.mo-have-info .mo-have-code {right: 0;bottom: 0;}
.mo-have-info .mo-have-code {right: 0;bottom: 0;width: 5.6875rem;height: 5.6875rem;}
.mo-have-info .mo-have-boxs {min-height: 100%;}
.mo-have-info .mo-have-pics {width: 100%;}
/* 用户中心 */
Expand All @@ -758,6 +759,7 @@ input:-webkit-autofill:focus {background-clip: content-box !important;}
.mo-shut-info .mo-shut-item:last-child {border: none}
.mo-shut-info .mo-shut-tips {height: 45px;line-height: 45px;background: rgba(255, 255, 255, .06)}
.mo-shut-info .mo-shut-span {line-height: 70px}
.mo-shut-info .mo-shut-code {height: 10rem;}
/* 防红防封 */
.mo-brow-info {background: white url(../img/browser.png) center top/contain no-repeat;}
.mo-brow-info .mo-brow-main {position: fixed;bottom: 80px;}
Expand Down
28 changes: 14 additions & 14 deletions asset/exc/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
array (
'logo' =>
array (
'src' => 'template/mojia/asset/img/logo.png',
'src' => 'https://cdn.jsdelivr.net/gh/amujie/mojia@master/asset/img/logo.png',
'link' => '/',
'type' => 'logo',
'desktop' => 'on',
Expand All @@ -28,10 +28,10 @@
),
'level' =>
array (
'id' => '1',
'id' => '',
'icon' => 'mo-icon-shuju',
'name' => '',
'link' => '/index.php/vod/detail/id/1.html',
'link' => '',
'type' => 'vod',
),
'film' =>
Expand Down Expand Up @@ -73,16 +73,16 @@
),
'music' =>
array (
'id' => '35',
'id' => '',
'icon' => 'mo-icon-zhibo',
'name' => '直播',
'link' => '/index.php/vod/type/id/35.html',
'name' => '',
'link' => '',
'type' => 'cat',
),
'live' =>
array (
'id' => '',
'icon' => 'mo-icon-zhibo',
'icon' => 'mo-icon-VIP',
'name' => '',
'link' => '',
'type' => 'cat',
Expand Down Expand Up @@ -325,15 +325,15 @@
'chat' =>
array (
'name' => '扫码观看',
'pics' => 'template/mojia/asset/img/favicon.png',
'pics' => 'https://cdn.jsdelivr.net/gh/amujie/mojia@master/asset/img/favicon.png',
'send' => '关键词1',
'code' => '长城',
'type' => '',
),
'logo' =>
array (
'name' => '视频标志',
'pics' => 'template/mojia/asset/img/logo.png',
'pics' => 'https://cdn.jsdelivr.net/gh/amujie/mojia@master/asset/img/logo.png',
'state' => '0',
'width' => '25%',
'height' => '60px',
Expand All @@ -343,7 +343,7 @@
'cover' =>
array (
'name' => '视频封面',
'pics' => 'template/mojia/asset/img/loading.gif',
'pics' => 'https://cdn.jsdelivr.net/gh/amujie/mojia@master/asset/img/loading.gif',
'state' => '1',
),
'advs' =>
Expand Down Expand Up @@ -560,7 +560,7 @@
array (
'name' => '关站设置',
'tips' => '网站维护中,请稍后访问',
'time' => '2020-01-31 00:00:00',
'time' => '2021-05-20 00:00:00',
'state' => '1',
),
'edit' =>
Expand Down Expand Up @@ -589,20 +589,20 @@
'tips' => '关注微信公众号,追剧不迷路',
'link' => '',
'state' => '0',
'pics' => 'template/mojia/asset/img/favicon.png',
'pics' => 'https://cdn.jsdelivr.net/gh/amujie/mojia@master/asset/img/favicon.png',
),
'share' =>
array (
'name' => '分享设置',
'apis' => '',
'host' => '',
'state' => '1',
'image' => 'template/mojia/asset/img/image.jpg',
'image' => 'https://cdn.jsdelivr.net/gh/amujie/mojia@master/asset/img/image.jpg',
),
'icon' =>
array (
'name' => '网站标志',
'pics' => 'template/mojia/asset/img/favicon.png',
'pics' => 'http://cdn.jsdelivr.net/gh/amujie/mojia@master/asset/img/favicon.png',
),
'lazy' =>
array (
Expand Down
6 changes: 4 additions & 2 deletions asset/exc/create.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,15 @@ function moJiaCommon() {
} else {
$mojia = moJiaPath('mojia');
$url = $mojia['other']['share']['host'] ? $mojia['other']['share']['host'] . parse_url(@$_POST['url'], PHP_URL_PATH) : @$_POST['url'];
die(json_encode(array('msg' => moJiaCurlGet($mojia['other']['share']['apis'] . $url))));
die(json_encode(array('msg' => moJiaCurlGet($mojia['other']['share']['apis'] . rawurlencode($url)))));
}
}

// 主题更新
function moJiaUpdate() {
if (isset($_POST['ver'])) {
if (!moJiaPower('mojia', moJiaPath('base'))) {
die(json_encode(array('msg' => '权限不足')));
} elseif (isset($_POST['ver'])) {
$path = '../../../';
$name = 'mojia-' . $_POST['ver'] . '.zip';
$href = moJiaPath('down') . $name . '?v=' . time();
Expand Down
2 changes: 1 addition & 1 deletion asset/exc/obtain.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function moJiaDaTaoKe($api, $param, $appSecret) {

// 表情转换
function moJiaFace($data) {
$version = parse_ini_file(moJiaPath('temp') . 'info.ini');
$version = parse_ini_file(substr(moJiaPath('temp'), strlen(moJiaPath('home'))) . 'info.ini');
$mojia = file_exists('application/extra/mojiaopt.php') ? @require ('application/extra/mojiaopt.php') : @require ('config.php'); ;
$cdnpath = $mojia['other']['cdns']['state'] ? $mojia['other']['cdns']['link'] . (strpos($mojia['other']['cdns']['link'], 'cdn.jsdelivr.net/gh/amujie') !== false ? '@' . $version['version'] : '') . '/' : moJiaPath('temp');
preg_match_all('/(?:\[)[^(?:\])]+]/i', $data, $match);
Expand Down
3 changes: 2 additions & 1 deletion asset/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,13 @@ layui.define(['jquery', 'element', 'form', 'upload', 'laydate', 'iconfonts', 'mu
return false;
});
form.on('submit(lookup)', function(data) {
var image = $(this).parents('td').prev().prev().find('input').val();
layer.open({
type: 1,
title: false,
shadeClose: true,
area: ['300px', '300px'],
content: '<img width="100%" src="' + magic.path + $(this).parents('td').prev().prev().find('input').val() + '"/>'
content: '<img width="100%" src="' + (image.indexOf('//') != -1 ? image : magic.path + image) + '"/>'
});
});
form.on('submit(colour)', function(data) {
Expand Down
47 changes: 26 additions & 21 deletions asset/js/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ layui.define(['jquery'], function(exports) {
mojia.player.init();
mojia.global.click();
mojia.global.event();
mojia.global.output();
mojia.global.verify();
mojia.global.paging();
mojia.global.passer();
Expand Down Expand Up @@ -43,18 +44,6 @@ layui.define(['jquery'], function(exports) {
mojia.global.swiper();
});
}
if ($('.mo-code-info').length) {
layui.use('qrcode', function() {
if ($('.mo-code-info').attr('data-api')) {
$.post(magic.tpl + 'asset/exc/create.php?id=url', 'url=' + encodeURIComponent(location.href), function(data) {
var url = data.msg && data.msg.indexOf('http') != -1 ? data.msg : location.href;
mojia.global.qrcode(148, url, '.mo-code-info', 'mo-code-pics')
});
} else {
mojia.global.qrcode(148, location.href, '.mo-code-info', 'mo-code-pics');
}
});
}
if ($('.mo-java-theia').length && !mojia.global.mobile()) {
layui.use('sidebar', function() {
$('.mo-java-side').theiaStickySidebar({
Expand Down Expand Up @@ -207,6 +196,7 @@ layui.define(['jquery'], function(exports) {
'qrcode': function(size, text, info, pics) {
var image = new Image();
image.src = document.getElementById(pics).src;
image.crossOrigin = 'anonymous';
image.onload = function() {
$(info).qrcode({
image: document.getElementById(pics),
Expand All @@ -220,6 +210,20 @@ layui.define(['jquery'], function(exports) {
});
$(info).find('img').addClass(pics);
};
},
'output': function() {
if ($('.mo-code-info').length) {
layui.use('qrcode', function() {
if ($('.mo-code-info').attr('data-api')) {
$.post(magic.tpl + 'asset/exc/create.php?id=url', 'url=' + encodeURIComponent(location.href), function(data) {
var url = data.msg && data.msg.indexOf('//') != -1 ? data.msg : location.href;
mojia.global.qrcode(148, url, '.mo-code-info', 'mo-code-pics')
});
} else {
mojia.global.qrcode(148, location.href, '.mo-code-info', 'mo-code-pics');
}
});
}
}
},
'navbar': {
Expand All @@ -228,19 +232,20 @@ layui.define(['jquery'], function(exports) {
this.login('.mo-pops-login', '.mo-pops-form');
this.cutout('mo_record', '.mo-pops-recs .mo-pops-clear');
this.cutout('mo_history', '.mo-pops-record .mo-pops-clear');
$(document).on('click', '.mo-navs-loop', function() {
mojia.navbar.loading($('.mo-head-info').children());
});
},
'loading': function(that) {
$.post(that.attr('data-url'), 'mid=' + that.attr('type-mid') + '&aid=' + that.attr('type-aid') + '&tid=' + that.attr('type-tid') + '&pid=' + that.attr('type-pid'), function(data) {
that.html(data);
mojia.player.tabs('.mo-pops-hots', '.mo-pops-boxs', 'mo-text-mojia');
mojia.navbar.output('mo_history', '.mo-pops-record .mo-pops-list');
mojia.navbar.output('mo_record', '.mo-pops-recs');
mojia.global.verify();
}).error(function() {
that.html('<p class="mo-navs-ajax mo-coxs-center">导航栏加载失败,<a class="mo-navs-record mo-text-mojia" href="javascript:;">重新加载</a></p>');
});
$(document).on('click', '.mo-navs-loop', function() {
mojia.navbar.loading($('.mo-head-info').children());
});
},
'login': function(str, form) {
mojia.global.submit(str, form);
Expand Down Expand Up @@ -288,8 +293,8 @@ layui.define(['jquery'], function(exports) {
},
'notice': function(str) {
var notice = Number(mojia.cookie.get('mo_notice'));
if (notice && notice >= Number($('body').attr('data-num'))) return false;
if ($('body').attr('data-alert')) {
if (notice && notice >= Number($('.mo-main-info').attr('data-num'))) return false;
if ($('.mo-main-info').attr('data-alert')) {
layui.use(['layer'], function() {
$(document).on('click', str, function() {
var count = notice ? notice : 0;
Expand Down Expand Up @@ -339,26 +344,26 @@ layui.define(['jquery'], function(exports) {
},
'shares': function(str) {
$(document).on('click', str, function() {
var that = $(this);
layui.use(['polyfill', 'layer', 'clipboard', 'qrcode', 'canvas'], function() {
var load = layer.load();
var that = $(this);
$('.mo-java-left').addClass('mo-part-left');
$.post(magic.path + 'index.php/label/share.html', function(data) {
layer.close(load);
$('.mo-java-left').addClass('mo-part-left');
layer.open({
type: 1,
id: 'have',
area: 'auto',
maxWidth: '640px',
area: '275px',
title: false,
closeBtn: 0,
shadeClose: true,
skin: 'mo-bord-round mo-have-open',
content: data.replace('{image}', $('meta[itemprop="image"]').attr('content')).replace('{qrcode}', $('meta[itemprop="image"]').attr('content')).replace('{title}', $('meta[itemprop="name"]').attr('content')).replace('{keywords}', $('meta[itemprop="keywords"]').attr('content').substring(0, 28)),
success: function(layero, index) {
if (that.attr('data-api')) {
$.post(magic.tpl + 'asset/exc/create.php?id=url', 'url=' + encodeURIComponent(location.href), function(data) {
var url = data.msg && data.msg.indexOf('http') != -1 ? data.msg : location.href;
var url = data.msg && data.msg.indexOf('//') != -1 ? data.msg : location.href;
mojia.global.qrcode(200, url, '.mo-have-code', 'mo-have-pics')
mojia.button.canvas(url, index);
});
Expand Down
2 changes: 1 addition & 1 deletion asset/js/mojia.js

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions asset/js/other.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ layui.define(['jquery', 'layer', 'common'], function(exports) {
}, 1000);
},
'browser': function() {
common.global.output();
var url = window.location.href;
if (navigator.userAgent.indexOf('QQ/') > -1) {
mojia.global.openurl('ucbrowser://' + url);
Expand Down Expand Up @@ -62,9 +63,7 @@ layui.define(['jquery', 'layer', 'common'], function(exports) {
});
},
'update': function() {
layui.use('qrcode', function() {
common.global.qrcode(148, location.href, '.mo-code-info', 'mo-code-pics');
});
common.global.output();
},
'openurl': function(url) {
document.getElementById('browser').href = url;
Expand Down
7 changes: 4 additions & 3 deletions html/basics/banner.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<div class="mo-swip-container mo-cols-rows">
<ul class="mo-swip-wrapper mo-cols-zero">
{maccms:foreach name="[data]"}
{assign name="type" value="$vo['type_1']['type_mid']?mac_get_mid_code($vo['type_1']['type_mid']):'topic'"}
<li class="mo-swip-slide{[top]}">
<a class="mo-situ-pics mo-lazy-color mo-swip-lazy mo-lazy-broad{[style]}" href="{[href]}" data-background="{[image]}">
<a class="mo-situ-pics mo-lazy-color mo-swip-lazy mo-lazy-broad{[style]}" href="{if'[type]'=='index'}{:mac_default($vo['art_jumpurl'],mac_url($type.'/detail',[],$vo))}{else}{[href]}{/if}" data-background="{if'[type]'=='index'}{:mac_url_img(trim(mac_default($vo[$type.'_pic_slide'],$vo[$type.'_pic'])))}{else}{[image]}{/if}">
<div class="mo-swip-title mo-cols-rows mo-part-ramp mo-text-white mo-wrap-arow">
<span class="mo-wrap-arow mo-fsxs-18px mo-swip-head">{[name]}</span>
<span class="mo-wrap-arow mo-fsxs-12px">{[remark]}</span>
<span class="mo-wrap-arow mo-fsxs-18px mo-swip-head">{if'[type]'=='index'}{$vo[$type.'_name']}{else}{[name]}{/if}</span>
<span class="mo-wrap-arow mo-fsxs-12px">{if'[type]'=='index'}{:mac_default($vo[$type.'_remarks'],'查看详情')}{else}{[remark]}{/if}</span>
</div>
</a>
</li>
Expand Down
8 changes: 4 additions & 4 deletions html/index/banner.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{if$mojia['home']['slide']['state']}{if$maccms.mid==0}
{php}$__LIST1__ = $mojia['home']['slide']['advs']?json_decode(str_replace('art','vod',json_encode(model("Art")->listCacheData('{"ids":"'.$mojia['home']['slide']['advs'].'"}')['list'])), ture):array('list'=>array());{/php}
{php}$__LIST2__ = json_decode(str_replace('topic','vod',json_encode(model('Topic')->listCacheData('{"num":"'.$mojia['home']['slide']['num'].'","order":"'.$mojia['home']['slide']['order'].'","by":"'.$mojia['home']['slide']['sort'].'","level":"'.$mojia['home']['slide']['level'].'"}')['list'])), ture);{/php}
{php}$__LIST1__ = $mojia['home']['slide']['advs']?model("Art")->listCacheData('{"ids":"'.$mojia['home']['slide']['advs'].'"}')['list']:array('list'=>array());{/php}
{php}$__LIST2__ = model('Topic')->listCacheData('{"num":"'.$mojia['home']['slide']['num'].'","order":"'.$mojia['home']['slide']['order'].'","by":"'.$mojia['home']['slide']['sort'].'","level":"'.$mojia['home']['slide']['level'].'"}')['list'];{/php}
{php}$__LIST3__ = model('Vod')->listCacheData('{"num":"'.$mojia['home']['slide']['num'].'","type":"'.$mojia['home']['slide']['type'].'","order":"'.$mojia['home']['slide']['order'].'","by":"'.$mojia['home']['slide']['sort'].'","level":"'.$mojia['home']['slide']['level'].'"}')['list'];{/php}
{include file="basics/banner" data=":array_filter(array_merge($__LIST1__,$__LIST2__,$__LIST3__))" top=":mac_default(' mo-mtxs-0px mo-mtsm-10px mo-mtmd-20px')" style=":mac_default(' mo-byxs-3by2 mo-bymd-5by2')" name=":mac_default($vo['vod_name'])" remark=":mac_default($vo['vod_remarks'],'查看详情')" image=":mac_url_img(trim(mac_default($vo['vod_pic_slide'],$vo['vod_pic'])))" href=":mac_url_vod_detail($vo)"}
{include file="basics/banner" type="index" data=":array_filter(array_merge($__LIST1__,$__LIST2__,$__LIST3__))" top=":mac_default(' mo-mtxs-0px mo-mtsm-10px mo-mtmd-20px')" style=":mac_default(' mo-byxs-3by2 mo-bymd-5by2')" name=":mac_default($vo['vod_name'])"}
{elseif$maccms.mid==1}
{php}$__LIST4__ = model('Vod')->listCacheData('{"num":"'.$mojia['home']['slide']['num'].'","type":"current","order":"'.$mojia['home']['slide']['order'].'","by":"'.$mojia['home']['slide']['sort'].'","level":"'.$mojia['home']['slide']['level'].'"}')['list'];{/php}
{include file="basics/banner" data=":mac_default($__LIST4__)" top=":mac_default(' mo-mtxs-0px mo-mtsm-10px mo-mtmd-20px')" style=":mac_default(' mo-byxs-3by2 mo-bymd-5by2')" name=":mac_default($vo['vod_name'])" remark=":mac_default($vo['vod_remarks'],'查看详情')" image=":mac_url_img(trim(mac_default($vo['vod_pic_slide'],$vo['vod_pic'])))" href=":mac_url_vod_detail($vo)"}
{elseif$maccms.mid==2}
{php}$__LIST5__ = model('Art')->listCacheData('{"num":"'.$mojia['home']['slide']['num'].'","type":"current","order":"'.$mojia['home']['slide']['order'].'","by":"'.$mojia['home']['slide']['sort'].'","level":"'.$mojia['home']['slide']['level'].'"}')['list'];{/php}
{include file="basics/banner" data=":mac_default($__LIST5__)" top=":mac_default(' mo-mtxs-0px mo-mtsm-10px mo-mtmd-20px')" style=":mac_default(' mo-byxs-3by2 mo-bymd-5by2')" name=":mac_default($vo['vod_name'])" remark=":mac_default($vo['vod_remarks'],'查看详情')" image=":mac_url_img(trim(mac_default($vo['vod_pic_slide'],$vo['vod_pic'])))" href=":mac_url_vod_detail($vo)"}
{include file="basics/banner" data=":mac_default($__LIST5__)" top=":mac_default(' mo-mtxs-0px mo-mtsm-10px mo-mtmd-20px')" style=":mac_default(' mo-byxs-3by2 mo-bymd-5by2')" name=":mac_default($vo['art_name'])" remark=":mac_default($vo['art_remarks'],'查看详情')" image=":mac_url_img(trim(mac_default($vo['art_pic_slide'],$vo['art_pic'])))" href=":mac_url_art_detail($vo)"}
{/if}{assign name="banner" value="1"}{/if}
2 changes: 1 addition & 1 deletion html/index/bloger.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{/maccms:type}
</div>
<div class="mo-cols-info mo-cols-xs12 mo-cols-lg4 mo-java-side mo-coxs-none mo-colg-block">
{include file="tinier/sidebar"}
{include file="module/widget"}
</div>
</div>
{/if}
Loading

0 comments on commit ebc1779

Please sign in to comment.