This commit is contained in:
luofei 2023-05-19 18:23:07 +08:00
commit 3e1d4ace81
2 changed files with 12 additions and 0 deletions

View File

@ -28,6 +28,17 @@ class StoreMicro extends BaseController
return app('json')->success($store_product);
}
public function ProductDetails($id){
$find=Db::name('store_product')->where('product_id',$id)
->withAttr('attr_value',function ($value,$data){
return Db::name('store_product_attr_value')->where('product_id',$data['product_id'])->select();
})
->find();
return app('json')->success(['list'=>$find]);
}
public function eadtProduct(){
$product_id = $this->request->param('id', 0);
if ($product_id==0) return app('json')->fail('商品id不能为空');

View File

@ -26,6 +26,7 @@ Route::group('api/', function () {
Route::group('micro', function () {
Route::get('seach_bar_code', '/seach_bar_code');
Route::get('product_details', '/ProductDetails');
Route::post('eadt_product', '/eadtProduct');
})->prefix('api.store.product.StoreMicro');