diff --git a/app/admin/logic/content/ArticleLogic.php b/app/admin/logic/content/ArticleLogic.php index 848ad88..7d79bf7 100644 --- a/app/admin/logic/content/ArticleLogic.php +++ b/app/admin/logic/content/ArticleLogic.php @@ -80,6 +80,7 @@ class ArticleLogic extends Logic 'cid' => $post['cid'], 'title' => $post['title'], 'image' => $post['image'] ?? '', + 'intro' => $post['intro'] ?? '', 'content' => $post['content'] ?? '', 'visit' => 0, 'likes' => 0, @@ -168,4 +169,4 @@ class ArticleLogic extends Logic return false; } } -} \ No newline at end of file +} diff --git a/app/admin/logic/vote/VotePlayerLogic.php b/app/admin/logic/vote/VotePlayerLogic.php index f33802a..2a15329 100644 --- a/app/admin/logic/vote/VotePlayerLogic.php +++ b/app/admin/logic/vote/VotePlayerLogic.php @@ -97,7 +97,7 @@ class VotePlayerLogic extends Logic ]); $vote_p = new VotePlayer(); $vote = new Vote(); - $count = $vote_p->where(['status','=',1])->where('vote_id','=',$post['vote_id'])->sum("base_vote"); + $count = $vote_p->where('status','=',1)->where('del','=',0)->where('vote_id','=',$post['vote_id'])->sum("base_vote"); $update = [ "base_vote" => $count ]; @@ -137,7 +137,7 @@ class VotePlayerLogic extends Logic $vote_p = new VotePlayer(); $vote = new Vote(); - $count = $vote_p->where('status','=',1)->where('vote_id','=',$post['vote_id'])->sum("base_vote"); + $count = $vote_p->where('status','=',1)->where('del','=',0)->where('vote_id','=',$post['vote_id'])->sum("base_vote"); $update = [ "base_vote" => $count ]; @@ -166,7 +166,7 @@ class VotePlayerLogic extends Logic $vote_p = new VotePlayer(); $vote = new Vote(); - $count = $vote_p->where(['status','=',1])->where('vote_id','=',$id)->sum("base_vote"); + $count = $vote_p->where('status','=',1)->where('del','=',0)->where('vote_id','=',$id)->sum("base_vote"); $update = [ "base_vote" => $count ]; @@ -195,7 +195,7 @@ class VotePlayerLogic extends Logic $vote_p = new VotePlayer(); $vote = new Vote(); - $count = $vote_p->where(['status','=',1])->where('vote_id','=',$id)->sum("base_vote"); + $count = $vote_p->where('status','=',1)->where('del','=',0)->where('vote_id','=',$id)->sum("base_vote"); $update = [ "base_vote" => $count ]; diff --git a/app/admin/view/community/organ/add.html b/app/admin/view/community/organ/add.html index b53ec74..2002680 100644 --- a/app/admin/view/community/organ/add.html +++ b/app/admin/view/community/organ/add.html @@ -204,7 +204,7 @@ //==========================================上传证书start========================================================= - like.certUpload('.cert-add', '{:url("file/other")}?local=1&sub_dir=resource', '{$storageUrl}'); + like.certUpload('.cert-add', '{:url("file/other")}?sub_dir=resource', '{$storageUrl}'); //==========================================上传证书end=========================================================== // 删除按钮的显示与隐藏 $(document).on('mouseover', '.pay-img', function () { @@ -231,4 +231,4 @@ ); }) - \ No newline at end of file + diff --git a/app/admin/view/community/organ/audit.html b/app/admin/view/community/organ/audit.html index c41ce7f..aa86c4d 100644 --- a/app/admin/view/community/organ/audit.html +++ b/app/admin/view/community/organ/audit.html @@ -199,7 +199,7 @@ //==========================================上传证书start========================================================= - like.certUpload('.cert-add', '{:url("file/other")}?local=1&sub_dir=resource', '{$storageUrl}'); + like.certUpload('.cert-add', '{:url("file/other")}?sub_dir=resource', '{$storageUrl}'); //==========================================上传证书end=========================================================== // 删除按钮的显示与隐藏 $(document).on('mouseover', '.pay-img', function () { @@ -227,4 +227,4 @@ ); }) - \ No newline at end of file + diff --git a/app/admin/view/community/organ/edit.html b/app/admin/view/community/organ/edit.html index 97d1bb2..9db6625 100644 --- a/app/admin/view/community/organ/edit.html +++ b/app/admin/view/community/organ/edit.html @@ -211,7 +211,7 @@ //==========================================上传证书start========================================================= - like.certUpload('.cert-add', '{:url("file/other")}?local=1&sub_dir=resource', '{$storageUrl}'); + like.certUpload('.cert-add', '{:url("file/other")}?sub_dir=resource', '{$storageUrl}'); //==========================================上传证书end=========================================================== // 删除按钮的显示与隐藏 $(document).on('mouseover', '.pay-img', function () { @@ -239,4 +239,4 @@ ); }) - \ No newline at end of file + diff --git a/app/admin/view/community/team/add.html b/app/admin/view/community/team/add.html index edbe767..5c50ff9 100644 --- a/app/admin/view/community/team/add.html +++ b/app/admin/view/community/team/add.html @@ -185,7 +185,7 @@ //==========================================上传证书start========================================================= - like.certUpload('.cert-add', '{:url("file/other")}?local=1&sub_dir=resource', '{$storageUrl}'); + like.certUpload('.cert-add', '{:url("file/other")}?sub_dir=resource', '{$storageUrl}'); //==========================================上传证书end=========================================================== // 删除按钮的显示与隐藏 $(document).on('mouseover', '.pay-img', function () { @@ -212,4 +212,4 @@ ); }) - \ No newline at end of file + diff --git a/app/admin/view/community/team/audit.html b/app/admin/view/community/team/audit.html index 0d75144..fbb7df4 100644 --- a/app/admin/view/community/team/audit.html +++ b/app/admin/view/community/team/audit.html @@ -189,7 +189,7 @@ //==========================================上传证书start========================================================= - like.certUpload('.cert-add', '{:url("file/other")}?local=1&sub_dir=resource', '{$storageUrl}'); + like.certUpload('.cert-add', '{:url("file/other")}?sub_dir=resource', '{$storageUrl}'); //==========================================上传证书end=========================================================== // 删除按钮的显示与隐藏 $(document).on('mouseover', '.pay-img', function () { @@ -217,4 +217,4 @@ ); }) - \ No newline at end of file + diff --git a/app/admin/view/community/team/edit.html b/app/admin/view/community/team/edit.html index ef8ab71..0ba4368 100644 --- a/app/admin/view/community/team/edit.html +++ b/app/admin/view/community/team/edit.html @@ -195,7 +195,7 @@ //==========================================上传证书start========================================================= - like.certUpload('.cert-add', '{:url("file/other")}?local=1&sub_dir=resource', '{$storageUrl}'); + like.certUpload('.cert-add', '{:url("file/other")}?sub_dir=resource', '{$storageUrl}'); //==========================================上传证书end=========================================================== // 删除按钮的显示与隐藏 $(document).on('mouseover', '.pay-img', function () { @@ -223,4 +223,4 @@ ); }) - \ No newline at end of file + diff --git a/app/admin/view/content/resource/add.html b/app/admin/view/content/resource/add.html index 32ca91e..47e2e6e 100644 --- a/app/admin/view/content/resource/add.html +++ b/app/admin/view/content/resource/add.html @@ -262,7 +262,7 @@ //==========================================上传证书start========================================================= - like.certUpload('.cert-add', '{:url("file/other")}?local=1&sub_dir=resource', '{$storageUrl}'); + like.certUpload('.cert-add', '{:url("file/other")}?sub_dir=resource', '{$storageUrl}'); //==========================================上传证书end=========================================================== // 删除按钮的显示与隐藏 $(document).on('mouseover', '.pay-img', function () { @@ -289,4 +289,4 @@ ); }) - \ No newline at end of file + diff --git a/app/admin/view/vote/vote/add.html b/app/admin/view/vote/vote/add.html index 11cc77c..0b0063e 100644 --- a/app/admin/view/vote/vote/add.html +++ b/app/admin/view/vote/vote/add.html @@ -286,7 +286,7 @@ //==========================================上传证书start========================================================= - like.certUpload('.cert-add', '{:url("file/other")}?local=1&sub_dir=resource', '{$storageUrl}'); + like.certUpload('.cert-add', '{:url("file/other")}?sub_dir=resource', '{$storageUrl}'); //==========================================上传证书end=========================================================== // 删除按钮的显示与隐藏 $(document).on('mouseover', '.pay-img', function () { @@ -313,4 +313,4 @@ ); }) - \ No newline at end of file + diff --git a/app/admin/view/vote/vote/edit.html b/app/admin/view/vote/vote/edit.html index 9c00f94..959cd6a 100644 --- a/app/admin/view/vote/vote/edit.html +++ b/app/admin/view/vote/vote/edit.html @@ -309,7 +309,7 @@ //==========================================上传证书start========================================================= - like.certUpload('.cert-add', '{:url("file/other")}?local=1&sub_dir=resource', '{$storageUrl}'); + like.certUpload('.cert-add', '{:url("file/other")}?sub_dir=resource', '{$storageUrl}'); //==========================================上传证书end=========================================================== // 删除按钮的显示与隐藏 $(document).on('mouseover', '.pay-img', function () { @@ -336,4 +336,4 @@ ); }) - \ No newline at end of file + diff --git a/app/admin/view/vote/vote_player/add.html b/app/admin/view/vote/vote_player/add.html index ca2b5ff..2009e6f 100644 --- a/app/admin/view/vote/vote_player/add.html +++ b/app/admin/view/vote/vote_player/add.html @@ -208,7 +208,7 @@ //==========================================上传证书start========================================================= - like.certUpload('.cert-add', '{:url("file/other")}?local=1&sub_dir=resource', '{$storageUrl}'); + like.certUpload('.cert-add', '{:url("file/other")}?sub_dir=resource', '{$storageUrl}'); //==========================================上传证书end=========================================================== // 删除按钮的显示与隐藏 $(document).on('mouseover', '.pay-img', function () { diff --git a/app/admin/view/vote/vote_player/edit.html b/app/admin/view/vote/vote_player/edit.html index b0b2a4d..cbf78be 100644 --- a/app/admin/view/vote/vote_player/edit.html +++ b/app/admin/view/vote/vote_player/edit.html @@ -257,7 +257,7 @@ //==========================================上传证书start========================================================= - like.certUpload('.cert-add', '{:url("file/other")}?local=1&sub_dir=resource', '{$storageUrl}'); + like.certUpload('.cert-add', '{:url("file/other")}?sub_dir=resource', '{$storageUrl}'); //==========================================上传证书end=========================================================== // 删除按钮的显示与隐藏 $(document).on('mouseover', '.pay-img', function () { diff --git a/app/admin/view/vote/vote_player/lists.html b/app/admin/view/vote/vote_player/lists.html index ece022a..7e66a61 100644 --- a/app/admin/view/vote/vote_player/lists.html +++ b/app/admin/view/vote/vote_player/lists.html @@ -89,7 +89,7 @@ add: function() { layer.open({ type: 2 - ,title: "新增活动" + ,title: "新增选手" ,content: "{:url('vote.VotePlayer/add')}" ,area: ["90%", "90%"] ,btn: ["确定", "取消"] @@ -120,7 +120,7 @@ edit: function(obj) { layer.open({ type: 2 - ,title: "编辑活动" + ,title: "编辑选手" ,content: "{:url('vote.VotePlayer/edit')}?id=" + obj.data.id ,area: ["90%", "90%"] ,btn: ["确定", "取消"] @@ -150,7 +150,7 @@ }); }, del: function(obj) { - layer.confirm("确定删除选手:"+obj.data.title, function(index) { + layer.confirm("确定删除选手:"+obj.data.name, function(index) { like.ajax({ url: "{:url('vote.VotePlayer/del')}", data: {id: obj.data.id}, diff --git a/app/api/logic/CommunityLogic.php b/app/api/logic/CommunityLogic.php index 108225f..6e6476e 100644 --- a/app/api/logic/CommunityLogic.php +++ b/app/api/logic/CommunityLogic.php @@ -229,6 +229,12 @@ class CommunityLogic extends Logic ->where($where) ->order(['sort' => 'asc', 'id' => 'desc']) ->select()->toArray(); +// $item = [ +// 'id' => '', +// 'name' => '全部' +// ]; +// array_unshift($lists, $item); + return $lists; } @@ -1036,4 +1042,4 @@ class CommunityLogic extends Logic return $article; } -} \ No newline at end of file +} diff --git a/app/api/logic/VoteLogic.php b/app/api/logic/VoteLogic.php index d8d2260..8f54e25 100644 --- a/app/api/logic/VoteLogic.php +++ b/app/api/logic/VoteLogic.php @@ -89,7 +89,7 @@ class VoteLogic extends Logic $item['is_rank'] = $item['is_rank'] ? '显示' : '隐藏'; $item['is_redo'] = $item['is_redo']==0 ? '当天不可重复' : ($item['is_redo']==1?"全部不重复":"可重复"); $item['vote_str'] = ($item['vote_type']==0 ? '每天' : '总共').$item['vote_num']."票"; - + $item['vote_total'] = $item['vote_total'] + $item['base_vote']; } $more = is_more($count, $get['page_no'], $get['page_size']); @@ -118,6 +118,7 @@ class VoteLogic extends Logic $where = [ ['status', '=', 1], + ['del', '=', 0], ['vote_id',"=",$get['id']] ]; $order = [ @@ -174,6 +175,8 @@ class VoteLogic extends Logic $pattern = '/]+href=["\'](.*?\.(?:mp4|wav))["\'][^>]*>(.*?)<\/a>/i'; $replacement = ''; $article['content'] = preg_replace($pattern, $replacement, $article['content']); + $article['content'] = str_replace("
","\n",$article['content']); + $article['content'] = strip_tags($article['content'],"\n"); $article['views'] = $article['views'] +$article['base_visit'] ; // $article['images'] = explode(",",$article['images']); if($article['images'] ){ @@ -195,10 +198,12 @@ class VoteLogic extends Logic $where = [ ['status', '=', 1], + ['del', '=', 0], ['vote_id',"=",$get['id']] ]; + $whereSql = "1=1"; if(!empty($get['keyword']) && trim($get['keyword'])){ - $where[] = ['name',"like","%{$get['keyword']}%"]; + $whereSql = "( name like '%{$get['keyword']}%' or id = '{$get['keyword']}' )"; } $order = [ 'add_time' => 'asc' @@ -206,10 +211,11 @@ class VoteLogic extends Logic $model = new VotePlayer(); - $count = $model->alias('a')->where($where)->count(); + $count = $model->alias('a')->where($where)->whereRaw($whereSql)->count(); $list = $model->alias('b') ->where($where) + ->whereRaw($whereSql) ->order($order) ->page($get['page_no'], $get['page_size']) ->select() diff --git a/runtime/admin/temp/11b1f5a2163bcf964e1939530bd00942.php b/runtime/admin/temp/11b1f5a2163bcf964e1939530bd00942.php index 866928c..ac5734f 100644 --- a/runtime/admin/temp/11b1f5a2163bcf964e1939530bd00942.php +++ b/runtime/admin/temp/11b1f5a2163bcf964e1939530bd00942.php @@ -1,4 +1,4 @@ - + @@ -105,7 +105,7 @@
-
@@ -191,6 +191,12 @@
+ +
+ +
+
+
@@ -275,7 +281,7 @@ //==========================================上传证书start========================================================= - like.certUpload('.cert-add', '?local=1&sub_dir=resource', ''); + like.certUpload('.cert-add', '?sub_dir=resource', ''); //==========================================上传证书end=========================================================== // 删除按钮的显示与隐藏 $(document).on('mouseover', '.pay-img', function () { @@ -303,5 +309,6 @@ }) + \ No newline at end of file