feat(shop): product editor SKU variants UI
Wire ProductEditorDrawer to existing /shop/products/{id}/variants REST
for list/save. Support attribute text parsing, batch replace save, and
optional save-variants-only. Align save endpoint JSON body parsing with
controller helper.
This commit is contained in:
1 parent
ee3e3f912f
commit
387486f49d
2 files changed
+189
-6
No files matched your search
@@ -31,7 +31,9 @@ trait AKSRT_Admin_Shop_Controller_Variant_Export_Operations {
|
||||
return $this->error('商品不存在', 404);
|
||||
}
|
||||
|
||||
$params = $request->get_json_params() ?? [];
|
||||
$params = method_exists($this, 'get_json_params')
|
||||
? $this->get_json_params($request)
|
||||
: ($request->get_json_params() ?? []);
|
||||
$variants = $params['variants'] ?? [];
|
||||
if (!is_array($variants)) {
|
||||
return $this->error('变体数据格式错误');
|
||||
|
||||
Reference in new issue
Block a user