修复冲突

master
yulingwei 5 years ago
commit 5cb129e95f

@ -15,8 +15,9 @@
<textarea name="desc" class="" placeholder="描述" >{$rule.desc}</textarea> <textarea name="desc" class="" placeholder="描述" >{$rule.desc}</textarea>
</li> </li>
<li> <li>
<label>权重</label> <label>排序</label>
<input name="sort" type="text" class="txt" placeholder="权重" value="{$rule.sort}" /> <input name="sort" type="text" class="txt" placeholder="排序" value="{$rule.sort}" />
<span style="font-size: small;color: red;">*排序越小越靠前</span>
</li> </li>
<li> <li>
<label>类型</label> <label>类型</label>

@ -221,6 +221,24 @@ class PromoteController extends BaseController
$this->assign('todayAddSpendData', $todayAddSpendData); $this->assign('todayAddSpendData', $todayAddSpendData);
$this->assign('mounthAddSpendData', $mounthAddSpendData); $this->assign('mounthAddSpendData', $mounthAddSpendData);
// 规则弹窗事宜
$rules = M("document_pop_rules")
//->where("(type = 1 and pop_time = {$currentTime}) or (type = 2 and pop_time = {$week})")
->order("sort asc, id desc")
->limit('0, 5')
->select();
$this->assign("rules", $rules);
$this->assign("rules_count", count($rules));
$currentTime = strtotime(date('Y-m-d'));
$weekArray = [7,1,2,3,4,5,6];
$week = $weekArray[date("w")];
$match_rules = M("document_pop_rules")
->field('id')
->where("(type = 1 and pop_time = {$currentTime}) or (type = 2 and pop_time = {$week})")
->order("sort asc, id desc")
->select();
$this->assign("match_rules_id", $match_rules ? json_encode(array_column($match_rules, 'id')) : []);
$this->assign("user_count", $user_count); $this->assign("user_count", $user_count);
$this->assign("total_money", $total_money); $this->assign("total_money", $total_money);
@ -248,6 +266,30 @@ class PromoteController extends BaseController
$this->display(); $this->display();
} }
public function popRuleDetail($id=0, $p=1, $row=1, $force=false)
{
$result = M("document_pop_rules")->where("id in ({$id})")->page($p, $row)->select();
if (empty($result)) {
return $this->error("未找到数据", [], true);
}
$count = M("document_pop_rules")->where("id in ({$id})")->count();
if ($p + 1 <= $count) {
$this->assign("next_page",$p+1);
}
if ($p - 1 >= 0) {
$this->assign("preview_page",$p-1);
}
if ($p + 1 > $count) {
$this->assign("close_btn", true);
}
$this->assign("count", $count);
$this->assign("force", $force);
// return $this->success("获取数据成功", $result, true);
//$this->show("<h2 style='text-align: center;'>{$result['title']}</h2>".$result['content']);
$this->assign("rule",$result[0]);
$this->display('pop_rule_detail');
}
private function caculateSpend($pay_time, $condition, $create = [], $type = 0) private function caculateSpend($pay_time, $condition, $create = [], $type = 0)
{ {
$map['promote_id'] = array('egt', 0); $map['promote_id'] = array('egt', 0);
@ -553,7 +595,12 @@ class PromoteController extends BaseController
} }
$count = M("protect_log","tab_")->field($field)->count(); $count = M("protect_log","tab_")->field($field)->count();
}*/ else { }*/
else if ($type == 57) {
$data_list = M('document_pop_rules')->order("sort asc, id desc")->page($p, $row)->select();
$count = count(M('document_pop_rules')->count());
}
else {
$data_list = M("document", "sys_")->join("left join sys_document_article a on a.id=sys_document.id")->limit('0,50')->where("category_id=56 and status=1 and a.id is not null")->order("update_time desc")->page($page, $row)->select(); //游戏公告 $data_list = M("document", "sys_")->join("left join sys_document_article a on a.id=sys_document.id")->limit('0,50')->where("category_id=56 and status=1 and a.id is not null")->order("update_time desc")->page($page, $row)->select(); //游戏公告
$count = M("document", "sys_")->where("category_id=56 and status=1")->count(); $count = M("document", "sys_")->where("category_id=56 and status=1")->count();
} }
@ -573,7 +620,6 @@ class PromoteController extends BaseController
$gg_ReadDocument = M("document_read", "sys_")->where($gg_where)->count(); $gg_ReadDocument = M("document_read", "sys_")->where($gg_where)->count();
// var_dump($gg_ReadDocument);die(); // var_dump($gg_ReadDocument);die();
$zx_data = M("document", "sys_")->join("left join sys_document_article a on a.id=sys_document.id")->where("category_id=51 and status=1 and a.id is not null")->order("update_time desc")->select(); $zx_data = M("document", "sys_")->join("left join sys_document_article a on a.id=sys_document.id")->where("category_id=51 and status=1 and a.id is not null")->order("update_time desc")->select();
$zx_Count = count($zx_data); $zx_Count = count($zx_data);
$zx_data = implode(',', array_column($zx_data, 'id')); $zx_data = implode(',', array_column($zx_data, 'id'));

