道具商城调整。

This commit is contained in:
2026-01-03 14:48:42 +08:00
parent 34b74335c2
commit 165e0565b5
3 changed files with 19 additions and 3 deletions

View File

@@ -276,7 +276,15 @@ class Decorate extends adminApi
return V(0,"该价格已存在");
}
//计算折扣取整
$discount = round($price/$original_price, 2)*10;
if($price==0 || $original_price==0){
$discount = 0;
}else{
$discount = round($price/$original_price, 2)*10;
if($discount >= 10){
$discount = 0;
}
}
$data = [
'did' => $did,
'day' => $day,