Skip to content

Commit

Permalink
doc: typo EasyWeChat\Work\Message on work/server.md (#2891)
Browse files Browse the repository at this point in the history
close #2884
  • Loading branch information
TheNorthMemory authored Feb 18, 2025
1 parent 6679b25 commit ae099bc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
4 changes: 4 additions & 0 deletions docs/.vitepress/theme/styles/pages.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@
.vt-doc.sponsor h3 .header-anchor {
display: none;
}

.custom-block.details.bg-transparent {
background-color: transparent
}
22 changes: 16 additions & 6 deletions docs/src/6.x/work/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,21 @@

> 👏🏻 欢迎点击本页下方 "帮助我们改善此页面!" 链接参与贡献更多的使用示例!
## [被动回复](https://developer.work.weixin.qq.com/document/path/90241) {#server-mode}

::: details 被动回复一个图片信息 {open .bg-transparent}

<!--
<details>
<summary>标题</summary>
内容
</details>
-->
```php
$server->with(function ($message) {
return [
'MsgType' => 'image',
'Image' => [
'MediaId' => $message['MediaId'],
],
]);
};
```

`$server`[这里](server)`media_id` 需提前由 [企业微信>素材管理](https://developer.work.weixin.qq.com/document/path/91054) 接口产生。

:::
2 changes: 1 addition & 1 deletion docs/src/6.x/work/server.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,6 @@ $message = $server->getRequestMessage(); // 原始消息
$message = $server->getDecryptedMessage();
```

`$message` 为一个 `EasyWeChat\OpenWork\Message` 实例。
`$message` 为一个 `EasyWeChat\Work\Message` 实例。

你可以在处理完逻辑后自行创建一个响应,当然,在不同的框架里,响应写法也不一样,请自行实现。

0 comments on commit ae099bc

Please sign in to comment.