diff --git a/Application/Sdk/Controller/GameGiftPageController.class.php b/Application/Sdk/Controller/GameGiftPageController.class.php index 1ef5df28..c45c579e 100644 --- a/Application/Sdk/Controller/GameGiftPageController.class.php +++ b/Application/Sdk/Controller/GameGiftPageController.class.php @@ -9,11 +9,11 @@ class GameGiftPageController extends Controller{ public $userToken; public function _initialize() { -// if (I("request.api_ver") == 2) { + // if (I("request.api_ver") == 2) { $user = BaseController::webH5Vetify(); $this->userId = $user['userId']; $this->userToken = $user['userToken']; -// } + // } } public function gift_list(){ $gameId = I('game_id'); @@ -28,6 +28,7 @@ class GameGiftPageController extends Controller{ $map['game_id'] = $gameId; $map['status']=1; + $map['start_time'] = ['lt',time()]; switch ($sdkVersion) { case 1: case 2: @@ -79,7 +80,7 @@ class GameGiftPageController extends Controller{ $novice = M('gift_record','tab_')->where(['gift_id' => $gift_id,'user_id' => $this->userId])->getField('novice'); $content['start_time'] = date('Y-m-d H:i:s',$content['start_time']); - $content['end_time'] = $content['end_time'] == 0?'长期有效':date('Y-m-d H:i:s',$content['start_time']); + $content['end_time'] = $content['end_time'] == 0?'长期有效':date('Y-m-d H:i:s',$content['end_time']); if($content['novice']!='') { @@ -88,7 +89,6 @@ class GameGiftPageController extends Controller{ }else{ $content['novice_num'] = 0;//是否剩余 } - $this->assign('user_token',$user_token); $this->assign('content',$content); $this->assign('novice',$novice); @@ -113,7 +113,7 @@ class GameGiftPageController extends Controller{ $content = M('Giftbag','tab_')->where(['id' => $gift_id])->field('id,novice,giftbag_name,start_time,end_time,desribe,digest')->find(); $content['start_time'] = date('Y-m-d H:i:s',$content['start_time']); - $content['end_time'] = $content['end_time'] == 0?'长期有效':date('Y-m-d H:i:s',$content['start_time']); + $content['end_time'] = $content['end_time'] == 0?'长期有效':date('Y-m-d H:i:s',$content['end_time']); if($content['novice']!='') {