Commit df398ea1 authored by zfc's avatar zfc

跟进列表3

parent 87ae41ff
......@@ -387,7 +387,8 @@ class Auth extends Basic
$data = input('post.');
if($table->repetition('name',$data['name'])&& empty($id)){
if($table->repetition('name',$data['name'])&& empty($data['id'])){
return $this->response(100, 'url存在重复值');
}
......
......@@ -88,22 +88,30 @@ class Remark extends Basic
}
/**
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function contentList(){
$table= new Remarks;
$data['status'] = 200;
$data['msg'] = '';
$params = $this->request->param();
$applyid=$params['apply_id'];
if($applyid){
$applyId=$params['apply_id'];
if($applyId){
//条件
$field='id,apply_id,shopuser_id,content,house_id,created,admin,';
$where="isinstatus=1 and content like '%【跟进】%' and apply_id='{$applyid}'";
$where="isinstatus=1 and content like '%【跟进】%' and apply_id='{$applyId}'";
$data['list'] = $table->field($field)->where($where)->select();
}else{
return $this->response(200,'失败,没有apply_id',$data);
return $this->response(100,'失败,没有apply_id',$data);
}
return $this->response(200,'成功',$data);
}
......
......@@ -70,6 +70,22 @@ class Remarks extends Model
->page($p)
->select();
//echo $this->getLastSql();
if(!$data){
return $data;
}
/****************************处理客户电话****************************************/
foreach($data as $k=> $li) {
$phonestr = htmlentities(trim($li["phpone"]));
$phonearr = explode('|', $phonestr);
$customer_phone = '';
foreach ($phonearr as $v) {
if ($v) {
$customer_phone .= substr_replace($v, '****', 3, 4) . '|';
}
}
$data[$k]['phpone'] = trim($customer_phone, '|');
}
/****************************处理客户电话****************************************/
return $data;
}
......
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