浏览代码

修改下单接口 提示文字套改成单

jun 3 月之前
父节点
当前提交
f03df061e0
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 5 5
      app/Http/Controllers/Api/Orders.php

+ 5 - 5
app/Http/Controllers/Api/Orders.php

@@ -129,7 +129,7 @@ class Orders extends Api{
 					// 判断限购数量
 					$total	 			= $buyNum[$buyInfo['product_id']] + $total;
 					// 如果超过数量
-					if( $total > $productInfo['quota'] ) return json_send(['code'=>'error','msg'=>'限购'.$productInfo['quota'].'-'.$productInfo['product_name'],'data'=>['error'=>'已超限=>'.($total - $productInfo['quota'])]]);
+					if( $total > $productInfo['quota'] ) return json_send(['code'=>'error','msg'=>'限购'.$productInfo['quota'].'-'.$productInfo['product_name'],'data'=>['error'=>'已超限=>'.($total - $productInfo['quota'])]]);
 				}
 			}
 			// 如果存在SKU
@@ -145,7 +145,7 @@ class Orders extends Api{
 					// 如果购买数量小于最低起购数量
 					if( $buyInfo['buy_num'] < $skuInfo['min_quota'] ){
 						// 如果超过数量
-						return json_send(['code'=>'error','msg'=>'最少购买'.$skuInfo['min_quota'].'-'.$productInfo['product_name'].'【'.$skuInfo['sku_attr_names'].'】','data'=>['error'=>'最少购买'.$skuInfo['min_quota'].'-'.$productInfo['product_name']]]);
+						return json_send(['code'=>'error','msg'=>'最少购买'.$skuInfo['min_quota'].'-'.$productInfo['product_name'].'【'.$skuInfo['sku_attr_names'].'】','data'=>['error'=>'最少购买'.$skuInfo['min_quota'].'-'.$productInfo['product_name']]]);
 					}
 				}
 				// 如果SKU限购
@@ -157,7 +157,7 @@ class Orders extends Api{
 						// 判断限购数量
 						$total	 			= $buyInfo['buy_num'] + $total;
 						// 如果超过数量
-						if( $total > $skuInfo['quota'] ) return json_send(['code'=>'error','msg'=>'限购'.$skuInfo['quota'].'-'.$productInfo['product_name'].'【'.$skuInfo['sku_attr_names'].'】','data'=>['error'=>'已超限=>'.($total - $skuInfo['quota'])]]);
+						if( $total > $skuInfo['quota'] ) return json_send(['code'=>'error','msg'=>'限购'.$skuInfo['quota'].'-'.$productInfo['product_name'].'【'.$skuInfo['sku_attr_names'].'】','data'=>['error'=>'已超限=>'.($total - $skuInfo['quota'])]]);
 					}
 				}
 				// 删除起购字段,避免影响后续产品最低起购的判定
@@ -172,7 +172,7 @@ class Orders extends Api{
 				// 如果购买数量小于最低起购数量
 				if( $buyNum[$buyInfo['product_id']] < $productInfo['min_quota'] ){
 					// 如果超过数量
-					return json_send(['code'=>'error','msg'=>'最少购买'.$productInfo['min_quota'].'套-'.$productInfo['product_name'],'data'=>['error'=>'最少购买'.$productInfo['min_quota'].'套-'.$productInfo['product_name']]]);
+					return json_send(['code'=>'error','msg'=>'最少购买'.$productInfo['min_quota'].'单-'.$productInfo['product_name'],'data'=>['error'=>'最少购买'.$productInfo['min_quota'].'单-'.$productInfo['product_name']]]);
 				}
 			}
 			// 需要扣除的库存
@@ -732,7 +732,7 @@ class Orders extends Api{
                     // 判断限购数量
                     $total	 			= $buyInfo['buy_num'] + $total;
                     // 如果超过数量
-                    if( $total > $productInfo['quota'] ) return json_send(['code'=>'error','msg'=>'限购'.$productInfo['quota'].'-'.$productInfo['product_name'],'data'=>['error'=>'已超限=>'.($total - $productInfo['quota'])]]);
+                    if( $total > $productInfo['quota'] ) return json_send(['code'=>'error','msg'=>'限购'.$productInfo['quota'].'-'.$productInfo['product_name'],'data'=>['error'=>'已超限=>'.($total - $productInfo['quota'])]]);
                 }
             }
             // 需要扣除的库存