javascript 移动WA.js的业务规则
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了javascript 移动WA.js的业务规则相关的知识,希望对你有一定的参考价值。
(function executeRule(current, previous /*null when async*/ ) {
/*
var query = current.getEncodedQuery();
var isOk = query && query.indexOf('roles=itil')!=-1;
if(gs.isMobile() && isOk){
gs.info('Fabio --> query: '+ query + ' isOk: ' + isOk);
gs.info('Fabio --> current.getTableName(): '+ current.getTableName());
gs.info('Fabio previous: ' + previous.getTableName());
var newQuery = query.replace(/CONTAINS/g, 'STARTSWITH');
current.addEncodedQuery(newQuery);
}
*/
var url;
try {
// catch for those cases where RP is not in scope
url = GlideTransaction.get(); //for api requests
gs.info('Fabio --> isMobile(): '+ gs.isMobile());
gs.info('Fabio --> GlideTransaction getPageName: '+ url.getPageName());
gs.info('Fabio --> GlideTransaction getURLString: '+ url.getURLString());
gs.info('Fabio --> GlideTransaction baseURL: '+ url.baseURL());
//gs.info('Fabio --> GT getRequest getRemoteAddr: '+ url.getRequest().getRemoteAddr());
//gs.info('Fabio --> GT getRequest getServletPath: '+ url.getRequest().getServletPath());
gs.info('Fabio --> GT getRequest getParameterMap: '+ url.getRequest().getParameterMap());
//gs.info('Fabio --> GT getRequest getPathTranslated: '+ url.getRequest().getPathTranslated());
gs.info('Fabio --> GT getRequest attributeNames: '+ url.getRequest().attributeNames);
gs.info('Fabio --> GT getRequest getRequestURL: '+ url.getRequest().getRequestURL());
gs.info('Fabio --> GT getRequest getRequestURI: '+ url.getRequest().getRequestURI());
gs.info('Fabio --> GT getRequest headerNames: '+ url.getRequest().headerNames);
gs.info('Fabio --> GT getRequest queryString: '+ url.getRequest().queryString);
gs.info('Fabio --> GT getRequest getParameterNames: '+ url.getRequest().getParameterNames());
gs.info('Fabio --> GT getRequest requestURI: '+ url.getRequest().requestURI);
//gs.info('Fabio --> GT getRequest getOriginalParameterMap: '+ url.getRequest().getOriginalParameterMap());
gs.info('Fabio --> GT getRequest toString: '+ url.getRequest().toString());
gs.info('Fabio --> GT getRequest getPathInfo: '+ url.getRequest().getPathInfo());
gs.info('Fabio --> GT getRequest parameterMap: '+ url.getRequest().parameterMap);
gs.info('Fabio --> GT getRequest parameterValues: '+ url.getRequest().parameterValues);
gs.info('Fabio --> GT getRequest header: '+ url.getRequest().header);
gs.info('Fabio --> GT getRequest getHeader: '+ url.getRequest().getHeader());
} catch(e) {
}
})(current, previous);
以上是关于javascript 移动WA.js的业务规则的主要内容,如果未能解决你的问题,请参考以下文章
如何在客户端和服务器之间共享 Javascript 业务规则?