悬浮球接口

master
tpingzhang 5 years ago
parent 3c5ebcfb50
commit 2012771107

@ -248,7 +248,6 @@ function re_msg($code=200,$msg='',$data=[])
$ret['code'] = $code;
$ret['msg'] = $msg;
$ret['data'] = $data;
echo base64_encode(json_encode($ret));
exit();
}

@ -56,7 +56,7 @@ class GameController extends BaseController{
$menus = json_decode($sdkMenus['config'],true);
foreach($menus as $k => $v) {
$menus[$k]['icon'] = C('ADMIN_DOMAIN') . $v['icon'];
$menus[$k]['url'] = $v['url'] . '/user_token/' . $user_token;
$menus[$k]['url'] = $_SERVER['HTTP_HOST'].$v['url'] . '/user_token/' . $userToken;
if ($menus[$k]['type'] == 1)
$menus[$k]['ios_url'] = "?action=".$menus[$k]['name'];
else { // H5
@ -70,7 +70,7 @@ class GameController extends BaseController{
$personalMenu = json_decode($personalMenu, true);
foreach($personalMenu as &$v) {
$v['icon'] = C('ADMIN_DOMAIN') . $v['icon'];
$v['url'] = $v['url'] . '/user_token/' . $userToken;
$v['url'] = $_SERVER['HTTP_HOST'].$v['url'] . '/user_token/' . $userToken;
if ($v['type'] == 1) // 1 H5页面
$v['ios_url'] = "?action=".$v['name'];
else {

@ -3150,13 +3150,12 @@ class UserController extends BaseController
{
$data = json_decode(base64_decode(file_get_contents("php://input"),true));
$data['user_token'] = 1;
$data['user_token'] = 'f6ddd0b38dc037293a18f5525d59d4eb';
if(empty($data['user_token']))
{
re_msg(1004,'fail','用户不存在');
}
$user_info = M('user','tab_')->where(['user_token' => $data['user_token']])->field('id,account,balance')->find();
$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']])
@ -3179,7 +3178,7 @@ class UserController extends BaseController
$deposit[$k]['create_time'] = date('Y-m-d',$v['create_time']);
}
$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('user_play',$user_play);
$this->display('balance');

Loading…
Cancel
Save