作者 刘朕
1 个管道 的构建 通过 耗费 0 秒

合并分支 'liuzhen' 到 'master'

Liuzhen



查看合并请求 !104
... ... @@ -476,14 +476,14 @@ class Hot extends Api
$res_msg = $msg_model->add($insert);
}
// 发送模板消息
// $send_data = array(
// "first" => '',
// 'keyword1' => '',
// "keyword2" => '',
// "keyword3" => date('Y-m-s',time()),
// "remark" => '',
// );
// $this->wxsendmessage('','','');
$send_data = array(
"first" => '您有一条新的消息',
'keyword1' => $param['content'] ? $param['content'] : '【图片消息】',
"keyword" => date('Y-m-s H:i:s',time()),
"remark" => '',
);
$openid = Db::name('third')->where('user_id',$this->auth->id)->value('openid');
$this->wxsendmessage($openid,$send_data,config('option.template')['msg']);
Db::commit();
} catch (PDOException $e) {
Db::rollback();
... ...
... ... @@ -2,6 +2,7 @@
namespace app\common\controller;
use addons\wechat\library\Config as ConfigService;
use app\common\library\Auth;
use EasyWeChat\Foundation\Application;
use think\Config;
... ... @@ -334,8 +335,7 @@ class Api
if (empty($open_id) || empty($data) || empty($templateId)) {
return false;
}
$options = get_addon_config('wechat');
$app = new Application($options);
$app = new Application(ConfigService::load());
$notice = $app->notice;
$userId = $open_id;
$url = config('option.vue_url').'/index/order/index.html';
... ...
... ... @@ -7,5 +7,8 @@ return [
'updateTimelineShareData',
'chooseWXPay'
],
'vue_url' => 'http://shequ.h.brofirst.cn'
'vue_url' => 'http://shequ.h.brofirst.cn',
'template' => [
'msg' => 'OnPAh4RbKvgZn9asTsUkF3pb_SixqccsSxbZBILqfQM'
]
];
\ No newline at end of file
... ...