|
@@ -57,6 +57,7 @@ class Msg
|
|
$project_id = Dever::input('project_id');
|
|
$project_id = Dever::input('project_id');
|
|
$touser = Dever::input('touser');
|
|
$touser = Dever::input('touser');
|
|
$page = Dever::input('page');
|
|
$page = Dever::input('page');
|
|
|
|
+ //$data = json_encode(Dever::input('data'));
|
|
$data = Dever::input('data');
|
|
$data = Dever::input('data');
|
|
$form_id = Dever::input('form_id');
|
|
$form_id = Dever::input('form_id');
|
|
$emphasis_keyword = Dever::input('emphasis_keyword');
|
|
$emphasis_keyword = Dever::input('emphasis_keyword');
|
|
@@ -66,16 +67,16 @@ class Msg
|
|
}
|
|
}
|
|
|
|
|
|
# 发送单条模板消息
|
|
# 发送单条模板消息
|
|
- public function sendOne($key, $project_id, $touser, $page, $data, $form_id = false, $emphasis_keyword = '', $state = false)
|
|
|
|
|
|
+ public function sendOne($key, $project_id, $touser, $path, $data, $form_id = false, $emphasis_keyword = '', $state = false)
|
|
{
|
|
{
|
|
- if ($project_id > 0 && $key && $touser && $page && $data) {
|
|
|
|
|
|
+ if ($project_id > 0 && $key && $touser && $path && $data) {
|
|
$info = Dever::db('wechat_applet/msg')->one(array('option_key' => $key, 'option_project_id' => $project_id));
|
|
$info = Dever::db('wechat_applet/msg')->one(array('option_key' => $key, 'option_project_id' => $project_id));
|
|
if ($info) {
|
|
if ($info) {
|
|
$update = array();
|
|
$update = array();
|
|
$update['project_id'] = $info['project_id'];
|
|
$update['project_id'] = $info['project_id'];
|
|
$update['msg_id'] = $info['id'];
|
|
$update['msg_id'] = $info['id'];
|
|
$update['touser'] = $touser;
|
|
$update['touser'] = $touser;
|
|
- $update['page'] = $page;
|
|
|
|
|
|
+ $update['path'] = $path;
|
|
$update['data'] = $data;
|
|
$update['data'] = $data;
|
|
$update['form_id'] = $form_id;
|
|
$update['form_id'] = $form_id;
|
|
$update['status'] = 1;
|
|
$update['status'] = 1;
|
|
@@ -94,11 +95,11 @@ class Msg
|
|
$where['option_touser'] = $update['touser'];
|
|
$where['option_touser'] = $update['touser'];
|
|
//$where['option_data'] = $update['data'];
|
|
//$where['option_data'] = $update['data'];
|
|
//$where['option_form_id'] = $update['form_id'];
|
|
//$where['option_form_id'] = $update['form_id'];
|
|
- $where['option_page'] = $update['page'];
|
|
|
|
|
|
+ $where['option_path'] = $update['path'];
|
|
|
|
|
|
$id = Dever::upinto('wechat_applet/msg_log', $where, $update);
|
|
$id = Dever::upinto('wechat_applet/msg_log', $where, $update);
|
|
|
|
|
|
- Core::run($info['project_id'], 'send_msg', 'msg.sendAction', 'msg.sendLog', 'applet', $id, $state);
|
|
|
|
|
|
+ Core::run($info['project_id'], 'send_msg', 'msg.sendAction', 'msg.sendLog', 'wechat_applet', $id, $state);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|