12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- namespace app\common\model\wechat;
-
- use think\Model;
-
- class Wechat extends Model
- {
-
-
- const msg_type_text = 'text';
- const msg_type_image = 'image';
- const msg_type_voice = 'voice';
- const msg_type_video = 'video';
- const msg_type_music = 'music';
- const msg_type_news = 'news';
- const msg_type_location = 'location';
- const msg_type_link = 'link';
- const msg_type_event = 'event';
- const msg_type_default = 'default';
-
-
-
- const msg_event_subscribe = 'subscribe';
- const msg_event_unsubscribe = 'unsubscribe';
- const msg_event_scan = 'SCAN';
- const msg_event_location = 'LOCATION';
- const msg_event_click = 'CLICK';
- const msg_event_view = 'VIEW';
-
- public static function getCustomReply($form = true){
- $desc = [
- self::msg_event_subscribe => '关注回复',
- self::msg_type_text => '关键词回复',
- self::msg_type_default => '默认回复',
- ];
- if( true === $form){
- return $desc;
- }
- return $desc[$form] ??[];
- }
- }
|