修正一些bug

This commit is contained in:
liyukun 2021-12-26 23:28:22 +08:00
parent cb1402d64f
commit 079b1a1739
14 changed files with 53 additions and 529 deletions

View File

@ -64,7 +64,7 @@ class Category extends AuthController
['link_str', ''],
['content', ''],
['sort', 0],
['display', 1]
['status', 1]
]);
if ($data['title'] == "") return app("json")->fail("分类名称不能为空");
if ($data['type'] == "") return app("json")->fail("类型不能为空");

View File

@ -31,9 +31,9 @@
<select name="category_id" id="category_id" class="form-control">
<option value="0">请选择</option>
{volist name="category" id="vo"}
<option value="{$vo.id}" {notempty name="pid" }{if $vo.id==
$category_id}selected{
/if}{/notempty}>{$vo.html}{$vo.title}</option>
<option value="{$vo.id}"
{notempty name="pid" }{if $vo.id==$category_id}selected{/if} {/notempty}
>{$vo.html}{$vo.title}</option>
{/volist}
</select>
</div>

View File

@ -4,14 +4,10 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/>
<title>页面提醒 - {:system_config("title")}后台管理系统</title>
<link rel="icon" href="{:system_config(" favicon
")}" type="image/ico">
<meta name="keywords" content="{:system_config(" keywords
")}">
<meta name="description" content="{:system_config(" description
")}">
<meta name="author" content="{:system_config(" author
")}">
<link rel="icon" href="{:system_config(" favicon")}" type="image/ico">
<meta name="keywords" content="{:system_config(" keywords")}">
<meta name="description" content="{:system_config(" description")}">
<meta name="author" content="{:system_config("author")}">
<link href="__ADMIN_PATH__css/bootstrap.min.css" rel="stylesheet">
<link href="__ADMIN_PATH__css/materialdesignicons.min.css" rel="stylesheet">
<link href="__ADMIN_PATH__css/style.min.css" rel="stylesheet">
@ -56,8 +52,7 @@
<h4>This page will be re-directed in <span id="wait" style="font-size: large;color: #f96868">3</span>
seconds</h4>
{/if}
<a href="{$backUrl}" class="btn {eq name=" type" value="success"}btn-success{else/}btn
btn-danger{/eq}">返回页面</a>
<a href="{$backUrl}" class="btn {eq name="type" value="success"}btn-success{else/}btn btn-danger{/eq}">返回页面</a>
</div>
</div>
</section>

View File

@ -188,10 +188,10 @@ class Article extends Base
if ($data['email'] == "") $this->error("邮箱不能为空");
if ($data['url'] == "") $this->error("url不能为空");
if ($data['content'] == "") $this->error("内容能为空");
$data['status'] = 0;
$data['status'] = web_config('comment_review')?0:1;
$res = commentModel::create($data);
if ($res) {
$this->success('申请成功,请耐心等待审核');
$this->success('提交成功');
} else {
$this->error('提交失败,请联系站长查看', null);
}

View File

