Browse Source

之前

master
jianglong 1 year ago
parent
commit
06ae033508
  1. 1
      app/admin/logic/content/ArticleLogic.php
  2. 8
      app/admin/logic/vote/VotePlayerLogic.php
  3. 2
      app/admin/view/community/organ/add.html
  4. 2
      app/admin/view/community/organ/audit.html
  5. 2
      app/admin/view/community/organ/edit.html
  6. 2
      app/admin/view/community/team/add.html
  7. 2
      app/admin/view/community/team/audit.html
  8. 2
      app/admin/view/community/team/edit.html
  9. 2
      app/admin/view/content/resource/add.html
  10. 2
      app/admin/view/vote/vote/add.html
  11. 2
      app/admin/view/vote/vote/edit.html
  12. 2
      app/admin/view/vote/vote_player/add.html
  13. 2
      app/admin/view/vote/vote_player/edit.html
  14. 6
      app/admin/view/vote/vote_player/lists.html
  15. 6
      app/api/logic/CommunityLogic.php
  16. 12
      app/api/logic/VoteLogic.php
  17. 13
      runtime/admin/temp/11b1f5a2163bcf964e1939530bd00942.php

1
app/admin/logic/content/ArticleLogic.php

@ -80,6 +80,7 @@ class ArticleLogic extends Logic
'cid' => $post['cid'], 'cid' => $post['cid'],
'title' => $post['title'], 'title' => $post['title'],
'image' => $post['image'] ?? '', 'image' => $post['image'] ?? '',
'intro' => $post['intro'] ?? '',
'content' => $post['content'] ?? '', 'content' => $post['content'] ?? '',
'visit' => 0, 'visit' => 0,
'likes' => 0, 'likes' => 0,

8
app/admin/logic/vote/VotePlayerLogic.php

@ -97,7 +97,7 @@ class VotePlayerLogic extends Logic
]); ]);
$vote_p = new VotePlayer(); $vote_p = new VotePlayer();
$vote = new Vote(); $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 = [ $update = [
"base_vote" => $count "base_vote" => $count
]; ];
@ -137,7 +137,7 @@ class VotePlayerLogic extends Logic
$vote_p = new VotePlayer(); $vote_p = new VotePlayer();
$vote = new Vote(); $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 = [ $update = [
"base_vote" => $count "base_vote" => $count
]; ];
@ -166,7 +166,7 @@ class VotePlayerLogic extends Logic
$vote_p = new VotePlayer(); $vote_p = new VotePlayer();
$vote = new Vote(); $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 = [ $update = [
"base_vote" => $count "base_vote" => $count
]; ];
@ -195,7 +195,7 @@ class VotePlayerLogic extends Logic
$vote_p = new VotePlayer(); $vote_p = new VotePlayer();
$vote = new Vote(); $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 = [ $update = [
"base_vote" => $count "base_vote" => $count
]; ];

2
app/admin/view/community/organ/add.html

