com.jfinal.weixin.sdk.msg.in.event

## 类 InMenuEvent

- java.lang.Object
- - com.jfinal.weixin.sdk.msg.in.InMsg
  - - com.jfinal.weixin.sdk.msg.in.event.EventInMsg
    - - com.jfinal.weixin.sdk.msg.in.event.InMenuEvent

- 所有已实现的接口:
    Serializable

      public class InMenuEvent
      extends EventInMsg

          自定义菜单事件
       1： 点击菜单拉取消息时的事件推送
       <xml>
       <ToUserName><![CDATA[toUser]]></ToUserName>
       <FromUserName><![CDATA[FromUser]]></FromUserName>
       <CreateTime>123456789</CreateTime>
       <MsgType><![CDATA[event]]></MsgType>
       <Event><![CDATA[CLICK]]></Event>
       <EventKey><![CDATA[EVENTKEY]]></EventKey>
       </xml>

       2： 点击菜单跳转链接时的事件推送
       <xml>
       <ToUserName><![CDATA[toUser]]></ToUserName>
       <FromUserName><![CDATA[FromUser]]></FromUserName>
       <CreateTime>123456789</CreateTime>
       <MsgType><![CDATA[event]]></MsgType>
       <Event><![CDATA[VIEW]]></Event>
       <EventKey><![CDATA[www.jfinal.com]]></EventKey>
       </xml>

       3. scancode_push：扫码推事件
       <xml>
       <ToUserName><![CDATA[toUser]]></ToUserName>
       <FromUserName><![CDATA[FromUser]]></FromUserName>
       <CreateTime>1412075451</CreateTime>
       <MsgType><![CDATA[event]]></MsgType>
       <Event><![CDATA[scancode_push]]></Event>
       <EventKey><![CDATA[rselfmenu_0_1]]></EventKey>
       <ScanCodeInfo>
       <ScanType><![CDATA[qrcode]]></ScanType>
       <ScanResult><![CDATA[http://www.jfinal.com]]></ScanResult>
       </ScanCodeInfo>
       </xml>

       4. scancode_waitmsg：扫码推事件且弹出“消息接收中”提示框
       <xml>
       <ToUserName><![CDATA[toUser]]></ToUserName>
       <FromUserName><![CDATA[FromUser]]></FromUserName>
       <CreateTime>1446526359</CreateTime>
       <MsgType><![CDATA[event]]></MsgType>
       <Event><![CDATA[scancode_waitmsg]]></Event>
       <EventKey><![CDATA[2_1]]></EventKey>
       <ScanCodeInfo>
       <ScanType><![CDATA[qrcode]]></ScanType>
       <ScanResult><![CDATA[http://www.jfinal.com]]></ScanResult>
       </ScanCodeInfo>
       </xml>

       5. pic_sysphoto：弹出系统拍照发图，这个后台其实收不到该菜单的消息，点击它后，调用的是手机里面的照相机功能，而照相以后再发过来时，就收到的是一个图片消息了
       <xml>
       <ToUserName><![CDATA[toUser]]></ToUserName>
       <FromUserName><![CDATA[FromUser]]></FromUserName>
       <CreateTime>1412135923</CreateTime>
       <MsgType><![CDATA[image]]></MsgType>
       <PicUrl><![CDATA[http://www.jfinal.com]]></PicUrl>
       <MsgId>6065077606992462276</MsgId>
       <MediaId><![CDATA[mediaId]]></MediaId>
       </xml>

       6. pic_photo_or_album方式，先推送菜单事件，再推送图片消息
       <xml>
       <ToUserName><![CDATA[toUser]]></ToUserName>
       <FromUserName><![CDATA[FromUser]]></FromUserName>
       <CreateTime>1412075614</CreateTime>
       <MsgType><![CDATA[event]]></MsgType>
       <Event><![CDATA[pic_photo_or_album]]></Event>
       <EventKey><![CDATA[rselfmenu_1_1]]></EventKey>
       <SendPicsInfo>
       <Count>1</Count>
       <PicList>
       <item>
       <PicMd5Sum><![CDATA[md5]]></PicMd5Sum>
       </item>
       </PicList>
       </SendPicsInfo>
       </xml>

       <xml>
       <ToUserName><![CDATA[toUser]]></ToUserName>
       <FromUserName><![CDATA[FromUser]]></FromUserName>
       <CreateTime>1412075618</CreateTime>
       <MsgType><![CDATA[image]]></MsgType>
       <PicUrl><![CDATA[http://www.jfinal.com]]></PicUrl>
       <MsgId>6064818598989675467</MsgId>
       <MediaId><![CDATA[mediaId]]></MediaId>
       </xml>

       7. pic_weixin ,下面是一次推送3张相片时的数据，再推送图片消息
       <xml>
       <ToUserName><![CDATA[toUser]]></ToUserName>
       <FromUserName><![CDATA[FromUser]]></FromUserName>
       <CreateTime>1412075552</CreateTime>
       <MsgType><![CDATA[event]]></MsgType>
       <Event><![CDATA[pic_weixin]]></Event>
       <EventKey><![CDATA[rselfmenu_1_2]]></EventKey>
       <SendPicsInfo>
       <Count>3</Count>
       <PicList>
       <item>
       <PicMd5Sum><![CDATA[md5]]></PicMd5Sum>
       </item>
       <item>
       <PicMd5Sum><![CDATA[md5]]></PicMd5Sum>
       </item>
       <item>
       <PicMd5Sum><![CDATA[md5]]></PicMd5Sum>
       </item>
       </PicList>
       </SendPicsInfo>
       </xml>
       回应上述消息，用户收不到，但微信会继续推送3个图片消息给接口
       <xml>
       <ToUserName><![CDATA[toUser]]></ToUserName>
       <FromUserName><![CDATA[FromUser]]></FromUserName>
       <CreateTime>1412075562</CreateTime>
       <MsgType><![CDATA[image]]></MsgType>
       <PicUrl><![CDATA[http://www.jfinal.com]]></PicUrl>
       <MsgId>6064818358471506877</MsgId>
       <MediaId><![CDATA[mediaId]]></MediaId>
       </xml>

       8. location_select：弹出地理位置选择器，菜单的响应用户收不到，在用户发送位置之后，会再推送一个地理位置消息功能给用户
       <xml>
       <ToUserName><![CDATA[toUser]]></ToUserName>
       <FromUserName><![CDATA[FromUser]]></FromUserName>
       <CreateTime>1412075681</CreateTime>
       <MsgType><![CDATA[event]]></MsgType>
       <Event><![CDATA[location_select]]></Event>
       <EventKey><![CDATA[rselfmenu_2_0]]></EventKey>
       <SendLocationInfo>
       <Location_X><![CDATA[22.538145]]></Location_X>
       <Location_Y><![CDATA[113.952298]]></Location_Y>
       <Scale><![CDATA[13]]></Scale>
       <Label><![CDATA[label]]></Label>
       <Poiname><![CDATA[]]></Poiname>
       </SendLocationInfo>
       </xml>

       <xml>
       <ToUserName><![CDATA[toUser]]></ToUserName>
       <FromUserName><![CDATA[FromUser]]></FromUserName>
       <CreateTime>1412075681</CreateTime>
       <MsgType><![CDATA[location]]></MsgType>
       <Location_X>22.538145</Location_X>
       <Location_Y>113.952298</Location_Y>
       <Scale>13</Scale>
       <Label><![CDATA[label]]></Label>
       <MsgId>6064818869572615123</MsgId>
       </xml>

       9. media_id：下发消息（除文本消息）

       10. view_limited：跳转图文消息URL

  另请参阅:
    序列化表格

- - ### 字段概要

    字段
    限定符和类型 | 字段和说明
    --- | ---
    `static String` | `EVENT_INMENU_CLICK`
    `static String` | `EVENT_INMENU_LOCATION_SELECT`
    `static String` | `EVENT_INMENU_MEDIA_ID`
    `static String` | `EVENT_INMENU_PIC_PHOTO_OR_ALBUM`
    `static String` | `EVENT_INMENU_PIC_SYSPHOTO`
    `static String` | `EVENT_INMENU_PIC_WEIXIN`
    `static String` | `EVENT_INMENU_SCANCODE_PUSH`
    `static String` | `EVENT_INMENU_scancode_waitmsg`
    `static String` | `EVENT_INMENU_VIEW`
    `static String` | `EVENT_INMENU_VIEW_LIMITED`

    - ### 从类继承的字段 com.jfinal.weixin.sdk.msg.in.event.EventInMsg

      `event`

    - ### 从类继承的字段 com.jfinal.weixin.sdk.msg.in.InMsg

      `createTime, fromUserName, msgType, toUserName`

  - ### 构造器概要

    构造器
    构造器和说明
    `InMenuEvent(String toUserName, String fromUserName, Integer createTime, String event)`

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `String` | `getEventKey()`
    `ScanCodeInfo` | `getScanCodeInfo()`
    `void` | `setEventKey(String eventKey)`
    `void` | `setScanCodeInfo(ScanCodeInfo scanCodeInfo)`

    - ### 从类继承的方法 com.jfinal.weixin.sdk.msg.in.event.EventInMsg

      `getEvent, setEvent`

    - ### 从类继承的方法 com.jfinal.weixin.sdk.msg.in.InMsg

      `getCreateTime, getFromUserName, getMsgType, getToUserName, setCreateTime, setFromUserName, setMsgType, setToUserName`

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 字段详细资料

    - #### EVENT_INMENU_CLICK

          public static final String EVENT_INMENU_CLICK

      另请参阅:
        常量字段值

    - #### EVENT_INMENU_VIEW

          public static final String EVENT_INMENU_VIEW

      另请参阅:
        常量字段值

    - #### EVENT_INMENU_SCANCODE_PUSH

          public static final String EVENT_INMENU_SCANCODE_PUSH

      另请参阅:
        常量字段值

    - #### EVENT_INMENU_scancode_waitmsg

          public static final String EVENT_INMENU_scancode_waitmsg

      另请参阅:
        常量字段值

    - #### EVENT_INMENU_PIC_SYSPHOTO

          public static final String EVENT_INMENU_PIC_SYSPHOTO

      另请参阅:
        常量字段值

    - #### EVENT_INMENU_PIC_PHOTO_OR_ALBUM

          public static final String EVENT_INMENU_PIC_PHOTO_OR_ALBUM

      另请参阅:
        常量字段值

    - #### EVENT_INMENU_PIC_WEIXIN

          public static final String EVENT_INMENU_PIC_WEIXIN

      另请参阅:
        常量字段值

    - #### EVENT_INMENU_LOCATION_SELECT

          public static final String EVENT_INMENU_LOCATION_SELECT

      另请参阅:
        常量字段值

    - #### EVENT_INMENU_MEDIA_ID

          public static final String EVENT_INMENU_MEDIA_ID

      另请参阅:
        常量字段值

    - #### EVENT_INMENU_VIEW_LIMITED

          public static final String EVENT_INMENU_VIEW_LIMITED

      另请参阅:
        常量字段值

  - ### 构造器详细资料

    - #### InMenuEvent

          public InMenuEvent(String toUserName,
                             String fromUserName,
                             Integer createTime,
                             String event)

  - ### 方法详细资料

    - #### getEventKey

          public String getEventKey()

    - #### setEventKey

          public void setEventKey(String eventKey)

    - #### getScanCodeInfo

          public ScanCodeInfo getScanCodeInfo()

    - #### setScanCodeInfo

          public void setScanCodeInfo(ScanCodeInfo scanCodeInfo)

Copyright © 2017. All rights reserved.