@ -80,7 +80,7 @@ class Index extends Base
}
/**
* 友链申请
* 留言
* @param Request $request
* @return string
* @throws \think\db\exception\DataNotFoundException

View File

@ -206,7 +206,6 @@
<i class="fas fa-couch"></i>沙发空余
{/if}
</div>
<ol class="commentlist">
{ape:comment type="top" typeId="$apeField['id']" void='field'}
<li class="comment">
@ -251,7 +250,6 @@
</span>
</div>
</div>
</li><!-- #comment-## -->
</ol><!-- .children -->
{/ape:comment}
@ -260,30 +258,27 @@
</ol>
<script type='text/javascript' src='__JS__/comment-reply.min.js'></script>
<script type='text/javascript'>
$("body").on("click", ".comment-reply-link",
function(e) {
addComment.moveForm("li-comment-" + $(this).attr("data-commentid"), $(this).attr("data-commentid"), "respond", $(this).attr("data-postid"));
console.log("li-comment-" + $(this).attr("data-commentid"), $(this).attr("data-commentid"), "respond", $(this).attr("data-postid"));
$('body').on('click', '.comment-reply-link', function (e) {
addComment.moveForm("li-comment-" + $(this).attr('data-commentid'), $(this).attr('data-commentid'), "respond", $(this).attr('data-postid'));
console.log("li-comment-" + $(this).attr('data-commentid'), $(this).attr('data-commentid'), "respond", $(this).attr('data-postid'));
e.stopPropagation();
return false;
});
$(document).click(function (e) {
$(".conment-face-plane").css("opacity", "0");
$(".conment-face-plane").css("visibility", "hidden");
$('.conment-face-plane').css("opacity", "0");
$('.conment-face-plane').css("visibility", "hidden");
e.stopPropagation();
});
$("body").on("click", ".img-pace",
function(e) {
$(".comment_form_textarea").val($(".comment_form_textarea").val() + "[f=" + $(this).attr("facename") + "]");
$('body').on('click', '.img-pace', function (e) {
$('.comment_form_textarea').val($('.comment_form_textarea').val() + '[f=' + $(this).attr('facename') + ']')
});
$("body").on("click", ".popover-btn-face",
function(e) {
if ($(".conment-face-plane").css("visibility") == "visible") {
$(".conment-face-plane").css("opacity", "0");
$(".conment-face-plane").css("visibility", "hidden");
$('body').on('click', '.popover-btn-face', function (e) {
if ($('.conment-face-plane').css("visibility") == 'visible') {
$('.conment-face-plane').css("opacity", "0");
$('.conment-face-plane').css("visibility", "hidden");
} else {
$(".conment-face-plane").css("opacity", "1");
$(".conment-face-plane").css("visibility", "visible");
$('.conment-face-plane').css("opacity", "1");
$('.conment-face-plane').css("visibility", "visible");
}
e.stopPropagation();
});

File diff suppressed because one or more lines are too long

View File

@ -3,16 +3,15 @@
<div class="header-main container header-main-location-left">
<script>
function openMenu() {
$("body").css("overflow", "hidden");
$('body').css('overflow', 'hidden');
$(".drawer-menu-plane").addClass("drawer-menu-plane-show");
$(".menu-plane").appendTo($(".drawer-menu-list"));
$(".user-menu-plane").appendTo($(".drawer-menu-list"));
//$(".menu-item-has-children").append('<div class="m-dropdown" onclick="mobile_menuclick(event,this)" ><i class="fa fa-angle-down"></i></div>');
$(".user-menu-main").not('.user-menu-main-notlogin').append('<div class="m-dropdown" onclick="mobile_menuclick(event,this)"><i class="fa fa-angle-down"></i></div>');
$(".user-menu-main").not('.user-menu-main-notlogin').append('<div class="m-dropdown" onclick="mobile_menuclick(event,this)"><i class="fa fa-angle-down"></i></div>')
}
function closeMenu() {
$("body").css("overflow", "auto");
$('body').css('overflow', 'auto');
$(".drawer-menu-plane").removeClass("drawer-menu-plane-show");
$(".user-menu-plane").prependTo($(".header-menu"));
$(".menu-plane").prependTo($(".header-menu"));
@ -24,9 +23,18 @@
}
function closeSearch() {
//$('body').css('overflow', 'auto');
$(".dialog-search-plane").removeClass("dialog-search-plane-show");
}
function darkMode() {
if (window.isdark == true) {
removedarkcss();
cp_user_set_dark('0');
} else {
loaddarkcss();
cp_user_set_dark('1');
}
}
</script>
<div class="mobile-menu-btn" onclick="openMenu()">
<i class="fa fa-bars" aria-hidden="true"></i>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

View File

@ -9,7 +9,7 @@ return array(
'think\\view\\driver\\' => array($vendorDir . '/topthink/think-view/src'),
'think\\captcha\\' => array($vendorDir . '/topthink/think-captcha/src'),
'think\\app\\' => array($vendorDir . '/topthink/think-multi-app/src'),
'think\\' => array($vendorDir . '/topthink/framework/src/think', $vendorDir . '/topthink/think-helper/src', $vendorDir . '/topthink/think-template/src', $vendorDir . '/topthink/think-orm/src'),
'think\\' => array($vendorDir . '/topthink/framework/src/think', $vendorDir . '/topthink/think-helper/src', $vendorDir . '/topthink/think-orm/src', $vendorDir . '/topthink/think-template/src'),
'learn\\' => array($baseDir . '/learn'),
'app\\' => array($baseDir . '/app'),
'Symfony\\Polyfill\\Php80\\' => array($vendorDir . '/symfony/polyfill-php80'),

View File

@ -85,8 +85,8 @@ class ComposerStaticInit179ad4390eaa61356c3a52b9b610e467
array (
0 => __DIR__ . '/..' . '/topthink/framework/src/think',
1 => __DIR__ . '/..' . '/topthink/think-helper/src',
2 => __DIR__ . '/..' . '/topthink/think-template/src',
3 => __DIR__ . '/..' . '/topthink/think-orm/src',
2 => __DIR__ . '/..' . '/topthink/think-orm/src',
3 => __DIR__ . '/..' . '/topthink/think-template/src',
),
'learn\\' =>
array (

View File

@ -5,7 +5,7 @@
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => '2354910f0f227b5379848bca0d3e26ae1c9a33fa',
'reference' => 'cb1402d64f9ca93ea47960ba194212d469fd5d98',
'name' => 'topthink/think',
'dev' => true,
),
@ -187,7 +187,7 @@
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => '2354910f0f227b5379848bca0d3e26ae1c9a33fa',
'reference' => 'cb1402d64f9ca93ea47960ba194212d469fd5d98',
'dev_requirement' => false,
),
'topthink/think-captcha' => array(

2
vendor/services.php vendored
View File

@ -1,5 +1,5 @@
<?php
// This file is automatically generated at:2021-12-13 00:32:17
// This file is automatically generated at:2021-12-26 21:35:37
declare (strict_types = 1);
return array (
0 => 'think\\captcha\\CaptchaService',