diff --git a/Application/Admin/Controller/AutoController.class.php b/Application/Admin/Controller/AutoController.class.php index 6ebe18b4b..b442ad320 100644 --- a/Application/Admin/Controller/AutoController.class.php +++ b/Application/Admin/Controller/AutoController.class.php @@ -890,5 +890,31 @@ public function auto_rrdae(){ } } + //根据时间统计玩家充值 + public function userPlayDataCount() + { + $time = strtotime(date('Y-m-d 00:00:00', time() - (3600 * 24))); + $spendMap['pay_status'] = 1; + $spendMap['pay_game_status'] = 1; + $spendMap['game_player_id'] = ['gt', 0]; + $spendMap['pay_time'] = ['between', [$time, strtotime(date('Y-m-d 23:59:59', $time))]]; + + $field = 'FROM_UNIXTIME(pay_time, "%Y-%m-%d") as day,game_id,server_id,game_player_id,sum(pay_amount) as recharge_cost,count(id) as recharge_count'; + $spendCostData = M('spend', 'tab_')->field($field) + ->where($spendMap) + ->group('day,game_player_id,server_id,game_id') + ->select(); + $data = []; + foreach ($spendCostData as $list) { + $save['game_id'] = $list['game_id']; + $save['server_id'] = $list['server_id']; + $save['role_id'] = $list['game_player_id']; + $save['recharge_cost'] = $list['recharge_cost']; + $save['recharge_count'] = $list['recharge_count']; + $save['create_time'] = strtotime($list['day']); + $data[] = $save; + } + M('user_play_data_count', 'tab_')->addAll($data); + } } diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 824276b35..9f99ad237 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -243,6 +243,7 @@ class ExportController extends Controller $promoter_ids = D("Promote")->where("chain like '%/{$_REQUEST['promote_id']}/%' or id={$_REQUEST['promote_id']}")->field('id')->select(); if ($promoter_ids) { $map['tab_user.promote_id'] = ['in', implode(',', array_column($promoter_ids, 'id'))]; + $spendprom = " AND ss.promote_id IN (" . implode(',', array_column($promoter_ids, 'id')) . ") "; } } } @@ -259,24 +260,24 @@ class ExportController extends Controller // unset($_REQUEST['promote_account']); // } if (isset($_REQUEST['register_way'])) { - if($_REQUEST['type']==1) { - if ($_GET['register_way'] == 1) { - empty($hav) || $hav .= ' AND '; - $hav .= ' tab_user.register_type in (0,1)'; - $maps['tab_user.register_type'] = ['in',[0,1]]; - } elseif($_GET['register_way'] == 7){ - empty($hav) || $hav .= ' AND '; - $hav .= ' tab_user.register_type in(7)'; - $maps['tab_user.register_type'] = 7; - }else { - empty($hav) || $hav .= ' AND '; - $hav .= ' tab_user.register_type in(2)'; - $maps['tab_user.register_type'] = 2; - } - } else { - $map['register_way'] = I('register_way'); - unset($_REQUEST['register_way']); - } + if($_REQUEST['type']==1) { + if ($_GET['register_way'] == 1) { + empty($hav) || $hav .= ' AND '; + $hav .= ' tab_user.register_type in (0,1)'; + $maps['tab_user.register_type'] = ['in',[0,1]]; + } elseif($_GET['register_way'] == 7){ + empty($hav) || $hav .= ' AND '; + $hav .= ' tab_user.register_type in(7)'; + $maps['tab_user.register_type'] = 7; + }else { + empty($hav) || $hav .= ' AND '; + $hav .= ' tab_user.register_type in(2)'; + $maps['tab_user.register_type'] = 2; + } + } else { + $map['register_way'] = I('register_way'); + unset($_REQUEST['register_way']); + } } if (isset($_REQUEST['register_type'])) { $map['register_type'] = I('register_type'); @@ -301,16 +302,25 @@ class ExportController extends Controller $order = 'id desc'; } - if (isset($_REQUEST['viplevel'])) { + if (isset($_REQUEST['viplevel'])) { - $havs = get_vip_level_limit('recharge_total',$_REQUEST['viplevel']); - } + $havs = get_vip_level_limit('recharge_total',$_REQUEST['viplevel']); + } - $map['puid'] = array('eq',0); - $map['is_platform'] = 0; - //数据 - $xlsData = M('user', 'tab_')->field('tab_user.id,tab_user.age_status,tab_user.account,tab_user.gold_coin,tab_user.alipay,tab_user.balance,tab_user.promote_account,register_time,tab_user.lock_status,tab_user.register_way,tab_user.register_type,tab_user.register_ip,tab_user.login_time,(IFNULL(sum(b.pay_amount),0) + IFNULL(sum(ss.pay_amount),0)) AS recharge_total') - ->join('left join tab_deposit AS b ON tab_user.id = b.user_id AND b.pay_status = 1') + $map['puid'] = array('eq',0); + $map['is_platform'] = 0; + if($_REQUEST['promote_id'] && $_REQUEST['promote_id'] > -1){ + $xlsData = M('user', 'tab_')->field('tab_user.id,tab_user.age_status,tab_user.account,tab_user.gold_coin,tab_user.alipay,tab_user.balance,tab_user.promote_account,register_time,tab_user.lock_status,tab_user.register_way,tab_user.register_type,tab_user.register_ip,tab_user.login_time,IFNULL(sum(ss.pay_amount),0) AS recharge_total') + ->join('left join tab_spend as ss on ss.user_id=tab_user.id AND ss.pay_status = 1'.$spendprom) + ->join($game_map ? "tab_user_play on tab_user_play.user_id = tab_user.id $game_map" : false) + ->join($game_play_map ? "tab_user_play_info on tab_user_play_info.user_id = tab_user.id $game_play_map" : false) + ->where($map) + ->group('tab_user.id') + ->order($order) + ->having($havs) + ->select(); + }else{ + $xlsData = M('user', 'tab_')->field('tab_user.id,tab_user.age_status,tab_user.account,tab_user.gold_coin,tab_user.alipay,tab_user.balance,tab_user.promote_account,register_time,tab_user.lock_status,tab_user.register_way,tab_user.register_type,tab_user.register_ip,tab_user.login_time,IFNULL(sum(ss.pay_amount),0) AS recharge_total') ->join('left join tab_spend as ss on ss.user_id=tab_user.id AND ss.pay_status = 1') ->join($game_map ? "tab_user_play on tab_user_play.user_id = tab_user.id $game_map" : false) ->join($game_play_map ? "tab_user_play_info on tab_user_play_info.user_id = tab_user.id $game_play_map" : false) @@ -319,38 +329,42 @@ class ExportController extends Controller ->order($order) ->having($havs) ->select(); - if($xlsData) { - $ids = array_column($xlsData,'id'); - /* 在手里 */ - $small = M('user','tab_')->field('count(id) as count,puid')->where(['puid'=>array('in',$ids)])->group('puid')->select(); - /* 出售中 */ - $small2 = M('user','tab_')->field('count(id) as count,source_puid')->where(['source_puid'=>array('in',$ids),'source_time'=>0])->group('source_puid')->select(); - - foreach($xlsData as $k => $v) { - - - $xlsData[$k]['vip_level'] = get_vip_level($v['recharge_total']); - if(empty($v['alipay'])){ - $xlsData[$k]['alipay'] = '--'; - } - - $xlsData[$k]['register_type'] = $v['register_type'] == 2?'手机号':($v['register_type']==7?'邮箱':'账号'); - - $xlsData[$k]['small_count'] = 0; - foreach($small as $s) { - if($s['puid'] == $v['id']) { - $xlsData[$k]['small_count'] += $s['count'];break; - } - } - foreach($small2 as $s) { - if($s['source_puid'] == $v['id']) { - $xlsData[$k]['small_count'] += $s['count'];break; - } - } + } + //数据 + + + if($xlsData) { + $ids = array_column($xlsData,'id'); + /* 在手里 */ + $small = M('user','tab_')->field('count(id) as count,puid')->where(['puid'=>array('in',$ids)])->group('puid')->select(); + /* 出售中 */ + $small2 = M('user','tab_')->field('count(id) as count,source_puid')->where(['source_puid'=>array('in',$ids),'source_time'=>0])->group('source_puid')->select(); - } + foreach($xlsData as $k => $v) { - } + + $xlsData[$k]['vip_level'] = get_vip_level($v['recharge_total']); + if(empty($v['alipay'])){ + $xlsData[$k]['alipay'] = '--'; + } + + $xlsData[$k]['register_type'] = $v['register_type'] == 2?'手机号':($v['register_type']==7?'邮箱':'账号'); + + $xlsData[$k]['small_count'] = 0; + foreach($small as $s) { + if($s['puid'] == $v['id']) { + $xlsData[$k]['small_count'] += $s['count'];break; + } + } + foreach($small2 as $s) { + if($s['source_puid'] == $v['id']) { + $xlsData[$k]['small_count'] += $s['count'];break; + } + } + + } + + } break; case 4: diff --git a/Application/Admin/Controller/MemberController.class.php b/Application/Admin/Controller/MemberController.class.php index 737e73e07..c8feca33f 100644 --- a/Application/Admin/Controller/MemberController.class.php +++ b/Application/Admin/Controller/MemberController.class.php @@ -26,6 +26,7 @@ class MemberController extends ThinkController if ($promoter_ids) { $maps['tab_user.promote_id'] = ['in', implode(',', array_column($promoter_ids, 'id'))]; $hav .= "tab_user.promote_id in (" . implode(',', array_column($promoter_ids, 'id')) . ") "; + $spendprom = " AND ss.promote_id IN (" . implode(',', array_column($promoter_ids, 'id')) . ") "; } } } @@ -176,7 +177,28 @@ class MemberController extends ThinkController // ->order($order) ->select(false); - $data = $usermodel->table('(' . $sql1 . ') as a ')->field('a.id,a.device_number,a.age_status,a.account,a.balance,a.gold_coin,a.alipay,a.promote_id,a.register_type,a.promote_account,a.register_time,a.lock_status,a.register_way,a.register_type,a.register_ip,a.login_time,(a.deposit_total+IFNULL(sum(ss.pay_amount),0)) as recharge_total,check_status') + // $data = $usermodel->table('(' . $sql1 . ') as a ')->field('a.id,a.device_number,a.age_status,a.account,a.balance,a.gold_coin,a.alipay,a.promote_id,a.register_type,a.promote_account,a.register_time,a.lock_status,a.register_way,a.register_type,a.register_ip,a.login_time,IFNULL(sum(ss.pay_amount),0) as recharge_total,check_status') + // ->join('left join tab_spend as ss on ss.user_id=a.id AND ss.pay_status = 1') + // ->join($game_map ? "tab_user_play on tab_user_play.user_id = a.id $game_map" : false) + // ->join($game_play_map ? "tab_user_play_info on tab_user_play_info.user_id = a.id $game_play_map" : false) + // ->page($page, $row) + // ->having($havs) + // ->group('a.id') + // ->order($order) + // ->select(); + if($_REQUEST['promote_id'] && $_REQUEST['promote_id'] > -1){ + $data = $usermodel->table('(' . $sql1 . ') as a ')->field('a.id,a.device_number,a.age_status,a.account,a.balance,a.gold_coin,a.alipay,a.promote_id,a.register_type,a.promote_account,a.register_time,a.lock_status,a.register_way,a.register_type,a.register_ip,a.login_time,IFNULL(sum(ss.pay_amount),0) as recharge_total,check_status') + ->join('left join tab_spend as ss on ss.user_id=a.id AND ss.pay_status = 1'.$spendprom) + ->join($game_map ? "tab_user_play on tab_user_play.user_id = a.id $game_map" : false) + ->join($game_play_map ? "tab_user_play_info on tab_user_play_info.user_id = a.id $game_play_map" : false) + ->page($page, $row) + ->having($havs) + ->group('a.id') + ->order($order) + ->select(); + // echo $data;die(); + }else{ + $data = $usermodel->table('(' . $sql1 . ') as a ')->field('a.id,a.device_number,a.age_status,a.account,a.balance,a.gold_coin,a.alipay,a.promote_id,a.register_type,a.promote_account,a.register_time,a.lock_status,a.register_way,a.register_type,a.register_ip,a.login_time,IFNULL(sum(ss.pay_amount),0) as recharge_total,check_status') ->join('left join tab_spend as ss on ss.user_id=a.id AND ss.pay_status = 1') ->join($game_map ? "tab_user_play on tab_user_play.user_id = a.id $game_map" : false) ->join($game_play_map ? "tab_user_play_info on tab_user_play_info.user_id = a.id $game_play_map" : false) @@ -185,10 +207,11 @@ class MemberController extends ThinkController ->group('a.id') ->order($order) ->select(); + } + //计数 - $sql = M('user', 'tab_')->field('tab_user.id,(IFNULL(sum(b.pay_amount),0) + IFNULL(sum(ss.pay_amount),0)) AS recharge_total') - ->join('left join tab_deposit AS b ON tab_user.id = b.user_id AND b.pay_status = 1') + $sql = M('user', 'tab_')->field('tab_user.id,IFNULL(sum(ss.pay_amount),0) AS recharge_total') ->join('left join tab_spend as ss on ss.user_id=tab_user.id AND ss.pay_status = 1') ->join($game_map ? "tab_user_play on tab_user_play.user_id = tab_user.id $game_map" : false) ->join($game_play_map ? "tab_user_play_info on tab_user_play_info.user_id = tab_user.id $game_play_map" : false) @@ -196,8 +219,22 @@ class MemberController extends ThinkController ->group('tab_user.id') ->where($hav) ->having($havs)->select(false); - $jcount = M('User', 'tab_')->field('count(a.id) as count')->table('(' . $sql . ') as a')->select(); + //替换为新表 + if($_REQUEST['promote_id'] && $_REQUEST['promote_id'] > -1){ + $sql = M('user', 'tab_')->field('tab_user.id,IFNULL(sum(ss.pay_amount),0) AS recharge_total') + ->join('left join tab_spend as ss on ss.user_id=tab_user.id AND ss.pay_status = 1'.$spendprom) + ->join($game_map ? "tab_user_play on tab_user_play.user_id = tab_user.id $game_map" : false) + ->join($game_play_map ? "tab_user_play_info on tab_user_play_info.user_id = tab_user.id $game_play_map" : false) + ->where($map) + ->group('tab_user.id') + ->where($hav) + ->having($havs)->select(false); + } + + $jcount = M('User', 'tab_')->field('count(a.id) as count,sum(a.recharge_total) recharge_total')->table('(' . $sql . ') as a')->select(); $count = $jcount[0]['count']; + // var_dump($jcount);die(); + $this->assign('pay_allcount', $jcount[0]['recharge_total']); $model = M('Model')->getByName('user'); diff --git a/Application/Admin/Controller/PlatformController.class.php b/Application/Admin/Controller/PlatformController.class.php index abaea3399..79f09c30b 100644 --- a/Application/Admin/Controller/PlatformController.class.php +++ b/Application/Admin/Controller/PlatformController.class.php @@ -387,6 +387,28 @@ class PlatformController extends ThinkController ->group('tp1.id') ->order('count desc, register_time') ->select(); + unset($map['tp1.id']); + unset($map['tp1.chain']); + $map['promote_id'] = 0; + //官方渠道数据添加 + $authorityData = M('user', 'tab_')->field('date_format(FROM_UNIXTIME(register_time),"%Y-%m-%d") AS time, count(id) as count, + count(IF(register_time ' . $today . ',1,null)) as today, + count(IF(register_time ' . $week . ',1,null)) as week, + count(IF(register_time ' . $mounth . ',1,null)) as mounth') + ->where($map) + ->find(); + $authorityData['promote_account'] = "官方渠道"; + $authorityData['id'] = "1"; + if (isset($_REQUEST['promote_id'])||$authorityData['count']==0) { + $authorityData = []; + } else { + array_push($data, $authorityData); + } + + //数据排序 + $last_names = array_column($data,'count'); + array_multisort($last_names,SORT_DESC,$data); + $count = count($data); foreach ($data as $key => $value) { static $i = 0; @@ -489,6 +511,7 @@ class PlatformController extends ThinkController ->where("pay_time".$pay_time) ->find(); $dbdata['promote_account'] = $promote[$i]['account']; + $dbdata['promote_id'] = $promote[$i]['id']; } else { $dbdata = $spend ->field(' @@ -500,6 +523,7 @@ class PlatformController extends ThinkController ->where("pay_time".$pay_time) ->find(); $dbdata['promote_account'] = $promote[$i]['account']; + $dbdata['promote_id'] = $promote[$i]['id']; } $data[] = $dbdata; } diff --git a/Application/Admin/View/Member/user_info.html b/Application/Admin/View/Member/user_info.html index c3c0b959e..83d7b0812 100644 --- a/Application/Admin/View/Member/user_info.html +++ b/Application/Admin/View/Member/user_info.html @@ -304,6 +304,13 @@ + + 汇总: + + 累计充值:{$pay_allcount} + + + diff --git a/Application/Admin/View/Platform/promote_statistics.html b/Application/Admin/View/Platform/promote_statistics.html index 597ab3889..f531e3b71 100644 --- a/Application/Admin/View/Platform/promote_statistics.html +++ b/Application/Admin/View/Platform/promote_statistics.html @@ -216,20 +216,20 @@ $(function(){ $("#search").click(); } }); - $(".ljzc").click(function(){ - var id = $(this).attr('data-value'); - var game_name = "{:I('game_name')}"; - var server_name = "{:I('server_id')}"; - var urlr = window.location.host; - layer.open({ - type: 2, - title: '注册记录', - shadeClose: true, - shade: 0.8, - area: ['70%', '80%'], - content: '/admin.php?s=/Platform/zhuce_detail/promote_id/'+id+'/game_name/'+game_name+'/server_name/'+server_name+''//iframe的url - }); - }); + // $(".ljzc").click(function(){ + // var id = $(this).attr('data-value'); + // var game_name = "{:I('game_name')}"; + // var server_name = "{:I('server_id')}"; + // var urlr = window.location.host; + // layer.open({ + // type: 2, + // title: '注册记录', + // shadeClose: true, + // shade: 0.8, + // area: ['70%', '80%'], + // content: '/admin.php?s=/Platform/zhuce_detail/promote_id/'+id+'/game_name/'+game_name+'/server_name/'+server_name+''//iframe的url + // }); + // }); $(".paixu").click(function(){ var that=$(this); $data_order=that.attr('data-order'); diff --git a/Application/Admin/View/Platform/promotepay_statistics.html b/Application/Admin/View/Platform/promotepay_statistics.html index 97b07c39c..b6ab050e3 100644 --- a/Application/Admin/View/Platform/promotepay_statistics.html +++ b/Application/Admin/View/Platform/promotepay_statistics.html @@ -120,7 +120,7 @@ {$data['promote_account']} - {$data.count} + {$data.count} {$data.today} {$data.week} @@ -193,19 +193,19 @@ $(function(){ $("#search").click(); } }); - $(".ljcz").click(function(){ - var id = $(this).attr('data-value'); - var game_name = "{:I('game_name')}"; - var server_name = "{:I('server_id')}"; - layer.open({ - type: 2, - title: '游戏消费记录', - shadeClose: true, - shade: 0.8, - area: ['70%', '80%'], - content: 'admin.php?s=/Platform/chongzhi_detail/promote_id/'+id+'/game_name/'+game_name+'/server_name/'+server_name+''//iframe的url - }); - }); + // $(".ljcz").click(function(){ + // var id = $(this).attr('data-value'); + // var game_name = "{:I('game_name')}"; + // var server_name = "{:I('server_id')}"; + // layer.open({ + // type: 2, + // title: '游戏消费记录', + // shadeClose: true, + // shade: 0.8, + // area: ['70%', '80%'], + // content: 'admin.php?s=/Platform/chongzhi_detail/promote_id/'+id+'/game_name/'+game_name+'/server_name/'+server_name+''//iframe的url + // }); + // }); $(".paixu").click(function(){ $ddd=$(this).attr('date-url'); $lzhuce="{:I('lzhuce')}"; diff --git a/Application/Base/Repository/UserRepository.class.php b/Application/Base/Repository/UserRepository.class.php index 3e42e4052..2598a165f 100644 --- a/Application/Base/Repository/UserRepository.class.php +++ b/Application/Base/Repository/UserRepository.class.php @@ -133,8 +133,13 @@ class UserRepository $dayList = $params['dayList'] ?? []; $params['time_column'] = 'create_time'; $conditions = $this->getDayGroupConditions($params); - $items = M('login_daily_record', 'tab_')->field('FROM_UNIXTIME(create_time, "%Y-%m-%d") as day, count(DISTINCT user_id, game_id) as count') + $subQuery = M('login_daily_record', 'tab_')->field('FROM_UNIXTIME(create_time, "%Y-%m-%d") as day,count(DISTINCT user_id) as count') ->where($conditions) + ->group('day,game_id') + ->buildSql(); + $items = M()->field('*,sum(count) as count') + ->table($subQuery) + ->alias('a') ->group('day') ->select(); @@ -294,8 +299,13 @@ class UserRepository $params['time_column'] = 'create_time'; $conditions = $this->getCreateRoleConditions($params); - $items = M('user_play_info', 'tab_')->field('count(distinct game_id,user_id) count, FROM_UNIXTIME(create_time, "%Y-%m-%d") as day') + $subQuery = M('user_play_info', 'tab_')->field('FROM_UNIXTIME(create_time, "%Y-%m-%d") as day,count(DISTINCT user_id) as count') ->where($conditions) + ->group('day,game_id') + ->buildSql(); + $items = M()->field('*,sum(count) as count') + ->table($subQuery) + ->alias('a') ->group('day') ->select(); return $this->assembleRecords($items, $dayList, 'count'); @@ -346,10 +356,14 @@ class UserRepository ->where("ti.user_id = user_id and ti.game_id = game_id and ti.create_time < " . $params['begin_time']) ->fetchSql(true) ->count(); - $items = $model->field("count(distinct game_id,user_id) count, FROM_UNIXTIME(create_time, '%Y-%m-%d') as day, - (" . $sql . ") as num") + $subQuery = $model->field('FROM_UNIXTIME(create_time, "%Y-%m-%d") as day,count(DISTINCT user_id) as count') ->where($conditions) - ->group("day") + ->group('day,game_id') + ->buildSql(); + $items = M()->field("*,sum(count) as count,(" . $sql . ") as num") + ->table($subQuery) + ->alias('a') + ->group('day') ->having('num = 0') ->select(); return $this->assembleRecords($items, $dayList, 'count'); @@ -411,10 +425,14 @@ class UserRepository ->where("ti.create_device_number = create_device_number and ti.game_id = game_id and ti.create_time < " . $params['begin_time']) ->fetchSql(true) ->count(); - $items = $model->field("count(distinct game_id,create_device_number) count, FROM_UNIXTIME(create_time, '%Y-%m-%d') as day, - (" . $sql . ") as num") + $subQuery = $model->field('FROM_UNIXTIME(create_time, "%Y-%m-%d") as day,count(DISTINCT create_device_number) as count') ->where($conditions) - ->group("day") + ->group('day,game_id') + ->buildSql(); + $items = M()->field("*,sum(count) as count,(" . $sql . ") as num") + ->table($subQuery) + ->alias('a') + ->group('day') ->having('num = 0') ->select(); return $this->assembleRecords($items, $dayList, 'count'); @@ -476,10 +494,14 @@ class UserRepository ->where("ti.create_ip = create_ip and ti.game_id = game_id and ti.create_time < " . $params['begin_time']) ->fetchSql(true) ->count(); - $items = $model->field("count(distinct game_id,create_ip) count, FROM_UNIXTIME(create_time, '%Y-%m-%d') as day, - (" . $sql . ") as num") + $subQuery = $model->field('FROM_UNIXTIME(create_time, "%Y-%m-%d") as day,count(DISTINCT create_ip) as count') ->where($conditions) - ->group("day") + ->group('day,game_id') + ->buildSql(); + $items = M()->field("*,sum(count) as count,(" . $sql . ") as num") + ->table($subQuery) + ->alias('a') + ->group('day') ->having('num = 0') ->select(); return $this->assembleRecords($items, $dayList, 'count'); diff --git a/Application/Common/Common/extend.php b/Application/Common/Common/extend.php index 6f38130b5..8ed98c5b7 100644 --- a/Application/Common/Common/extend.php +++ b/Application/Common/Common/extend.php @@ -1053,7 +1053,7 @@ function is_check_account($account){ $map[$field]=$game_id; $data=M('game','tab_')->where($map)->find(); if(empty($data)){return '';} - return $data['dratio']; + return $data['ratio']; } /** diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index a271b502a..dac68565b 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -412,17 +412,21 @@ class DownloadController extends BaseController { $initEndTime = empty(I('endtime')) ? $initEndTime : I('endtime'); $begTime = strtotime($initBegTime); $endTime = strtotime($initEndTime); - + $gameId = intval(I('game_id', 0)); + $status = intval(I('status', 0)); $map['chain'] = ['like', $this->loginPromote['chain'] . $this->loginPromote['id'] . '/%']; $ids = M('promote', 'tab_')->where($map)->getField('id', true); $ids[] = $this->loginPromote['id']; $ids = implode(',', $ids); $map = []; $map['promote_id'] = ['in', $ids]; + $map['pay_status'] = 1; if (!empty($payOrderNumber)) { $map['pay_order_number'] = $payOrderNumber; } - + if (!empty($gameId)) { + $map['game_id'] = $gameId; + } if (!empty($begTime) && empty($endTime)) { $map['pay_time'] = ['egt', $begTime]; } elseif (empty($begTime) && !empty($endTime)) { @@ -430,6 +434,22 @@ class DownloadController extends BaseController { } elseif (!empty($begTime) && !empty($endTime)) { $map['pay_time'] = ['between', [$begTime, $endTime + 86399]]; } + + if (isset($_GET['status'])) { + if ($status == -2) { + $map['selle_status'] = 0; + } else { + $withdrawMap['promote_id'] = $this->loginPromote['id']; + $withdrawMap['status'] = $status; + $withdrawIds = M('withdraw', 'tab_')->where($withdrawMap)->getField('id', true); + + if (empty($withdrawIds)) { + $map = '1 = 2'; + } else { + $map['withdraw_id'] = ['in', $withdrawIds]; + } + } + } $conditions = json_encode($map,TRUE); $addtime = time(); $data = [ @@ -1485,7 +1505,7 @@ class DownloadController extends BaseController { array_push($ids,PID); } - array_push($ids,$queryPromote['id']); + //array_push($ids,$queryPromote['id']); if (!empty($ids)) { $map['promote_id'] = ['in',$ids]; @@ -1530,7 +1550,7 @@ class DownloadController extends BaseController { if (($playTimeEnd - $playTimeBegin) > 31 * 24 * 3600) { $this->error('时间范围不能超过31天'); } - $map['play_time'] = ['between', [$playTimeBegin, $playTimeEnd]]; + $map['create_time'] = ['between', [$playTimeBegin, $playTimeEnd]]; } if ($isSelf) { $map['promote_id'] = $queryPromote['id']; @@ -1758,7 +1778,8 @@ class DownloadController extends BaseController { $xlsName = "注册明细"; $xlsCell = array( array('account','玩家账号'), - array('promote_account','推广账号'), + array('promote_account','推广账号'), + array('device_number','设备IMIE/IDFA'), array('register_time','注册时间'), array('register_ip','注册ip'), array('login_time','登陆时间'), @@ -1766,7 +1787,7 @@ class DownloadController extends BaseController { ); $model = M('user','tab_'); - $data = $model->field('account,promote_account,register_time,register_ip,login_time,login_ip')->where($map)->select(); + $data = $model->field('account,device_number,promote_account,register_time,register_ip,login_time,login_ip')->where($map)->order('tab_user.id desc')->select(); //var_dump($data); $xlsData = []; foreach ($data as $key1 => $value1) { @@ -1788,12 +1809,14 @@ class DownloadController extends BaseController { array('server_name','区服'), array('role_name','游戏昵称'), array('role_level','等级'), + array('create_time','创建时间'), ); $model = M('user_play_info','tab_'); - $data = $model->field('user_account,promote_account,game_name,server_name,role_name,role_level')->where($map)->select(); + $data = $model->field('user_account,promote_account,game_name,server_name,role_name,role_level')->where($map)->order('create_time desc')->select(); $xlsData = []; foreach ($data as $key1 => $value1) { $value1['user_account'] = $this->encryption($value1['user_account']); + $value1['create_time'] = date('Y-m-d H:i:s',$value1['create_time']); $xlsData[] = $value1; } $this->exportExcel($xlsName, $xlsCell, $xlsData,$id); @@ -1832,7 +1855,7 @@ class DownloadController extends BaseController { $begTime = strtotime($initBegTime); $endTime = strtotime($initEndTime); $params['begin_time'] = $begTime; - $params['end_time'] = $endTime; + $params['end_time'] = $endTime -1; if(!empty($map['apply_time'][1])) { $begTime = $map['apply_time'][1][0]; $endTime = $map['apply_time'][1][1]; @@ -2120,6 +2143,11 @@ class DownloadController extends BaseController { foreach ($data as $key => $value) { $value['create_time'] = date("Y-m-d H:i:s", $value['create_time']); $value['user_account'] = $this->encryption($value['user_account']); + if($value['check_status'] == 1) { + $value['check_status'] = "正常"; + }else { + $value['check_status'] = "拉黑"; + } //获取累计发放 $where = array( "user_id"=>$value['user_id'], @@ -2202,9 +2230,9 @@ class DownloadController extends BaseController { $data[$key]['create_time'] = date('Y-m-d H:m:i',$value['create_time']); $data[$key]['user_account'] = $this->encryption($value['user_account']); if($value['check_status'] == 1) { - $data[$key]['check_status'] = "冻结"; - }else { $data[$key]['check_status'] = "启用"; + }else { + $data[$key]['check_status'] = "冻结"; } } $xlsData = $data; @@ -2431,7 +2459,7 @@ class DownloadController extends BaseController { array('income','收益'), array('pay_time','充值时间'), array('selle_status','订单状态'), - ); + ); $model = M('spend', 'tab_'); $data = $model->field('pay_order_number,game_name,user_account,promote_account,pay_amount,pay_way,if(selle_ratio >= 0,selle_ratio,0) as selle_ratio,pay_time,selle_status,pay_status,withdraw_id') ->where($map) @@ -2532,23 +2560,23 @@ class DownloadController extends BaseController { } public function dailysummaryExcelInfo($id,$map) { - $xlsName = "每日概况"; - $xlsCell = array( + $xlsName = "每日概况"; + $xlsCell = array( array('day','日期'), - array('role_num','创角数'), - array('user_num','创角用户'), + array('role_num','创角数'), + array('user_num','创角用户'), array('new_user_num','新创角用户'), array('new_device_num','新创角设备'), - array('new_ip_num','新增创角IP'), - array('login_user_num','登陆用户数'), - array('spend_user_num','充值人数'), - array('spend_num','充值次数'), - array('spend_all_amount','充值总额'), - array('spend_cash','现金充值'), - array('spend_generic','通用币充值'), - array('spend_binding','绑定币充值'), - array('spend_discount','折扣币充值'), - array('spend_voucher','代金劵使用'), + array('new_ip_num','新增创角IP'), + array('login_user_num','登陆用户数'), + array('spend_user_num','充值人数'), + array('spend_num','充值次数'), + array('spend_all_amount','充值总额'), + array('spend_cash','现金充值'), + array('spend_generic','通用币充值'), + array('spend_binding','绑定币充值'), + array('spend_discount','折扣币充值'), + array('spend_voucher','代金劵使用'), ); $nowTime = date('Y-m-d'); @@ -2575,7 +2603,7 @@ class DownloadController extends BaseController { if(!empty($map['end_time'])) { $params['end_time'] = $map['end_time']; }else { - $params['begin_time'] = $endTime; + $params['begin_time'] = $endTime - 1; } $params['dayList'] = $map["dayList"]; $summaryData = []; @@ -2728,15 +2756,21 @@ class DownloadController extends BaseController { ); $subMap = []; - $subMap['game_id'] = $map['game_id']; - $subMap['server_id'] = $map['server_id']; + if(!empty($map['game_id'])) { + $subMap['game_id'] = $map['game_id']; + } + if(!empty($map['server_id'])) { + $subMap['server_id'] = $map['server_id']; + } $costBegin = $map['costbegin']; $costEnd = $map['costend']; unset($map['costbegin']); unset($map['costend']); - $roleIds = M('user_play_data_count', 'tab_')->group('role_id')->getField('role_id', true); + + $subMap['create_time'] = ['between', [$map['begintime'], $map['endtime'] - 1]]; + $roleIdMap = $subMap; + $roleIds = M('user_play_data_count', 'tab_')->where($roleIdMap)->group('role_id')->getField('role_id', true); $map['role_id'] = ['in', $roleIds]; - $subMap['create_time'] = ['between', [$map['begintime'], $map['endtime'] - 1]]; if ($costBegin != '' || $costEnd != '') { $having = ''; if ($costBegin != '' && $costEnd != '') { @@ -2767,30 +2801,36 @@ class DownloadController extends BaseController { ->buildSql(); $spendMap['uc.create_time'] = ['between', [strtotime(date('Y-m-d 00:00:00')), strtotime(date('Y-m-d 23:59:59'))]]; - + $sqlTodayCost = M('user_play_data_count', 'tab_')->alias('uc') ->field('sum(uc.recharge_count) count') ->where($spendMap) ->buildSql(); unset($map['begintime']); unset($map['endtime']); - $roles = M('user_play_info', 'tab_') - ->field("*,$sqlCost as cost,$sqlCount as count,$sqlTodayCost as today_cost") - ->where($map) - ->order('play_time desc') - ->select(); - foreach ($roles as $role) { + $subQuery = M('user_play_info', 'tab_') + ->field("*,$sqlCost as recharge_cost,$sqlCount as recharge_count,$sqlTodayCost as recharge_cost_today") + ->where($map) + ->having('recharge_cost > 0') + ->order('play_time desc') + ->buildSql(); + $roles = M()->field(' * ') + ->table($subQuery) + ->alias('a') + ->order('play_time desc') + ->select(); + foreach ($roles as $role) { $records[] = [ - 'user_account' => $role['user_account'], + 'user_account' => encryption($role['user_account']), 'game_name' => $role['game_name'], 'role_name' => $role['role_name'], 'role_id' => $role['role_id'], 'role_level' => $role['role_level'], 'server_id' => $role['server_id'], 'server_name' => $role['server_name'], - 'recharge_cost' => $role['cost'], - 'recharge_count' => $role['count'], - 'recharge_cost_today' => $role['cost_today'], + 'recharge_cost' => empty($role['recharge_cost']) ? 0 : $role['recharge_cost'], + 'recharge_count' => empty($role['recharge_count']) ? 0 : $role['recharge_count'], + 'recharge_cost_today' => empty($role['recharge_cost_today']) ? 0 : $role['recharge_cost_today'], 'play_time' => $role['play_time'], 'play_ip' => $role['play_ip'], 'promote_id' => $role['promote_id'], diff --git a/Application/Home/Controller/FinanceController.class.php b/Application/Home/Controller/FinanceController.class.php index b783521f0..f8b4e8ceb 100644 --- a/Application/Home/Controller/FinanceController.class.php +++ b/Application/Home/Controller/FinanceController.class.php @@ -15,6 +15,7 @@ class FinanceController extends BaseController { //提现状态 public static $withdrawStatus = [ + -2 => '已撤销', -1 => '审核未通过', 0 => '待审核', 1 => '汇款中', @@ -200,7 +201,7 @@ class FinanceController extends BaseController $map['pay_order_number'] = $payOrderNumber; } if (isset($_GET['status'])) { - if ($status == -2) { + if ($status == -99) { $map['selle_status'] = 0; } else { $withdrawMap['promote_id'] = $this->loginPromote['id']; @@ -277,8 +278,7 @@ class FinanceController extends BaseController //是否是会长 $this->purview(); //验证安全密码 - $metaTitle = '结算明细'; - $modelList = ['财务管理', $metaTitle]; + $modelList = []; $res = $this->verifyPasswordView($modelList, false); if ($res == false) { $data['status'] = 0; @@ -329,6 +329,7 @@ class FinanceController extends BaseController $add['status'] = 0; $add['widthdraw_number'] = $this->produceWithdrawNumber(); $add['settlement_end_time'] = $thisDay - 1; + $add['spend_ids'] = ''; M()->startTrans();//开启事物 $withdrawId = M('withdraw', 'tab_')->add($add); @@ -399,11 +400,9 @@ class FinanceController extends BaseController } if (isset($_GET['status']) && $_GET['status'] !== '') { $status = intval($_GET['status']); - if (!isset(FinanceController::$withdrawStatus[$status])) { - $this->error('参数异常'); + if (isset(FinanceController::$withdrawStatus[$status])) { + $map['status'] = $status; } - - $map['status'] = $status; } $data = $model->field('id,widthdraw_number,create_time,settlement_end_time,sum_money,status,respond,transfer_proof') @@ -420,8 +419,15 @@ class FinanceController extends BaseController $list['create_time'] = date('Y-m-d H:i:s', $list['create_time']); $list['settlement_end_time'] = date('Y-m-d H:i:s', $list['settlement_end_time']); $list['status_name'] = FinanceController::$withdrawStatus[$list['status']]; - if ($list['status'] == -1) { - $list['status_name'] = '' . $list['status_name'] . ''; + switch ($list['status']) { + case -2: + $list['status_name'] = '' . $list['status_name'] . ''; + break; + case -1: + $list['status_name'] = '' . $list['status_name'] . ''; + break; + default: + break; } } } @@ -567,13 +573,52 @@ class FinanceController extends BaseController } //审核拒绝 重新审核 - public function renewReview($id) + public function renewReview() { //是否是会长 $this->purview(); //验证安全密码 - $metaTitle = '结算明细'; - $modelList = ['财务管理', $metaTitle]; + $modelList = []; + $res = $this->verifyPasswordView($modelList, false); + if ($res == false) { + $data['status'] = 0; + $data['msg'] = '权限异常'; + $this->ajaxReturn($data); + } + + $id = intval(I('id', 0)); + $data = M('withdraw', 'tab_')->find($id); + if (empty($data) || $data['status'] != -1) { + $data['status'] = 0; + $data['msg'] = '数据异常'; + $this->ajaxReturn($data); + } + if ($data['promote_id'] != $this->loginPromote['id']) { + $data['status'] = 0; + $data['msg'] = '权限异常'; + $this->ajaxReturn($data); + } + + $save['status'] = 0; + $save['id'] = $id; + $res = M('withdraw', 'tab_')->save($save); + if ($res === false) { + $data['status'] = 0; + $data['msg'] = '提交失败'; + } else { + $data['status'] = 1; + $data['msg'] = '提交成功'; + } + $this->ajaxReturn($data); + } + + //撤销提现 + public function cancelWithdraw() + { + //是否是会长 + $this->purview(); + //验证安全密码 + $modelList = []; $res = $this->verifyPasswordView($modelList, false); if ($res == false) { $data['status'] = 0; @@ -581,6 +626,54 @@ class FinanceController extends BaseController $this->ajaxReturn($data); } - $id = intval($id); + $id = intval(I('id', 0)); + $data = M('withdraw', 'tab_')->find($id); + if (empty($data) || !in_array($data['status'], [-1, 0])) { + $data['status'] = 0; + $data['msg'] = '数据异常'; + $this->ajaxReturn($data); + } + if ($data['promote_id'] != $this->loginPromote['id']) { + $data['status'] = 0; + $data['msg'] = '权限异常'; + $this->ajaxReturn($data); + } + + $spendMap['withdraw_id'] = $id; + $spendIds = M('Spend', 'tab_')->where($spendMap)->getField('id', true); + if (empty($spendIds)) { + $data['status'] = 0; + $data['msg'] = '数据异常'; + $this->ajaxReturn($data); + } + $spendIds = implode(',', $spendIds); + $time = time(); + $withdrawSave['id'] = $id; + $withdrawSave['status'] = -2; + $withdrawSave['spend_ids'] = $spendIds; + $withdrawSave['last_up_update_time'] = $time; + + M('withdraw', 'tab_')->startTrans();//开启事物 + $withdrawRes = M('withdraw', 'tab_')->save($withdrawSave); + if ($withdrawRes === false) { + M('withdraw', 'tab_')->rollback();//事物回滚 + $data['status'] = 0; + $data['msg'] = '撤销失败'; + $this->ajaxReturn($data); + } + + $spendSave['selle_status'] = 0; + $spendSave['withdraw_id'] = 0; + $spendRes = M('spend', 'tab_')->where($spendMap)->save($spendSave); + if ($spendRes === false) { + M('withdraw', 'tab_')->rollback();//事物回滚 + $data['status'] = 0; + $data['msg'] = '撤销失败'; + } else { + M('withdraw', 'tab_')->commit();//事物提交 + $data['status'] = 1; + $data['msg'] = '撤销成功'; + } + $this->ajaxReturn($data); } } \ No newline at end of file diff --git a/Application/Home/Controller/PromoteController.class.php b/Application/Home/Controller/PromoteController.class.php index ccfd6e84f..0335835b6 100644 --- a/Application/Home/Controller/PromoteController.class.php +++ b/Application/Home/Controller/PromoteController.class.php @@ -180,14 +180,14 @@ class PromoteController extends BaseController $month_add_user_money = $this->pay_total(3, 1, $promoteId); $yesterday_start = mktime(0, 0, 0, date('m'), date('d') - 1, date('Y')); - $yesterday_end = mktime(0, 0, 0, date('m'), date('d'), date('Y')); + $yesterday_end = mktime(0, 0, 0, date('m'), date('d'), date('Y'))-1; //计算昨天用户的统计数据,当日用户充值数据 $pay_time = " between {$yesterday_start} and {$yesterday_end}"; $createTime = ['between', array($yesterday_start, $yesterday_end - 1)]; - $yesterdaySpendData = $this->caculateSpend($pay_time, [], $createTime); +// $yesterdaySpendData = $this->caculateSpend($pay_time, []); +// var_dump($yesterdaySpendData);die(); $todayAddSpendData = $this->caculateSpend($pay_time, [], [], 1); -// var_dump($todayAddSpendData);die(); $mounthAddSpendData = $this->caculateSpend($pay_time, [], [], 2); @@ -209,7 +209,7 @@ class PromoteController extends BaseController $this->assign('data', $data); // $this->assign('yesterdayData',$yesterdayData); $this->assign('spendData', $spendData); - $this->assign('yesterdaySpendData', $yesterdaySpendData); +// $this->assign('yesterdaySpendData', $yesterdaySpendData); $this->assign('todayAddSpendData', $todayAddSpendData); $this->assign('mounthAddSpendData', $mounthAddSpendData); @@ -240,99 +240,131 @@ class PromoteController extends BaseController private function caculateSpend($pay_time, $condition, $create = [], $type = 0) { + $map1['promote_id'] = $map['promote_id'] = array('egt', 0); $spend = M('Spend', 'tab_'); + $map1['pay_status'] = $map['pay_status'] = 1; $today = total(1); + $yesterday = total(5); $week = total(2); $mounth = total(3); - $yesterday = total(5); + unset( $map['create_time']); - $map1['promote_id'] = $map['promote_id'] = array('gt', 0); - $map1['pay_status'] = $map['pay_status'] = 1; - $map1['pay_way'] = $map['pay_way'] = array('gt', 0); - $userId = []; - $this->getLoginPromote(); + $promote_id = get_pid(); $promoteId = M("promote", "tab_") - ->where(array('chain' => ['like', $this->loginPromote['chain'] . $this->loginPromote['id'] . '/%'])) - ->getField('id', true); - $promoteId[] = $this->loginPromote['id']; + ->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]; if ($type == 1) { + $pay_time = total(1); $start = mktime(0, 0, 0, date('m'), date('d'), date('Y')); $end = mktime(0, 0, 0, date('m'), date('d') + 1, date('Y')) - 1; $whereUser['register_time'] = ['between', array($start, $end - 1)]; $userId = M('user', 'tab_')->field('id')->where($whereUser)->select(); } else if ($type == 2) { + $pay_time = total(3); $start = mktime(0, 0, 0, date('m'), 1, date('Y')); $end = mktime(0, 0, 0, date('m') + 1, 1, date('Y')) - 1; $whereUser['register_time'] = ['between', array($start, $end - 1)]; $userId = M('user', 'tab_')->field('id')->where($whereUser)->select(); } +// if ($userId) { +// var_dump($userId); +// } - $userId = implode(',', array_column($userId, 'id')); if ($userId) { + + $userId = implode(',', array_column($userId, 'id')); +// var_dump($userId); $map1['user_id'] = $map['user_id'] = ['IN', $userId]; } else if (!$userId && $type != 0) { - return array('today' => 0, 'mounth' => 0); - } - - if ($create) { - $map['create_time'] = $create; - } - - - $bindrecharge_data = M('bind_recharge', 'tab_') - ->field('max(id) as id,promote_account,promote_id,create_time as ordertime,date_format(FROM_UNIXTIME(create_time),"%Y-%m-%d") AS time, - floor(sum(IF(create_time ' . $pay_time . ',real_amount,0))*100) as scount, - floor(sum(IF(create_time ' . $today . ',real_amount,0))*100) as today, - floor(sum(IF(create_time ' . $week . ',real_amount,0))*100) as week, - floor(sum(IF(create_time ' . $mounth . ',real_amount,0))*100) as mounth') - ->where($map1) - ->group('promote_id') - ->select(false); - - $deposit_data = M('deposit', 'tab_') - ->field('max(id) as id,promote_account,promote_id,create_time as ordertime,date_format(FROM_UNIXTIME(create_time),"%Y-%m-%d") AS time, - floor(sum(IF(create_time ' . $pay_time . ',pay_amount,0))*100) as scount, - floor(sum(IF(create_time ' . $today . ',pay_amount,0))*100) as today, - floor(sum(IF(create_time ' . $week . ',pay_amount,0))*100) as week, - floor(sum(IF(create_time ' . $mounth . ',pay_amount,0))*100) as mounth') - ->where($map1) - ->group('promote_id') - ->select(false); - - $spendData = $spend - ->field('max(id) as id,promote_account,promote_id,pay_time as ordertime,date_format(FROM_UNIXTIME(pay_time),"%Y-%m-%d") AS time, - floor(sum(IF(pay_time ' . $pay_time . ',pay_amount,0))*100) as scount, - floor(sum(IF(pay_time ' . $today . ',pay_amount,0))*100) as today, - floor(sum(IF(pay_time ' . $week . ',pay_amount,0))*100) as week, - floor(sum(IF(pay_time ' . $mounth . ',pay_amount,0))*100) as mounth') - ->where($map) - ->union(' (' . $bindrecharge_data . ') ') - ->union(' (' . $deposit_data . ') ') - ->group('promote_id') - ->select(false); + return array('sum_mounth' => 0, 'sum_today' => 0); + } - $promote_id = get_pid(); - $promote_map = "tp1.`id` = {$promote_id}"; + //获取所有会长 + $promote_map = "`chain` = '%/{$promote_id}/%' OR id = {$promote_id}"; - $data = $spend->field('sum(a.scount) AS count,sum(a.today) AS today,sum(a. WEEK) AS WEEK,sum(a.mounth) AS mounth') - ->join("INNER JOIN (SELECT tp2.*, tp1.id AS pid, tp1.account as promote_account FROM tab_promote tp1 LEFT JOIN tab_promote tp2 ON tp2.`chain` LIKE CONCAT('%/', tp1.id, '/%') OR tp1.id = tp2.id where $promote_map ) AS t ON promote_id = t.id") - ->where($condition)->table('(' . $spendData . ') as a')->group()->order('count desc,a.ordertime')->find(); + $promote = M("promote","tab_")->field("id,account")->where($promote_map)->select(); + $data =array(); + 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; $kfield(' + 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 ' . $week . ',pay_amount,0))*100) as week, + floor(sum(IF(pay_time ' . $mounth . ',pay_amount,0))*100) as mounth') + ->where($map) + ->where("pay_time".$pay_time) + ->find(); + $dbdata['promote_account'] = $promote[$i]['account']; + } else { + $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 ' . $week . ',pay_amount,0))*100) as week, + floor(sum(IF(pay_time ' . $mounth . ',pay_amount,0))*100) as mounth') + ->where($map) + ->where("pay_time".$pay_time) + ->find(); + $dbdata['promote_account'] = $promote[$i]['account']; + } + $data[] = $dbdata; + } +// if ($userId) { +// echo $spend->_sql();die(); +// } + foreach ($data as $key => $value) { + $value['count'] ?: 0; + $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); - $spendData1 = $spend->field('sum(a.scount) AS count,sum(a.today) AS today,sum(a. WEEK) AS WEEK,sum(a.mounth) AS mounth') -// ->join("INNER JOIN (SELECT tp2.*, tp1.id AS pid, tp1.account as promote_account FROM tab_promote tp1 LEFT JOIN tab_promote tp2 ON tp2.`chain` LIKE CONCAT('%/', tp1.id, '/%') ) AS t ON promote_id = t.id") - ->where($condition)->table('(' . $spendData . ') as a')->group()->order('count desc,a.ordertime')->find(); + return $total; +// - $data['rand'] = 1; - $data['count'] = $data['count'] / 100; - $data['today'] = $spendData1['today'] / 100; - $data['week'] = $spendData1['week'] / 100; - $data['mounth'] = $spendData1['mounth'] / 100; + } - return $data; + public function data_total($data) + { + $total['sum_count'] = array_sum(array_column($data, 'count')); + $total['sum_today'] = array_sum(array_column($data, 'today')); + $total['yesterday'] = array_sum(array_column($data, 'yesterday')); + $total['sum_week'] = array_sum(array_column($data, 'week')); + $total['sum_mounth'] = array_sum(array_column($data, 'mounth')); + return $total; } private function pay_total($type = 0, $newadd = 1, $promoteId = "") @@ -867,6 +899,7 @@ class PromoteController extends BaseController $realName = I('real_name', ''); $status = I('status', 'all'); $promoteType = I('promote_type', 0); + $parentId = I('parent_id', 0); $loginer = $this->getLoginPromote(); $map = []; @@ -892,6 +925,9 @@ class PromoteController extends BaseController if ($realName) { $map['real_name'] = ['like', '%' . $realName . '%']; } + if ($parentId) { + $map['parent_id'] = $parentId; + } if ($status != 'all') { $map['status'] = ['eq', $status]; } @@ -899,10 +935,8 @@ class PromoteController extends BaseController list($records, $pagination, $count) = $this->paginate($query); foreach ($records as $key => $value) { - $records[$key]['idcard'] = encryption($value['idcard']); $records[$key]['mobile_phone'] = encryption($value['mobile_phone']); - } $ids = array_column($records, 'id'); @@ -941,6 +975,23 @@ class PromoteController extends BaseController $promoteTypeName = '推广员'; } + $parentMap = []; + $parentMap['chain'] = ['like', $loginer['chain'] . $loginer['id'] . '/%']; + $isGetParents = true; + if ($loginer['level'] == 1 && $promoteType == 1) { + $parentMap['level'] = 2; + } elseif ($loginer['level'] == 1 && $promoteType == 2) { + $parentMap['level'] = 3; + } elseif ($loginer['level'] == 2 && $promoteType == 2) { + $parentMap['level'] = 3; + } else { + $isGetParents = false; + } + $parents = null; + if ($isGetParents) { + $parents = M('promote', 'tab_')->field(['id', 'account', 'real_name'])->where($parentMap)->select(); + } + $this->assign('parents', $parents); $this->assign('promoteTypeName', $promoteTypeName); $this->assign('hasChildList', $hasChildList); $this->assign('hasPlayerList', $hasPlayerList); diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index bbbf0f56d..c4d6fa044 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1066,7 +1066,7 @@ class QueryController extends BaseController $params['server_id'] = $serverId; } $params['begin_time'] = $begTime; - $params['end_time'] = $endTime; + $params['end_time'] = $endTime - 1; $summaryData = []; $dayList = $this->getDayList($begTime, $endTime); @@ -1227,7 +1227,7 @@ class QueryController extends BaseController } $params['begin_time'] = $begTime; - $params['end_time'] = $endTime; + $params['end_time'] = $endTime - 1; $data = M('Apply', 'tab_')->alias('a') ->field('a.game_id,a.game_name,a.sdk_version') @@ -1769,9 +1769,10 @@ class QueryController extends BaseController $map['promote_id'] = $queryPromote['id']; } - $roleIds = M('user_play_data_count', 'tab_')->group('role_id')->getField('role_id', true); - $map['role_id'] = ['in', $roleIds]; $subMap['create_time'] = ['between', [$begTime, $endTime - 1]]; + $roleIdMap = $subMap; + $roleIds = M('user_play_data_count', 'tab_')->where($roleIdMap)->group('role_id')->getField('role_id', true); + $map['role_id'] = ['in', $roleIds]; if ($costBegin != '' || $costEnd != '') { $having = ''; if ($costBegin != '' && $costEnd != '') { @@ -1833,7 +1834,7 @@ class QueryController extends BaseController ->having('recharge_cost > 0') ->order('play_time desc') ->buildSql(); - $query = M()->field(' * ') + $query = M()->field('*') ->table($subQuery) ->alias('a') ->order($orderBy); @@ -2133,31 +2134,4 @@ class QueryController extends BaseController $this->ajaxReturn($data); } - - public function userPlayDataCount() - { - $time = strtotime(date('Y-m-d 00:00:00', time() - (3600 * 24))); - $spendMap['pay_status'] = 1; - $spendMap['pay_game_status'] = 1; - $spendMap['game_player_id'] = ['gt', 0]; - $spendMap['pay_time'] = ['between', [$time, strtotime(date('Y-m-d 23:59:59', $time))]]; - - $field = 'FROM_UNIXTIME(pay_time, "%Y-%m-%d") as day,game_id,server_id,game_player_id,sum(pay_amount) as recharge_cost,count(id) as recharge_count'; - $spendCostData = M('spend', 'tab_')->field($field) - ->where($spendMap) - ->group('day,game_player_id,server_id,game_id') - ->select(); - - $data = []; - foreach ($spendCostData as $list) { - $save['game_id'] = $list['game_id']; - $save['server_id'] = $list['server_id']; - $save['role_id'] = $list['game_player_id']; - $save['recharge_cost'] = $list['recharge_cost']; - $save['recharge_count'] = $list['recharge_count']; - $save['create_time'] = strtotime($list['day']); - $data[] = $save; - } - M('user_play_data_count', 'tab_')->addAll($data); - } } diff --git a/Application/Home/Controller/SafeController.class.php b/Application/Home/Controller/SafeController.class.php index f411f529a..260dc2c8c 100644 --- a/Application/Home/Controller/SafeController.class.php +++ b/Application/Home/Controller/SafeController.class.php @@ -443,38 +443,13 @@ class SafeController extends BaseController{ public function safeDocument() { $time = time(); - $today = date('Y-m-d'); - $username = $_REQUEST['username']; - $tsession =S($today); - if(S($username)) { - $code = S($username); - }else { - if(!empty($tsession)) { - $num = $tsession + 1; - }else { - $num = 1; - } - $promoteRs = M('promote','tab_')->where(['account'=>$username])->getField('create_time',true); - $code = date('Ymd',$promoteRs[0])."_".$num; - } + $loginPromote = $this->getLoginPromote(); + $sn = date('Ymd') . '-' . strtoupper(substr(md5($loginPromote['id']), 8, 16)); $endTime = date('Y-m-d',strtotime('+1 year')); $this->assign('time',date('Y-m-d',$time)); $this->assign('endTime',$endTime); - $this->assign('code',$code); - $this->assign('username',$username); + $this->assign('sn',$sn); $this->display(); } - - public function ajaxAgree() { - $username = $_REQUEST['username']; - $code = $_REQUEST['code']; - $today = date('Y-m-d'); - if(empty(S($username))) { - S($username, $code); - $t = S($today); - S($today,$t+1); - } - $this->ajaxReturn(['code'=>10000]); - } } \ No newline at end of file diff --git a/Application/Home/View/default/Finance/settlementDtl.html b/Application/Home/View/default/Finance/settlementDtl.html index 2cbb07ea2..aefcaf46a 100644 --- a/Application/Home/View/default/Finance/settlementDtl.html +++ b/Application/Home/View/default/Finance/settlementDtl.html @@ -103,8 +103,8 @@
+ +
+ +
+
diff --git a/Application/Home/View/default/Promote/index.html b/Application/Home/View/default/Promote/index.html index eeeb5b479..0c550f33c 100644 --- a/Application/Home/View/default/Promote/index.html +++ b/Application/Home/View/default/Promote/index.html @@ -6,15 +6,15 @@
  • 推广总用户

    {$data.count}
  • -
  • 推广总充值

    ¥{$spendData.count}
  • -
  • 当日新增用户充值

    ¥{$todayAddSpendData.today}
  • -
  • 当月新增用户充值

    ¥{$mounthAddSpendData.mounth}
  • +
  • 推广总充值

    ¥{$spendData.sum_count}
  • +
  • 当日新增用户充值

    ¥{$todayAddSpendData.sum_today}
  • +
  • 当月新增用户充值

    ¥{$mounthAddSpendData.sum_mounth}
  • 昨日注册用户

    {$data.yesterday}
  • -
  • 昨日充值金额

    ¥{$yesterdaySpendData.count}
  • +
  • 昨日充值金额

    ¥{$spendData.yesterday}
  • 今日注册用户

    {$data.today}
  • -
  • 今日充值金额

    ¥{$spendData.today}
  • +
  • 今日充值金额

    ¥{$spendData.sum_today}
