diff --git a/app/api/controller/IndexController.php b/app/api/controller/IndexController.php index 3b72c497a..0b2652957 100644 --- a/app/api/controller/IndexController.php +++ b/app/api/controller/IndexController.php @@ -285,10 +285,11 @@ class IndexController extends BaseApiController public function wps_product() { $data = $this->request->post(); - return $this->success('ok',$data); - + if ($data) { - $data=json_decode($data,true); + $keys = array_keys($data); // 获取所有键 + $firstKey = $keys[0]; // 获取第一个键 + $data=json_decode($firstKey,true); if ($data['product_id'] > 0) { $find = Db::name('wps_product')->where('product_id', $data['product_id'])->find(); $arr = [];