...
|
...
|
@@ -464,22 +464,22 @@ class Api |
|
|
->field('p.id,p.avatar,p.name,c.class_con,l.logo')
|
|
|
->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();
|
...
|
...
|
|