diff --git a/Application/Home/View/default/Query/userRecharges.html b/Application/Home/View/default/Query/userRecharges.html index f09abebed..b760808bc 100644 --- a/Application/Home/View/default/Query/userRecharges.html +++ b/Application/Home/View/default/Query/userRecharges.html @@ -172,7 +172,7 @@
- 导出 + 导出 {$pagination}
diff --git a/Application/Home/View/default/Query/userRoles.html b/Application/Home/View/default/Query/userRoles.html index 5ceef8dfb..81e70c274 100644 --- a/Application/Home/View/default/Query/userRoles.html +++ b/Application/Home/View/default/Query/userRoles.html @@ -60,7 +60,7 @@ -
+
@@ -107,7 +107,7 @@
- 导出 + 导出 {$pagination}
diff --git a/Application/Home/View/default/Safe/safeDocument.html b/Application/Home/View/default/Safe/safeDocument.html index a2f05aaf3..3395e8ae0 100644 --- a/Application/Home/View/default/Safe/safeDocument.html +++ b/Application/Home/View/default/Safe/safeDocument.html @@ -51,7 +51,7 @@ and open the template in the editor.

游戏推广服务框架协议

本协议由以下双方于{$time}签订:

-

合同编号:{$code}

+

合同编号:{$sn}

