http 自动加白
This commit is contained in:
@@ -26,6 +26,30 @@ class User extends Controller
|
|||||||
$this->http_user_info = $user_model->get_http_user($this->userinfo['UserId']);
|
$this->http_user_info = $user_model->get_http_user($this->userinfo['UserId']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//获取用户的token
|
||||||
|
public function get_user_token() {
|
||||||
|
$request_data = [
|
||||||
|
'sgUserId' => $this->http_user_info['sgUserId'],
|
||||||
|
];
|
||||||
|
$url = $this->url_root.'/user/detail';
|
||||||
|
|
||||||
|
$request_data = formatHttpRequert($request_data);
|
||||||
|
|
||||||
|
$data = json_decode(linkcurl($url,'POST',$request_data,[],0));
|
||||||
|
|
||||||
|
$user_data = [
|
||||||
|
'uid' => $this->http_user_info['sgUserId'],
|
||||||
|
'token' => $data->d->apiToken,
|
||||||
|
];
|
||||||
|
$return_data = [
|
||||||
|
'code' => 1,
|
||||||
|
'data' => $user_data,
|
||||||
|
'msg' => '',
|
||||||
|
];
|
||||||
|
|
||||||
|
echo json_encode($return_data);
|
||||||
|
}
|
||||||
|
|
||||||
//获取聚币余额
|
//获取聚币余额
|
||||||
public function get_balance() {
|
public function get_balance() {
|
||||||
$data = $this->http_user_info['ju_money'];
|
$data = $this->http_user_info['ju_money'];
|
||||||
|
|||||||
Reference in New Issue
Block a user