Browse Source

之前

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

3
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;
}
}
}
}

8
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
];

4
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 @@
);
})
</script>
</script>

4
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 @@
);
})
</script>
</script>

4
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 @@
);
})
</script>
</script>

4
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 @@
);
})
</script>
</script>

4
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 @@
);
})
</script>
</script>

4
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 @@
);
})
</script>
</script>

4
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 @@
);
})
</script>
</script>

4
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 @@
);
})
</script>
</script>

4
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 @@
);
})
</script>
</script>

2
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 () {

2
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 () {

6
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},

8
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;
}
}
}

12
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 = '/<a[^>]+href=["\'](.*?\.(?:mp4|wav))["\'][^>]*>(.*?)<\/a>/i';
$replacement = '<video src="$1"></video>';
$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['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()

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>
<html>
<head>
@ -105,7 +105,7 @@
<div class="layui-form-item">
<label for="cid2" class="layui-form-label"><span style="color:red;">*</span>资料二级分类:</label>
<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>
</select>
</div>
@ -191,6 +191,12 @@
</div>
<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>
<div class="layui-input-block">
<textarea name="content" id="content" lay-verify="content"></textarea>
@ -275,7 +281,7 @@
//==========================================上传证书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===========================================================
// 删除按钮的显示与隐藏
$(document).on('mouseover', '.pay-img', function () {
@ -303,5 +309,6 @@
})
</script>
</body>
</html>
Loading…
Cancel
Save