超级签 登入状态验证

master
tpingzhang 5 years ago
parent 44de895eb7
commit 8670b8974f

@ -23,6 +23,8 @@ class SsgController extends BaseController {
$user = session("user_auth"); $user = session("user_auth");
$promoteId = I("promote_id"); $promoteId = I("promote_id");
if (!$promoteId) { if (!$promoteId) {
echo "链接失效,请重新向推广员索取链接。";
exit();
$this->error("参数非法"); $this->error("参数非法");
} }
$exists = M("promote", "tab_")->where(array('id' => $promoteId))->find(); $exists = M("promote", "tab_")->where(array('id' => $promoteId))->find();

@ -7,8 +7,16 @@ use Mobile\Controller\SsgController;
// a8eeac3335cef5ee117d357738598f691932513b // a8eeac3335cef5ee117d357738598f691932513b
class Ipa365Controller extends BaseController{ class Ipa365Controller extends BaseController{
const signprice = 10; // 超级签价格 const signprice = 10; // 超级签价格
public $userinfo;
public function __construct() {
$this->userinfo = $_SESSION['onethink_home']['user_auth'];
parent::__construct();
}
public function test(){ public function test(){
$user = $this->userinfo;
pp($user);
die(); die();
$ipa365 = new Ipa365Controller(); $ipa365 = new Ipa365Controller();
$result = $ipa365->pay_notify(array( $result = $ipa365->pay_notify(array(
@ -95,7 +103,7 @@ class Ipa365Controller extends BaseController{
* 发起支付 * 发起支付
*/ */
public function pay() { public function pay() {
$userId = $_SESSION['user_id']; $userId = $this->userinfo['user_id'];
if (!$userId ) { if (!$userId ) {
$this->error("请登入", "/mobile.php/ssg/login"); $this->error("请登入", "/mobile.php/ssg/login");
} }
@ -165,8 +173,13 @@ class Ipa365Controller extends BaseController{
} }
// 微信分享页面
public function paytip(){ public function paytip(){
$userId = $this->userinfo['user_id'];
if (!$userId ) {
$this->error("请登入", "/mobile.php/ssg/login");
}
$orderId = I('order_id'); $orderId = I('order_id');
$payLog = M('game_supersign', 'tab_')->where(array( $payLog = M('game_supersign', 'tab_')->where(array(
@ -214,11 +227,15 @@ class Ipa365Controller extends BaseController{
public function install_show() { public function install_show() {
$orderId = I('order_id', 0); $orderId = I('order_id', 0);
$gameId = I('game_id', 0); $gameId = I('game_id', 0);
$userId = I('user_id', 0); /* $userId = I('user_id', 0);
$user = M('user', 'tab_')->where(array( $user = M('user', 'tab_')->where(array(
'id' => $userId 'id' => $userId
))->find(); ))->find(); */
$userId = $this->userinfo['user_id'];
if (!$userId ) {
$this->error("请登入", "/mobile.php/ssg/login");
}
// $userId = $_SESSION['user_id']; // $userId = $_SESSION['user_id'];
if (!$userId ) { if (!$userId ) {
@ -250,7 +267,7 @@ class Ipa365Controller extends BaseController{
* 获取用户安装历史url * 获取用户安装历史url
*/ */
public function get_install_list() { public function get_install_list() {
$gameId = I('game_id', 0); /* $gameId = I('game_id', 0);
$where = array( $where = array(
'pay_status' => 1, 'pay_status' => 1,
'ticket' => array('neq', '') 'ticket' => array('neq', '')
@ -261,14 +278,14 @@ class Ipa365Controller extends BaseController{
// pp($list); // pp($list);
$url = $game['supersign_url']."?code={$code}"; $url = $game['supersign_url']."?code={$code}";
pp($url); pp($url);
redirect($url); redirect($url); */
} }
/** /**
* 用户点击安装 * 用户点击安装
*/ */
public function install() { public function install() {
$userId = I('user_id', 0); $userId = $this->userinfo['user_id'];
if (!$userId ) { if (!$userId ) {
$this->error("请登入", "/mobile.php/ssg/login"); $this->error("请登入", "/mobile.php/ssg/login");
} }
@ -342,7 +359,11 @@ class Ipa365Controller extends BaseController{
* 打包列表 * 打包列表
*/ */
public function pay_list() { public function pay_list() {
$userId = 0; $userId = $this->userinfo['user_id'];
if (!$userId ) {
$this->error("请登入", "/mobile.php/ssg/login");
}
$list = M('game_supersion', 'tab_')->where(array( $list = M('game_supersion', 'tab_')->where(array(
'user_id' => $userId, 'user_id' => $userId,
))->select(); ))->select();

Loading…
Cancel
Save