add lltrip test

This commit is contained in:
wlh
2014-10-25 22:06:35 +08:00
parent 9f4c5bccad
commit 533298055c
249 changed files with 19678 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
/*
* 作者:wlhmyit@126.com
* 时间:2014-10-09
* 描述: 页面渲染
* */
define(function(require, exports, module) {
/*
* @param:tpl 模板
* @param:div 渲染内置view
* @param:data 获取的数据
*
* */
var render = function(tpl, div, data){
var _tpl = $('#' + tpl).html(),
_div = $('#' + div);
var list = {
data: JSON.parse(JSON.stringify(data))
};
//编译模板 & 渲染
var html = _.template(_tpl, list);
_div.html(html);
};
module.exports = {
render: render
};
});