Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新增图文消息留言管理接口 #716

Merged
merged 4 commits into from
May 27, 2017
Merged

新增图文消息留言管理接口 #716

merged 4 commits into from
May 27, 2017

Conversation

mingyoung
Copy link
Collaborator

@mingyoung mingyoung commented May 26, 2017

// 获取实例
$comment = $wechat->comment;
  • 打开已群发文章评论:$comment->open($dataId, $index);
  • 关闭已群发文章评论:$comment->close($dataId, $index);
  • 查看指定文章的评论数据:$comment->lists($dataId, $index, $begin, $count, $type);
  • 将评论标记精选:$comment->markElect($dataId, $index, $commentId);
  • 将评论取消精选:$comment->unmarkElect($dataId, $index, $commentId);
  • 删除评论:$comment->delete($dataId, $index, $commentId);
  • 回复评论:$comment->reply($dataId, $index, $commentId, '回复内容');
  • 删除评论回复:$comment->deleteReply($dataId, $index, $commentId);

@overtrue
Copy link
Collaborator

@mingyoung 😆

@mingyoung
Copy link
Collaborator Author

@overtrue
Copy link
Collaborator

感觉设计有问题啊:

  1. MediaPress 与文章还是评论感觉都不合适啊
  2. 我更倾向于把 select 的作用改为 API 参数传入

@mingyoung
Copy link
Collaborator Author

MediaPress 与文章还是评论感觉都不合适啊

media press 的意思我理解为推送文章,首先选择一篇文章,然后管理这篇文章下面的评论、回复等等。

我更倾向于把 select 的作用改为 API 参数传入

这样的话每个方法都+2个参数,其中获取评论的参数就有5个了,会不会有点多?
$mp->comments('msg_data_id', 0, 1, 20, 0);

@overtrue
Copy link
Collaborator

  1. media press 在官方没有定义吧?所以这样用感觉还是有点奇怪,其实可以简单的把这个模块叫评论是不是更好?
  2. $mp->comments('msg_data_id', 0, 1, 20, 0); 其实还好啦,订单退款那里也少不了,没办法的事情

@mingyoung
Copy link
Collaborator Author

其实开始我就是把它叫做comment的😅

那就这样:

// 获取实例
$comment = $wechat->comment;
  • 打开已群发文章评论:$comment->open($dataId, $index);
  • 关闭已群发文章评论:$comment->close($dataId, $index);
  • 查看指定文章的评论数据:$comment->lists($dataId, $index, $begin, $count, $type);
  • 将评论标记精选:$comment->markElect($dataId, $index, $commentId);
  • 将评论取消精选:$comment->unmarkElect($dataId, $index, $commentId);
  • 删除评论:$comment->delete($dataId, $index, $commentId);
  • 回复评论:$comment->reply($dataId, $index, $commentId, '回复内容');
  • 删除评论回复:$comment->deleteReply($dataId, $index, $commentId);

@overtrue
Copy link
Collaborator

OK, nice

@overtrue overtrue merged commit aff1846 into w7corp:master May 27, 2017
@mingyoung mingyoung deleted the feature/media_press branch May 27, 2017 03:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants