Merge branch 'dev' of 47.111.118.107:/srv/git/platform into dev

master
chenzhi 5 years ago
commit c4eca18b4e

@ -240,26 +240,25 @@ class PromoteController extends BaseController
private function caculateSpend($pay_time, $condition, $create = [], $type = 0) private function caculateSpend($pay_time, $condition, $create = [], $type = 0)
{ {
$map1['promote_id'] = $map['promote_id'] = array('egt', 0); $map['promote_id'] = array('egt', 0);
$spend = M('Spend', 'tab_'); $spend = M('Spend', 'tab_');
$map1['pay_status'] = $map['pay_status'] = 1; $map['pay_status'] = 1;
$today = total(1); $today = total(1);
$yesterday = total(5); $yesterday = total(5);
$week = total(2); $week = total(2);
$mounth = total(3); $mounth = total(3);
unset( $map['create_time']); $this->getLoginPromote();
$promote_id = get_pid(); $promoteId = $this->loginPromote['id'];
$promoteId = M("promote", "tab_")
->field("id")
->where(array('chain' => ['like', '/'.$promote_id . '/%'],'id'=>$promote_id,'_logic'=>'or'))
->select();
$promoteId = implode(',',array_column($promoteId,'id'));
$whereUser['promote_id'] = ['IN', $promoteId]; $promoteIds = M("promote", "tab_")
->where(array('chain' => ['like', $this->loginPromote['chain'] . $promoteId . '/%']))
->getField('id', true);
$promoteIds[] = $promoteId;
$map['promote_id'] = ['IN', $promoteIds];
if (in_array($type, [1, 2])) { if (in_array($type, [1, 2])) {
$whereUser['promote_id'] = $map['promote_id'];
if ($type == 1) { if ($type == 1) {
$pay_time = total(1); $pay_time = total(1);
$start = mktime(0, 0, 0, date('m'), date('d'), date('Y')); $start = mktime(0, 0, 0, date('m'), date('d'), date('Y'));
@ -271,78 +270,49 @@ class PromoteController extends BaseController
} }
$whereUser['register_time'] = ['between', array($start, $end - 1)]; $whereUser['register_time'] = ['between', array($start, $end - 1)];
$userId = M('user', 'tab_')->where($whereUser)->getField('id', true); $userId = M('user', 'tab_')->where($whereUser)->getField('id', true);
}
if ($userId) { if ($userId) {
$map1['user_id'] = $map['user_id'] = ['IN', $userId]; $map['user_id'] = ['IN', $userId];
} else if (!$userId && $type != 0) { } else if (!$userId && $type != 0) {
return array('sum_mounth' => 0, 'sum_today' => 0); return array('sum_mounth' => 0, 'sum_today' => 0);
}
} }
//获取所有会长 if (isset($_REQUEST['game_name'])) {
$promote_map = "`chain` = '%/{$promote_id}/%' OR id = {$promote_id}"; $map['game_name'] = $_REQUEST['game_name'];
if (isset($_REQUEST['server_id'])) {
$promote = M("promote","tab_")->field("id,account")->where($promote_map)->select(); $map['server_name'] = $_REQUEST['server_id'];
$data =array(); unset($_REQUEST['server_id']);
for ($i=0; $i < count($promote); $i++) {
# code...
$proid = M("promote","tab_")->field("id")->where("`chain` like '%/{$promote[$i]['id']}/%'")->select();
$str = '';
for($k=0; $k<count($proid); $k++){
# code...
$str .= ($proid[$k]['id'].",");
} }
$str .= "{$promote[$i]['id']}"; $data = $spend
$map['promote_id'] = array("in",$str); ->field('
if (isset($_REQUEST['game_name'])) { floor(sum(IF(pay_time ' . $pay_time . ',pay_amount,0))*100) as sum_count,
$map['game_name'] = $_REQUEST['game_name']; floor(sum(IF(pay_time ' . $today . ',pay_amount,0))*100) as sum_today,
if (isset($_REQUEST['server_id'])) {
$map['server_name'] = $_REQUEST['server_id'];
unset($_REQUEST['server_id']);
}
$dbdata = $spend
->field('
floor(sum(IF(pay_time ' . $pay_time . ',pay_amount,0))*100) as count,
floor(sum(IF(pay_time ' . $today . ',pay_amount,0))*100) as today,
floor(sum(IF(pay_time ' . $yesterday . ',pay_amount,0))*100) as yesterday, floor(sum(IF(pay_time ' . $yesterday . ',pay_amount,0))*100) as yesterday,
floor(sum(IF(pay_time ' . $week . ',pay_amount,0))*100) as week, floor(sum(IF(pay_time ' . $week . ',pay_amount,0))*100) as sum_week,
floor(sum(IF(pay_time ' . $mounth . ',pay_amount,0))*100) as mounth') floor(sum(IF(pay_time ' . $mounth . ',pay_amount,0))*100) as sum_mounth')
->where($map) ->where($map)
->where("pay_time".$pay_time) ->where("pay_time".$pay_time)
->find(); ->find();
$dbdata['promote_account'] = $promote[$i]['account']; } else {
} else { $data = $spend
$dbdata = $spend ->field('
->field(' floor(sum(IF(pay_time ' . $pay_time . ',pay_amount,0))*100) as sum_count,
floor(sum(IF(pay_time ' . $pay_time . ',pay_amount,0))*100) as count, floor(sum(IF(pay_time ' . $today . ',pay_amount,0))*100) as sum_today,
floor(sum(IF(pay_time ' . $today . ',pay_amount,0))*100) as today,
floor(sum(IF(pay_time ' . $yesterday . ',pay_amount,0))*100) as yesterday, floor(sum(IF(pay_time ' . $yesterday . ',pay_amount,0))*100) as yesterday,
floor(sum(IF(pay_time ' . $week . ',pay_amount,0))*100) as week, floor(sum(IF(pay_time ' . $week . ',pay_amount,0))*100) as sum_week,
floor(sum(IF(pay_time ' . $mounth . ',pay_amount,0))*100) as mounth') floor(sum(IF(pay_time ' . $mounth . ',pay_amount,0))*100) as sum_mounth')
->where($map) ->where($map)
->where("pay_time".$pay_time) ->where("pay_time".$pay_time)
->find(); ->find();
$dbdata['promote_account'] = $promote[$i]['account']; }
} $data['sum_count'] = empty($data['sum_count']) ? 0 : bcdiv($data['sum_count'], 100 ,2);
$data[] = $dbdata; $data['sum_today'] = empty($data['sum_today']) ? 0 : bcdiv($data['sum_today'], 100 ,2);
} $data['yesterday'] = empty($data['yesterday']) ? 0 : bcdiv($data['yesterday'], 100 ,2);
foreach ($data as $key => $value) { $data['sum_week'] = empty($data['sum_week']) ? 0 : bcdiv($data['sum_week'], 100 ,2);
$value['count'] ?: 0; $data['sum_mounth'] = empty($data['sum_mounth']) ? 0 : bcdiv($data['sum_mounth'], 100 ,2);
$value['today'] ?: 0;
$value['week'] ?: 0;
$value['mounth'] ?: 0;
static $i = 0;
$i++;
$data[$key]['rand'] = $i;
$data[$key]['count'] = $value['count'] / 100;
$data[$key]['today'] = $value['today'] / 100;
$data[$key]['yesterday'] = $value['yesterday'] / 100;
$data[$key]['week'] = $value['week'] / 100;
$data[$key]['mounth'] = $value['mounth'] / 100;
}
$total = $this->data_total($data);
return $total; return $data;
} }
public function data_total($data) public function data_total($data)

@ -895,8 +895,6 @@ class UserController extends BaseController
} else { } else {
$model = M('User', 'tab_')->where($map)->save(array('phone' => '')); $model = M('User', 'tab_')->where($map)->save(array('phone' => ''));
} }
$this->suser->set_login_info('phone', $_REQUEST['phone']); $this->suser->set_login_info('phone', $_REQUEST['phone']);
if ($model !== false) { if ($model !== false) {

@ -4,47 +4,39 @@
<script src="__JS__/jquery-1.11.3.min.js"></script> <script src="__JS__/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="__JS__/getRem.js"></script> <script type="text/javascript" src="__JS__/getRem.js"></script>
<link rel="stylesheet" type="text/css" href="__CSS__/reset.css"> <link rel="stylesheet" type="text/css" href="__CSS__/reset.css">
<link rel="stylesheet" type="text/css" href="__CSS__/name.css"> <link rel="stylesheet" type="text/css" href="__CSS__/password.css">
<section class="trunker"> <style>
<section class="container"> body {
<form id="form" action="" method="post" onsubmit="return false" class=""> background: white;
<div class="name"> }
<!-- 子页公共头部 --> input,button{
<div class="subpage-heard">修改密码 padding: 0;
<a href="javascript:window.history.go(-1);" class="arrows"></a> }
</div> </style>
<div class="name-info"> <div class="name">
<!-- 子页公共头部 -->
<div class="name-input"> <div class="subpage-heard">修改密码
<div class="name-inputBox"> <a href="#" class="arrows"></a>
<img src="__IMG__/xiugaimima.png" alt=""> </div>
<div>原始密码</div> <form action="" id="form">
</div> <div class="login-box">
<input type="text" placeholder="请输入原始密码" style="padding: 0" name="old_pwd" id="old_pwd" value=""> <div class="login-input">
</div> <img src="__IMG__/suo.png" alt="">
<input type="text" placeholder="请输入原始密码" name="old_pwd" id="old_pwd" value="">
<div class="name-input">
<div class="name-inputBox">
<img src="__IMG__/xiugaimima.png" alt="">
<div>新密码</div>
</div>
<input type="text" placeholder="请输入新密码" style="padding: 0" name="new_pwd" id="new_pwd" value="">
</div>
<div class="name-input">
<div class="name-inputBox">
<img src="__IMG__/xiugaimima.png" alt="">
<div>确认密码</div>
</div>
<input type="text" placeholder="请输入确认密码" style="padding: 0" name="com_pwd" id="com_pwd" value="">
</div>
<div class="save jssubmit">保存修改</div>
</div>
</div> </div>
</form> <div class="login-input">
</section> <img src="__IMG__/suo.png" alt="">
</section> <input type="password" placeholder="请输入新密码" name="new_pwd" id="new_pwd" value="">
</div>
<div class="login-input">
<img src="__IMG__/suo.png" alt="">
<input type="password" placeholder="请输入新密码" name="com_pwd" id="com_pwd" value="">
</div>
<div class="login-btn jssubmit">提交</div>
</div>
</form>
</div>
<div class="popmsg pop-dialog"></div> <div class="popmsg pop-dialog"></div>
<script src="__JS__/pop.lwx.min.js"></script> <script src="__JS__/pop.lwx.min.js"></script>
<script> <script>

@ -4,58 +4,40 @@
<script src="__JS__/jquery-1.11.3.min.js"></script> <script src="__JS__/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="__JS__/getRem.js"></script> <script type="text/javascript" src="__JS__/getRem.js"></script>
<link rel="stylesheet" type="text/css" href="__CSS__/reset.css"> <link rel="stylesheet" type="text/css" href="__CSS__/reset.css">
<link rel="stylesheet" type="text/css" href="__CSS__/name.css">
<link rel="stylesheet" type="text/css" href="__CSS__/remove.css"> <link rel="stylesheet" type="text/css" href="__CSS__/remove.css">
<style> <style>
body { body {
background: white; background: white;
} }
input,button{
padding: 0;
}
</style> </style>
<div class="name"> <div class="name">
<!-- 子页公共头部 --> <!-- 子页公共头部 -->
<div class="subpage-heard"><empty name="user.phone">绑定手机<else/>解除绑定</empty> <div class="subpage-heard"><empty name="user.phone">绑定手机<else/>解除绑定</empty>
<a href="javascript:window.history.go(-1);" class="arrows"></a> <a href="javascript:window.history.go(-1);" class="arrows"></a>
</div> </div>
<div class="remove-info"> <form action="" id="form">
<div class="login-box">
<form id='form' action="" method="post" class=""> <?php if(!empty($user['phone'])){ ?>
<div class="login-input">
<?php if(!empty($user['phone'])){ ?> <img src="__IMG__/shouji.png" alt="">
<div class="remove-input"> <input style="color: #292929" type="text" placeholder="请输入手机号" readonly style="padding: 0" name="phone" id="phone" value="{$user['phone']}">
<div class="remove-inputBox">
<img src="__IMG__/shoujibangding.png" alt="">
<div>手机号</div>
</div> </div>
<div style="color: #292929">{$user['phone']}</div> <?php }else{ ?>
<input type="hidden" name="phone" id="phone" value="{$user['phone']}"> <div class="login-input">
</div> <img src="__IMG__/shouji.png" alt="">
<?php }else{ ?> <input type="text" placeholder="请输入手机号" name="phone" id="phone" value="{$user['phone']}">
<div class="name-input">
<div class="name-inputBox">
<img src="__IMG__/shoujibangding.png" alt="">
<div>手机号</div>
</div> </div>
<input type="text" placeholder="请输入手机号" style="padding: 0" name="phone" id="phone" value="{$user['phone']}"> <?php }?>
</div> <div class="login-code">
<?php }?>
<div class="remove-input">
<div class="remove-inputBox">
<img src="__IMG__/mingzibianji.png" alt="">
<div>验证码</div>
<input type="text" placeholder="请输入验证码" id="scode" name="scode" value=""> <input type="text" placeholder="请输入验证码" id="scode" name="scode" value="">
<div id="sendSafeCode">获取验证码</div>
</div> </div>
<div class="code g-btn" id="sendSafeCode">获取验证码</div> <div class="login-btn jssubmit">提交</div>
</div> </div>
<div class="save jssubmit">保存修改</div> </form>
</form>
</div>
</div> </div>
<div class="popmsg pop-dialog"></div> <div class="popmsg pop-dialog"></div>

@ -0,0 +1,95 @@
.loginPhTwo{
width: 100%;
font-family:PingFang SC;
}
.login-box{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.login-input{
margin-top: 0.6rem;
width: 5.5rem;
height: 0.8rem;
display: flex;
align-items: center;
justify-content: center;
background:rgba(245,245,245,1);
border-radius:0.4rem;
}
.login-input>img{
width: 0.42rem;
height: 0.42rem;
}
.login-input>input{
font-size: 0.28rem;
border: 0;
outline: 0;
height: 0.6rem;
width: 4rem;
margin-left: 0.16rem;
background-color: rgba(245,245,245,1);
}
.login-input>input::placeholder{
color: #A9A9A9;
}
.login-code{
margin-top: 0.6rem;
display: flex;
align-items: center;
justify-content: center;
}
.login-code>input{
width: 3rem;
height: 0.8rem;
background-color: #F5F5F5;
border-radius: 0.4rem;
font-size: 0.28rem;
text-align: center;
border: 0;
outline: 0;
}
.login-code>input::placeholder{
text-align: center;
color: #A9A9A9;
}
.login-code>div{
width: 2.3rem;
height: 0.8rem;
background-color: #389AED;
font-size: 0.28rem;
color: #FFFFFF;
border-radius: 0.4rem;
margin-left: 0.2rem;
text-align: center;
line-height: 0.8rem;
}
.login-btn{
margin-top: 0.6rem;
width: 5.5rem;
height: 0.8rem;
background-color: #389AED;
border-radius: 0.4rem;
font-size: 0.32rem;
color: #fff;
text-align: center;
line-height: 0.8rem;
outline: 0;
border: 0;
}
.forget-text{
font-size: 0.24rem;
color: #292929;
margin-top: 0.3rem;
font-weight: 400;
text-align: center;
line-height: 0.4rem;
}
.forget-text a{
color: #389AED;
font-size: 0.24rem;
font-weight: 400;
margin-left: 0.1rem;
cursor: pointer;
}

@ -1,61 +1,95 @@
.remove-info{ .loginPhTwo{
width: 100%; width: 100%;
font-family:PingFang SC;
} }
.remove-input { .login-box{
padding: 0.15rem 0.3rem;
display: flex; display: flex;
flex-direction: column;
align-items: center; align-items: center;
justify-content: space-between; justify-content: center;
border-bottom: 1px solid #F5F5F5;
height: 0.78rem;
font-size: 0.28rem;
} }
.remove-inputBox { .login-input{
margin-top: 0.6rem;
width: 5.5rem;
height: 0.8rem;
display: flex; display: flex;
align-items: center; align-items: center;
font-size:0.28rem; justify-content: center;
font-family:PingFang SC; background:rgba(245,245,245,1);
font-weight:500; border-radius:0.4rem;
color:rgba(41,41,41,1)
} }
.remove-inputBox>img{ .login-input>img{
width: 0.3rem; width: 0.42rem;
height: 0.3rem; height: 0.42rem;
margin-right: 0.23rem;
} }
.remove-inputBox>input{ .login-input>input{
width: 1.8rem; font-size: 0.28rem;
height: 0.5rem;
border: 0; border: 0;
outline: 0; outline: 0;
padding: 0; height: 0.6rem;
width: 4rem;
margin-left: 0.16rem;
background-color: rgba(245,245,245,1);
}
.login-input>input::placeholder{
color: #A9A9A9;
}
.login-code{
margin-top: 0.6rem;
display: flex;
align-items: center;
justify-content: center;
}
.login-code>input{
width: 3rem;
height: 0.8rem;
background-color: #F5F5F5;
border-radius: 0.4rem;
font-size: 0.28rem; font-size: 0.28rem;
margin-left: 0.33rem;
}
.code{
width:1.84rem;
height:0.6rem;
background:rgba(33,177,235,1);
border-radius:0.3rem;
font-size:0.28rem;
font-family:PingFang SC;
font-weight:400;
color:rgba(255,255,255,1);
text-align: center; text-align: center;
line-height: 0.6rem; border: 0;
outline: 0;
}
.login-code>input::placeholder{
text-align: center;
color: #A9A9A9;
} }
.login-code>div{
.save{ width: 2.3rem;
width:5rem; height: 0.8rem;
height:0.8rem; background-color: #389AED;
background:rgba(33,177,235,1); font-size: 0.28rem;
border-radius:0.4rem; color: #FFFFFF;
font-size:0.32rem; border-radius: 0.4rem;
font-family:PingFang SC; margin-left: 0.2rem;
font-weight:500; text-align: center;
color:rgba(255,255,255,1);
line-height: 0.8rem; line-height: 0.8rem;
}
.login-btn{
margin-top: 0.6rem;
width: 5.5rem;
height: 0.8rem;
background-color: #389AED;
border-radius: 0.4rem;
font-size: 0.32rem;
color: #fff;
text-align: center; text-align: center;
margin: 0.3rem auto 0 auto; line-height: 0.8rem;
margin-bottom: 10px; outline: 0;
border: 0;
}
.forget-text{
font-size: 0.24rem;
color: #292929;
margin-top: 0.3rem;
font-weight: 400;
text-align: center;
line-height: 0.4rem;
}
.forget-text a{
color: #389AED;
font-size: 0.24rem;
font-weight: 400;
margin-left: 0.1rem;
cursor: pointer;
} }
Loading…
Cancel
Save