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

更新 CardController.php 搜索调整

... ... @@ -60,10 +60,11 @@ class CardController extends RestBaseController
public function getList() {
$data = $this->request->param();
$per_page = $data['per_page'] ? : config('per_page');
$condition['c.is_recommend'] = 1;//后台推荐
//加分享过的名片
$ids = Db::name('card_log')->where(['user_id' => $this->userId])->column('card_id');
if($data['keyword']) {
$condition2['c.is_recommend'] = 1;//后台推荐
$condition2['c.name|company|tel'] = ['like','%'.$data['keyword'].'%'];
//搜索日志
$info = Db::name('search')->where(['keyword' => $data['keyword']])->find();
... ... @@ -73,6 +74,7 @@ class CardController extends RestBaseController
Db::name('search')->insert(['keyword' => $data['keyword'],'num' => 1]);
}
} else {
$condition['c.is_recommend'] = 1;//后台推荐
//加业务员自己的名片id
if ($this->userType == 3) {
$my_card = Db::name('card')->where(['user_id' => $this->userId])->value('id');
... ...