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

添加最新版本的easywechat

... ... @@ -572,11 +572,38 @@ class MemberCenterController extends RestBaseController
//获取志愿者
$volunteerModel = new VolunteerModel();
$data['status']=input('status');
if ($data['status']==2){
$keyword='审核通过';
}else{
$keyword='审核未通过';
}
$data['refund_reason']=input('refund_reason')??'';
$result = $volunteerModel->updateData(array('id'=>$id),$data);
if(empty($result)){
$this->success(['code'=>40002,'msg'=>'当前申请可能已被其他管理员审核,请刷新页面!']);
}
$userMap['user_id']=$id;
$openid=db('third_party_user')->where($userMap)->value('openid');
$volunteer=db('volunteer')->where('id',$id)->find();
$formMap['user_id']=$id;
$formMap['use_time']=0;
$formMap['expire_time']=['>',time()];
$form_id=\db('form_id')->where($formMap)->find();
$data['keyword1']= $volunteer['name'];
$data['keyword2']='活动审核';
$data['keyword3']=$keyword;
$data['keyword4']='志愿者审核';
$message = [
'touser' => $openid,
'template_id' => '1FYkLuMK8LNKO4_nxJ_DuNQhgIjaaJQlAukgt92C-uw',
'page' => 'pages/index/index',
'form_id' => $form_id['value'],
'data' => $data,
'emphasis_keyword' =>$data['keyword3']='状态',
];
$this->wxappNotice($message);
$this->success(['code'=>20000,'msg'=>'更新成功!']);
}
... ...