ソースを参照

新订单提示方式调整

shish 5 年 前
コミット
ab6509daaa
1 ファイル変更8 行追加1 行削除
  1. 8 1
      biz/wx/classes/WxMessageClass.php

+ 8 - 1
biz/wx/classes/WxMessageClass.php

@@ -121,6 +121,13 @@ class WxMessageClass extends BaseClass
         }
         $orderId = $order->id;
         $actPrice = $order->actPrice;
+
+        $first = "您有新的订单,请注意查收";
+        $customName = $order->customName ?? '';
+        if (!empty($customName)) {
+            $first = $customName . '下单';
+        }
+
         $adminList = ShopAdminClass::getRemainAdmin($shopId);
         foreach ($adminList as $admin) {
             if (isset($admin['subscribe']) == false || $admin['subscribe'] == 0) {
@@ -132,7 +139,7 @@ class WxMessageClass extends BaseClass
                 "template_id" => $tempId,
                 "url" => Yii::$app->params['ghsDomain'],
                 "data" => [
-                    "first" => ["value" => "您有新的订单,请注意查收", "color" => "#173177"],
+                    "first" => ["value" => $first, "color" => "#173177"],
                     "keyword1" => ["value" => $order->orderSn, "color" => "#173177"],
                     "keyword2" => ["value" => $actPrice, "color" => "#173177"],
                     "keyword3" => ["value" => date("Y-m-d H:i"), "color" => "#173177"],