作者 lishaoshuai
1 个管道 的构建 通过 耗费 0 秒

更新 CardController.php

... ... @@ -58,13 +58,14 @@ class CardController extends RestBaseController
* @data id:名片id id avatar:头像 name:姓名 position:职称 tel:电话 home_tel:座机 email:邮箱 company:公司
*/
public function getList() {
$condition = '';
$data = $this->request->param();
$per_page = $data['per_page'] ? : config('per_page');
//加分享过的名片
$ids = Db::name('card_log')->where(['user_id' => $this->userId])->column('card_id');
if($data['keyword']) {
$condition = '';
$condition2['c.is_recommend'] = 1;//后台推荐
$condition2['c.name|company|tel'] = ['like','%'.$data['keyword'].'%'];
//搜索日志
... ... @@ -75,7 +76,7 @@ class CardController extends RestBaseController
Db::name('search')->insert(['keyword' => $data['keyword'],'num' => 1]);
}
} else {
$condition['c.is_recommend'] = 1;//后台推荐
$condition['c.is_recommend'] = 1;//后台推荐
//加业务员自己的名片id
if ($this->userType == 3) {
$my_card = Db::name('card')->where(['user_id' => $this->userId])->value('id');
... ...