shish 3 anni fa
parent
commit
eea9512629
1 ha cambiato i file con 7 aggiunte e 0 eliminazioni
  1. 7 0
      app-ghs/controllers/ItemController.php

+ 7 - 0
app-ghs/controllers/ItemController.php

@@ -64,6 +64,13 @@ class ItemController extends BaseController
         $priceBase64 = stringUtil::ossBase64($newPrice);
 
         $name = $item->name ?? '';
+        if ($item->presell == 1) {
+            $name = '【预售】' . $name;
+        } else {
+            if ($item->discountPrice > 0) {
+                $name = '【特价】' . $name;
+            }
+        }
         $nameBase64 = stringUtil::ossBase64($name);
 
         $staff = $this->shopAdmin;