|
@@ -91,13 +91,21 @@ class Useraudit extends Backend
|
|
|
Db::startTrans();
|
|
|
$rs = Db::name('user_audit')->where('id',$id)->update($data);
|
|
|
|
|
|
+ $type_arr = [
|
|
|
+ 'photo_images' => '相册',
|
|
|
+ 'avatar' => '头像审核',
|
|
|
+ 'audio_bio' => '语音',
|
|
|
+ 'video_bio' => '视频',
|
|
|
+ ];
|
|
|
+ $type_text = isset($type_arr[$info['type']]) ? $type_arr[$info['type']] : '资料';
|
|
|
+
|
|
|
if($status == 1){
|
|
|
- Db::name('user')->where('id',$info['user_id'])->update(['bio'=>$info['new_bio']]);
|
|
|
+ Db::name('user')->where('id',$info['user_id'])->update([$info['type']=>$info['new_data']]);
|
|
|
//系统消息
|
|
|
- $msg_id = \app\common\model\Message::addMessage($info['user_id'],'资料审核','资料审核已经通过');
|
|
|
+ $msg_id = \app\common\model\Message::addMessage($info['user_id'],$type_text.'审核',$type_text.'审核已经通过');
|
|
|
}elseif($status == 2){
|
|
|
//系统消息
|
|
|
- $msg_id = \app\common\model\Message::addMessage($info['user_id'],'资料审核','资料审核已经被拒绝:'.$data['auditremark']);
|
|
|
+ $msg_id = \app\common\model\Message::addMessage($info['user_id'],$type_text.'审核',$type_text.'审核已经被拒绝:'.$data['auditremark']);
|
|
|
}
|
|
|
Db::commit();
|
|
|
|