|
@@ -98,6 +98,33 @@ class Msg
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public function submit()
|
|
|
+ {
|
|
|
+ # 立刻发送
|
|
|
+ $id = Dever::input('id');
|
|
|
+ if ($id > 0) {
|
|
|
+ $info = Dever::db('applet/msg_send')->one($id);
|
|
|
+ if ($info) {
|
|
|
+ Dever::setInput('key', $info['key']);
|
|
|
+ Dever::setInput('project_id', $info['project_id']);
|
|
|
+ Dever::setInput('page', $info['page']);
|
|
|
+ $data = json_decode(base64_decode($info['content']), true);
|
|
|
+ if ($data) {
|
|
|
+ $send = array();
|
|
|
+ foreach ($data as $k => $v) {
|
|
|
+ $send[$v['key']] = $v['value'];
|
|
|
+ }
|
|
|
+ $send = json_encode($send);
|
|
|
+ Dever::setInput('data', $send);
|
|
|
+ }
|
|
|
+
|
|
|
+ $this->sendMul();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Dever::alert('提交成功,请到模板消息日志中查看发送记录');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
# 发送多条模板消息 入队
|
|
|
public function sendMul()
|
|
|
{
|