-
Notifications
You must be signed in to change notification settings - Fork 172
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
add new event #106
add new event #106
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
大体 okay,不过具体姿势有点问题,提交信息(commit message)也稍微认真按照规范写一下会比较好(有时候别人代码写得 OK 除了 commit message 没有按 conventional 格式来,为了优化新人体验,也就算了,这次你反正也得 squash 你的提交所以就一并要求了)
rx_msg.go
Outdated
@@ -181,3 +181,21 @@ func (m *RxMessage) EventChangeTypeCreateUser() (*rxEventChangeTypeCreateUser, b | |||
y, ok := m.extras.(*rxEventChangeTypeCreateUser) | |||
return y, ok | |||
} | |||
|
|||
// EventAppMenuClick 点击菜单事件 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请照着其他同类方法的注释写这些新方法的注释
rx_msg.go
Outdated
|
||
// EventUnknown 未定义的event类型 | ||
func (m *RxMessage) EventUnknown() (*rxEventUnknow, bool) { | ||
y, ok := m.extras.(*rxEventUnknow) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rxEventUnknow
拼错了
rx_msg.md.go
Outdated
// 应用菜单事件 | ||
const ( | ||
// EventTypeAppMenuClick 点击菜单 | ||
EventTypeAppMenuClick = "click" | ||
// EventTypeAppMenuCView 打开菜单链接 | ||
EventTypeAppMenuView = "view" | ||
// EventTypeAppMenuScanCodePush 扫码上传 | ||
EventTypeAppMenuScanCodePush = "scancode_push" | ||
// EventTypeAppMenuScanCodeWaitMsg 扫码等待消息 | ||
EventTypeAppMenuScanCodeWaitMsg = "scancode_waitmsg" | ||
// EventTypeAppMenuPicSysPhoto 弹出系统拍照发图 | ||
EventTypeAppMenuPicSysPhoto = "pic_sysphoto" | ||
// EventTypeAppMenuPicPhotoOrAlbum 弹出系统拍照发图 | ||
EventTypeAppMenuPicPhotoOrAlbum = "pic_photo_or_album" | ||
// EventTypeAppMenuPicWeixin 弹出微信相册发图器 | ||
EventTypeAppMenuPicWeixin = "pic_weixin" | ||
// EventTypeAppMenuLocationSelect 弹出微信位置选择器 | ||
EventTypeAppMenuLocationSelect = "location_select" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
你得改相应的 md 文件然后 go generate
吧,否则下次这些更改就没了
你在写这个文件的时候,编辑器应该警告你不要动它了,文件头也告诉你这个文件怎么生成的了。。。
|
thx! 大佬看的好认真,我下周改一下;确实没怎么看代码规范,也没看项目的代码逻辑,只想着实现我需要的功能了T.T |
Ping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly LGTM except one nit, thanks!
docs/rx_msg.md
Outdated
const EventTypeAppSubscribe = "subscribe" | ||
|
||
// EventTypeAppUnSubscribe 应用订阅取消 | ||
const EventTypeAppUnSubscribe = "unsubscribe" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unsubscribe 是一个词,只需要大写一个首字母即可
改好之后,rebase(不允许有 merge 提交),squash 成单个提交,改提交说明 或者我帮你搞? |
我弄吧, |
docs/rx_msg.md
Outdated
const EventTypeAppUnsubscribe = "unsubscribe" | ||
|
||
// EventTypeUnknown 未在本项目中定义与实现的event类型 | ||
const EventTypeUnknown = ".*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个没用到吧。。实际上他也不会被当作正则来用(未知消息类型,直接看取到的值类型就知道他“未知”了),去掉就好了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的
虽然你的 commit message 里“3. 未知事件类型: sdk中未定义的事件类型, 返回原始的body, 用于debug”这里序号 3 重复了,但无伤大雅,先给你合了 bors r+ 十分感谢贡献! |
Build succeeded: |
新增事件消息类型:
click
view