Update
parent
8f3d3929c9
commit
b4dae3373b
|
|
@ -7,11 +7,13 @@ use App\Endpoint\Api\Http\Resources\ProduckSkuResource;
|
|||
use App\Endpoint\Api\Http\Resources\ProductFeatureResource;
|
||||
use App\Endpoint\Api\Http\Resources\ProductSkuTinyResource;
|
||||
use App\Events\ProductSkuViewed;
|
||||
use App\Exceptions\BizException;
|
||||
use App\Helpers\Paginator;
|
||||
use App\Models\ProductSku;
|
||||
use App\Models\ProductSkuFavorite;
|
||||
use App\Models\ProductSpu;
|
||||
use EasyWeChat\Factory as EasyWeChat;
|
||||
use EasyWeChat\Kernel\Http\StreamResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class ProductSkuController extends Controller
|
||||
|
|
@ -174,9 +176,17 @@ class ProductSkuController extends Controller
|
|||
'code' => $user->userInfo->code,
|
||||
]);
|
||||
|
||||
return $app->app_code->getUnlimit($scene, [
|
||||
$response = $app->app_code->getUnlimit($scene, [
|
||||
'page' => 'pages/index/index',
|
||||
'width' => $request->query('width', 200),
|
||||
]);
|
||||
|
||||
if ($response instanceof StreamResponse) {
|
||||
return response()->json([
|
||||
'image' => 'data:image/png;base64,'.base64_encode($response->getBody()),
|
||||
]);
|
||||
}
|
||||
|
||||
throw new BizException('分享失败');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue