fixed
This commit is contained in:
@@ -55,6 +55,12 @@
|
||||
<input class="form-control firmcustomer-sync-info" type="button" value="同步信息">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('微信昵称')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-wx_nickname" class="form-control" name="row[wx_nickname]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Rel_group')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
||||
@@ -31,6 +31,12 @@
|
||||
<input id="c-rel_wx" class="form-control" name="row[rel_wx]" readonly type="text" value="{$row.rel_wx|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('微信昵称')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-wx_nickname" class="form-control" name="row[wx_nickname]" type="text" value="{$row.wx_nickname|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Rel_group')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
||||
@@ -14,8 +14,13 @@ use wanghua\general_utility_tools_php\tool\Tools;
|
||||
class MessageLogic extends BaseLogic
|
||||
{
|
||||
|
||||
///message/postText
|
||||
|
||||
/**
|
||||
* desc:发送私聊消息
|
||||
* author:wh
|
||||
* @param $data
|
||||
* @return mixed
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function postText($data)
|
||||
{
|
||||
$url = '/message/postText';
|
||||
@@ -31,4 +36,26 @@ class MessageLogic extends BaseLogic
|
||||
Tools::log_to_write_txt(['发送文字消息,出参:$res'=>$res]);
|
||||
return $res;
|
||||
}
|
||||
|
||||
/**
|
||||
* desc:发送群消息
|
||||
* author:wh
|
||||
* @param $data
|
||||
* @return mixed
|
||||
*/
|
||||
public function postGroupText($data)
|
||||
{
|
||||
$url = '/message/postText';
|
||||
$post_data = [
|
||||
'appId'=>$data['appId'],
|
||||
'toWxid'=>$data['toWxid'],//群的ID
|
||||
'content'=>$data['content'],
|
||||
//@的好友,多个英文逗号分隔。群主或管理员@全部的人,则填写'notify@all'
|
||||
'ats'=>$data['ats'],
|
||||
];
|
||||
Tools::log_to_write_txt(['发送文字消息,入参:$post_data'=>$post_data]);
|
||||
$res = $this->curl_post_json($url, $post_data);
|
||||
Tools::log_to_write_txt(['发送文字消息,出参:$res'=>$res]);
|
||||
return $res;
|
||||
}
|
||||
}
|
||||
@@ -37,7 +37,7 @@ class Tasktimer extends Controller
|
||||
|
||||
Tools::log_to_write_txt(['客户回访计划,开始:$item'=>$item]);
|
||||
$ret = $this->postText($item);
|
||||
//dump($ret);
|
||||
dump($ret);
|
||||
Tools::log_to_write_txt(['客户回访计划,结束:$res'=>$ret]);
|
||||
}
|
||||
|
||||
@@ -90,6 +90,7 @@ class Tasktimer extends Controller
|
||||
$date = date('Y-m-d ',$day_time).$plan['followup_time'];
|
||||
$exc_time = strtotime($date);//最终的执行时间
|
||||
|
||||
dump(date('Y-m-d H:i:s',$exc_time));
|
||||
//校验时间是否达到执行计划时间
|
||||
if($exc_time > time()){
|
||||
return Tools::set_fail('未到计划回访时间');
|
||||
@@ -101,13 +102,13 @@ class Tasktimer extends Controller
|
||||
$tokenArr = (new TokenLogic())->getToken();
|
||||
$data = [
|
||||
'appId'=>$tokenArr['appId'],
|
||||
'toWxid'=>$cust['rel_wx'],
|
||||
'content'=>$return_record['visit_msg'],
|
||||
'toWxid'=>$cust['rel_group'],//是群则发送群消息,否则发个人私人消息
|
||||
'content'=>"@".$cust['wx_nickname']." ".$return_record['visit_msg'],
|
||||
//@的好友,多个英文逗号分隔。群主或管理员@全部的人,则填写'notify@all'
|
||||
'ats'=>$cust['rel_wx'],
|
||||
];
|
||||
Tools::log_to_write_txt(['回访客户,开始:$post_data'=>$data]);
|
||||
$res = $logic->postText($data);
|
||||
$res = $logic->postGroupText($data);
|
||||
Tools::log_to_write_txt(['回访客户,结束:$res'=>$res]);
|
||||
|
||||
//修改回访记录回访状态
|
||||
|
||||
@@ -140,6 +140,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||
|
||||
|
||||
|
||||
|
||||
//同时查询关联群
|
||||
let ai_config_id = $('#c-aicustomerservice_ids').val();
|
||||
$.get('Gechatroom/getChatroomList',{ai_config_id:ai_config_id},function (res) {
|
||||
@@ -171,6 +172,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||
layer.close(load_index);
|
||||
//回显
|
||||
$('#c-headimage').val(res.data.smallHeadImgUrl);
|
||||
$('#c-wx_nickname').val(res.data.nickName);
|
||||
},'json');
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user