Commit b53886ac authored by shajiaiming's avatar shajiaiming

节点筛选

parent a5437286
......@@ -125,6 +125,15 @@ class UserController extends BaseController
*/
public function actionUserList()
{
$token_string = Yii::$app->request->headers->get('Token');
$user = Admin::findIdentityByAccessToken($token_string);
$platform_id = $user->platform_id;
$node_params = [
'scheme' => Yii::$app->params['trusteeship']['scheme'],
'host' => Yii::$app->params['trusteeship']['host'],
'port' => Yii::$app->params['trusteeship']['port'][$platform_id]
];
$page = Yii::$app->request->get('page', 1);
$size = Yii::$app->request->get('size', 15);
$real_type = Yii::$app->request->get('real_type', '');
......@@ -142,7 +151,7 @@ class UserController extends BaseController
'end_time' => $end_time
];
$service = new TrusteeShipService();
$service = new TrusteeShipService($node_params);
$result = $service->getUserList($params);
if (200 !== $result['code']) {
return ['code' => $result['code'], 'data' => [], 'msg' => $result['msg']];
......@@ -150,29 +159,4 @@ class UserController extends BaseController
return ['code' => 1, 'data' => $result['msg'], 'msg' => 'success'];
}
/**
* 重置密码
*/
public function actionResetPassword()
{
}
/**
* 获取用户基本信息
* @return array
*/
public function actionView()
{
}
/*
* 更改密码
* @return array
*/
public function actionUpdatePassword()
{
}
}
\ No newline at end of file
......@@ -60,11 +60,20 @@ class WalletController extends BaseController
public function actionUserAsset()
{
$token_string = Yii::$app->request->headers->get('Token');
$user = Admin::findIdentityByAccessToken($token_string);
$platform_id = $user->platform_id;
$node_params = [
'scheme' => Yii::$app->params['trusteeship']['scheme'],
'host' => Yii::$app->params['trusteeship']['host'],
'port' => Yii::$app->params['trusteeship']['port'][$platform_id]
];
$uid = Yii::$app->request->get('uid', '');
$params = [
'uid' => $uid
];
$service = new TrusteeShipService();
$service = new TrusteeShipService($node_params);
$result = $service->getUserAsset($params);
if (200 !== $result['code']) {
return ['code' => $result['code'], 'data' => [], 'msg' => $result['msg']];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment