Commit 37a2e383 authored by hujun's avatar hujun

app客户修改

parent a0b18ef9
......@@ -254,11 +254,11 @@ class Broker extends Basic
exit;*/
//dump($UPhoneFollowPp_res);
foreach($UPhoneFollowPp_res as $k=>$v){
$table= new Agents();
$table= new AAgents();
$Agents_res =$table->Agents_res($v['agent_id']);
//dump($Agents_res);
$UPhoneFollowPp_res[$k]['agentinfo']=$Agents_res?$Agents_res['agentshopname'].'-'.$Agents_res['realname']:'未知';
$UPhoneFollowPp_res[$k]['user_pic']=ADMIN_URL_TL.'user_header/'.$Agents_res['head_portrait'];
$UPhoneFollowPp_res[$k]['agentinfo']=$Agents_res?$Agents_res['store_name'].'-'.$Agents_res['name']:'未知';
$UPhoneFollowPp_res[$k]['user_pic']=AGENTHEADERIMGURL.$Agents_res['img'];
$UPhoneFollowPp_res[$k]['label']='';
//dump($v['labels_id']);
//电话跟进标签
......@@ -277,10 +277,10 @@ class Broker extends Basic
$user_res =$user->useraction_search_user_res($user_id);
//dump($user_res);
$user_res['user_pic']=HEADERIMGURL.$user_res['user_pic'];
$table= new Agents();
$table= new AAgents();
$Agents_res =$table->Agents_res($v['agent_id']);
//dump($Agents_res);
$user_res['agentinfo']=$Agents_res?$Agents_res['realname'].'/'.$Agents_res['phone']:'未知';
$user_res['agentinfo']=$Agents_res?$Agents_res['name'].'/'.$Agents_res['phone']:'未知';
$records = new GOperatingRecords();
$records_result = $records->user_history($user_id);
......
......@@ -3,6 +3,7 @@
namespace app\api_broker\controller;
use app\api_broker\extend\Basic;
use app\model\AAgents;
use app\model\Agents;
use app\model\ULabels;
use app\model\Users;
......@@ -304,13 +305,13 @@ class Client extends Basic
foreach($user_res as $k=>$v)
{
$user_res[$k]['time']=tranTime($v['create_time']);
$table= new Agents();
$table= new AAgents();
$Agents_res = $table->Agents_res($v['agent_id']);
//dump($Agents_res);
$user_res[$k]['agentinfo'] =$Agents_res ? $Agents_res['agentshopname'].'-'.$Agents_res['realname'] : '未知';
$user_res[$k]['agentshopname'] =$Agents_res['agentshopname'] ? $Agents_res['agentshopname'] : '';
$user_res[$k]['realname'] =$Agents_res['realname'] ? $Agents_res['realname'] : '';
$user_res[$k]['user_pic'] =ADMIN_URL_TL.'user_header/'.$Agents_res['head_portrait'];
$user_res[$k]['agentinfo'] =$Agents_res ? $Agents_res['name'].'-'.$Agents_res['name'] : '未知';
$user_res[$k]['agentshopname'] =$Agents_res['store_name'] ? $Agents_res['store_name'] : '';
$user_res[$k]['realname'] =$Agents_res['name'] ? $Agents_res['name'] : '';
$user_res[$k]['user_pic'] =AGENTHEADERIMGURL.$Agents_res['img'];
}
}
......
......@@ -9,6 +9,7 @@
namespace app\index\controller;
use app\index\extend\Basic;
use app\model\AAgents;
use app\model\Agents;
use app\model\GOperatingRecords;
use app\model\Remarks;
......@@ -155,11 +156,11 @@ class Remark extends Basic
exit;*/
//dump($UPhoneFollowPp_res);
foreach($UPhoneFollowPp_res as $k=>$v){
$table= new Agents();
$table= new AAgents();
$Agents_res =$table->Agents_res($v['agent_id']);
//dump($Agents_res);
$UPhoneFollowPp_res[$k]['agentinfo']=$Agents_res?$Agents_res['agentshopname'].'-'.$Agents_res['realname']:'未知';
$UPhoneFollowPp_res[$k]['user_pic']=ADMIN_URL_TL.'user_header/'.$Agents_res['head_portrait'];
$UPhoneFollowPp_res[$k]['agentinfo']=$Agents_res?$Agents_res['store_name'].'-'.$Agents_res['name']:'未知';
$UPhoneFollowPp_res[$k]['user_pic']=AGENTHEADERIMGURL.$Agents_res['img'];
$UPhoneFollowPp_res[$k]['label']='';
//dump($v['labels_id']);
//电话跟进标签
......@@ -178,10 +179,10 @@ class Remark extends Basic
$user_res =$user->useraction_search_user_res($user_id);
//dump($user_res);
$user_res['user_pic']=HEADERIMGURL.$user_res['user_pic'];
$table= new Agents();
$table= new AAgents();
$Agents_res =$table->Agents_res($user_res['agent_id']);
//dump($Agents_res);
$user_res['agentinfo']=$Agents_res?$Agents_res['realname'].'/'.$Agents_res['phone']:'未知';
$user_res['agentinfo']=$Agents_res?$Agents_res['name'].'/'.$Agents_res['phone']:'未知';
$records = new GOperatingRecords();
$records_result = $records->user_history($user_id);
......
......@@ -628,4 +628,17 @@ class AAgents extends BaseModel
->where('level','in','20,30')
->find();
}
/**
* @param $agent_id
* @return mixed
*/
public function Agents_res($agent_id)
{
return db('a_agents')->alias('a')
->field('name,phone,img,store_name')
->join('a_store b','a.store_id=b.id','left')
->where('a.id', $agent_id)
->find();
}
}
\ No newline at end of file
......@@ -268,7 +268,7 @@ class Users extends Model
{
return db('u_users')
->where('id', $user_id)
->field('id as user_id,agent_id,sex,user_nick,user_pic,user_phone,create_time')
->field('id as user_id,agent_id,sex,user_nick,user_pic,user_status,user_phone,create_time')
->find();
}
......
......@@ -270,11 +270,11 @@ Route::group('api', [
//Version
'getVersionNo' => [ 'api/Version/getVersionNo', [ 'method' => 'post' ] ],
'agentUserTb' => [ 'api_broker/Client/agentUserTb', [ 'method' => 'get' ] ],//客户列表
'agentUserFollow' => [ 'api_broker/Client/agentUserFollow', [ 'method' => 'get' ] ],//客户列表
'agentSearch' => [ 'api_broker/Client/agentSearch', [ 'method' => 'get' ] ],//经纪人搜索
'getULabelsListApp' => [ 'api_broker/Client/getULabelsListApp', [ 'method' => 'get' ] ],//客户标签
'all_user' => [ 'api_broker/Client/all_user', [ 'method' => 'post|get' ] ],//全部客户 朱伟
// 'agentUserTb' => [ 'api_broker/Client/agentUserTb', [ 'method' => 'get' ] ],//客户列表
// 'agentUserFollow' => [ 'api_broker/Client/agentUserFollow', [ 'method' => 'get' ] ],//客户列表
// 'agentSearch' => [ 'api_broker/Client/agentSearch', [ 'method' => 'get' ] ],//经纪人搜索
// 'getULabelsListApp' => [ 'api_broker/Client/getULabelsListApp', [ 'method' => 'get' ] ],//客户标签
// 'all_user' => [ 'api_broker/Client/all_user', [ 'method' => 'post|get' ] ],//全部客户 朱伟
......
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