李帅

1. 众妙接口新增一言内容

...@@ -26,7 +26,7 @@ class Immerse extends Model ...@@ -26,7 +26,7 @@ class Immerse extends Model
26 $str = Str::of($url)->replace('/usr/local/nginx/html/OnePoem/storage/app/public/', ''); 26 $str = Str::of($url)->replace('/usr/local/nginx/html/OnePoem/storage/app/public/', '');
27 return Storage::disk('public')->url($str); 27 return Storage::disk('public')->url($str);
28 } else { 28 } else {
29 - return $url; 29 + return Storage::disk('public')->url($url);
30 } 30 }
31 } 31 }
32 32
...@@ -36,7 +36,17 @@ class Immerse extends Model ...@@ -36,7 +36,17 @@ class Immerse extends Model
36 $str = Str::of($url)->replace('/usr/local/nginx/html/OnePoem/storage/app/public/', ''); 36 $str = Str::of($url)->replace('/usr/local/nginx/html/OnePoem/storage/app/public/', '');
37 return Storage::disk('public')->url($str); 37 return Storage::disk('public')->url($str);
38 } else { 38 } else {
39 - return $url; 39 + return Storage::disk('public')->url($url);
40 + }
41 + }
42 +
43 + public function getBgmAttribute($url)
44 + {
45 + if (Str::contains($url, '/storage/app/public/')) {
46 + $str = Str::of($url)->replace('/usr/local/nginx/html/OnePoem/storage/app/public/', '');
47 + return Storage::disk('public')->url($str);
48 + } else {
49 + return Storage::disk('public')->url($url);
40 } 50 }
41 } 51 }
42 } 52 }
......