diff --git a/app/api/controller/IndexController.php b/app/api/controller/IndexController.php index 0b2652957..86b30def6 100644 --- a/app/api/controller/IndexController.php +++ b/app/api/controller/IndexController.php @@ -53,7 +53,7 @@ use PhpOffice\PhpWord\Style\Font; class IndexController extends BaseApiController { - public $notNeedLogin = ['index', 'app_update', 'express_list', 'province', 'city', 'area', 'street', 'village', 'brigade', 'config', 'push', 'purchase_product_offer','wps_product']; + public $notNeedLogin = ['index', 'app_update', 'express_list', 'province', 'city', 'area', 'street', 'village', 'brigade', 'config', 'push', 'purchase_product_offer']; public function index() { @@ -285,11 +285,7 @@ class IndexController extends BaseApiController public function wps_product() { $data = $this->request->post(); - if ($data) { - $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 = []; @@ -310,7 +306,6 @@ class IndexController extends BaseApiController Db::name('wps_product')->insert($arr); } } - return $this->success('ok'); } else { return $this->fail('时间不能为空'); }