|
|
@ -3146,21 +3146,20 @@ class UserController extends BaseController
|
|
|
|
* 获取用户平台币充值记录绑币余额
|
|
|
|
* 获取用户平台币充值记录绑币余额
|
|
|
|
* @return [type] [description]
|
|
|
|
* @return [type] [description]
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function get_user_money()
|
|
|
|
public function get_user_money()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$data = json_decode(base64_decode(file_get_contents("php://input"),true));
|
|
|
|
$data = json_decode(base64_decode(file_get_contents("php://input"),true));
|
|
|
|
|
|
|
|
|
|
|
|
$data['user_token'] = 1;
|
|
|
|
$data['user_token'] = 'f6ddd0b38dc037293a18f5525d59d4eb';
|
|
|
|
if(empty($data['user_token']))
|
|
|
|
if(empty($data['user_token']))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
re_msg(1004,'fail','用户不存在');
|
|
|
|
re_msg(1004,'fail','用户不存在');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$user_info = M('user','tab_')->where(['user_token' => $data['user_token']])->field('id,account,balance')->find();
|
|
|
|
$user_info = M('user','tab_')->where(['user_token' => $data['user_token']])->field('id,account,balance')->find();
|
|
|
|
|
|
|
|
|
|
|
|
$user_play = M('user_play','tab_')->alias('user')
|
|
|
|
$user_play = M('user_play','tab_')->alias('user')
|
|
|
|
->join('tab_game as game on user.game_id = game.id')
|
|
|
|
->join('tab_game as game on user.game_id = game.id')
|
|
|
|
->where(['user_id' => $user_info['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.cover')->select();
|
|
|
|
foreach($user_play as $k => $v)
|
|
|
|
foreach($user_play as $k => $v)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$cover = get_cover($v['cover'],'path');
|
|
|
|
$cover = get_cover($v['cover'],'path');
|
|
|
@ -3179,7 +3178,7 @@ class UserController extends BaseController
|
|
|
|
$deposit[$k]['create_time'] = date('Y-m-d',$v['create_time']);
|
|
|
|
$deposit[$k]['create_time'] = date('Y-m-d',$v['create_time']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$this->assign('account',$user_info['account']);
|
|
|
|
$this->assign('account',$user_info['account']);
|
|
|
|
$this->assign('balance',$user_info['balance']);
|
|
|
|
$this->assign('balance',$user_info['balance']?:0);
|
|
|
|
$this->assign('deposit',$deposit);
|
|
|
|
$this->assign('deposit',$deposit);
|
|
|
|
$this->assign('user_play',$user_play);
|
|
|
|
$this->assign('user_play',$user_play);
|
|
|
|
$this->display('balance');
|
|
|
|
$this->display('balance');
|
|
|
|