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

添加最新版本的easywechat

@@ -572,11 +572,38 @@ class MemberCenterController extends RestBaseController @@ -572,11 +572,38 @@ class MemberCenterController extends RestBaseController
572 //获取志愿者 572 //获取志愿者
573 $volunteerModel = new VolunteerModel(); 573 $volunteerModel = new VolunteerModel();
574 $data['status']=input('status'); 574 $data['status']=input('status');
  575 +
  576 + if ($data['status']==2){
  577 + $keyword='审核通过';
  578 + }else{
  579 + $keyword='审核未通过';
  580 + }
575 $data['refund_reason']=input('refund_reason')??''; 581 $data['refund_reason']=input('refund_reason')??'';
576 $result = $volunteerModel->updateData(array('id'=>$id),$data); 582 $result = $volunteerModel->updateData(array('id'=>$id),$data);
577 if(empty($result)){ 583 if(empty($result)){
578 $this->success(['code'=>40002,'msg'=>'当前申请可能已被其他管理员审核,请刷新页面!']); 584 $this->success(['code'=>40002,'msg'=>'当前申请可能已被其他管理员审核,请刷新页面!']);
579 } 585 }
  586 + $userMap['user_id']=$id;
  587 + $openid=db('third_party_user')->where($userMap)->value('openid');
  588 + $volunteer=db('volunteer')->where('id',$id)->find();
  589 + $formMap['user_id']=$id;
  590 + $formMap['use_time']=0;
  591 + $formMap['expire_time']=['>',time()];
  592 + $form_id=\db('form_id')->where($formMap)->find();
  593 +
  594 + $data['keyword1']= $volunteer['name'];
  595 + $data['keyword2']='活动审核';
  596 + $data['keyword3']=$keyword;
  597 + $data['keyword4']='志愿者审核';
  598 + $message = [
  599 + 'touser' => $openid,
  600 + 'template_id' => '1FYkLuMK8LNKO4_nxJ_DuNQhgIjaaJQlAukgt92C-uw',
  601 + 'page' => 'pages/index/index',
  602 + 'form_id' => $form_id['value'],
  603 + 'data' => $data,
  604 + 'emphasis_keyword' =>$data['keyword3']='状态',
  605 + ];
  606 + $this->wxappNotice($message);
580 $this->success(['code'=>20000,'msg'=>'更新成功!']); 607 $this->success(['code'=>20000,'msg'=>'更新成功!']);
581 } 608 }
582 609