类 GetIpRegionMethod
java.lang.Object
com.publiccms.common.base.BaseMethod
com.publiccms.views.method.tools.GetIpRegionMethod
- 所有已实现的接口:
freemarker.template.TemplateMethodModel
,freemarker.template.TemplateMethodModelEx
,freemarker.template.TemplateModel
getIpRegion 获取IP区域信息
返回结果
string
ip
${getIpRegion('127.0.0.1')}
<script> $.getJSON('${site.dynamicPath}api/method/getIpRegion?parameters=127.0.0.1', function(data){ console.log(data); }); </script>
-
字段概要
字段从类继承的字段 com.publiccms.common.base.BaseMethod
log
从接口继承的字段 freemarker.template.TemplateModel
NOTHING
-
构造器概要
构造器 -
方法概要
从类继承的方法 com.publiccms.common.base.BaseMethod
exec, execute, getBoolean, getDate, getDouble, getInteger, getIntegerArray, getLong, getLongArray, getMap, getModel, getName, getShort, getString, getStringArray, httpEnabled, setName
-
字段详细资料
-
searcher
private org.lionsoul.ip2region.xdb.Searcher searcher
-
-
构造器详细资料
-
GetIpRegionMethod
public GetIpRegionMethod()
-
-
方法详细资料
-
execute
public Object execute(List<freemarker.template.TemplateModel> arguments) throws freemarker.template.TemplateModelException - 指定者:
execute
在类中BaseMethod
- 抛出:
freemarker.template.TemplateModelException
-
minParametersNumber
public int minParametersNumber()- 指定者:
minParametersNumber
在类中BaseMethod
- 返回:
- min parameters number
-
needAppToken
public boolean needAppToken()- 指定者:
needAppToken
在类中BaseMethod
- 返回:
- whether to need app token
-
getIpRegion
-