getValue(); } function getUserId(){ $payload = JWTAuth::auth(); return $payload['id']->getValue(); } function getQydm(){ $payload = JWTAuth::auth(); return $payload['qydm']->getValue(); } /** * @return false|string * 获取行政区代码,并去除结尾的0 */ function getXzqdmSub(){ $payload = JWTAuth::auth(); $xzqdm = $payload['xzqdm']->getValue(); $province = substr($xzqdm,3); $city = substr($xzqdm,4); $country = substr($xzqdm,6); if($province === "000000"){ $code = substr($xzqdm,0,2); }else if ($city === "00000"){ $code = substr($xzqdm,0,4); }else if ($country === "000"){ $code = substr($xzqdm,0,6); }else{ $code = $xzqdm ; } return $code; }