| xqd
@@ -108,22 +108,23 @@ class AlbumPosterController extends Controller
|
|
|
|
|
|
public function createPoster(Request $request)
|
|
|
{
|
|
|
- /* $userAuth = Auth('api')->user();
|
|
|
+ $userAuth = Auth('api')->user();
|
|
|
if (!$userAuth) {
|
|
|
return $this->error(ErrorCode::CLIENT_WRONG_PARAMS, '未登录!');
|
|
|
}
|
|
|
$validator = Validator::make($request->all(), [
|
|
|
'store_id' => 'required',
|
|
|
+ 'store_id' => 'required',
|
|
|
], [
|
|
|
'store_id.required' => '店铺信息未知',
|
|
|
]);
|
|
|
if ($validator->fails()) {
|
|
|
return $this->validatorError($validator->messages()->all(), ErrorCode::CLIENT_WRONG_PARAMS, '');
|
|
|
}
|
|
|
- $store_id = $request->input('store_id');*/
|
|
|
+ $data = $request->input('store_id');
|
|
|
$editor = Grafika::createEditor();
|
|
|
- $editor->open($image, public_path() . '/base/poster/img/poster_canvas.png');
|
|
|
-
|
|
|
+ $editor->open($image_poster, public_path() . '/base/poster/img/poster_canvas.png');
|
|
|
+ $editor->open($image_poduct, public_path() . '');
|
|
|
}
|
|
|
|
|
|
private function curlGet($url)
|