|
|
@@ -89,6 +89,10 @@ class ProductController extends BaseController
|
|
|
if ($addPrice > $price) {
|
|
|
util::fail('批发价的加价不能大于售价');
|
|
|
}
|
|
|
+ // 图片列表数组转换为字符串
|
|
|
+ if (is_array($post['images'])) {
|
|
|
+ $post['images'] = implode(',', $post['images']);
|
|
|
+ }
|
|
|
//复制标识
|
|
|
$post['copy'] = 1;
|
|
|
|
|
|
@@ -252,6 +256,11 @@ class ProductController extends BaseController
|
|
|
util::fail('请填写重量,最小0.1');
|
|
|
}
|
|
|
$post['staffName'] = $shopAdmin->name ?? '';
|
|
|
+ // 图片列表数组转换为字符串
|
|
|
+ if (is_array($post['images'])) {
|
|
|
+ $post['images'] = implode(',', $post['images']);
|
|
|
+ }
|
|
|
+
|
|
|
ProductClass::addProduct($post, $this->shop);
|
|
|
util::complete('添加成功');
|
|
|
}
|
|
|
@@ -724,6 +733,11 @@ class ProductController extends BaseController
|
|
|
$ptItemId = $respond['itemId'] ?? 0;
|
|
|
$ptItemInfo = PtItemClass::getById($ptItemId);
|
|
|
$respond['ptItemInfo'] = $ptItemInfo;
|
|
|
+ // 封面图与多花材图片的兼容处理
|
|
|
+ if ($respond['images'] == '' && $respond['shortCover'] != '') {
|
|
|
+ $respond['images'] = $respond['shortCover'];
|
|
|
+ }
|
|
|
+
|
|
|
util::success($respond);
|
|
|
}
|
|
|
|