甲方:海南万盟天下科技有限公司

注册地址:海南省海口市南海大道26号海口国家高新区创业孵化中心A楼5层A1-1268室

联系电话:13067391751

@@ -237,8 +237,6 @@ and open the template in the editor.
- -







@@ -247,20 +245,10 @@ and open the template in the editor. $(function() { - var username = document.getElementById('us').value; - var code = document.getElementById('code').value; $("#ag").on('click',function(event) { - $.ajax({ - type:"POST", - url:"{:U('Safe/ajaxAgree')}", - data:{'username':username,'code':code}, - dataType:'json', - success:function(res) { - window.localStorage.setItem('checked','checked'); - window.history.back(-1); - } - }); - }) + window.localStorage.setItem('checked','checked'); + window.location.href = "/index.php?s=/Home/Safe/modifyBaseInfo.html" + }); }) diff --git a/Application/Media/View/default/Article/article/detail1.html b/Application/Media/View/default/Article/article/detail1.html index 01d500f9e..06fb0b828 100644 --- a/Application/Media/View/default/Article/article/detail1.html +++ b/Application/Media/View/default/Article/article/detail1.html @@ -239,7 +239,7 @@
备案号:琼ICP备19000556号-1 diff --git a/Application/Media/View/default/Index/business.html b/Application/Media/View/default/Index/business.html index 0cd6eefda..db35bcb12 100644 --- a/Application/Media/View/default/Index/business.html +++ b/Application/Media/View/default/Index/business.html @@ -68,8 +68,8 @@
-
+ -
+ \ No newline at end of file diff --git a/Application/Media/View/default/Index/hezuo.html b/Application/Media/View/default/Index/hezuo.html index 67a827811..54afc010c 100644 --- a/Application/Media/View/default/Index/hezuo.html +++ b/Application/Media/View/default/Index/hezuo.html @@ -1,4 +1,3 @@ - @@ -8,6 +7,25 @@ + +
@@ -17,14 +35,14 @@
万盟天下一直坚持开放诚信高效的业务合作,欢迎各位业界同仁前来联系,互利共赢。
-
媒体合作
+
商务合作
万盟天下一直希望通过广泛的市场及品牌合作,为用户提供更全面的产品与服务。
-
联系方式
-

