Browse Source

根据梦体要求修改退货的二级分类必选

lvhao 6 tháng trước cách đây
mục cha
commit
68d1a82d47
1 tập tin đã thay đổi với 6 bổ sung1 xóa
  1. 6 1
      core/CoreApp/controllers/Returngoods.php

+ 6 - 1
core/CoreApp/controllers/Returngoods.php

@@ -144,9 +144,14 @@ class Returngoods extends Start_Controller {
                 echo json_encode(array('msg'=>'店铺信息异常!','success'=>false));exit;
             }
             if(empty($post['cate_one'])){
-                echo json_encode(array('msg'=>'一级分类缺失!请填写','success'=>false));exit;
+                echo json_encode(array('msg'=>'原因一级分类缺失!请填写','success'=>false));exit;
 
             }
+            if(in_array($post['cate_one'],[1,3])){
+                if(empty($post['cate_two'])){
+                    echo json_encode(array('msg'=>'原因二级分类缺失!请填写','success'=>false));exit;
+                }
+            }
             $time = date("Y-m-d H:i:s",time());
             $insert_data  =[
                 "number"=>$post['number'],