Merge pull request 'feat(admin): 修复后台商品状态操作权限问题' (#292) from dev into main
Reviewed-on: #292
This commit is contained in:
commit
561d92567e
@ -69,6 +69,14 @@ class StoreProductController extends BaseAdminController
|
|||||||
*/
|
*/
|
||||||
public function status(){
|
public function status(){
|
||||||
$params=$this->request->post();
|
$params=$this->request->post();
|
||||||
|
$admin_info=$this->adminInfo;
|
||||||
|
if($admin_info['job_ids']){
|
||||||
|
foreach ($admin_info['job_ids'] as $key => $job_id) {
|
||||||
|
if($job_id==2){
|
||||||
|
return $this->fail('无权限操作');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
StoreProduct::where('id',$params['id'])->update(['is_show'=>$params['is_show']]);
|
StoreProduct::where('id',$params['id'])->update(['is_show'=>$params['is_show']]);
|
||||||
return $this->success('操作成功',[],1,1);
|
return $this->success('操作成功',[],1,1);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user