个检按钮增加是否是开发者判断

main
yanzai 10 months ago
parent 623df955e2
commit 0fc27429d4

@ -11,7 +11,16 @@ class CheckUpTypeController extends Controller
//H5获取体检类型名称和logo
public function GetList()
{
$list=DB::table('checkup_type')->where(['status'=>1,'is_del'=>0])->get();
return \Yz::Return(true,"查询完成",['list'=>$list]);
$openid = request('openid');
$user=DB::table('web_users')->where(['openid'=>$openid])->first();
$list=DB::table('checkup_type');
$list=$list->where(['status'=>1,'is_del'=>0]);
if($user->dev===1){ //开发人员开启婚检
$list=$list->orWhere('id',4);
}
$list=$list->get();
return \Yz::Return(true,"查询完成",['list'=>$list]);
}
}

Loading…
Cancel
Save