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

master
zhengyongxing 5 years ago
commit d6184531d8

@ -130,15 +130,15 @@ class SsgController extends BaseController {
$_SESSION['user_id'] = $user_id; $_SESSION['user_id'] = $user_id;
$user = M('user', 'tab_')->where(array( $user = M('user', 'tab_')->where(array(
'id' => $user_id 'id' => $user_id
))->find(); ))->find();
if (!$user['promote_id'] && $promote) { if (!$user['promote_id'] && $promote) {
M('user', 'tab_')->where(array( M('user', 'tab_')->where(array(
'id' => $user_id 'id' => $user_id
))->save(array( ))->save(array(
'promote_id' => $promoteId, 'promote_id' => $promoteId,
'promote_account' => $promote['account'] 'promote_account' => $promote['account']
)); ));
} }
} }
$this->ajaxReturn(array("ErrorCode"=>$res_code,"ResultMsg"=>$res_msg),'JSON'); $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']); $this -> sms_verify($user['account'], $user['code']);
$res = $this -> doRegister($user['account'],$user['password'],$user['account'],$promoteId,4,2, $game_id); $res = $this -> doRegister($user['account'],$user['password'],$user['account'],$promoteId,4,2, $game_id);
if(empty($res)){ if(empty($res)){
$this -> set_message(1017, "fail", "添加失败"); $this -> set_message(1017, "fail", "添加失败");
} }
//添加自动登录 //添加自动登录
$userApi = new MemberApi(); $userApi = new MemberApi();
$user_id = $userApi->login($user['account'], $user['password'],1); $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); $res = $this -> doRegister($account,$password,'',$promoteId,4,1);
if(empty($res)){ if(empty($res)){
$this -> set_message(1017, "fail", "添加失败"); $this -> set_message(1017, "fail", "添加失败");
} }
//添加自动登录 //添加自动登录
$userApi = new MemberApi(); $userApi = new MemberApi();
$user_id = $userApi->login($account, $password,1); $user_id = $userApi->login($account, $password,1);
$this -> set_message(1, "success", "添加成功"); $this -> set_message(1, "success", "添加成功");
# code... # 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( $msg = array(
"status" => $status, "status" => $status,
"return_code" => $return_code, "return_code" => $return_code,
@ -482,15 +482,14 @@ class SsgController extends BaseController {
))->find(); ))->find();
$payLog = M('game_supersign', 'tab_')->where(array( $isPay = M('game_supersign', 'tab_')->where(array(
'user_id' => $userId, 'user_id' => $userId,
'game_id' => $gameId 'game_id' => $gameId,
'pay_status' =>1
))->find(); ))->find();
if($payLog && $payLog['pay_status']==1){ if($isPay){
//$this->assign("error","亲~您已购买过了~<br/>请到【订单查询】查看订单信息哟~"); redirect("/mobile.php/Ssg/install_show/user_id/$userId/game_id/$gameId/order_id/".$isPay['order_id']);
//$this->display('blank');
redirect("/mobile.php/Ssg/install_show/user_id/$userId/game_id/$gameId/order_id/".$payLog['order_id']);
}else{ }else{
if (!$gameInfo['supersign_token']) { if (!$gameInfo['supersign_token']) {
//$this->error("超级签token未填写"); //$this->error("超级签token未填写");
@ -527,27 +526,19 @@ class SsgController extends BaseController {
exit(); exit();
} }
$payLog = M('game_supersign', 'tab_')->where(array( $isPay = M('game_supersign', 'tab_')->where(array(
'user_id' => $userId, 'user_id' => $userId,
'game_id' => $gameId 'game_id' => $gameId,
))->find(); 'pay_status' => 1
))->find(); //是否有已支付订单
$gameInfo = M('game', 'tab_')->field('game_name,supersign_token')->where(array( $gameInfo = M('game', 'tab_')->field('game_name,supersign_token')->where(array(
'id' => $gameId, 'id' => $gameId,
))->find(); ))->find();
if ($payLog && $payLog['pay_status']==0) { if ($isPay){
$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");
}*/
$this->assign("error","亲~您已购买过了~<br/>请到【订单查询】查看订单信息哟~"); $this->assign("error","亲~您已购买过了~<br/>请到【订单查询】查看订单信息哟~");
$this->display('blank'); $this->display('blank');
//$this->error("亲~您已购买过了~请到【订单查询】查看订单信息哟~");
exit(); exit();
} else { } else {
$orderId = "SS_" . date('Ymd') . date('His') . sp_random_string(4); // 超级签 $orderId = "SS_" . date('Ymd') . date('His') . sp_random_string(4); // 超级签

@ -649,3 +649,6 @@ CREATE TABLE `tab_server_notice` (
KEY `start_time` (`start_time`), KEY `start_time` (`start_time`),
KEY `create_time` (`create_time`) KEY `create_time` (`create_time`)
) ENGINE=InnoDB AUTO_INCREMENT=488 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='游戏区服预告表'; ) 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');

Loading…
Cancel
Save