浏览代码

提交数据

lvhao 2 月之前
父节点
当前提交
c51f43a7cc
共有 1 个文件被更改,包括 8 次插入7 次删除
  1. 8 7
      core/CoreApp/models/Model_logic_order.php

+ 8 - 7
core/CoreApp/models/Model_logic_order.php

@@ -255,28 +255,29 @@ class Model_logic_order extends Lin_Model {
 
     //根据提交信息 校验一下客户下单是否正确
     public function checkEditCustomer($post){
-        if($post['type'] != 5 && in_array($post['express'],[2,63,64]))
+        if($post['express'] == 2 && strlen($post['zipcode']) != 5)//如果usps 邮编不是5位
         {
             return [
                 'code'=>-1,
-                "msg"=>"此快递方式必须从美仓发货!"
+                "msg"=>"USPS-USA的邮编需按5位数格式提交!"
             ];
         }
-
-        if($post['type'] == 5 && !in_array($post['express'],[2,63,64]))
+        if($post['type'] != 5 && in_array($post['express'],[2,63,64]))
         {
             return [
                 'code'=>-1,
-                "msg"=>"此快递方式不能美仓发货!"
+                "msg"=>"此快递方式必须从美仓发货!"
             ];
         }
-        if($post['express'] == 2 && strlen($post['zipcode']) != 5)//如果usps 邮编不是5位
+
+        if($post['type'] == 5 && !in_array($post['express'],[2,63,64]))
         {
             return [
                 'code'=>-1,
-                "msg"=>"USPS-USA的邮编需按5位数格式提交!"
+                "msg"=>"此快递方式不能美仓发货!"
             ];
         }
+       
 
         return [
             'code'=>1,