正在显示
1 个修改的文件
包含
6 行增加
和
7 行删除
@@ -406,22 +406,22 @@ class Api | @@ -406,22 +406,22 @@ class Api | ||
406 | ->field('p.stock,s.product_id,s.id,p.avatar,p.name,c.class_con,l.logo,s.buy_num') | 406 | ->field('p.stock,s.product_id,s.id,p.avatar,p.name,c.class_con,l.logo,s.buy_num') |
407 | ->select(); | 407 | ->select(); |
408 | $tidu = Db::name('product')->where(['id' => $product_id])->find(); | 408 | $tidu = Db::name('product')->where(['id' => $product_id])->find(); |
409 | - if ($buy_num < $tidu['tidu1'] + 1 & $buy_num > 0) { | 409 | + if ($buy_num < $tidu['tidu1'] & $buy_num > 0) { |
410 | $price = $buy_num * $tidu['price']; | 410 | $price = $buy_num * $tidu['price']; |
411 | } | 411 | } |
412 | - if ($buy_num > $tidu['tidu1'] & $buy_num < $tidu['tidu2'] + 1) { | 412 | + if ($buy_num > $tidu['tidu1'] - 1 & $buy_num < $tidu['tidu2']) { |
413 | $price = $buy_num * $tidu['price1']; | 413 | $price = $buy_num * $tidu['price1']; |
414 | } | 414 | } |
415 | - if ($buy_num > $tidu['tidu2'] & $buy_num < $tidu['tidu3'] + 1) { | 415 | + if ($buy_num > $tidu['tidu2'] - 1 & $buy_num < $tidu['tidu3']) { |
416 | $price = $buy_num * $tidu['price2']; | 416 | $price = $buy_num * $tidu['price2']; |
417 | } | 417 | } |
418 | - if ($buy_num > $tidu['tidu3'] & $buy_num < $tidu['tidu4'] + 1) { | 418 | + if ($buy_num > $tidu['tidu3'] - 1 & $buy_num < $tidu['tidu4']) { |
419 | $price = $buy_num * $tidu['price3']; | 419 | $price = $buy_num * $tidu['price3']; |
420 | } | 420 | } |
421 | - if ($buy_num > $tidu['tidu4'] & $buy_num < $tidu['tidu5'] + 1) { | 421 | + if ($buy_num > $tidu['tidu4'] - 1 & $buy_num < $tidu['tidu5']) { |
422 | $price = $buy_num * $tidu['price4']; | 422 | $price = $buy_num * $tidu['price4']; |
423 | } | 423 | } |
424 | - if ($buy_num > $tidu['tidu5']) { | 424 | + if ($buy_num > $tidu['tidu5'] - 1) { |
425 | $price = $buy_num * $tidu['price5']; | 425 | $price = $buy_num * $tidu['price5']; |
426 | } | 426 | } |
427 | $tidu_new = Db::name('product')->where(['id' => $product_id])->select(); | 427 | $tidu_new = Db::name('product')->where(['id' => $product_id])->select(); |
@@ -597,7 +597,6 @@ class Api | @@ -597,7 +597,6 @@ class Api | ||
597 | } | 597 | } |
598 | 598 | ||
599 | 599 | ||
600 | - | ||
601 | /** | 600 | /** |
602 | * Json方式 查询订单物流轨迹 | 601 | * Json方式 查询订单物流轨迹 |
603 | */ | 602 | */ |
-
请 注册 或 登录 后发表评论