|
|
|
@ -14,6 +14,9 @@ class UserHController extends BaseController
|
|
|
|
|
public function get_user_money()
|
|
|
|
|
{
|
|
|
|
|
$data = json_decode(base64_decode(file_get_contents("php://input")), true);
|
|
|
|
|
if (I("debug") == 1) {
|
|
|
|
|
$data['user_token'] = 'b9c9739f7e3dc0b338dc3f4a4f02cb29';
|
|
|
|
|
}
|
|
|
|
|
$user_info = M('user','tab_')->where(['user_token' => $data['user_token']])->field('id,account,balance')->find();
|
|
|
|
|
|
|
|
|
|
$user_play = M('user_play','tab_')->alias('user')
|
|
|
|
@ -38,9 +41,11 @@ class UserHController 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->assign('user_token', $data['user_token']);
|
|
|
|
|
|
|
|
|
|
$this->display();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -49,21 +54,22 @@ class UserHController extends BaseController
|
|
|
|
|
* 填写充值
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
public function file_pay($account)
|
|
|
|
|
public function file_pay()
|
|
|
|
|
{
|
|
|
|
|
$this->assign('account',$account);
|
|
|
|
|
$u = M('user', 'tab_')->where(['id' => $this->userId])->find();
|
|
|
|
|
$this->assign("account", $u['account']);
|
|
|
|
|
$this->assign("user_token", $u['user_token']);
|
|
|
|
|
$this->display('file_pay');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function pay()
|
|
|
|
|
{
|
|
|
|
|
$u = M('user', 'tab_')->where(['id' => $this->userId])->find();
|
|
|
|
|
$post = I('post.');
|
|
|
|
|
|
|
|
|
|
if(empty($post['money']))
|
|
|
|
|
{
|
|
|
|
|
if(empty($post['money'])) {
|
|
|
|
|
$this->error('金额不能为空');
|
|
|
|
|
}
|
|
|
|
|
$this->assign('account',$post['account']);
|
|
|
|
|
$this->assign("account", $u['account']);
|
|
|
|
|
$this->assign('money',$post['money']);
|
|
|
|
|
$this->display('pay');
|
|
|
|
|
}
|
|
|
|
|