shop discount

This commit is contained in:
songliang 2022-11-02 14:10:34 +08:00
parent 43ef81c3b1
commit 7e447c7f5f

View File

@ -141,11 +141,12 @@ class ShopController extends BaseAuthedController {
$need_price = $price_array[$token_pos];
$discount = $discount_array[$token_pos];
$discount_begin = $row['discount_begin'];
$discount_end = $row['discount_end'];
$discount_begin = strtotime($row['discount_begin'].' UTC');
$discount_end = strtotime($row['discount_end'].' UTC');
$nowTime = $this->_getNowTime();
if ($nowTime>=$discount_begin && $nowTime<$discount_end) {
$need_price = ceil($need_price * ($discount / 100.0));
}