|
@@ -17,7 +17,20 @@ class Family extends Api
|
|
|
$type = input('type',1);
|
|
|
|
|
|
$list = Db::name('family')->where('user_id',$this->auth->id)->where('type',$type)->order('id desc')->autopage()->select();
|
|
|
- $list = list_domain_image($list,['media_file']);
|
|
|
+ if(!empty($list)){
|
|
|
+ foreach($list as $key => &$val){
|
|
|
+ $val['media_file'] = localpath_to_netpath($val['media_file']);
|
|
|
+
|
|
|
+ if($val['type'] == 2){
|
|
|
+ $images_url = explode('.', $val['media_file']);
|
|
|
+ unset($images_url[count($images_url) - 1]);
|
|
|
+ $val['thumb_image'] = join('.', $images_url) . '_0.jpg';
|
|
|
+ }else{
|
|
|
+ $val['thumb_image'] = $val['media_file'] . '?imageView2/1/w/100/h/100/q/85';
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
$this->success(1,$list);
|
|
|
}
|