routes修改
This commit is contained in:
parent
ff7959fdc9
commit
694e9f2c97
|
@ -62,4 +62,17 @@ Rails.application.routes.draw do
|
|||
post 'sessions' => 'sessions#create'
|
||||
delete 'session' => 'sessions#destroy'
|
||||
get 'session' => 'sessions#show'
|
||||
|
||||
post 'shares' => 'shares#create'
|
||||
get 'shares' => 'share#getShareList'
|
||||
|
||||
get 'projects' => 'projects#index'
|
||||
post 'projects' => 'projects#create'
|
||||
post 'projects/users' => 'projects#addUsers'
|
||||
get 'projects/detail' => 'projects#detail'
|
||||
|
||||
get 'missions/project/status' => 'missions#getlist'
|
||||
get 'missions/detail' => 'missions#detail'
|
||||
patch 'missions/detail' => 'missions#update'
|
||||
post 'missions/comments' => 'missions#commentPublish'
|
||||
end
|
||||
|
|
|
@ -259,6 +259,25 @@
|
|||
<!-- AdminLTE for demo purposes -->
|
||||
<script src="../dist/js/demo.js"></script>
|
||||
<!-- date select and query -->
|
||||
<script>
|
||||
//alert("111");
|
||||
$(document).ready(function(){
|
||||
$.ajax({
|
||||
type: "get",
|
||||
dataType: "json",
|
||||
url:"/shares.json",
|
||||
statusCode: {
|
||||
200: function(data) {// 请求成功
|
||||
alert(data);
|
||||
},
|
||||
401:function(){// 未授权
|
||||
alert("未登录!");
|
||||
window.location.href="pages/login.html";
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Reference in New Issue