审核提交
This commit is contained in:
parent
3dedec8448
commit
1adac352bd
@ -215,6 +215,13 @@ class Activity extends Backend
|
|||||||
$this->error(__('Parameter %s can not be empty', ''));
|
$this->error(__('Parameter %s can not be empty', ''));
|
||||||
}
|
}
|
||||||
$params = $this->preExcludeFields($params);
|
$params = $this->preExcludeFields($params);
|
||||||
|
|
||||||
|
$auth_success = null;
|
||||||
|
if($row["auth_status"] !=$params["auth_status"]){
|
||||||
|
$auth_success = $params["auth_status"];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$result = false;
|
$result = false;
|
||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
try {
|
try {
|
||||||
@ -228,6 +235,22 @@ class Activity extends Backend
|
|||||||
$result = $row->allowField(true)->save($params);
|
$result = $row->allowField(true)->save($params);
|
||||||
$this->update_classes($row["id"],$params);
|
$this->update_classes($row["id"],$params);
|
||||||
|
|
||||||
|
$row = $this->model->get($row[ "id" ]);
|
||||||
|
if($auth_success === 1){
|
||||||
|
//审核通过
|
||||||
|
//调用事件
|
||||||
|
$data = ['activity' => $row,"user_id"=>$row["user_id"],"oper_type"=>"admin","oper_id"=>$this->auth->id];
|
||||||
|
\think\Hook::listen('new_activity_auth_success_after', $data);
|
||||||
|
|
||||||
|
}elseif($auth_success === 2){
|
||||||
|
//审核不通过
|
||||||
|
//审核通过
|
||||||
|
//调用事件
|
||||||
|
$data = ['activity' => $row,"user_id"=>$row["user_id"],"oper_type"=>"admin","oper_id"=>$this->auth->id];
|
||||||
|
\think\Hook::listen('new_activity_auth_fail_after', $data);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Db::commit();
|
Db::commit();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user