Commit 6f1f2467 authored by twj's avatar twj

twj

parent 27d90ca3
......@@ -164,7 +164,7 @@ 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');
$this->success('获取用户信息成功', ['userinfo' => $userinfo]);
}
......@@ -178,6 +178,10 @@ class Users extends Api
$this->error('用户不存在');
}
$agentInfo = AgentModel::where(['agent_user_id' => $uid, 'status' => 1, 'level' => ['>', 0]])->find();
if (!$agentInfo) {
$agentInfo['level'] = 0;
$this->success('获取用户信息成功', ['agentInfo' => $agentInfo]);
}
$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