mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-15 13:22:51 +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=''){
|
public static function reply($key,$default=''){
|
||||||
$res = self::where('key',$key)->where('status','1')->find();
|
$res = self::where('key',$key)->where('status','1')->find();
|
||||||
if(empty($res)) $res = self::where('key','default')->where('status','1')->find();
|
if(empty($res)) $res = self::where('key','default')->where('status','1')->find();
|
||||||
if(empty($res)){
|
if(empty($res)) return WechatService::transfer();
|
||||||
return WechatService::textMessage($default);
|
|
||||||
}
|
|
||||||
$res['data'] = json_decode($res['data'],true);
|
$res['data'] = json_decode($res['data'],true);
|
||||||
if($res['type'] == 'text'){
|
if($res['type'] == 'text'){
|
||||||
return WechatService::textMessage($res['data']['content']);
|
return WechatService::textMessage($res['data']['content']);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user