|
@@ -2,7 +2,7 @@
|
2
|
2
|
|
3
|
3
|
namespace App\Models;
|
4
|
4
|
|
5
|
|
-use App\Models\Record;
|
|
5
|
+use App\Models\Vest;
|
6
|
6
|
use Illuminate\Database\Eloquent\Model;
|
7
|
7
|
use Illuminate\Support\Facades\DB;
|
8
|
8
|
|
|
@@ -21,6 +21,11 @@ class VestPublish extends Model
|
21
|
21
|
if (count($publish_info)==1){
|
22
|
22
|
//判断是图集还是视频
|
23
|
23
|
if ($publish_info[0]['img_or_video']==2){
|
|
24
|
+ //反串行化publish_info
|
|
25
|
+ $publish_info[0]['publish_info']=unserialize($publish_info[0]['publish_info']);
|
|
26
|
+ $publish_info[0]['publish_info'][0]=$http.$publish_info[0]['publish_info'][0];
|
|
27
|
+ //马甲头像
|
|
28
|
+ $publish_info[0]['img']=Vest::get_img_by_id($publish_info[0]['vest_id']);
|
24
|
29
|
//视频个数
|
25
|
30
|
$publish_info[0]['counts']=1;
|
26
|
31
|
//点赞
|
|
@@ -33,6 +38,8 @@ class VestPublish extends Model
|
33
|
38
|
if (count($allimgs)==1){
|
34
|
39
|
unset($publish_info[0]['publish_info']);
|
35
|
40
|
$publish_info[0]['publish_info'][]=$http.$allimgs[0];
|
|
41
|
+ //马甲头像
|
|
42
|
+ $publish_info[0]['img']=Vest::get_img_by_id($publish_info[0]['vest_id']);
|
36
|
43
|
//图集个数
|
37
|
44
|
$publish_info[0]['counts']=1;
|
38
|
45
|
//点赞
|
|
@@ -42,6 +49,8 @@ class VestPublish extends Model
|
42
|
49
|
}else{
|
43
|
50
|
unset($publish_info[0]['publish_info']);
|
44
|
51
|
$publish_info[0]['publish_info']=self::add_http($allimgs);
|
|
52
|
+ //马甲头像
|
|
53
|
+ $publish_info[0]['img']=Vest::get_img_by_id($publish_info[0]['vest_id']);
|
45
|
54
|
//图集个数
|
46
|
55
|
$publish_info[0]['counts']=count($publish_info[0]['publish_info']);
|
47
|
56
|
//点赞
|
|
@@ -55,6 +64,11 @@ class VestPublish extends Model
|
55
|
64
|
foreach ($publish_info as $key=>$info){
|
56
|
65
|
//判断是图集还是视频
|
57
|
66
|
if ($info['img_or_video']==2){
|
|
67
|
+ //反串行化publish_info
|
|
68
|
+ $info['publish_info']=unserialize($info['publish_info']);
|
|
69
|
+ $info['publish_info'][0]=$http.$info['publish_info'][0];
|
|
70
|
+ //马甲头像
|
|
71
|
+ $info['img']=Vest::get_img_by_id($info['vest_id']);
|
58
|
72
|
//视频个数
|
59
|
73
|
$info['counts']=1;
|
60
|
74
|
//点赞
|
|
@@ -69,6 +83,8 @@ class VestPublish extends Model
|
69
|
83
|
$http=config('constants.HOST_URL');
|
70
|
84
|
unset($info['publish_info']);
|
71
|
85
|
$info['publish_info'][]=$http.$allimgs[0];
|
|
86
|
+ //马甲头像
|
|
87
|
+ $info['img']=Vest::get_img_by_id($info['vest_id']);
|
72
|
88
|
//图集个数
|
73
|
89
|
$info['counts']=1;
|
74
|
90
|
//点赞
|
|
@@ -79,6 +95,8 @@ class VestPublish extends Model
|
79
|
95
|
}else{
|
80
|
96
|
unset($info['publish_info']);
|
81
|
97
|
$info['publish_info']=self::add_http($allimgs);
|
|
98
|
+ //马甲头像
|
|
99
|
+ $info['img']=Vest::get_img_by_id($info['vest_id']);
|
82
|
100
|
//图集个数
|
83
|
101
|
$info['counts']=count($info['publish_info']);
|
84
|
102
|
//点赞
|