@ -204,7 +204,7 @@
//==========================================上传证书start========================================================= //==========================================上传证书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=========================================================== //==========================================上传证书end===========================================================
// 删除按钮的显示与隐藏 // 删除按钮的显示与隐藏
$(document).on('mouseover', '.pay-img', function () { $(document).on('mouseover', '.pay-img', function () {

2
app/admin/view/community/organ/audit.html

@ -199,7 +199,7 @@
//==========================================上传证书start========================================================= //==========================================上传证书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=========================================================== //==========================================上传证书end===========================================================
// 删除按钮的显示与隐藏 // 删除按钮的显示与隐藏
$(document).on('mouseover', '.pay-img', function () { $(document).on('mouseover', '.pay-img', function () {

2
app/admin/view/community/organ/edit.html

@ -211,7 +211,7 @@
//==========================================上传证书start========================================================= //==========================================上传证书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=========================================================== //==========================================上传证书end===========================================================
// 删除按钮的显示与隐藏 // 删除按钮的显示与隐藏
$(document).on('mouseover', '.pay-img', function () { $(document).on('mouseover', '.pay-img', function () {

2
app/admin/view/community/team/add.html

@ -185,7 +185,7 @@
//==========================================上传证书start========================================================= //==========================================上传证书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=========================================================== //==========================================上传证书end===========================================================
// 删除按钮的显示与隐藏 // 删除按钮的显示与隐藏
$(document).on('mouseover', '.pay-img', function () { $(document).on('mouseover', '.pay-img', function () {

2
app/admin/view/community/team/audit.html

@ -189,7 +189,7 @@
//==========================================上传证书start========================================================= //==========================================上传证书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=========================================================== //==========================================上传证书end===========================================================
// 删除按钮的显示与隐藏 // 删除按钮的显示与隐藏
$(document).on('mouseover', '.pay-img', function () { $(document).on('mouseover', '.pay-img', function () {

2
app/admin/view/community/team/edit.html

@ -195,7 +195,7 @@
//==========================================上传证书start========================================================= //==========================================上传证书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=========================================================== //==========================================上传证书end===========================================================
// 删除按钮的显示与隐藏 // 删除按钮的显示与隐藏
$(document).on('mouseover', '.pay-img', function () { $(document).on('mouseover', '.pay-img', function () {

2
app/admin/view/content/resource/add.html

@ -262,7 +262,7 @@
//==========================================上传证书start========================================================= //==========================================上传证书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=========================================================== //==========================================上传证书end===========================================================
// 删除按钮的显示与隐藏 // 删除按钮的显示与隐藏
$(document).on('mouseover', '.pay-img', function () { $(document).on('mouseover', '.pay-img', function () {

2
app/admin/view/vote/vote/add.html

@ -286,7 +286,7 @@
//==========================================上传证书start========================================================= //==========================================上传证书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=========================================================== //==========================================上传证书end===========================================================
// 删除按钮的显示与隐藏 // 删除按钮的显示与隐藏
$(document).on('mouseover', '.pay-img', function () { $(document).on('mouseover', '.pay-img', function () {

2
app/admin/view/vote/vote/edit.html

@ -309,7 +309,7 @@
//==========================================上传证书start========================================================= //==========================================上传证书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=========================================================== //==========================================上传证书end===========================================================
// 删除按钮的显示与隐藏 // 删除按钮的显示与隐藏
$(document).on('mouseover', '.pay-img', function () { $(document).on('mouseover', '.pay-img', function () {

2
app/admin/view/vote/vote_player/add.html

@ -208,7 +208,7 @@
//==========================================上传证书start========================================================= //==========================================上传证书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=========================================================== //==========================================上传证书end===========================================================
// 删除按钮的显示与隐藏 // 删除按钮的显示与隐藏
$(document).on('mouseover', '.pay-img', function () { $(document).on('mouseover', '.pay-img', function () {

2
app/admin/view/vote/vote_player/edit.html

@ -257,7 +257,7 @@
//==========================================上传证书start========================================================= //==========================================上传证书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=========================================================== //==========================================上传证书end===========================================================
// 删除按钮的显示与隐藏 // 删除按钮的显示与隐藏
$(document).on('mouseover', '.pay-img', function () { $(document).on('mouseover', '.pay-img', function () {

6
app/admin/view/vote/vote_player/lists.html

@ -89,7 +89,7 @@
add: function() { add: function() {
layer.open({ layer.open({
type: 2 type: 2
,title: "新增活动" ,title: "新增选手"
,content: "{:url('vote.VotePlayer/add')}" ,content: "{:url('vote.VotePlayer/add')}"
,area: ["90%", "90%"] ,area: ["90%", "90%"]
,btn: ["确定", "取消"] ,btn: ["确定", "取消"]
@ -120,7 +120,7 @@
edit: function(obj) { edit: function(obj) {
layer.open({ layer.open({
type: 2 type: 2
,title: "编辑活动" ,title: "编辑选手"
,content: "{:url('vote.VotePlayer/edit')}?id=" + obj.data.id ,content: "{:url('vote.VotePlayer/edit')}?id=" + obj.data.id
,area: ["90%", "90%"] ,area: ["90%", "90%"]
,btn: ["确定", "取消"] ,btn: ["确定", "取消"]
@ -150,7 +150,7 @@
}); });
}, },
del: function(obj) { del: function(obj) {
layer.confirm("确定删除选手:"+obj.data.title, function(index) { layer.confirm("确定删除选手:"+obj.data.name, function(index) {
like.ajax({ like.ajax({
url: "{:url('vote.VotePlayer/del')}", url: "{:url('vote.VotePlayer/del')}",
data: {id: obj.data.id}, data: {id: obj.data.id},

6
app/api/logic/CommunityLogic.php

@ -229,6 +229,12 @@ class CommunityLogic extends Logic
->where($where) ->where($where)
->order(['sort' => 'asc', 'id' => 'desc']) ->order(['sort' => 'asc', 'id' => 'desc'])
->select()->toArray(); ->select()->toArray();
// $item = [
// 'id' => '',
// 'name' => '全部'
// ];
// array_unshift($lists, $item);
return $lists; return $lists;
} }

12
app/api/logic/VoteLogic.php

@ -89,7 +89,7 @@ class VoteLogic extends Logic
$item['is_rank'] = $item['is_rank'] ? '显示' : '隐藏'; $item['is_rank'] = $item['is_rank'] ? '显示' : '隐藏';
$item['is_redo'] = $item['is_redo']==0 ? '当天不可重复' : ($item['is_redo']==1?"全部不重复":"可重复"); $item['is_redo'] = $item['is_redo']==0 ? '当天不可重复' : ($item['is_redo']==1?"全部不重复":"可重复");
$item['vote_str'] = ($item['vote_type']==0 ? '每天' : '总共').$item['vote_num']."票"; $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']); $more = is_more($count, $get['page_no'], $get['page_size']);
@ -118,6 +118,7 @@ class VoteLogic extends Logic
$where = [ $where = [
['status', '=', 1], ['status', '=', 1],
['del', '=', 0],
['vote_id',"=",$get['id']] ['vote_id',"=",$get['id']]
]; ];
$order = [ $order = [
@ -174,6 +175,8 @@ class VoteLogic extends Logic
$pattern = '/<a[^>]+href=["\'](.*?\.(?:mp4|wav))["\'][^>]*>(.*?)<\/a>/i'; $pattern = '/<a[^>]+href=["\'](.*?\.(?:mp4|wav))["\'][^>]*>(.*?)<\/a>/i';
$replacement = '<video src="$1"></video>'; $replacement = '<video src="$1"></video>';
$article['content'] = preg_replace($pattern, $replacement, $article['content']); $article['content'] = preg_replace($pattern, $replacement, $article['content']);
$article['content'] = str_replace("<br>","\n",$article['content']);
$article['content'] = strip_tags($article['content'],"\n");
$article['views'] = $article['views'] +$article['base_visit'] ; $article['views'] = $article['views'] +$article['base_visit'] ;
// $article['images'] = explode(",",$article['images']); // $article['images'] = explode(",",$article['images']);
if($article['images'] ){ if($article['images'] ){
@ -195,10 +198,12 @@ class VoteLogic extends Logic
$where = [ $where = [
['status', '=', 1], ['status', '=', 1],
['del', '=', 0],
['vote_id',"=",$get['id']] ['vote_id',"=",$get['id']]
]; ];
$whereSql = "1=1";
if(!empty($get['keyword']) && trim($get['keyword'])){ if(!empty($get['keyword']) && trim($get['keyword'])){
$where[] = ['name',"like","%{$get['keyword']}%"]; $whereSql = "( name like '%{$get['keyword']}%' or id = '{$get['keyword']}' )";
} }
$order = [ $order = [
'add_time' => 'asc' 'add_time' => 'asc'
@ -206,10 +211,11 @@ class VoteLogic extends Logic
$model = new VotePlayer(); $model = new VotePlayer();
$count = $model->alias('a')->where($where)->count(); $count = $model->alias('a')->where($where)->whereRaw($whereSql)->count();
$list = $model->alias('b') $list = $model->alias('b')
->where($where) ->where($where)
->whereRaw($whereSql)
->order($order) ->order($order)
->page($get['page_no'], $get['page_size']) ->page($get['page_no'], $get['page_size'])
->select() ->select()

13
runtime/admin/temp/11b1f5a2163bcf964e1939530bd00942.php

@ -1,4 +1,4 @@
<?php /*a:2:{s:64:"E:\waibao\ahbcqz\server\app\admin\view\content\resource\add.html";i:1704276024;s:51:"E:\waibao\ahbcqz\server\app\admin\view\layout2.html";i:1679478874;}*/ ?> <?php /*a:2:{s:64:"E:\waibao\ahbcqz\server\app\admin\view\content\resource\add.html";i:1723542040;s:51:"E:\waibao\ahbcqz\server\app\admin\view\layout2.html";i:1679478874;}*/ ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
@ -105,7 +105,7 @@
<div class="layui-form-item"> <div class="layui-form-item">
<label for="cid2" class="layui-form-label"><span style="color:red;">*</span>资料二级分类:</label> <label for="cid2" class="layui-form-label"><span style="color:red;">*</span>资料二级分类:</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<select name="cid2" id="cid2" lay-verType="tips" lay-verify="required"> <select name="cid2" id="cid2" lay-verType="tips" >
<option value="">全部</option> <option value="">全部</option>
</select> </select>
</div> </div>
@ -191,6 +191,12 @@
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<label for="sort" class="layui-form-label">基础浏览数:</label>
<div class="layui-input-inline">
<input type="number" name="base_visit" id="base_visit" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label for="content" class="layui-form-label">资料内容:</label> <label for="content" class="layui-form-label">资料内容:</label>
<div class="layui-input-block"> <div class="layui-input-block">
<textarea name="content" id="content" lay-verify="content"></textarea> <textarea name="content" id="content" lay-verify="content"></textarea>
@ -275,7 +281,7 @@
//==========================================上传证书start========================================================= //==========================================上传证书start=========================================================
like.certUpload('.cert-add', '<?php echo url("file/other"); ?>?local=1&sub_dir=resource', '<?php echo htmlentities($storageUrl); ?>'); like.certUpload('.cert-add', '<?php echo url("file/other"); ?>?sub_dir=resource', '<?php echo htmlentities($storageUrl); ?>');
//==========================================上传证书end=========================================================== //==========================================上传证书end===========================================================
// 删除按钮的显示与隐藏 // 删除按钮的显示与隐藏
$(document).on('mouseover', '.pay-img', function () { $(document).on('mouseover', '.pay-img', function () {
@ -303,5 +309,6 @@
}) })
</script> </script>
</body> </body>
</html> </html>
Loading…
Cancel
Save