Procházet zdrojové kódy

处理tt的订单分类问题

lvhao před 19 hodinami
rodič
revize
2c93c5117a

+ 4 - 0
core/CoreApp/controllers/Customertt.php

@@ -1141,6 +1141,10 @@ class customertt extends Start_Controller {
 			//$pay = $this->pay->get_typeclass($post['pay']);
 			$yga = $post['shouldmoney'];
 			$post['budget'] = 0;
+
+			$post['cate_one'] = 1;
+			$post['cate_two'] =	0;
+
 			/**
 			if($pay)
 			{

+ 8 - 1
core/CoreApp/controllers/Fullordertt.php

@@ -1063,7 +1063,10 @@ class Fullordertt extends Start_Controller {
 					echo json_encode(array('msg'=>$lo_ret['msg'],'success'=>false));exit;
 				}
 			}
-			
+			$r = $this->logic_order->checkTtCate($post['cate_one'],$post['cate_two']);
+			if(!$r){
+				echo json_encode(array('msg'=>"请选择订单分类2的选项",'success'=>false));exit;
+			}
 			if($post['express'] == 24 && $post['sbpm'] != 'Hair Sample' && $post['sbpm'] != 'Human Hair Wigs' && $post['sbpm'] != 'Human Hair Goods' && $post['type'] != 34)//$post['express'] == 3 || 
 			{
 				echo json_encode(array('msg'=>'此快递方式必须选择Hair Sample/Human Hair Wigs/Human Hair Goods!','success'=>false));exit;
@@ -1795,6 +1798,10 @@ class Fullordertt extends Start_Controller {
 			{
 				echo json_encode(array('msg'=>'非英国无法选择CNE和GES!','success'=>false));exit;
 			}
+			$r = $this->logic_order->checkTtCate($post['cate_one'],$post['cate_two']);
+			if(!$r){
+				echo json_encode(array('msg'=>"请选择订单分类2的选项",'success'=>false));exit;
+			}
 
 			if($post['type'] != 5 && in_array($post['express'],[2,63,64,81,83,85,87]))
 			{

+ 14 - 0
core/CoreApp/models/Model_logic_order.php

@@ -821,6 +821,20 @@ class Model_logic_order extends Lin_Model {
         return ["code"=>1,"msg"=>"ok"];
     }
 
+    /**
+     * tt的订单分类的判断
+     */
+    public function checkTtCate($cate_one,$cate_two = '0'){
+        if(in_array($cate_one,['1','5'])){
+            return true;
+        }else{
+            if($cate_two > 0){
+                return true;
+            }else{
+                return false;
+            }
+        }
+    }
     protected function transferFpdata($fpdata_str){
         $fpdata = explode(';',rtrim($fpdata_str,';'));
         foreach ($fpdata as $k=>$v)