@ -72,6 +72,13 @@
</span> </span>
</if> </if>
</span> </span>
<span class="fxui-tab-tit"><a href="#;">平台规则</a>
<if condition="$rules_count gt 0">
<!-- <span style="width: 25px;height: 25px;float: left;position: relative;bottom:50px;left:125px;text-align: center;background: rgba(255, 0, 0, 1);border-radius:15px">
<a style="line-height: 25px;padding: 0px;color: #fff">{$rules_count}</a>
</span> -->
</if>
</span>
<div id="u271_ann" class="annotation"></div> <div id="u271_ann" class="annotation"></div>
<span class="more"><a href="{:U('msg_list')}">查看更多></a></span> <span class="more"><a href="{:U('msg_list')}">查看更多></a></span>
</div> </div>
@ -123,6 +130,18 @@
</volist> </volist>
</empty> </empty>
</div> </div>
<div class="fxui-tab-nav">
<empty name="rules">
暂无平台规则
<else/>
<volist name="rules" id="rule">
<p onclick='pop_rulus_content({$rule.id}, 0)'>
<span class="title"><a >{$rule.title}</a></span>
<span class="time">{$rule.operate_time|date="Y/m/d",###}</span>
</p>
</volist>
</empty>
</div>
</div> </div>
</li> </li>
</ul> </ul>
@ -203,6 +222,46 @@
yes:function(){window.location.href="{:U('Safe/modifyBaseInfo')}"}, yes:function(){window.location.href="{:U('Safe/modifyBaseInfo')}"},
}); });
var pop_ids = {$match_rules_id};
function pop_rulus_content(id, force = false)
{
if (id instanceof Array) {
console.log(id)
var index = 0;
layer.open({
type: 2,
title: '平台规则',
area:['60%', '80%'],
closeBtn: 0,
shadeClose: false,
skin: 'yourclass',
content: "{:U('Promote/popRuleDetail')}&id="+id+"&force="+force
});
} else {
layer.open({
type: 2,
title: '平台规则',
area:['60%', '80%'],
closeBtn: 0,
shadeClose: false,
skin: 'yourclass',
//btn:['返回'],
content: "{:U('Promote/popRuleDetail')}&id="+id+"&force="+force,
end:function(){
return false;
}
});
}
}
if (pop_ids && !getCookie('pop_over')) {pop_rulus_content(pop_ids, true);}
function getCookie(name)
{
var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");
if(arr=document.cookie.match(reg))
return unescape(arr[2]);
else
return null;
} }
$(function(){ $(function(){
$(".select_gallery").select2(); $(".select_gallery").select2();

@ -41,6 +41,13 @@
</span> </span>
</if> </if>
</span> </span>
<span class="fxui-tab-tit <if condition="$type==57">curr</if>"><a href="{:U('msg_list')}&type=57">平台规则</a>
<if condition="$zx_count gt 0">
<!-- <span style="width: 25px;height: 25px;float: left;position: relative;bottom:50px;left:83px;text-align: center;background: rgba(255, 0, 0, 1)">
<a style="line-height: 25px;padding: 0px;color: #fff">{$zx_count}</a>
</span> -->
</if>
</span>
</div> </div>
<div class="fxui-tab-nav"> <div class="fxui-tab-nav">
<empty name="data_list"> <empty name="data_list">
@ -48,12 +55,14 @@
<else/> <else/>
<volist name="data_list" id="data"> <volist name="data_list" id="data">
<p> <p>
<if condition="$type neq 0"> <if condition="in_array($type, [50, 51, 56])">
<span class="title"><a href="index.php?s=/Home/Article/detail/id/{$data.id}.html">{$data.title}</a></span> <span class="title"><a href="index.php?s=/Home/Article/detail/id/{$data.id}.html">{$data.title}</a></span>
<elseif condition="$type == 57"/>
<a onclick="pop_rulus_content({$data.id}, 0)">{$data.title}</a>
<else/> <else/>
<span class="title"><a href="index.php?s=/Home/TestResource/protectLogList/id/{$zx.id}.html">{$data.title}</a></span> <span class="title"><a href="index.php?s=/Home/TestResource/protectLogList/id/{$zx.id}.html">{$data.title}</a></span>
</if>
<span class="time">{$data.update_time|date="Y/m/d",###}</span> <span class="time">{$data.update_time|date="Y/m/d",###}</span>
</if>
</p> </p>
</volist> </volist>
</empty> </empty>
@ -73,5 +82,35 @@
$(function () { $(function () {
setValue('row', '{:I("row",10)}'); setValue('row', '{:I("row",10)}');
}) })
function pop_rulus_content(id, force = false)
{
if (id instanceof Array) {
console.log(id)
var index = 0;
layer.open({
type: 2,
title: '平台规则',
area:['60%', '80%'],
closeBtn: 0,
shadeClose: false,
skin: 'yourclass',
content: "{:U('Promote/popRuleDetail')}&id="+id+"&force="+force
});
} else {
layer.open({
type: 2,
title: '平台规则',
area:['60%', '80%'],
closeBtn: 0,
shadeClose: false,
skin: 'yourclass',
//btn:['返回'],
content: "{:U('Promote/popRuleDetail')}&id="+id+"&force="+force,
end:function(){
return false;
}
});
}
}
</script> </script>
</block> </block>

@ -0,0 +1,129 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title>充值查询列表|----软件管理平台</title>
<link href="http://admin.vlcms.com/Public/icon.ico" type="image/x-icon" rel="shortcut icon">
<link rel="stylesheet" type="text/css" href="__CSS__/base.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/common.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/module.css">
<link rel="stylesheet" type="text/css" href="__CSS__/style.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/default_color.css" media="all">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css"/>
<script type="text/javascript" src="__STATIC__/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="__JS__/jquery.mousewheel.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
</head>
<style>
html {
min-width:100%;
}
body {
padding: 0px;
}
.select2-container--default .select2-selection--single {
color: #000;
resize: none;
border-width: 1px;
border-style: solid;
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
box-shadow: 0px 3px 3px #F7F8F9 inset;height:35px;
height:28px;border-radius:3px;font-size:12px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
line-height:35px;
line-height:28px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
height:26px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
height:26px;line-height:26px;font-size:12px;
}
.select2-results__option[aria-selected] {font-size:12px;}
* {
margin: 0;
padding: 0;
}
footer {
background-color: white;
position:fixed;
bottom:0px;
width: 100%;
}
</style>
<body>
<div id="main" class="main" style="min-height: 342px;width: 96%;">
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="__CSS__/admin_table.css" media="all">
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
<h2 style="text-align: center;">{$rule.title}</h2>
<div>{$rule.content}</div>
</div>
</body>
<footer>
<div style="text-align: right;margin-right: 10px;">
<?php if ($preview_page):?>
<a href="{:U('Promote/popRuleDetail', ['id'=>$_GET['id'], 'p'=>$preview_page, 'force'=>$force ])}" class="submit btn" style="line-height: 15px"><i class="add_qudao"></i><span>上一页</span></a>
<?php endif;?>
<?php if ($next_page):?>
<a onclick="checkJump('{:U('Promote/popRuleDetail', ['id'=>$_GET['id'], 'p'=>$next_page, 'force'=>$force ])}')" class="submit btn" style="line-height: 15px"><i class="add_qudao"></i><span>下一页</span></a>
<?php endif;?>
<?php if ($close_btn):?>
<a onclick="<?php if ($force):?>checkClose();<?php else:?>parent.layer.closeAll();<?php endif;?>" class="submit btn" style="line-height: 15px"><i class="add_qudao"></i><span>关闭</span></a>
<?php endif;?>
</div>
</footer>
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<php>if(C('COLOR_STYLE')=='blue_color') echo '
<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">
';
</php>
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"
charset="UTF-8"></script>
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<script>
var isAble = false;
setTimeout(function (){
isAble = true;
}, 5000);
function checkClose()
{
if (isAble == false) {
layer.msg("请浏览5秒后再点击");
return false;
} else {
setCookie();
parent.layer.closeAll();
return true;
}
}
function setCookie()
{
var name = 'pop_over';
var value = '1';
var expires = new Date(new Date(new Date().getTime() + 24 * 60 * 60 * 1000).setHours(0, 0, 0, 0));
document.cookie = name + "=" + escape(value) + ";expires=" + expires.toGMTString();
console.log(name + "=" + escape(value) + ";expires=" + expires.toGMTString());
}
function checkJump(url)
{
if (isAble == false) {
layer.msg("请浏览5秒后再点击");
return false;
} else {
window.location.href = url;
return true;
}
}
</script>
</html>
Loading…
Cancel
Save