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

调试相关bug

... ... @@ -307,30 +307,30 @@ class ApprovalController extends AdminBaseController
$update['status']=input('status');
$result=db('transfer')->where(['id'=>$id])->update($update);
if ($result==1){
// /*发送模板消息*/
// $User=new UserModel();
// $openid=$User->getUserOpenid($engage['user_id']);
// $userId = $openid;
// $templateId = 'M0PtJ9xxGWkMoCI6p1ZhQLyj83k3PAqkeG94yyMRxD4';
// $url = url('user/expert/transferdetail',['id'=>$id],'',true);
// if($update['status']==1){
// $first='恭喜您,您提交的问诊审核已通过';
// }else{
// $first='对不起,您提交的问诊审核已被驳回';
// }
//
// $data = array(
// "first"=>$first,
// "keyword1" => $engage['user_nickname'],
// "keyword2" => $engage['mobile'],
// "keyword3" => date('Y-m-d H:i',$engage['addtime']),
// "keyword4" => "问诊审核",
// "remark" => "点击查看详情确认信息",
// );
// $config=config('wechat_config');
// $Wechat=new Application($config);
// $notice = $Wechat->notice;
// $result = $notice->uses($templateId)->withUrl($url)->andData($data)->andReceiver($userId)->send();
/*发送模板消息*/
$User=new UserModel();
$openid=$User->getUserOpenid($engage['user_id']);
$userId = $openid;
$templateId = 'M0PtJ9xxGWkMoCI6p1ZhQLyj83k3PAqkeG94yyMRxD4';
$url = url('user/expert/transferdetail',['id'=>$id],'',true);
if($update['status']==1){
$first='恭喜您,您提交的问诊审核已通过';
}else{
$first='对不起,您提交的问诊审核已被驳回';
}
$data = array(
"first"=>$first,
"keyword1" => $engage['user_nickname'],
"keyword2" => $engage['mobile'],
"keyword3" => date('Y-m-d H:i',$engage['addtime']),
"keyword4" => "问诊审核",
"remark" => "点击查看详情确认信息",
);
$config=config('wechat_config');
$Wechat=new Application($config);
$notice = $Wechat->notice;
$result = $notice->uses($templateId)->withUrl($url)->andData($data)->andReceiver($userId)->send();
$model->commit();
$this->success('审核成功!');
}else{
... ...