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

添加最新版本的easywechat

@@ -518,23 +518,15 @@ class ActivityController extends AdminBaseController @@ -518,23 +518,15 @@ class ActivityController extends AdminBaseController
518 'secret' => $secret, 518 'secret' => $secret,
519 ]; 519 ];
520 //dump($config); 520 //dump($config);
  521 +
521 $wechat=new Application($config); 522 $wechat=new Application($config);
522 $notice=$wechat->mini_program->notice; 523 $notice=$wechat->mini_program->notice;
523 - /* if (empty($message)){  
524 - $data['keyword1']='姓名';  
525 - $data['keyword2']='类型';  
526 - $data['keyword3']='状态';  
527 - $data['keyword4']='申请项目';  
528 - $message = [  
529 - 'touser' => $openid,  
530 - 'template_id' => '1FYkLuMK8LNKO4_nxJ_DuNQhgIjaaJQlAukgt92C-uw',  
531 - 'page' => 'pages/index/index',  
532 - 'form_id' => $form_id,  
533 - 'data' => $data,  
534 - 'emphasis_keyword' =>$data['keyword3']='状态',  
535 - ];  
536 - }*/  
537 - $result= $notice->send($message); 524 + try{
  525 + $result= $notice->send($message);
  526 + }catch(Exception $e){
  527 + $e->getMessage();
  528 + }
  529 +
538 return $result; 530 return $result;
539 } 531 }
540 532