mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-14 12:32:50 +00:00
如果默认无效关键词没有设置,接入微信客服
This commit is contained in:
parent
aeb237b9e8
commit
e1b3762350
@ -187,9 +187,7 @@ class WechatReply extends ModelBasic
|
||||
public static function reply($key,$default=''){
|
||||
$res = self::where('key',$key)->where('status','1')->find();
|
||||
if(empty($res)) $res = self::where('key','default')->where('status','1')->find();
|
||||
if(empty($res)){
|
||||
return WechatService::textMessage($default);
|
||||
}
|
||||
if(empty($res)) return WechatService::transfer();
|
||||
$res['data'] = json_decode($res['data'],true);
|
||||
if($res['type'] == 'text'){
|
||||
return WechatService::textMessage($res['data']['content']);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user