礼包列表图标

master
zhanglingsheng 5 years ago
parent 445bf24285
commit 2a8414e4cd

@ -10,19 +10,19 @@ class UserHController extends Controller
public $userId;
public function _initialize()
{
$userToken = I("request.user_token");
if (!$userToken) {
re_msg(11, "参数有误,请重新登入获取!");
}
// public function _initialize()
// {
// $userToken = I("request.user_token");
// if (!$userToken) {
// re_msg(11, "参数有误,请重新登入获取!");
// }
$this->userId = M("user", "tab_")->where(['user_token' => $userToken])->getField("id");
$this->userToken = $userToken;
if (!$this->userId) {
re_msg(12, $userToken."Token失效");
}
}
// $this->userId = M("user", "tab_")->where(['user_token' => $userToken])->getField("id");
// $this->userToken = $userToken;
// if (!$this->userId) {
// re_msg(12, $userToken."Token失效");
// }
// }
/**
@ -38,7 +38,7 @@ class UserHController extends Controller
$user_play = M('user_play','tab_')->alias('user')
->join('tab_game as game on user.game_id = game.id')
->where(['user_id' => $user_info['id']])
->field('user.game_name,user.bind_balance,game.cover')->select();
->field('user.game_name,user.bind_balance,game.icon')->select();
foreach($user_play as $k => $v)
{
$cover = (substr($v['icon'], 0, 7) == "http://" || substr($v['icon'], 0, 8) == "https://" ) ? get_cover($v['icon'],"path") : (is_https() ? 'https://' : 'http://' . $_SERVER['HTTP_HOST'] . get_cover($v['icon'],"path"));
@ -51,7 +51,6 @@ class UserHController extends Controller
{
$deposit[$k]['create_time'] = date('Y-m-d',$v['create_time']);
}
$this->assign('game_id', I('game_id', 0));
$this->assign('account', $user_info['account']);
$this->assign('balance', $user_info['balance']?:0);

Loading…
Cancel
Save