Browse Source

no commit message

齐博 1 year ago
parent
commit
ff5719d0b1
1 changed files with 5 additions and 1 deletions
  1. 5 1
      plugins/weixin/util/Msg.php

+ 5 - 1
plugins/weixin/util/Msg.php

@@ -380,7 +380,7 @@ class Msg
         $url = $array[2] ? "$array[1]:$array[2]" : request()->url(true);
         $content = preg_replace('/<([^<]*)>/is',"",$content);
         $content = addslashes($content);
-        
+        $field_name = config('webdb.weixin_msgfield')?:'keyword2';
         $data="      {
         \"touser\":\"$openid\",
         \"template_id\":\"".config('webdb.weixin_msg_template_id')."\",
@@ -390,6 +390,10 @@ class Msg
         \"value\":\"$content\",
         \"color\":\"#0000ff\"
     },
+    \"{$field_name}\":{
+    \"value\":\"$content\",
+    \"color\":\"#000000\"
+    },
     \"subject\":{
     \"value\":\"$subject\",
     \"color\":\"#666666\"