ali内部

在webx-component.xml中
需求: 要初始化一个工具类,在vm中被用到
<services:pull xmlns="http://www.alibaba.com/schema/services/pull/factories">
<utils />
<rundata-tool />
<csrfToken />
<form-tool />
<control-tool />
<uris-tool />
<bean-tool id="DateTimeUtil" class="com.alibaba.xxx.utils.DateTimeUtil" autowire="true" scope="global"/>
</services:pull>



#set($spmHome="/static")  
<link href="$spmHome/css/backend.css" type="text/css" rel="stylesheet" media="screen" />


$screen_placeholder

$control.setTemplate("spmHeader")




#SLITERAL($msg.content)  这个标签可以转义 html



===================================

============================
内部:
<script type="text/javascript">
      jQuery(document).ready(function($) {
          var t=new ais.home.notice({$el:$('#content-container')});
          t.initData();
       });
</script>


var url = App.getDataUrl()+'xservice/getUserInfoByEmplId.jsonp?_='+jQuery.now();
        var data = {'emplId':emplId};
jQuery.when(ali.network.easyJsonp(url, data)).done(function(){
   
  
}).fail(function(){
   
});




var source = [
].join('');

var template = Handlebars.compile(source);

var template = Handlebars.compile(source);
Handlebars.registerHelper('image_url', function () {
        return App.getZoomImgUrl(this.imageUrl,50);
        });

var result = template(data);


if(App.subscribers['ais.search.resource.pagination.nextpage']) {
    PageBus.unsubscribe(App.subscribers['ais.search.resource.pagination.nextpage']);
    }

App.subscribers['ais.search.resource.pagination.nextpage']=PageBus.subscribe('ais.search.resource.pagination.nextpage', this,function (subj, msg) {

});
    PageBus.publish('ais.global.popmsg',{type:3,content:'刷新过滤条件失败'});


Handlebars.registerHelper('tip', function () {
                        var unreadContent = "";
                        if(this.unreadContent>0){
                            unreadContent = "has-unread-content";
                        }
                         if(this.tip.trim().length>0){
                             var _html= ['<div class="name g-csscut-more ',unreadContent,'" >',this.tip,'</div>'].join('');
                            
                             return new Handlebars.SafeString(_html);
                         }
                         return "";
                    });

private static final Logger logger              = LoggerFactory.getLogger(MsgReminderService.class);

你可能感兴趣的:(li)