This commit is contained in:
2020-10-29 10:41:59 +08:00
parent f1c9abf187
commit 1daf123baa
3 changed files with 3 additions and 3 deletions

View File

@@ -204,7 +204,7 @@ class IndexController extends AdminController
if ($request->total < 0) { if ($request->total < 0) {
$error = new MessageBag([ $error = new MessageBag([
'title' => '错误', 'title' => '错误',
'message' => '可发券总数必须大于0.', 'message' => '可发券总数必须大于0',
]); ]);
return back()->withInput()->with(compact('error')); return back()->withInput()->with(compact('error'));

View File

@@ -100,7 +100,7 @@ class Activity extends Model
{ {
try { try {
$code = '66406' . date('ymd') . mt_rand(100000, 999999); $code = 'YSD' . date('ymd') . mt_rand(100000, 999999);
if ($this->type == SELF::TYPE_EXTEND) { if ($this->type == SELF::TYPE_EXTEND) {
$start_at = now(); $start_at = now();

View File

@@ -22,7 +22,7 @@ class YsdGrant extends Init
if (!$activity->status) { if (!$activity->status) {
return '发券失败,活动已经关闭。'; return '发券失败,活动已经关闭。';
} }
if ($activity->type == Activity::TYPE_SCOPE && Carbon::now()->gt($activity->end_at)) { if ($activity->type == Activity::TYPE_SCOPE && Carbon::now()->gt($activity->end_at)) {
return '发券失败,此活动已经结束。'; return '发券失败,此活动已经结束。';
} }