qifengquan 1 年之前
父节点
当前提交
9517229b6c
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      app/data/controller/api/business/Purchase.php

+ 3 - 2
app/data/controller/api/business/Purchase.php

@@ -60,8 +60,9 @@ class Purchase extends Controller
 //            'images.min:1'=>'图片必须',
 //            'images.min:1'=>'图片必须',
             'item.require'=>'商品参数不能为空',
             'item.require'=>'商品参数不能为空',
         ]);
         ]);
-        input('images')?$data['images']=input('images'):'';
-        if(isset($data['images'])){
+        $images = $this->request->post('images');
+
+        if(isset($images) && $images!=null){
             $data['images'] = json_decode($request['images'],true);
             $data['images'] = json_decode($request['images'],true);
             foreach ($data['images'] as $image){
             foreach ($data['images'] as $image){
                 $validate->failException()->check($image,[
                 $validate->failException()->check($image,[