阿里妈妈-RAP项目的实践(1)

在同事的推荐下,去了解了一下http://thx.github.io/RAP/study.html#,它是发现在前后端分离开发的神器

下面我们来简单上一组代码,来简单了解一下rap

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<title>rap--mockjs---demo</title>
<style type="text/css">
.section { text-align: center; font: 50px "Microsoft Yahei"; color: #fff;}
p{ font-size: 20px; }
a { color: #fff;}

</style>

</head>
<body>
<h1>rap--mockjs---demo</h1>




<script src="http://rap.taobao.org/rap.plugin.js?projectId=4793"></script>
<script src="http://libs.baidu.com/jquery/1.8.3/jquery.min.js"></script>
<script>
$(function(){
	$.ajax({  
         type:'get',      
         url:'http://rap.taobao.org/mockjs/4793/datas/list',  
         data:{},  
         dataType:'json',  
         success:function(data){  
         	console.log(data);
         }  
     });
});
</script>
</body>
</html>

  

posted on 2016-06-19 12:28  shenggen  阅读(751)  评论(0编辑  收藏  举报

导航