|
@@ -112,12 +112,12 @@ class Video extends Base
|
|
if($is_hot) $sel_where[] = ['is_hot','=',$is_hot];
|
|
if($is_hot) $sel_where[] = ['is_hot','=',$is_hot];
|
|
$where_str = 'id > 0';
|
|
$where_str = 'id > 0';
|
|
if($is_tj) {
|
|
if($is_tj) {
|
|
- $search_log = UserSearch::where('user_id',$this->user_id)->order('id desc')->limit(0,5)->column('title');
|
|
|
|
|
|
+ $search_log = UserSearch::where([['user_id','=',$this->user_id]])->order('id desc')->limit(0,10)->column('title');
|
|
$search_arr = [];
|
|
$search_arr = [];
|
|
foreach ($search_log as $t){
|
|
foreach ($search_log as $t){
|
|
$search_arr[] = " title like '".'%'.$t."%'" .' ';
|
|
$search_arr[] = " title like '".'%'.$t."%'" .' ';
|
|
}
|
|
}
|
|
- $where_str = !empty($search_arr) ? implode(' OR ',$search_arr) : '';
|
|
|
|
|
|
+ if(!empty($search_arr)) $where_str = implode(' OR ',$search_arr);
|
|
}
|
|
}
|
|
$order = 'is_top desc,sort desc ,id desc';
|
|
$order = 'is_top desc,sort desc ,id desc';
|
|
if($sort_type == 2)$order = 'id asc';
|
|
if($sort_type == 2)$order = 'id asc';
|