diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 0f879b6e4..80f10074a 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -860,7 +860,11 @@ class ExportController extends Controller $map['spend_ip'] = array('like', '%' . trim($_REQUEST['spend_ip']) . '%'); unset($_REQUEST['spend_ip']); } - + if (isset($_REQUEST['time-start']) && isset($_REQUEST['time-end'])) { + $map['pay_time'] = array('BETWEEN', array(strtotime($_REQUEST['time-start']), strtotime($_REQUEST['time-end']) + 24 * 60 * 60 - 1)); + unset($_REQUEST['time-start']); + unset($_REQUEST['time-end']); + } if (isset($_REQUEST['timestart']) && isset($_REQUEST['timeend'])) { $map['pay_time'] = array('BETWEEN', array(strtotime($_REQUEST['timestart']), strtotime($_REQUEST['timeend']) + 24 * 60 * 60 - 1)); unset($_REQUEST['timestart']); @@ -1004,7 +1008,7 @@ class ExportController extends Controller array('pay_amount', "充值平台币"), array('pay_way', "充值方式", 'get_pay_way', '*'), array('pay_ip', "充值ip"), - array('create_time', "充值时间", 'time_format'), + array('create_time', "充值时间"), array('pay_status', L('Order_status'), 'get_info_status', '*', '9'), array('', "共计充值{$total}"), ); @@ -1012,6 +1016,10 @@ class ExportController extends Controller ->where($map) ->order('id DESC') ->select(); + foreach ($xlsData as $key => $value) { + $xlsData[$key]['create_time'] = date('Y-m-d H:i:s', $value['create_time']); + } +// dd($xlsData); break; case 9: $xlsName = $xlsName?$xlsName:"平台币发放"; @@ -1542,6 +1550,7 @@ class ExportController extends Controller $xlsName = $xlsCell = $xlsData = []; } + //数据处理 foreach ($xlsData as $key => $val) { foreach ($xlsCell as $k => $v) { @@ -3472,6 +3481,10 @@ if ($key == 'model'){ $map['user_account'] = array('like', '%' . trim($_REQUEST['account']) . '%'); } + if (isset($_REQUEST['promote_id'])) { + $map['promote_id'] = $_REQUEST['promote_id']; + } + // $map['login_time'] = array('neq', 0); $page = intval($_REQUEST['p']); diff --git a/Application/Admin/Controller/FileController.class.php b/Application/Admin/Controller/FileController.class.php index 864003999..0e1304463 100644 --- a/Application/Admin/Controller/FileController.class.php +++ b/Application/Admin/Controller/FileController.class.php @@ -209,9 +209,9 @@ class FileController extends AdminController ); //TODO:上传到远程服务器 // 添加水印 - if ($_REQUEST['flag']) { - $this->addWatermarkOnPic($info['download']); - } +// if ($_REQUEST['flag']) { +// $this->addWatermarkOnPic($info['download']); +// } /* 记录图片信息 */ if ($info) { @@ -249,8 +249,6 @@ class FileController extends AdminController C("UPLOAD_{$file_driver}_CONFIG"), $_REQUEST['flag'] ); //TODO:上传到远程服务器 - - /* 记录图片信息 */ if ($info) { $return['status'] = 1; diff --git a/Application/Admin/Controller/MemberController.class.php b/Application/Admin/Controller/MemberController.class.php index afde5599c..8f064b6a8 100644 --- a/Application/Admin/Controller/MemberController.class.php +++ b/Application/Admin/Controller/MemberController.class.php @@ -788,13 +788,20 @@ class MemberController extends ThinkController $map['server_name'] = $_REQUEST['server_name']; unset($_REQUEST['server_name']); } + if (isset($_REQUEST['promote_id'])) { + $map['promote_id'] = $_REQUEST['promote_id']; + unset($_REQUEST['promote_id']); + } // $map['type'] = 1; // $map['login_time'] = ['exp', 'login_time<>0']; $extend = array(); $extend['map'] = $map; - + $count = M('UserLoginRecord','tab_')->field('user_id')->where($extend['map'])->group('user_id')->select(false); + $sql = "select count(user_id) as count from ({$count})t"; + $count = M('UserLoginRecord','tab_')->query($sql); $this->m_title = '登录记录'; + $this->assign('user_count',$count[0]['count']); $this->assign('commonset', M('Kuaijieicon')->where(['url' => 'Member/login_record', 'status' => 1])->find()); parent::lists("UserLoginRecord", $p, $extend['map']); diff --git a/Application/Admin/Controller/MendController.class.php b/Application/Admin/Controller/MendController.class.php index 16625e9d8..b4a22e062 100644 --- a/Application/Admin/Controller/MendController.class.php +++ b/Application/Admin/Controller/MendController.class.php @@ -132,9 +132,9 @@ class MendController extends ThinkController { $id = I('id'); $status = M('ShiftTask')->where(['id' => $id,'status' => 0])->save(['status' => 2]); if ($status) { - $this->success('取消补链成功', U('lists'), 2); + $this->ajaxReturn(array("status"=>1,"url"=> U('lists'))); } else { - $this->error("取消失败,或补链已生效",U('lists')); + $this->ajaxReturn(array("status"=>0,"url"=> U('lists'))); } } } diff --git a/Application/Admin/Controller/StatController.class.php b/Application/Admin/Controller/StatController.class.php index 3f3ee2da9..325a530f8 100644 --- a/Application/Admin/Controller/StatController.class.php +++ b/Application/Admin/Controller/StatController.class.php @@ -604,7 +604,11 @@ class StatController extends ThinkController ->where($map) ->group('user_id') ->find(); - $data[$key]['keep_num'] = round($num['num']/$data[$key]['register_num'],4)*100; + if (!empty($data[$key]['register_num'])) { + $data[$key]['keep_num'] = round($num['num']/$data[$key]['register_num'],4)*100; + } else { + $data[$key]['keep_num'] = 0; + } //充值 $map = $map_list; empty($game_name ) || $map['game_name'] = array('like','%'.$game_name.'%'); @@ -638,12 +642,24 @@ class StatController extends ThinkController $data[$key]['new_pop'] = $query[0]['num']; //付费率 - $data[$key]['spend_rate'] = round($data[$key]['spend_people']/$data[$key]['act_user'],4)*100; + if (!empty($data[$key]['act_user'])) { + $data[$key]['spend_rate'] = round($data[$key]['spend_people']/$data[$key]['act_user'],4)*100; + } else { + $data[$key]['spend_rate'] = 0; + } //ARPU - $data[$key]['ARPU'] = round($data[$key]['spend']/$data[$key]['act_user'],2); - //ARPPU - $data[$key]['ARPPU'] = round($data[$key]['spend']/$data[$key]['spend_people'],2); + if (!empty($data[$key]['act_user'])) { + $data[$key]['ARPU'] = round($data[$key]['spend']/$data[$key]['act_user'],2); + } else { + $data[$key]['ARPU'] = 0; + } + //ARPPU + if (!empty($data[$key]['spend_people'])) { + $data[$key]['ARPPU'] = round($data[$key]['spend']/$data[$key]['spend_people'],2); + } else { + $data[$key]['ARPPU'] = 0; + } //累计付费玩家 $map = $map_list; empty($hasbindcoins) || $map['pay_way'] = $hasbindcoins['pay_way']; @@ -1144,7 +1160,11 @@ class StatController extends ThinkController ->join("right join tab_user_login_record as ur on ur.user_id = tab_user.id and FROM_UNIXTIME(ur.login_time,'%Y-%m-%d') = '{$login_time}'") ->where($mapl) ->find(); - $data[$key]['keep_num'] = round($num['num']/$data[$key]['register_num'],4)*100; + if (!empty($data[$key]['register_num'])) { + $data[$key]['keep_num'] = round($num['num']/$data[$key]['register_num'],4)*100; + } else { + $data[$key]['keep_num'] = 0; + } //充值 $mapl = $map_list; empty($game_name ) || $mapl['game_name'] = array('like','%'.$game_name.'%'); @@ -1157,15 +1177,26 @@ class StatController extends ThinkController //付费玩家数 $data[$key]['spend_people'] = $spend['people']; //付费率 - $data[$key]['spend_rate'] = round($data[$key]['spend_people']/$data[$key]['act_user'],4)*100; + if (!empty($data[$key]['act_user'])) { + $data[$key]['spend_rate'] = round($data[$key]['spend_people']/$data[$key]['act_user'],4)*100; + } else { + $data[$key]['spend_rate'] = 0; + } //ARPU - $data[$key]['ARPU'] = round($data[$key]['spend']/$data[$key]['act_user'],2); + if (!empty($data[$key]['act_user'])) { + $data[$key]['ARPU'] = round($data[$key]['spend']/$data[$key]['act_user'],2); + } else { + $data[$key]['ARPU'] = 0; + } //ARPPU - $data[$key]['ARPPU'] = round($data[$key]['spend']/$data[$key]['spend_people'],2); - if($data[$key]['register_num']==0&&$data[$key]['act_user']==0&&$data[$key]['keep_num']==0&&$data[$key]['spend']==0&&$data[$key]['spend_people']==0){ - unset($data[$key]); + if (!empty($data[$key]['spend_people'])) { + $data[$key]['ARPPU'] = round($data[$key]['spend']/$data[$key]['spend_people'],2); + } else { + $data[$key]['ARPPU'] = 0; } - +// if($data[$key]['register_num']==0&&$data[$key]['act_user']==0&&$data[$key]['keep_num']==0&&$data[$key]['spend']==0&&$data[$key]['spend_people']==0){ +// unset($data[$key]); +// } } $count=count($data); if($count > $row){ @@ -1180,6 +1211,7 @@ class StatController extends ThinkController $this->assign('list_data',$data); $this->display(); } + function game_analysis(){ if($_REQUEST['time-start']!=''&&$_REQUEST['time-end']!=''){ $start=$_REQUEST['time-start']; @@ -1375,7 +1407,7 @@ class StatController extends ThinkController $model = M('device_statistics','tab_'); if ($type == 0) { - $return = $model->sum('new_device'); + $return = $model->where(['time'=>['neq',0]])->sum('new_device'); // $return = $device->all_device(); } else if($type == 1) { $return = $model->where(['time'=>array('between',[$todaystart,$todaystart+86399])])->sum('new_device'); diff --git a/Application/Admin/Controller/TimingController.class.php b/Application/Admin/Controller/TimingController.class.php index b2055cc0b..438a28079 100644 --- a/Application/Admin/Controller/TimingController.class.php +++ b/Application/Admin/Controller/TimingController.class.php @@ -142,9 +142,15 @@ class TimingController extends AdminController { //当日新增设备 $newSql = M('device_record','tab_')->field('min(create_time) as create_time,model,unique_code,id')->where(['version'=>1])->group('unique_code')->select(false); $data['new_device'] = M('device_record','tab_')->table('(' . $newSql . ') as a')->where(['create_time'=>array('between',[$startTime,$startTime+86399])])->order('create_time')->count(); + $data['time'] = $startTime; echo $data['new_device'].' '; + $duration = $this->duration(['create_time'=>array('between',[$startTime-86400*7,$startTime-1])]); + $newSqls = M('device_record','tab_')->field('min(create_time) as create_time,model,unique_code,id')->group('unique_code')->select(false); + $data['duration7'] = ($duration/M('device_record','tab_')->table('(' . $newSqls . ') as a')->where(['create_time'=>array('between',[$startTime-86400*7,$startTime-1])])->order('create_time')->count())/7; + $data['version'] = 1; + $getStatistics = M('device_statistics','tab_')->where(['time'=>$startTime,'version'=>1])->find(); echo "\n"; if (!$getStatistics) { @@ -152,13 +158,14 @@ class TimingController extends AdminController { } else { M('device_statistics','tab_')->where(['time'=>$startTime,'version'=>1])->save($data); } - + $data['duration7'] = 0; echo date("Y-m-d",$startTime).' 苹果 '; //当日新增设备 $newSql = M('device_record','tab_')->field('min(create_time) as create_time,model,unique_code,id')->where(['version'=>2])->group('unique_code')->select(false); $data['new_device'] = M('device_record','tab_')->table('(' . $newSql . ') as a')->where(['create_time'=>array('between',[$startTime,$startTime+86399])])->order('create_time')->count(); echo $data['new_device'].' '; + $data['version'] = 2; $getStatistics = M('device_statistics','tab_')->where(['time'=>$startTime,'version'=>2])->find(); echo "\n"; diff --git a/Application/Admin/View/Member/login_record.html b/Application/Admin/View/Member/login_record.html index 93fd046e7..8de70f9e1 100644 --- a/Application/Admin/View/Member/login_record.html +++ b/Application/Admin/View/Member/login_record.html @@ -90,6 +90,21 @@
+
+ + - +
+
+ +
@@ -139,6 +154,10 @@ + + 合计 +   登录玩家:{$user_count}人 + @@ -178,6 +197,7 @@ highlight_subnav("{:U('Member/login_record')}"); $(function () { + Think.setValue('{$key}', "{$vo}"); $(".select_gallery").select2(); @@ -276,6 +296,28 @@ $("#game_type").change(); }); $("#game_name").change(); + + var promote_id = "{:I('promote_id')}"; + $("#promote_level").change(function(){ + $.ajax({ + url:"{:U('Ajax/getPromotersByLevel')}", + type:"get", + data:{level:$("#promote_level option:selected").val()}, + dataType:'json', + success:function(response){ + str = ''; + data = response.data; + for (var i in data){ + str += "" + } + $("#promote_id").empty(); + $("#promote_id").append(str); + $("#promote_id").select2(); + } + }) + }); + $("#promote_level").change(); + }) diff --git a/Application/Admin/View/Mend/shiftInfo.html b/Application/Admin/View/Mend/shiftInfo.html index 768d1bd5c..050614e98 100644 --- a/Application/Admin/View/Mend/shiftInfo.html +++ b/Application/Admin/View/Mend/shiftInfo.html @@ -130,6 +130,7 @@ + - + + + + + + + + + + {$game['relation_game_name']} - - - - - + @@ -30,47 +31,326 @@ -
-
- - - - - - - + +
+
+
+ +
+
{$game['relation_game_name']}
+
{$game['features']}
+
+ +
免费安装
+ +
免费安装
+ + +
+
+
+
+
+
+ {$game['game_score']} +
+ + + + + +
+
+
14.48K个评分
+
+
+ #{$game['recommend_level']} +
网络游戏
+
+
+ 16+ +
年龄
+
+
+
+
    + +
  • + +
  • +
    +
