|
@@ -132,8 +132,8 @@ class Tvindex extends Api
|
|
|
}
|
|
|
|
|
|
$info['image'] = one_domain_image($info['image']);
|
|
|
- $info['is_collection'] = Db::name('video_collection')->where(['user_id' => $this->auth->id, 'video_id' => $id])->count('id');
|
|
|
- $info['is_good'] = Db::name('video_good')->where(['user_id' => $this->auth->id, 'video_id' => $id])->count('id');
|
|
|
+ $info['is_collection'] = Db::name('video_collection')->where(['user_id' => $this->auth->id, 'video_id' => $info['id']])->count('id');
|
|
|
+ $info['is_good'] = Db::name('video_good')->where(['user_id' => $this->auth->id, 'video_id' => $info['id']])->count('id');
|
|
|
|
|
|
//剧集列表
|
|
|
$juji = [];
|
|
@@ -161,7 +161,7 @@ class Tvindex extends Api
|
|
|
if($this->auth->isLogin()){
|
|
|
$view_map = [
|
|
|
'user_id' => $this->auth->id,
|
|
|
- 'video_id' => $id,
|
|
|
+ 'video_id' => $info['id'],
|
|
|
];
|
|
|
$check_view = Db::name('video_view')->where($view_map)->find();
|
|
|
if($check_view){
|
|
@@ -174,7 +174,7 @@ class Tvindex extends Api
|
|
|
}
|
|
|
|
|
|
//记录pv,uv
|
|
|
- $this->video_pvuv($id);
|
|
|
+ $this->video_pvuv($info['id']);
|
|
|
|
|
|
//
|
|
|
$result = [
|
|
@@ -205,14 +205,14 @@ class Tvindex extends Api
|
|
|
}
|
|
|
|
|
|
$info['image'] = one_domain_image($info['image']);
|
|
|
- $info['is_collection'] = Db::name('video_collection')->where(['user_id' => $this->auth->id, 'video_id' => $id])->count('id');
|
|
|
- $info['is_good'] = Db::name('video_good')->where(['user_id' => $this->auth->id, 'video_id' => $id])->count('id');
|
|
|
+ $info['is_collection'] = Db::name('video_collection')->where(['user_id' => $this->auth->id, 'video_id' => $info['id']])->count('id');
|
|
|
+ $info['is_good'] = Db::name('video_good')->where(['user_id' => $this->auth->id, 'video_id' => $info['id']])->count('id');
|
|
|
|
|
|
//记录浏览历史,给浏览历史列表用的,即时的
|
|
|
if($this->auth->isLogin()){
|
|
|
$view_map = [
|
|
|
'user_id' => $this->auth->id,
|
|
|
- 'video_id' => $id,
|
|
|
+ 'video_id' => $info['id'],
|
|
|
];
|
|
|
$check_view = Db::name('video_view')->where($view_map)->find();
|
|
|
if($check_view){
|
|
@@ -225,7 +225,7 @@ class Tvindex extends Api
|
|
|
}
|
|
|
|
|
|
//记录pv,uv
|
|
|
- $this->video_pvuv($id);
|
|
|
+ $this->video_pvuv($info['id']);
|
|
|
|
|
|
//
|
|
|
$result = [
|