|
|
@@ -905,6 +905,27 @@ class OrderController extends BaseController
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //多颜色数据整理
|
|
|
+ $colorItem = $post['xj'] ?? [];
|
|
|
+ $newXj = [];
|
|
|
+ if (!empty($colorItem)) {
|
|
|
+ $colorData = json_decode($colorItem, true);
|
|
|
+ if (!empty($colorData) && is_array($colorData)) {
|
|
|
+ foreach ($colorData as $colorInfo) {
|
|
|
+ if (!empty($colorList)) {
|
|
|
+ $ptItemId = $colorInfo['ptItemId'];
|
|
|
+ $colorList = $colorInfo['list'];
|
|
|
+ if (!empty($colorList)) {
|
|
|
+ foreach ($colorList as $colorItemKey => $colorItem) {
|
|
|
+ $newXj[$ptItemId][] = $colorItem;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $post['xj'] = $newXj;
|
|
|
+
|
|
|
$productJson = $post['product'] ?? '';
|
|
|
if (empty($productJson)) {
|
|
|
util::fail('请选择花材');
|