公司地址:福建省福州市鼓楼区福大怡山文化创意园11号楼103号

-

联系人: 雷女士

-

联系电话: 13067391751

+
联系方式
+

公司地址:福建省福州市鼓楼区福大怡山文化创意园11号楼103号

+

联系人: 雷女士

+

联系电话: 13067391751

邮政编码:350004

@@ -55,11 +73,13 @@ -
+ -
+ - + + +
diff --git a/Application/Media/View/default/Public/base.html b/Application/Media/View/default/Public/base.html index aa74b0327..390161505 100644 --- a/Application/Media/View/default/Public/base.html +++ b/Application/Media/View/default/Public/base.html @@ -95,7 +95,7 @@
- - + + diff --git a/Application/Mobile/View/Index/index.html b/Application/Mobile/View/Index/index.html index 21449a1cb..156399e17 100644 --- a/Application/Mobile/View/Index/index.html +++ b/Application/Mobile/View/Index/index.html @@ -54,5 +54,33 @@
+ + diff --git a/Application/Mobile/View/Index/introduce.html b/Application/Mobile/View/Index/introduce.html index 25eb5ab79..b30913d8a 100644 --- a/Application/Mobile/View/Index/introduce.html +++ b/Application/Mobile/View/Index/introduce.html @@ -1,9 +1,16 @@ + + +
@@ -22,5 +29,32 @@
海南万盟天下科技有限公司
- + +
\ No newline at end of file diff --git a/Application/Mobile/View/Public/bases.html b/Application/Mobile/View/Public/bases.html index 0ea6f8f33..604038c69 100644 --- a/Application/Mobile/View/Public/bases.html +++ b/Application/Mobile/View/Public/bases.html @@ -84,34 +84,6 @@ - - + + + + + + diff --git a/Application/Mobile/View/User/forget.html b/Application/Mobile/View/User/forget.html index 044c9da78..1b1b536a5 100644 --- a/Application/Mobile/View/User/forget.html +++ b/Application/Mobile/View/User/forget.html @@ -1,128 +1,123 @@ - - - - - - - - - - - - - - - - - - - - -
-
- -

