diff --git a/Application/Admin/Controller/PromoteController.class.php b/Application/Admin/Controller/PromoteController.class.php index 62bcdd0af..73c1a1b0a 100644 --- a/Application/Admin/Controller/PromoteController.class.php +++ b/Application/Admin/Controller/PromoteController.class.php @@ -1111,10 +1111,15 @@ class PromoteController extends ThinkController $game_id = $codeRes['game_id']; $gameInfo = M('game','tab_')->field('game_name')->where(['id'=>$game_id])->find(); $params['game_name'] = $gameInfo['game_name']; - $expires_in = $codeRes['expires_in']; + if(!empty($codeRes)) { + $expires_in = $codeRes['expires_in']; + }else { + $expires_in = -100; + } + if($expires_in == 0) { $params['expires_in'] = "永久性"; - }else { + }else if($expires_in > 0) { $params['expires_in'] = $expires_in; } $params['created_at'] = $codeRes['created_at'];