扫码领取数量限制

This commit is contained in:
2026-02-25 10:40:39 +08:00
parent e829e406e1
commit 1251f78c6b
4 changed files with 26 additions and 1 deletions
@@ -66,6 +66,7 @@ class InvItemController extends BaseController
{
try {
$id = $request->post('id');
$num = $request->post('num');
if (!$id) {
return $this->error('物品ID不能为空');
}
@@ -86,6 +87,7 @@ class InvItemController extends BaseController
// 更新物品记录
$item->qr_code = $result['path'];
$item->qr_code_num = !empty($num)?$num:0;
$item->qr_code_url = $result['url'];
$item->save();
@@ -125,6 +127,7 @@ class InvItemController extends BaseController
// 清空物品记录中的二维码字段
$item->qr_code = '';
$item->qr_code_num = 0;
$item->qr_code_url = '';
$item->save();