找回密码

+ + + + + + + + + +
+ +
找回密码 + +
+
+ +
+
+ +
手机号
+
+
-
-
-
-
-
-
-
- -
- -
-
-
- -
-
-

- 通过手机号找回密码只适用于手机号注册的账号
用户名注册的账号可 - 联系客服 -

-
-
+ +
+
+ +
验证码
+
-
-
-
- - - + + - - \ No newline at end of file + }) + }); + + \ No newline at end of file diff --git a/Application/Mobile/View/User/forget1.html b/Application/Mobile/View/User/forget1.html index 29dea346c..7678a7f7b 100644 --- a/Application/Mobile/View/User/forget1.html +++ b/Application/Mobile/View/User/forget1.html @@ -1,88 +1,83 @@ - - - - - - - - - - - - - - - - - - - - -
-
- -

设置新密码

-
-
-
-
-
-
-
-
-
- -
-
- + + + + + + + +
+
+ +
+ +
设置新密码 + +
+
+ +
+
+ +
新密码
+
-
- - + +
+
+ +
确认密码
+
+
- + +
保存修改
+
-
+
-
- - - + + - - \ No newline at end of file + }) + + }); + +
\ No newline at end of file diff --git a/Application/Mobile/View/User/index.html b/Application/Mobile/View/User/index.html index baa2b2a89..846c51f04 100644 --- a/Application/Mobile/View/User/index.html +++ b/Application/Mobile/View/User/index.html @@ -21,7 +21,7 @@
我的平台币
- +
{$user['balance']}
充值 @@ -59,7 +59,34 @@
- + +
diff --git a/Application/Mobile/View/User/userauth.html b/Application/Mobile/View/User/userauth.html index 0b41a41f2..1fa5ef00f 100644 --- a/Application/Mobile/View/User/userauth.html +++ b/Application/Mobile/View/User/userauth.html @@ -1,112 +1,119 @@ - -
-
- -

