footer_grain.html 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <div class="bottom-wrap">&copy; <span id="footbottom"></span> 中储粮-单仓档案管理系统 版权所有</div>
  2. <!-- <div id="fangxiang">
  3. <img src="img/fangxiang.png"/>
  4. </div> -->
  5. <script type="text/javascript">
  6. $(function(){
  7. var path=window.location.pathname;
  8. var patharr=path.split("/");
  9. var grainFile=patharr[3];
  10. var grainName=grainFile.split(".");
  11. var grain=grainName[0];
  12. localStorage.grainPitctureName = grain;
  13. console.log(grain);
  14. $("#Map area").click(function(){
  15. var number=$(this).data("num");
  16. $.ajax({
  17. type: "get",
  18. dataType: 'json',
  19. url: config.baseUrl + config.organization.getHouseByGrainNameAndHnum+"?gename="+grain+"&number="+number,
  20. success: function(data) {
  21. if(data.code==0){
  22. localStorage.warehouseID=data.houseId;
  23. Cookies.set('warehouseID', data.houseId);
  24. window.location.href="/pages/base.html";
  25. }else{
  26. alert(data.msg);
  27. }
  28. },
  29. error: function(e) {
  30. console.log(e);
  31. }
  32. });
  33. });
  34. $.ajax({
  35. type: "get",
  36. dataType: 'json',
  37. url: config.baseUrl + config.organization.getGrainByEnName+"?enname="+grain,
  38. success: function(data) {
  39. if(data.code==0){
  40. var content="<h4>"+data.obj.name+"介绍信息</h4>";
  41. if(data.obj.grainDescribe){
  42. content=content+data.obj.grainDescribe;
  43. }else{
  44. content=content+"暂未添加";
  45. }
  46. $("#grain-info").html(content);
  47. }
  48. },
  49. error: function(e) {
  50. console.log(e);
  51. }
  52. });
  53. });
  54. </script>
  55. <script>
  56. $.ajax({
  57. type: "get",
  58. dataType: 'json',
  59. contentType: 'application/json;charset=utf-8',
  60. url: config.baseUrl + '/sys/sync/serverTime',
  61. success: function(e) {
  62. $('#footbottom').text(e.data)
  63. },
  64. error: function(e) {
  65. console.log(e);
  66. }
  67. });
  68. </script>