...
|
...
|
@@ -362,6 +362,17 @@ class Store extends Api |
|
|
$param['user_id'] = $this->auth->id;
|
|
|
$model = new StoreApply();
|
|
|
$result = $model->add($param);
|
|
|
// 发送模板消息
|
|
|
$user = $this->auth->getUser();
|
|
|
$send_data = array(
|
|
|
"first" => '您好,您有一个未处理的申请!',
|
|
|
"keyword1" => $user['nickname'],
|
|
|
"keyword2" => $user['mobile'],
|
|
|
"keyword3" => date('Y年m月s日 H:i',time()),
|
|
|
"remark" => '请尽快处理!',
|
|
|
);
|
|
|
$url = 'http://community.t.brotop.cn/admininfo.php';
|
|
|
(new \app\common\controller\Api)->wxsendmessage('otlkQ0l4L3wsmz8dhDIbHJQVJnI8',$send_data,config('option.template')['examine'],$url);
|
|
|
Db::commit();
|
|
|
} catch (PDOException $e) {
|
|
|
Db::rollback();
|
...
|
...
|
@@ -759,6 +770,17 @@ class Store extends Api |
|
|
);
|
|
|
$res_log = Db::name('user_score_log')->insert($insert_data);
|
|
|
}
|
|
|
// 发送模板消息
|
|
|
$user = $this->auth->getUser();
|
|
|
$send_data = array(
|
|
|
"first" => '您好,您有一个未处理的申请!',
|
|
|
"keyword1" => $user['nickname'],
|
|
|
"keyword2" => $user['mobile'],
|
|
|
"keyword3" => date('Y年m月s日 H:i',time()),
|
|
|
"remark" => '请尽快处理!',
|
|
|
);
|
|
|
$url = 'http://community.t.brotop.cn/admininfo.php';
|
|
|
(new \app\common\controller\Api)->wxsendmessage('otlkQ0l4L3wsmz8dhDIbHJQVJnI8',$send_data,config('option.template')['examine'],$url);
|
|
|
if(!$result || !$res_user || !$res_log) {
|
|
|
Db::rollback();
|
|
|
} else {
|
...
|
...
|
|