Commit 7a8bf575 authored by hujun's avatar hujun

edit

parent 25baa234
...@@ -6,6 +6,7 @@ use app\model\Agents; ...@@ -6,6 +6,7 @@ use app\model\Agents;
use app\model\Evaluate; use app\model\Evaluate;
use app\model\EvaluateSign; use app\model\EvaluateSign;
use app\model\JournalAccounts; use app\model\JournalAccounts;
use think\Db;
/** /**
* Description of Agents * Description of Agents
* *
...@@ -134,7 +135,7 @@ class Broker extends Basic{ ...@@ -134,7 +135,7 @@ class Broker extends Basic{
//评价列表信息 //评价列表信息
$result['evaluate'] = $evalutate->getEvaluate($pageNo, $pageSize, 'id desc', $fields_evaluate, '', $params['agent_id']); $result['evaluate'] = $evalutate->getEvaluate($pageNo, $pageSize, 'id desc', $fields_evaluate, '', $params['agent_id']);
//成交记录 //成交记录
$result['journalAccounts'] = $journal->getJournalHouseInfo($pageNo, $pageSize, 'j.id desc', $fields, 'j.transaction_status = 3', $params['agent_id']); $result['journalAccounts'] = $journal->getJournalHouseInfo($pageNo, $pageSize, 'j.id desc', '', 'j.transaction_status = 3', $params['agent_id']);
$data['data'] = $result; $data['data'] = $result;
break; break;
case 1: case 1:
...@@ -158,4 +159,26 @@ class Broker extends Basic{ ...@@ -158,4 +159,26 @@ class Broker extends Basic{
return $this->response($data['status'], $data['msg'], $data['data']); return $this->response($data['status'], $data['msg'], $data['data']);
} }
/**
* 经纪人详情
*
* @return type
*/
public function brokerDetail() {
$data['status'] = 200;
$data['data'] = '';
$data['msg'] = '';
if ($this->params['id']) {
$agents = new Agents();
$data['data'] = $agents->agentsDetail($this->params['id']);
} else {
$data['status'] = 101;
$data['msg'] = 'agent_id is null';
}
return $this->response($data['status'], $data['msg'], $data['data']);
}
} }
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
namespace app\model; namespace app\model;
use think\Model; use think\Model;
use think\Db;
class Agents extends Model class Agents extends Model
{ {
...@@ -50,4 +51,22 @@ class Agents extends Model ...@@ -50,4 +51,22 @@ class Agents extends Model
return $data; return $data;
} }
/**
* 经纪人详情
*
* @param type $id
* @return boolean
*/
public function agentsDetail($id) {
if ($id) {
$result = $this->field('id,realname,created,sub_shopname,head_portrait')->where('id',$id)->find();
$result['head_portrait'] = 'user_header/'.$result['head_portrait'];
$result['evaluate_grade'] = Db::table('');
} else {
$data = false;
}
return $result;
}
} }
...@@ -54,6 +54,7 @@ Route::group('api',[ ...@@ -54,6 +54,7 @@ Route::group('api',[
//get broker //get broker
'getBroker'=> ['api/broker/index',['method'=>'get']], //获取当前商铺或街铺的经纪人 'getBroker'=> ['api/broker/index',['method'=>'get']], //获取当前商铺或街铺的经纪人
'commentAndDeal'=> ['api/broker/commentAndDeal',['method'=>'get']], //获取当前经纪人的评价和交易列表 'commentAndDeal'=> ['api/broker/commentAndDeal',['method'=>'get']], //获取当前经纪人的评价和交易列表
'brokerDetail/:id' => ['api/broker/brokerDetail',['method'=>'get']], //经纪人详情
//post broker //post broker
'appraiser'=> ['api/broker/appraiser',['method'=>'post']], //评价经纪人 'appraiser'=> ['api/broker/appraiser',['method'=>'post']], //评价经纪人
......
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