Commit 27d90ca3 authored by twj's avatar twj

twj

parent a8921afe
......@@ -164,15 +164,22 @@ class Users extends Api
}
$userinfo['invite_device_num'] = \app\admin\model\order\Order::where(['share_id' => $uid, 'sale_status' => 2])->sum('num'); //推广设备数
$userinfo['recharge_amount'] = Config::get('site.recharge_gift_pack');
//是否是团长的标志
$userInfo['captin'] = 0;
$agentInfo = AgentModel::where(['agent_user_id' => $uid, 'status' => 1, 'level' => ['>', 0]])->find();
if ($agentInfo) {
$userInfo['captin'] = 1;
}
$this->success('获取用户信息成功', ['userinfo' => $userinfo]);
}
/**
* 身份接口
*/
public function getUserLevel()
{
$uid = $this->auth->id;
if (!$uid) {
$this->error('用户不存在');
}
$agentInfo = AgentModel::where(['agent_user_id' => $uid, 'status' => 1, 'level' => ['>', 0]])->find();
$this->success('获取用户信息成功', ['agentInfo' => $agentInfo]);
}
/**
* 我的收入(包括单个设备的收入)
*/
......
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