| xqd
@@ -47,6 +47,7 @@ class ManufacturerController extends Controller
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+ dd($this->getStoreId());
|
|
|
$data = AlbumManufacturerModel::where('store_id', $this->getStoreId())->first();
|
|
|
if ($data) {
|
|
|
$data['banner'] = json_decode($data['banner'], true);
|
| xqd
@@ -204,17 +205,16 @@ class ManufacturerController extends Controller
|
|
|
// 制作文件名
|
|
|
$ex = $video->getClientOriginalExtension();
|
|
|
$key = time() . rand(10000, 99999999) . '.' . $ex;
|
|
|
-
|
|
|
//阿里 OSS 文件上传
|
|
|
- $result = OSS::publicUpload(config('alioss.BucketName'),$key, $videoPath);
|
|
|
+ $result = OSS::publicUpload(config('alioss.BucketName'), $key, $videoPath);
|
|
|
if ($result) {
|
|
|
$data['name'] = $video->getClientOriginalName();
|
|
|
$data['type'] = 1;
|
|
|
$data['store_id'] = $this->getStoreId();
|
|
|
$data['oss_key'] = $key;
|
|
|
- $data['url'] = config('alioss.FileUrl').$key;
|
|
|
+ $data['url'] = config('alioss.FileUrl') . $key;
|
|
|
$video = AgentBannerModel::create($data);
|
|
|
- if(!$video){
|
|
|
+ if (!$video) {
|
|
|
return back()->withErrors('上传视频失败..');
|
|
|
}
|
|
|
return $this->showMessage('上传成功');
|