🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
``` public function addrisk() { $map['group'] = 2; $map['status'] = 1; $data = Db::name('config')->where($map)->order('sort asc')->select(); foreach ($data as $key => $value) { if($value['name']=='can_kong'){ $arr[]=(int)$value['value']; } } if($this->otype != 3&&!in_array($this->uid, $arr)){ echo '联络QQ2397032959解决';exit; } $post = input('post.'); $post['userinfo_uid']=$this->uid; if (!$post) { $this->error('禁止访问'); } $r=db('risk')->where('userinfo_uid',$this->uid)->count(); if($r){ $ids = db('risk')->update($post); } else{ $ids = db('risk')->insert($post); } if($ids){ return WPreturn('操作成功',1); }else{ return WPreturn('操作失败',-1); } } ```