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

master
tpingzhang 5 years ago
commit 6bc9699546

@ -9,11 +9,11 @@ class GameGiftPageController extends Controller{
public $userToken; public $userToken;
public function _initialize() public function _initialize()
{ {
// if (I("request.api_ver") == 2) { // if (I("request.api_ver") == 2) {
$user = BaseController::webH5Vetify(); $user = BaseController::webH5Vetify();
$this->userId = $user['userId']; $this->userId = $user['userId'];
$this->userToken = $user['userToken']; $this->userToken = $user['userToken'];
// } // }
} }
public function gift_list(){ public function gift_list(){
$gameId = I('game_id'); $gameId = I('game_id');
@ -28,6 +28,7 @@ class GameGiftPageController extends Controller{
$map['game_id'] = $gameId; $map['game_id'] = $gameId;
$map['status']=1; $map['status']=1;
$map['start_time'] = ['lt',time()];
switch ($sdkVersion) { switch ($sdkVersion) {
case 1: case 1:
case 2: 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'); $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['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']!='') if($content['novice']!='')
{ {
@ -88,7 +89,6 @@ class GameGiftPageController extends Controller{
}else{ }else{
$content['novice_num'] = 0;//是否剩余 $content['novice_num'] = 0;//是否剩余
} }
$this->assign('user_token',$user_token); $this->assign('user_token',$user_token);
$this->assign('content',$content); $this->assign('content',$content);
$this->assign('novice',$novice); $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 = 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['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']!='') if($content['novice']!='')
{ {

Loading…
Cancel
Save