From 628b90b72ca6889f49608035e1b5821c7741ff97 Mon Sep 17 00:00:00 2001 From: zhengchanglong Date: Wed, 4 Dec 2019 17:12:07 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=B6=85=E7=BA=A7=E7=AD=BE=E8=B4=AD?= =?UTF-8?q?=E4=B9=B0=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Mobile/Controller/SsgController.class.php | 69 ++++++++----------- 1 file changed, 30 insertions(+), 39 deletions(-) diff --git a/Application/Mobile/Controller/SsgController.class.php b/Application/Mobile/Controller/SsgController.class.php index 24c9a289e..3f3446b49 100644 --- a/Application/Mobile/Controller/SsgController.class.php +++ b/Application/Mobile/Controller/SsgController.class.php @@ -130,15 +130,15 @@ class SsgController extends BaseController { $_SESSION['user_id'] = $user_id; $user = M('user', 'tab_')->where(array( - 'id' => $user_id + 'id' => $user_id ))->find(); if (!$user['promote_id'] && $promote) { - M('user', 'tab_')->where(array( - 'id' => $user_id - ))->save(array( - 'promote_id' => $promoteId, - 'promote_account' => $promote['account'] - )); + M('user', 'tab_')->where(array( + 'id' => $user_id + ))->save(array( + 'promote_id' => $promoteId, + 'promote_account' => $promote['account'] + )); } } $this->ajaxReturn(array("ErrorCode"=>$res_code,"ResultMsg"=>$res_msg),'JSON'); @@ -182,15 +182,15 @@ class SsgController extends BaseController { #验证短信验证码 $this -> sms_verify($user['account'], $user['code']); - $res = $this -> doRegister($user['account'],$user['password'],$user['account'],$promoteId,4,2, $game_id); - if(empty($res)){ + $res = $this -> doRegister($user['account'],$user['password'],$user['account'],$promoteId,4,2, $game_id); + if(empty($res)){ $this -> set_message(1017, "fail", "添加失败"); - } - //添加自动登录 - $userApi = new MemberApi(); - $user_id = $userApi->login($user['account'], $user['password'],1); + } + //添加自动登录 + $userApi = new MemberApi(); + $user_id = $userApi->login($user['account'], $user['password'],1); - $this -> set_message(1, "success", "添加成功"); + $this -> set_message(1, "success", "添加成功"); } //忘记密码 @@ -229,18 +229,18 @@ class SsgController extends BaseController { $res = $this -> doRegister($account,$password,'',$promoteId,4,1); if(empty($res)){ $this -> set_message(1017, "fail", "添加失败"); - } + } - //添加自动登录 - $userApi = new MemberApi(); - $user_id = $userApi->login($account, $password,1); + //添加自动登录 + $userApi = new MemberApi(); + $user_id = $userApi->login($account, $password,1); - $this -> set_message(1, "success", "添加成功"); + $this -> set_message(1, "success", "添加成功"); # code... } //消息返回 - public function set_message($status=0,$return_code="fail",$return_msg="操作失败"){ + public function set_message($status=0,$return_code="fail",$return_msg="操作失败"){ $msg = array( "status" => $status, "return_code" => $return_code, @@ -482,15 +482,14 @@ class SsgController extends BaseController { ))->find(); - $payLog = M('game_supersign', 'tab_')->where(array( + $isPay = M('game_supersign', 'tab_')->where(array( 'user_id' => $userId, - 'game_id' => $gameId + 'game_id' => $gameId, + 'pay_status' =>1 ))->find(); - if($payLog && $payLog['pay_status']==1){ - //$this->assign("error","亲~您已购买过了~
请到【订单查询】查看订单信息哟~"); - //$this->display('blank'); - redirect("/mobile.php/Ssg/install_show/user_id/$userId/game_id/$gameId/order_id/".$payLog['order_id']); + if($isPay){ + redirect("/mobile.php/Ssg/install_show/user_id/$userId/game_id/$gameId/order_id/".$isPay['order_id']); }else{ if (!$gameInfo['supersign_token']) { //$this->error("超级签token未填写!"); @@ -527,27 +526,19 @@ class SsgController extends BaseController { exit(); } - $payLog = M('game_supersign', 'tab_')->where(array( + $isPay = M('game_supersign', 'tab_')->where(array( 'user_id' => $userId, - 'game_id' => $gameId - ))->find(); + 'game_id' => $gameId, + 'pay_status' => 1 + ))->find(); //是否有已支付订单 $gameInfo = M('game', 'tab_')->field('game_name,supersign_token')->where(array( 'id' => $gameId, ))->find(); - if ($payLog && $payLog['pay_status']==0) { - $orderId = $payLog['order_id']; - }elseif ($payLog && $payLog['pay_status']==1){ - /*$orderId = $payLog['order_id']; - if(stripos($_SERVER['HTTP_HOST'], '.wmtxkj.cn') || $_SERVER['HTTP_HOST']=='127.0.0.1' || stripos($_SERVER['HTTP_HOST'], '.free.idcfengye.com')){ - redirect("http://".$_SERVER['HTTP_HOST']."/mobile.php/Ssg/install_show/user_id/$userId/game_id/$gameId/order_id/$orderId"); - }else{ - redirect("https://".$_SERVER['HTTP_HOST']."/mobile.php/Ssg/install_show/user_id/$userId/game_id/$gameId/order_id/$orderId"); - }*/ + if ($isPay){ $this->assign("error","亲~您已购买过了~
请到【订单查询】查看订单信息哟~"); $this->display('blank'); - //$this->error("亲~您已购买过了~请到【订单查询】查看订单信息哟~"); exit(); } else { $orderId = "SS_" . date('Ymd') . date('His') . sp_random_string(4); // 超级签 From 7ba60cffdd1cfbae005f37feae106bdec336b4e9 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Wed, 4 Dec 2019 17:27:39 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Data/update.sql | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Data/update.sql b/Data/update.sql index cf6859817..c1c337020 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -648,4 +648,7 @@ CREATE TABLE `tab_server_notice` ( KEY `show_status` (`show_status`), KEY `start_time` (`start_time`), KEY `create_time` (`create_time`) -) ENGINE=InnoDB AUTO_INCREMENT=488 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='游戏区服预告表'; \ No newline at end of file +) ENGINE=InnoDB AUTO_INCREMENT=488 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='游戏区服预告表'; + +INSERT INTO `sys_model` ( `name`, `title`, `extend`, `relation`, `need_pk`, `field_sort`, `field_group`, `attribute_list`, `attribute_alias`, `template_list`, `template_add`, `template_edit`, `list_grid`, `list_row`, `search_key`, `search_list`, `create_time`, `update_time`, `status`, `engine_type`) +VALUES ('ServerNotice', '游戏区服预告', '0', '', '1', '{\"1\":[\"289\",\"288\",\"290\",\"291\",\"293\",\"292\",\"287\",\"286\",\"282\",\"281\",\"283\",\"284\",\"285\",\"280\"]}', '1:基础', '', '', '', '', '', 'id:编号\r\ngame_name:游戏名称\r\nserver_name:区服名称\r\nshow_status|get_info_status:区服状态\r\nstart_time|set_show_time:开服时间\r\nserver_version:运营平台\r\ndevelopers:开发商\r\nid:操作:[EDIT]&id=[id]|编辑,ServerNotice/del?ids=[id]|删除', '10', '', '', '1480318911', '1493879217', '1', 'MyISAM');