实名认证

-
-
-
-
-
- -
-
+ + + + +
+
+ +
+ +
实名认证 + +
+ + +
+
+ +
真实姓名
+
+ +
+ +
+
+ +
真实姓名
+
+ +
+ + -
    -
  • - 真实姓名 - - - -
  • -
  • - 证件号码 - - - -
  • -
+ +
+
+ +
证件号码
+
+
-
- + +
+
+ +
证件号码
+
+
- - - 您已进行过支付宝实名认证 - -
-
- 您已进行过实名认证 -
    -
  • 真实姓名{:substr_cut($user['real_name'],'*')}
  • -
  • 证件号码{:substr_replace($user['idcard'],'****************',1,16)}
  • -
+ + + +
保存修改
-
- -
+ +
+
-
- - - + + - + + + }); + \ No newline at end of file diff --git a/Application/Mobile/View/User/usergift.html b/Application/Mobile/View/User/usergift.html index 7c498cd1f..c9c75ea45 100644 --- a/Application/Mobile/View/User/usergift.html +++ b/Application/Mobile/View/User/usergift.html @@ -134,7 +134,7 @@ $('#moreBtn').removeClass('ms-none');loads = false; } else { $('.loading').removeClass('hidden').addClass('ms-none'); - pmsg.msg('已经到底了~'); + // pmsg.msg('已经到底了~'); } }) }); diff --git a/Application/Mobile/View/User/usernick.html b/Application/Mobile/View/User/usernick.html index abeedeea3..5daa4d7ad 100644 --- a/Application/Mobile/View/User/usernick.html +++ b/Application/Mobile/View/User/usernick.html @@ -1,26 +1,28 @@ -
-
- -

修改昵称

- 保存 -
-
-
+ + + +
-
-
    -
  • - 昵称 - - - -
  • -
+
+ +
修改名字 + +
+
+
+
+ +
昵称
+
+ +
+
保存修改
+
diff --git a/Application/Mobile/View/User/userpassword.html b/Application/Mobile/View/User/userpassword.html index 4cdc7ab34..9de7f1e4b 100644 --- a/Application/Mobile/View/User/userpassword.html +++ b/Application/Mobile/View/User/userpassword.html @@ -1,84 +1,88 @@ - - -
-
- -

修改密码

-
-
-
+ + + + +
-
-
-
-
    -
  • - 原始密码 - - - -
  • -
  • - 新密码 - - - -
  • -
  • - 确认密码 - - - -
  • -
-
-
- -
-
-
+
+
+
+ +
修改密码 + +
+
+ +
+
+ +
原始密码
+
+ +
+ +
+
+ +
新密码
+
+ +
+ +
+
+ +
确认密码
+
+ +
+ +
保存修改
+
+
+
+
-
\ No newline at end of file diff --git a/Application/Mobile/View/User/userphone.html b/Application/Mobile/View/User/userphone.html index 20aab93f1..a2a6babdf 100644 --- a/Application/Mobile/View/User/userphone.html +++ b/Application/Mobile/View/User/userphone.html @@ -1,125 +1,148 @@ - + - -
-
- -

绑定手机解除绑定

+ + + + + + +
+ +
绑定手机解除绑定 + +
+
+ +
+ + +
+
+ +
手机号
+
+
{$user['phone']}
+
-
-
-
-
- -
-
    -
  • - 手机号 - - readonly = "readonly" class="w-input" class="w-input cheackinput"> - -
  • -
  • - 短信验证码 - - - -
  • -
-
-
- -
- -
-
-
- - + - + + + }); +
\ No newline at end of file diff --git a/Application/Mobile/View/User/userset.html b/Application/Mobile/View/User/userset.html index 608ddcbd2..a423563cf 100644 --- a/Application/Mobile/View/User/userset.html +++ b/Application/Mobile/View/User/userset.html @@ -77,7 +77,7 @@
{$user.account}
-
+
昵称 @@ -86,7 +86,7 @@
- + 性别
@@ -138,6 +138,35 @@
+ + +
diff --git a/Application/Mobile/View/User/usersex.html b/Application/Mobile/View/User/usersex.html index a5186a8cd..9d7180e17 100644 --- a/Application/Mobile/View/User/usersex.html +++ b/Application/Mobile/View/User/usersex.html @@ -1,70 +1,94 @@ - - - - -
-
- -

