Kaynağa Gözat

门店开单

shish 2 yıl önce
ebeveyn
işleme
3e5c74e503
1 değiştirilmiş dosya ile 3 ekleme ve 9 silme
  1. 3 9
      biz/wx/classes/WxMessageClass.php

+ 3 - 9
biz/wx/classes/WxMessageClass.php

@@ -189,14 +189,8 @@ class WxMessageClass extends BaseClass
         $actPrice = $order->actPrice;
         $actPrice = floatval($actPrice);
 
-        $first = "";
+        $first = isset($order->shopAdminId) && !empty($order->shopAdminId) ? "【门店开单】" : "";
         $customName = $order->customName ?? '';
-        if (!empty($customName)) {
-            $first = $customName;
-            if (isset($order->shopAdminId) && !empty($order->shopAdminId)) {
-                $first = "【门店开单】" . $customName;
-            }
-        }
 
         $adminList = ShopAdminClass::getRemainAdmin($shop);
         if (empty($adminList)) {
@@ -217,8 +211,8 @@ class WxMessageClass extends BaseClass
                 "url" => Yii::$app->params['ghsDomain'],
                 "data" => [
                     "first" => ["value" => '', "color" => "#173177"],
-                    "keyword1" => ["value" => $title . $orderSn, "color" => "#173177"],
-                    "keyword2" => ["value" => $first . ' ¥' . $actPrice, "color" => "#173177"],
+                    "keyword1" => ["value" => $orderSn . $title, "color" => "#173177"],
+                    "keyword2" => ["value" => $customName . ' ¥' . $actPrice . $first, "color" => "#173177"],
                     "keyword3" => ["value" => date("Y-m-d H:i"), "color" => "#173177"],
                     "remark" => ["value" => "点击查看详情", "color" => "#173177"]
                 ]