+
+
+
简介
+
{$game['features']}
+
+
+
查看更多
+
+
+
+
评分及评论
+
+
+ {$game['game_score']} + 满分5分 +
+
+
+
+ + + + + +
+
+
+
+
+
+
+ + + + +
+
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+ +
+
+
+
+
+
14.48K个评分
+
+
+
+
+
新功能
+
更新说明:
+
1、优化用户体验
+
+
+
信息
+
+ 大小 +
{$game['game_size']}MB
+
+
+ 类别 +
游戏
+
+
+ 语言 +
英语,简体中文
+
+
+ 年龄分级 +
限16岁以上
+
+
+ 价格 +
免费
+
+
隐私政策
+
+
+
+
+
闽ICP备19000000号-0
+
闽网文{2019}1554-099号
+
+
抵制不良游戏,拒绝盗版游戏。注意自我保护,谨防受骗上当。
+
适度游戏益脑,沉迷游戏伤身。合理安排时间,享受健康生活。
- - - - - \ No newline at end of file diff --git a/Application/Media/Controller/IndexController.class.php b/Application/Media/Controller/IndexController.class.php index 6c62afa6f..ddf4dd26a 100644 --- a/Application/Media/Controller/IndexController.class.php +++ b/Application/Media/Controller/IndexController.class.php @@ -361,7 +361,7 @@ class IndexController extends BaseController { $model = array( 'm_name'=>'Game', 'prefix'=>'tab_', - 'map' =>array('game_status'=>1,'recommend_status'=>1,'display_site'=>['like','%' . DISPLAY_SITE . '%']), + 'map' =>array('game_status'=>1,'recommend_status'=>2,'display_site'=>['like','%' . DISPLAY_SITE . '%']), 'field' =>'*,min(id) as id', 'order' =>'sort desc,id desc', 'group' =>'relation_game_id', @@ -375,7 +375,7 @@ class IndexController extends BaseController { S('index_reco',$reco); } } - $reco=game_merge($reco,$model['map']); + $reco = game_merge($reco,$model['map']); $this->assign('recommend',$reco); diff --git a/Application/Mobile/Controller/UserController.class.php b/Application/Mobile/Controller/UserController.class.php index e967dbe33..334fef288 100644 --- a/Application/Mobile/Controller/UserController.class.php +++ b/Application/Mobile/Controller/UserController.class.php @@ -203,16 +203,15 @@ class UserController extends BaseController } else { $pid = I('get.pid', 0); $gid = I('get.gid', 0); + $from = I('get.from', ""); if ($pid > 0 || $gid > 0) { cookie('pgInfo', json_encode(['pid' => $pid, 'gid' => $gid]), 3600 * 24); } - if ($_REQUEST['url']) { $this->assign('url', base64_decode(base64_decode($_REQUEST['url']))); } else { $this->assign('url', U('User/index')); } - $this->display(); } } @@ -1008,10 +1007,10 @@ class UserController extends BaseController if (!$invidcard) { $this->ajaxReturn(array('status' => -1, 'info' => '身份证号码填写不正确', 'url' => U('User/userauth'))); } - $cardd = M('User', 'tab_')->where(array('idcard' => $_POST['idcard']))->find(); - if ($cardd) { - $this->ajaxReturn(array('status' => -1, 'info' => '身份证号码已被使用', 'url' => U('User/userauth'))); - } + // $cardd = M('User', 'tab_')->where(array('idcard' => $_POST['idcard']))->find(); + // if ($cardd) { + // $this->ajaxReturn(array('status' => -1, 'info' => '身份证号码已被使用', 'url' => U('User/userauth'))); + // } } if (C('tool_age.status') == 0) { diff --git a/Application/Mobile/View/User/login.html b/Application/Mobile/View/User/login.html index d25a26c11..7ba63d50c 100644 --- a/Application/Mobile/View/User/login.html +++ b/Application/Mobile/View/User/login.html @@ -40,17 +40,41 @@
- +
+ +
+ +
@@ -19,14 +19,14 @@
-
  • 平台币充值
  • -
  • 折扣充值
  • +
  • 平台币充值
  • +
    -
    +
    @@ -38,13 +38,13 @@
    充值金额
    - +
    获得平台币
    - +
    @@ -85,12 +85,12 @@
    -
    - - +
    diff --git a/Application/Sdk/View/default/Spend/pay_success.html b/Application/Sdk/View/default/Spend/pay_success.html index 2e07525ba..22c772766 100644 --- a/Application/Sdk/View/default/Spend/pay_success.html +++ b/Application/Sdk/View/default/Spend/pay_success.html @@ -137,28 +137,19 @@ $("#back_success").click(function() { }catch(err){ } */ - var Scheme=$('.Scheme').val(); - var orderno=$('.orderno').val(); - var u = navigator.userAgent; - var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端 - if(isAndroid){ - window.mengchuang.getPayResult('succeed'); - }else{ - - - window.location.href = Scheme+"://1&back"; - - - - - window.location.href = "mengchuang://showWapPayResult_btnType_?1&back"; - - - } + // var Scheme=$('.Scheme').val(); + // var orderno=$('.orderno').val(); + // var u = navigator.userAgent; + // var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端 + // if(isAndroid){ + // window.mengchuang.getPayResult('succeed'); + // }else{ + window.location.href = '/mobile.php?s=/User/index.html'; + // } }); $("#back_error").click(function() { - + window.location.href = '/mobile.php?s=/User/index.html'; /* var orderno=$('.orderno').val(); var u = navigator.userAgent; var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端 @@ -171,22 +162,22 @@ $("#back_error").click(function() { }catch(err){ } */ - var Scheme=$('.Scheme').val(); - var orderno=$('.orderno').val(); - var u = navigator.userAgent; - var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端 - if(isAndroid){ - window.mengchuang.getPayResult('fail'); - }else{ - - if (!Scheme) - ; - else - window.location.href = Scheme+"://0&back"; - - window. location.href = "mengchuang://showWapPayResult_btnType_?0&back"; - - } + // var Scheme=$('.Scheme').val(); + // var orderno=$('.orderno').val(); + // var u = navigator.userAgent; + // var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端 + // if(isAndroid){ + // window.mengchuang.getPayResult('fail'); + // }else{ + // + // if (!Scheme) + // ; + // else + // window.location.href = Scheme+"://0&back"; + // + // window. location.href = "mengchuang://showWapPayResult_btnType_?0&back"; + // + // } }); diff --git a/Data/update.sql b/Data/update.sql index 9fe8233fb..924ff99c5 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -595,4 +595,17 @@ CHANGE COLUMN `create_promote_id` `creator_id` int(11) NOT NULL DEFAULT 0 COMMEN ALTER TABLE `sys_shift_task` ADD COLUMN `creator_type` tinyint(1) NOT NULL DEFAULT 0 COMMENT '创建者类型 0 后台管理员 1 推广员' AFTER `creator_id`; ALTER TABLE `tab_mend` -ADD COLUMN `op_type` tinyint(0) NOT NULL DEFAULT 0 COMMENT '0 管理员 1 推广员' AFTER `op_account`; \ No newline at end of file +ADD COLUMN `op_type` tinyint(0) NOT NULL DEFAULT 0 COMMENT '0 管理员 1 推广员' AFTER `op_account`; + +--补链新增切分时间 chenzhi +UPDATE `sys_model` SET `list_grid` = 'id:编号 +user_account:账号 +user_nickname:昵称 +promote_id:推广员编号 +promote_account:推广员账号 +promote_id_to:修改后编号 +promote_account_to:修改后账号 +remark:备注 +create_time:时间 +op_account:操作人账号 +order_time:切分时间' WHERE `id` = 29; \ No newline at end of file diff --git a/Public/Mobile/css/remove.css b/Public/Mobile/css/remove.css index 08e5de8c5..127d48c3d 100644 --- a/Public/Mobile/css/remove.css +++ b/Public/Mobile/css/remove.css @@ -37,7 +37,7 @@ height:0.6rem; background:rgba(33,177,235,1); border-radius:0.3rem; - font-size:0.15rem; + font-size:0.28rem; font-family:PingFang SC; font-weight:400; color:rgba(255,255,255,1); diff --git a/Public/Mobile/images/juxing3.png b/Public/Mobile/images/juxing3.png index e19b24a60..031a52fd5 100644 Binary files a/Public/Mobile/images/juxing3.png and b/Public/Mobile/images/juxing3.png differ