fix: 后台管理 产品参数问题

This commit is contained in:
2025-07-16 11:51:48 +08:00
parent 12422f06b4
commit 2b8f8c8294

View File

@@ -171,7 +171,7 @@ class Product
// 更新产品参数
if ($put['params'] != "") {
ProductParamsModel::productId($id)->delete();
if (preg_match_all('/(\S+):(.[^\s]+)/', $put['params'], $match_result)) {
if (preg_match_all('/(.+):(.+)/', $put['params'], $match_result)) {
$params = [];
for ($i = 0; $i < count($match_result[0]); $i++) {
$params[] = [