Skip to content

Commit d89c5a2

Browse files
committed
🎨 优化代码
1 parent 30edf6d commit d89c5a2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/main/java/com/github/binarywang/demo/wx/mp/config/WxMpConfiguration.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
import static me.chanjar.weixin.common.api.WxConsts.EventType;
1717
import static me.chanjar.weixin.common.api.WxConsts.EventType.SUBSCRIBE;
1818
import static me.chanjar.weixin.common.api.WxConsts.EventType.UNSUBSCRIBE;
19-
import static me.chanjar.weixin.common.api.WxConsts.MenuButtonType.CLICK;
20-
import static me.chanjar.weixin.common.api.WxConsts.MenuButtonType.VIEW;
2119
import static me.chanjar.weixin.common.api.WxConsts.XmlMsgType;
2220
import static me.chanjar.weixin.common.api.WxConsts.XmlMsgType.EVENT;
2321
import static me.chanjar.weixin.mp.constant.WxMpEventConstants.CustomerService.*;
@@ -84,10 +82,10 @@ public WxMpMessageRouter messageRouter(WxMpService wxMpService) {
8482
newRouter.rule().async(false).msgType(EVENT).event(POI_CHECK_NOTIFY).handler(this.storeCheckNotifyHandler).end();
8583

8684
// 自定义菜单事件
87-
newRouter.rule().async(false).msgType(EVENT).event(CLICK).handler(this.menuHandler).end();
85+
newRouter.rule().async(false).msgType(EVENT).event(EventType.CLICK).handler(this.menuHandler).end();
8886

8987
// 点击菜单连接事件
90-
newRouter.rule().async(false).msgType(EVENT).event(VIEW).handler(this.nullHandler).end();
88+
newRouter.rule().async(false).msgType(EVENT).event(EventType.VIEW).handler(this.nullHandler).end();
9189

9290
// 关注事件
9391
newRouter.rule().async(false).msgType(EVENT).event(SUBSCRIBE).handler(this.subscribeHandler).end();

0 commit comments

Comments
 (0)