123456789101112131415161718192021 |
- template.helper("getPhoto", function(str){
- return getImgUrl(str);
- });
- template.helper("getCategoryName", function(cid){
- if(cid == "1"){
- return "血糖仪";
- }else if(cid == "2"){
- return "血压计";
- }
- });
- template.helper("formatDate", function(timestamp){
- var time = parseInt(timestamp),
- d = new Date(time);
- return d.format("yyyy-MM-dd hh:mm");
- });
- template.helper("getJsonStr", function(obj){
- return JSON.stringify(obj);
- })
|