...
|
...
|
@@ -406,22 +406,22 @@ class Api |
|
|
->field('p.stock,s.product_id,s.id,p.avatar,p.name,c.class_con,l.logo,s.buy_num')
|
|
|
->select();
|
|
|
$tidu = Db::name('product')->where(['id' => $product_id])->find();
|
|
|
if ($buy_num < $tidu['tidu1'] + 1 & $buy_num > 0) {
|
|
|
if ($buy_num < $tidu['tidu1'] & $buy_num > 0) {
|
|
|
$price = $buy_num * $tidu['price'];
|
|
|
}
|
|
|
if ($buy_num > $tidu['tidu1'] & $buy_num < $tidu['tidu2'] + 1) {
|
|
|
if ($buy_num > $tidu['tidu1'] - 1 & $buy_num < $tidu['tidu2']) {
|
|
|
$price = $buy_num * $tidu['price1'];
|
|
|
}
|
|
|
if ($buy_num > $tidu['tidu2'] & $buy_num < $tidu['tidu3'] + 1) {
|
|
|
if ($buy_num > $tidu['tidu2'] - 1 & $buy_num < $tidu['tidu3']) {
|
|
|
$price = $buy_num * $tidu['price2'];
|
|
|
}
|
|
|
if ($buy_num > $tidu['tidu3'] & $buy_num < $tidu['tidu4'] + 1) {
|
|
|
if ($buy_num > $tidu['tidu3'] - 1 & $buy_num < $tidu['tidu4']) {
|
|
|
$price = $buy_num * $tidu['price3'];
|
|
|
}
|
|
|
if ($buy_num > $tidu['tidu4'] & $buy_num < $tidu['tidu5'] + 1) {
|
|
|
if ($buy_num > $tidu['tidu4'] - 1 & $buy_num < $tidu['tidu5']) {
|
|
|
$price = $buy_num * $tidu['price4'];
|
|
|
}
|
|
|
if ($buy_num > $tidu['tidu5']) {
|
|
|
if ($buy_num > $tidu['tidu5'] - 1) {
|
|
|
$price = $buy_num * $tidu['price5'];
|
|
|
}
|
|
|
$tidu_new = Db::name('product')->where(['id' => $product_id])->select();
|
...
|
...
|
@@ -597,7 +597,6 @@ class Api |
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Json方式 查询订单物流轨迹
|
|
|
*/
|
...
|
...
|
|