修改性别

- 保存 -
-
-
-
-
-
-
-
    -
  • - 性别 - - - - -
  • -
-
-
-
-
-
- - + + + + + + + + + + + +
+ +
修改性别 + +
+ +
+
+
+
+ +
性别
+
+
+
+ + + +
+ +
+ + + +
+
+
+
+
+ +
保存修改
+
+ +
+ + - -
\ No newline at end of file + + }); + + + diff --git a/Data/update.sql b/Data/update.sql index c989c2a8c..c4a608160 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -524,7 +524,26 @@ CREATE TABLE `tab_user_play_data_count` ( ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; ALTER TABLE `tab_user_play_data_count` -ADD INDEX `search`(`game_id`, `server_id`, `role_id`) USING BTREE, +ADD INDEX `search`(`game_id`, `server_id`, `role_id`, `create_time`) USING BTREE, ADD INDEX `create_time`(`create_time`) USING BTREE; ADD INDEX `recharge_cost`(`recharge_cost`) USING BTREE, -ADD INDEX `recharge_count`(`recharge_count`) USING BTREE; \ No newline at end of file +ADD INDEX `recharge_count`(`recharge_count`) USING BTREE; + +--身份证认证信息 +CREATE TABLE `tab_idcard_log` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(80) NOT NULL COMMENT '姓名', + `id_card` varchar(20) NOT NULL COMMENT '身份证号码', + `user_id` int(11) NOT NULL COMMENT '用户id', + `ip` varchar(40) DEFAULT '0' COMMENT 'ip地址', + `num` int(11) DEFAULT '1' COMMENT '认证次数', + `status` tinyint(2) DEFAULT '0' COMMENT '0 认证失败 1 认证成功', + `create_time` int(11) DEFAULT '0' COMMENT '创建时间', + PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COMMENT='身份证认证信息'; + +--提现表添加最后更新时间 +ALTER TABLE `tab_withdraw` +ADD COLUMN `last_up_update_time` int(10) NOT NULL DEFAULT 0 COMMENT '最后更新时间', +ADD COLUMN `spend_ids` longtext NOT NULL COMMENT '充值订单id'; + diff --git a/Public/Media/css/index.css b/Public/Media/css/index.css index 46893ed82..2600eb2a2 100644 --- a/Public/Media/css/index.css +++ b/Public/Media/css/index.css @@ -55,6 +55,7 @@ top: 4.23rem; width: 2.70rem; height: 3.70rem; + z-index: 9; } .side_tabbar img{ width: 100%; diff --git a/Public/Media/images/index_about/qrcode.png b/Public/Media/images/index_about/qrcode.png index 2c41fe3b8..d33691b9b 100644 Binary files a/Public/Media/images/index_about/qrcode.png and b/Public/Media/images/index_about/qrcode.png differ diff --git a/Public/Media/js/recharge.js b/Public/Media/js/recharge.js index 600774dca..20448a92e 100644 --- a/Public/Media/js/recharge.js +++ b/Public/Media/js/recharge.js @@ -1,4 +1,5 @@ $(function() { + //钱的数量选择 $(".select-box-soon>div:not(.price-input)").click(function(){ $(this).addClass("selectBg").siblings("div").removeClass("selectBg"); @@ -22,7 +23,7 @@ $(function() { $(".way-show>div>span").text(way); $("#apitype").val($(this).data('type')); }); - + $(".way-select>div").eq(0).trigger('click'); $(".recharge-btn").click(function () { var that = $('#recharge_form'); if($.trim($("#toaccount2").val()).length == 0){ diff --git a/Public/Mobile/css/business.css b/Public/Mobile/css/business.css index 3abc8eb81..5940366ba 100644 --- a/Public/Mobile/css/business.css +++ b/Public/Mobile/css/business.css @@ -35,7 +35,7 @@ body{ margin-top: 0.5rem; font-size: 0.24rem; font-family:PingFang SC; - font-weight:bold; + font-weight:500; color:rgba(41,41,41,1); line-height:0.4rem; text-indent: 2em; @@ -43,12 +43,13 @@ body{ .bazaar{ margin-top: 0.34rem; font-family:PingFang SC; - font-weight:bold; + font-weight:500; color:rgba(41,41,41,1); font-size: 0.24rem; } .bazaar .title{ - font-size:0.32rem; + font-size:0.32rem; + font-weight: 700; } .bazaar .info{ font-size:0.24rem; diff --git a/Public/Mobile/css/common.css b/Public/Mobile/css/common.css index e667cae3b..0af4f8f35 100644 --- a/Public/Mobile/css/common.css +++ b/Public/Mobile/css/common.css @@ -445,15 +445,18 @@ share_icon height:100vh; } .pop-dialog span { - background:rgba(0,0,0,.6); - top:50%; - color:#FFF; - display:inline-block; - line-height:2; - position:relative; - padding:.5rem 2rem; - word-break:break-all; - max-width:60vw;border-radius: 5px; + background: rgba(0,0,0,.6); + top: 50%; + color: #FFF; + display: inline-block; + line-height: 2; + position: relative; + word-break: break-all; + max-width: 2rem; + font-size: 0.32rem; + border-radius: 5px; + display: block; + margin: auto; } .pop-table { display:table; diff --git a/Public/Mobile/css/enterprise.css b/Public/Mobile/css/enterprise.css index 4a70149df..208375ce1 100644 --- a/Public/Mobile/css/enterprise.css +++ b/Public/Mobile/css/enterprise.css @@ -35,7 +35,7 @@ body{ margin-top: 0.5rem; font-size: 0.24rem; font-family:PingFang SC; - font-weight:bold; + font-weight: 500; color:rgba(41,41,41,1); line-height:0.4rem; } @@ -45,7 +45,7 @@ body{ } .introduce>div:last-child{ font-family:"宋体"; - font-weight:bold; + font-weight:700; color:#389AED; margin-bottom: 1rem; font-style: oblique; diff --git a/Public/Mobile/css/gender.css b/Public/Mobile/css/gender.css new file mode 100644 index 000000000..6878f5959 --- /dev/null +++ b/Public/Mobile/css/gender.css @@ -0,0 +1,90 @@ +.gender-info{ + width: 100%; +} +.gender-input { + padding: 0.15rem 0.3rem; + display: flex; + align-items: center; + justify-content: space-between; + border-bottom: 1px solid #F5F5F5; + height: 0.78rem; +} +.gender-inputBox { + display: flex; + align-items: center; + font-size:0.28rem; + font-family:PingFang SC; + font-weight:500; + color:rgba(41,41,41,1) +} +.gender-inputBox>img{ + width: 0.3rem; + height: 0.3rem; + margin-right: 0.23rem; +} +.gender-sel{ + display: flex; + align-items: center; +} +.radio { + color: #292929; + font-size: 0.28rem; + font-weight: bold; + display: flex; + align-items: center; + margin-left: 0.82rem; + } + .radio>span{ + margin-right: 0.2rem; + } + .radio input[type="radio"] { + position: absolute; + opacity: 0; + } + .radio input[type="radio"] + .radio-label:before { + margin-top: 0.12rem; + content: ''; + background: #f4f4f4; + border-radius: 100%; + border: 1px solid #b4b4b4; + display: inline-block; + width: 0.28rem; + height: 0.28rem; + position: relative; + top: -0.2em; + /* margin-right: 1rem; */ + vertical-align: top; + cursor: pointer; + text-align: center; + -webkit-transition: all 250ms ease; + transition: all 250ms ease; + } + .radio input[type="radio"]:checked + .radio-label:before { + background-color: #3197EE; + box-shadow: inset 0 0 0 4px #f4f4f4; + } + .radio input[type="radio"]:focus + .radio-label:before { + outline: none; + border-color: #3197EE; + } + .radio input[type="radio"]:disabled + .radio-label:before { + box-shadow: inset 0 0 0 4px #f4f4f4; + border-color: #b4b4b4; + background: #b4b4b4; + } + .radio input[type="radio"] + .radio-label:empty:before { + margin-right: 0; + } + .save{ + width:5rem; + height:0.8rem; + background:rgba(33,177,235,1); + border-radius:0.4rem; + font-size:0.32rem; + font-family:PingFang SC; + font-weight:500; + color:rgba(255,255,255,1); + line-height: 0.8rem; + text-align: center; + margin: 0.3rem auto 0 auto; +} \ No newline at end of file diff --git a/Public/Mobile/css/home.css b/Public/Mobile/css/home.css index 3904e426f..4b582ee97 100644 --- a/Public/Mobile/css/home.css +++ b/Public/Mobile/css/home.css @@ -56,7 +56,7 @@ body{ height: 100%; } .swiper-pagination{ - bottom: 6px !important; + bottom: 5px !important; } .swiper-pagination-bullet { width: 0.4rem; @@ -75,7 +75,7 @@ body{ margin-top: 0.15rem; width: 100%; background-color: #fff; - height: 3.6rem; + height: 3.75rem; } .hot .hot_box{ padding: 0.3rem; @@ -111,7 +111,7 @@ body{ margin-top: 0.15rem; width: 100%; background-color: #fff; - height: 3.3rem; + height: 3.45rem; margin-bottom: 0.45rem; } .recharge_box{ diff --git a/Public/Mobile/css/my.css b/Public/Mobile/css/my.css index 81c836d4b..0e295c089 100644 --- a/Public/Mobile/css/my.css +++ b/Public/Mobile/css/my.css @@ -128,21 +128,20 @@ padding: 0.3rem 0.3rem 0.3rem 0.32rem; display: flex; align-items: center; + justify-content: space-between; } .platform_info .del{ - font-size: 0.28rem; + font-size: 0.32rem; color: #292929; } .platform_info img{ width: 0.3rem; height: 0.3rem; - margin-left: 0.15rem; margin-right: 0.68rem; } .platform_info .price{ font-size: 0.4rem; color: #389AED; - margin-right: 1rem; } .platform_info .recharge{ background: url(../images/new/selected.png) no-repeat; diff --git a/Public/Mobile/css/myBag.css b/Public/Mobile/css/myBag.css index 88da8f7fe..2e4b53a35 100644 --- a/Public/Mobile/css/myBag.css +++ b/Public/Mobile/css/myBag.css @@ -15,11 +15,15 @@ .not-play>img{ width: 3rem; height: 2.1rem; + position: relative; + bottom: 100px; } .not-play>span{ font-size: 0.28rem; margin-top: 0.28rem; color: #A9A9A9; + position: relative; + bottom: 100px; } .myBag-box{ margin-top: 0.3rem; @@ -27,7 +31,6 @@ } .myBag-info{ width: 100%; - height: 3.6rem; background:rgba(255,255,255,1); box-shadow:0px 0px 0.1rem 0px rgba(0, 0, 0, 0.15); border-radius:0.2rem; diff --git a/Public/Mobile/css/name.css b/Public/Mobile/css/name.css new file mode 100644 index 000000000..309d01557 --- /dev/null +++ b/Public/Mobile/css/name.css @@ -0,0 +1,48 @@ +.name-info{ + width: 100%; +} +.name-input { + padding: 0.15rem 0.3rem; + display: flex; + align-items: center; + justify-content: space-between; + border-bottom: 1px solid #F5F5F5; + height: 0.78rem; +} +.name-inputBox { + display: flex; + align-items: center; + font-size:0.28rem; + font-family:PingFang SC; + font-weight:500; + color:rgba(41,41,41,1) +} +.name-inputBox>img{ + width: 0.3rem; + height: 0.3rem; + margin-right: 0.23rem; +} +.name-input>input{ + font-size:0.28rem; + font-family:PingFang SC; + font-weight:400; + color:rgba(169,169,169,1); + outline: 0; + border: 0; + height: 0.5rem; + width: 4rem; + text-align: right; +} +.save{ + width:5rem; + height:0.8rem; + background:rgba(33,177,235,1); + border-radius:0.4rem; + font-size:0.32rem; + font-family:PingFang SC; + font-weight:500; + color:rgba(255,255,255,1); + line-height: 0.8rem; + text-align: center; + margin: 0.3rem auto 0 auto; +} \ No newline at end of file diff --git a/Public/Mobile/css/recharge.css b/Public/Mobile/css/recharge.css index 99d216ded..e8b122e66 100644 --- a/Public/Mobile/css/recharge.css +++ b/Public/Mobile/css/recharge.css @@ -64,7 +64,7 @@ display: flex; align-items: center; justify-content: space-between; - border-bottom: 1px solid #F5F5F5; + /*border-bottom: 1px solid #F5F5F5;*/ } .flat-info>span{ font-size:0.24rem; @@ -98,12 +98,13 @@ color: #A9A9A9; } .recharge-payment{ - margin-top: 0.15rem; + margin-top: 0.3rem; width: 6.9rem; height: 3.76rem; background:rgba(255,255,255,1); box-shadow:0px 0px 0.1rem 0px rgba(26,26,26,0.15); border-radius:0.2rem; + margin-left: 0.1rem; } .recharge-payment .title{ padding: 0.32rem 0.29rem; diff --git a/Public/Mobile/css/remove.css b/Public/Mobile/css/remove.css new file mode 100644 index 000000000..08e5de8c5 --- /dev/null +++ b/Public/Mobile/css/remove.css @@ -0,0 +1,61 @@ +.remove-info{ + width: 100%; +} +.remove-input { + padding: 0.15rem 0.3rem; + display: flex; + align-items: center; + justify-content: space-between; + border-bottom: 1px solid #F5F5F5; + height: 0.78rem; + font-size: 0.28rem; +} +.remove-inputBox { + display: flex; + align-items: center; + font-size:0.28rem; + font-family:PingFang SC; + font-weight:500; + color:rgba(41,41,41,1) +} +.remove-inputBox>img{ + width: 0.3rem; + height: 0.3rem; + margin-right: 0.23rem; +} +.remove-inputBox>input{ + width: 1.8rem; + height: 0.5rem; + border: 0; + outline: 0; + padding: 0; + 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.15rem; + font-family:PingFang SC; + font-weight:400; + color:rgba(255,255,255,1); + text-align: center; + line-height: 0.6rem; +} + +.save{ + width:5rem; + height:0.8rem; + background:rgba(33,177,235,1); + border-radius:0.4rem; + font-size:0.32rem; + font-family:PingFang SC; + font-weight:500; + color:rgba(255,255,255,1); + line-height: 0.8rem; + text-align: center; + margin: 0.3rem auto 0 auto; + margin-bottom: 10px; +} \ No newline at end of file diff --git a/Public/Mobile/css/reset.css b/Public/Mobile/css/reset.css index b13e17868..8a58c3077 100644 --- a/Public/Mobile/css/reset.css +++ b/Public/Mobile/css/reset.css @@ -30,7 +30,7 @@ h1,h2,h3,h4,h5,h6,span,strong,i{font-size:100%;font-weight:normal;margin: 0;padd /* 子页公共头部 */ .subpage-heard{ - padding:0.7rem 0.3rem 0.28rem; + padding:0.7rem 0 0.28rem 0; display: flex; align-items: center; justify-content: center; @@ -46,7 +46,7 @@ h1,h2,h3,h4,h5,h6,span,strong,i{font-size:100%;font-weight:normal;margin: 0;padd flex-direction: row; align-items: center; top: 0.92rem; - left: 0.3rem; + left: 0.1rem; } .arrows::after{ position: absolute; diff --git a/Public/Mobile/css/step1.css b/Public/Mobile/css/step1.css index 5dbafce52..11b4b6bdc 100644 --- a/Public/Mobile/css/step1.css +++ b/Public/Mobile/css/step1.css @@ -108,7 +108,7 @@ margin-right: 0; } .login-btn{ - margin-top: 0.38rem; + margin-top: 0.6rem; width: 5.5rem; height: 0.8rem; background-color: #389AED; diff --git a/Public/Mobile/css/user/myPlay.css b/Public/Mobile/css/user/myPlay.css index 9a2644461..81d6f4ac2 100644 --- a/Public/Mobile/css/user/myPlay.css +++ b/Public/Mobile/css/user/myPlay.css @@ -14,11 +14,15 @@ .not-play>img{ width: 3rem; height: 2.1rem; + position: relative; + bottom: 100px; } .not-play>span{ font-size: 0.28rem; margin-top: 0.28rem; color: #A9A9A9; + position: relative; + bottom: 100px; } .myPlay-box{ padding: 0 0.3rem; diff --git a/Public/Mobile/css/user/setting.css b/Public/Mobile/css/user/setting.css index 38ba7c66d..ad89ec9bc 100644 --- a/Public/Mobile/css/user/setting.css +++ b/Public/Mobile/css/user/setting.css @@ -4,7 +4,6 @@ body{ background-color: #F5F5F5;} font-family:PingFang SC; } .setting-box{ - margin-top: 0.2rem; background-color: #fff; } .setting-info{ diff --git a/Public/Mobile/images/haoma.png b/Public/Mobile/images/haoma.png new file mode 100644 index 000000000..e9cb5b1ac Binary files /dev/null and b/Public/Mobile/images/haoma.png differ diff --git a/Public/Mobile/images/mingzibianji.png b/Public/Mobile/images/mingzibianji.png new file mode 100644 index 000000000..a4dd65b0e Binary files /dev/null and b/Public/Mobile/images/mingzibianji.png differ diff --git a/Public/Mobile/images/shimingrenzhengmoren.png b/Public/Mobile/images/shimingrenzhengmoren.png new file mode 100644 index 000000000..ce934ed70 Binary files /dev/null and b/Public/Mobile/images/shimingrenzhengmoren.png differ diff --git a/Public/Mobile/images/shouji.png b/Public/Mobile/images/shouji.png new file mode 100644 index 000000000..6bb388b32 Binary files /dev/null and b/Public/Mobile/images/shouji.png differ diff --git a/Public/Mobile/images/shoujibangding.png b/Public/Mobile/images/shoujibangding.png new file mode 100644 index 000000000..132806682 Binary files /dev/null and b/Public/Mobile/images/shoujibangding.png differ diff --git a/Public/Mobile/images/user/shoujibangding.png b/Public/Mobile/images/user/shoujibangding.png index f61a696f1..132806682 100644 Binary files a/Public/Mobile/images/user/shoujibangding.png and b/Public/Mobile/images/user/shoujibangding.png differ diff --git a/Public/Mobile/images/user/xingbie.png b/Public/Mobile/images/user/xingbie.png new file mode 100644 index 000000000..6dda9d327 Binary files /dev/null and b/Public/Mobile/images/user/xingbie.png differ diff --git a/Public/Mobile/images/xingbie2.png b/Public/Mobile/images/xingbie2.png new file mode 100644 index 000000000..e9fa8fb84 Binary files /dev/null and b/Public/Mobile/images/xingbie2.png differ diff --git a/Public/Mobile/images/xiugaimima.png b/Public/Mobile/images/xiugaimima.png new file mode 100644 index 000000000..1f0b974e5 Binary files /dev/null and b/Public/Mobile/images/xiugaimima.png differ