修改bug

This commit is contained in:
2020-08-24 08:35:19 +08:00
parent 0230bb0144
commit da9d0d258f
2 changed files with 334 additions and 334 deletions

View File

@@ -184,8 +184,8 @@ class IndexController extends AdminController
$form->decimal('sort', '排序')->default(0)->help('序号越大越靠前');
$form->saving(function ($form) {
$sum = (int) $form->pv + (int) $form->bonus + (int) $form->recommend;
if ((int) $sum > $form->price) {
$sum = (int)$form->pv + (int)$form->bonus + (int)$form->recommend;
if ((int)$sum > $form->price) {
admin_warning('配置错误', 'PV+佣金+推荐人佣金不能超过礼物价值');
throw new \Exception('配置错误,PV+佣金+推荐人佣金不能超过礼物价值');
}