Commit b0bfb948 authored by hujun's avatar hujun

经纪人头像路径

parent 05ee1d3a
......@@ -57,7 +57,9 @@ class Agents extends Model
*/
public function agentsDetail($id) {
if ($id) {
$result = $this->field('id,realname,created,sub_shopname,head_portrait')->where('id',$id)->find();
$result = $this->field('id,realname,created,sub_shopname,head_portrait')
->where('level=2 or level=5')
->where('id',$id)->find();
$result['head_portrait'] = 'user_header/'.$result['head_portrait']; //头像
$evaluate_grade = Db::table('u_evaluate')
->field('avg(evaluate_grade) as evaluate_grade, count(*) as num')
......@@ -70,6 +72,7 @@ class Agents extends Model
$result['watch_shop'] = Db::table('u_appoint_watch_shop')
->where('agents_id',$id)->count(); //看铺
$result['head_portrait'] = 'http://admin.tonglianjituan.com/'.$result['head_portrait'];
$journal = new JournalAccounts();
$fields = 'count(j.id) as num';
$result['JournalAccounts'] = $journal->getJournalHouseInfoId($fields, $id)['num']; //成交记录
......
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