Kirin 2 years ago
parent
commit
849bc0a0c2
1 changed files with 7 additions and 0 deletions
  1. 7 0
      app/admin/controller/store/StoreProduct.php

+ 7 - 0
app/admin/controller/store/StoreProduct.php

@@ -269,6 +269,13 @@ class StoreProduct extends AuthController
             } else {
                 $productInfo['activity'] = ['秒杀', '砍价', '拼团'];
             }
+            $time_area_discount = json_decode($productInfo['time_area_discount'] ?: '[]', true);
+            $selectTime = [];
+            foreach ($time_area_discount as $k => $v) {
+                $times = explode('-', $k);
+                $selectTime[] = ['start' => $times[0], 'end' => $times[1], 'value' => $v];
+            }
+            $productInfo['selectTime'] = $selectTime;
             $data['productInfo'] = $productInfo;
         }
         return JsonService::successful($data);