You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

footer.tmpl 3.9 kB

10 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. {{/*
  2. <html>
  3. <body>
  4. <div>
  5. */}}
  6. {{template "custom/body_inner_post" .}}
  7. </div>
  8. {{template "custom/body_outer_post" .}}
  9. {{template "base/footer_content" .}}
  10. <script src="{{StaticUrlPrefix}}/js/jquery.js?v={{MD5 AppVer}}"></script>
  11. {{if .RequireSimpleMDE}}
  12. <script src="{{StaticUrlPrefix}}/vendor/plugins/simplemde/simplemde.min.js"></script>
  13. <script src="{{StaticUrlPrefix}}/vendor/plugins/codemirror/addon/mode/loadmode.js"></script>
  14. <script src="{{StaticUrlPrefix}}/vendor/plugins/codemirror/mode/meta.js"></script>
  15. <script>
  16. CodeMirror.modeURL = "{{StaticUrlPrefix}}/vendor/plugins/codemirror/mode/%N/%N.js";
  17. </script>
  18. {{end}}
  19. <!-- Third-party libraries -->
  20. {{if .RequireMinicolors}}
  21. <script src="{{StaticUrlPrefix}}/vendor/plugins/jquery.minicolors/jquery.minicolors.min.js"></script>
  22. {{end}}
  23. {{if .RequireU2F}}
  24. <script src="{{StaticUrlPrefix}}/vendor/plugins/u2f/index.js"></script>
  25. {{end}}
  26. {{if .EnableCaptcha}}
  27. {{if eq .CaptchaType "recaptcha"}}
  28. <script src='{{ URLJoin .RecaptchaURL "api.js"}}' async></script>
  29. {{end}}
  30. {{end}}
  31. {{if .RequireTribute}}
  32. <script src="{{StaticUrlPrefix}}/vendor/plugins/tribute/tribute.min.js"></script>
  33. {{end}}
  34. {{if .PageIsHome}}
  35. <script rel="stylesheet" src="{{StaticUrlPrefix}}/vendor/plugins/jquery.particleground/jquery.particleground.min.js"></script>
  36. {{end}}
  37. <script src="{{StaticUrlPrefix}}/fomantic/semantic.min.js?v={{MD5 AppVer}}"></script>
  38. <script src="{{StaticUrlPrefix}}/js/index.js?v={{MD5 AppVer}}"></script>
  39. {{template "custom/footer" .}}
  40. {{if .PageIsHome}}
  41. <!--script src="https://www.jq22.com/jquery/jquery-1.10.2.js"></script-->
  42. <script src="/rotation3D/vue-2.6.10.min.js"></script>
  43. <script src="/rotation3D/rotation3D.js?v={{MD5 AppVer}}"></script>
  44. <script>
  45. var jobTask={};
  46. var html =document.documentElement;
  47. var lang = html.attributes["lang"]
  48. var isZh = true;
  49. if(lang != null && lang.nodeValue =="en-US" ){
  50. isZh=false;
  51. }
  52. function queryAiCenterInfo(){
  53. $.ajax({
  54. type:"GET",
  55. url:"/api/v1/cloudbrain/get_newest_job",
  56. headers: {
  57. authorization:token,
  58. },
  59. dataType:"json",
  60. async:false,
  61. success:function(json){
  62. for(var i=0;i < json.length;i++){
  63. jobTask[json[i].ai_center_id] =json[i].job_name;
  64. }
  65. },
  66. error:function(response) {
  67. console.log("query task info error.");
  68. }
  69. });
  70. $.ajax({
  71. type:"GET",
  72. url:"/api/v1/cloudbrain/get_center_info",
  73. headers: {
  74. authorization:token,
  75. },
  76. dataType:"json",
  77. async:false,
  78. success:function(json){
  79. displayAiCenterInfo(json);
  80. },
  81. error:function(response) {
  82. }
  83. });
  84. }
  85. function displayAiCenterInfo(json){
  86. for(var i=0;i<json.length;i++){
  87. var tmp ={};
  88. tmp["name"]=json[i].name;
  89. if(jobTask[json[i].id] != null){
  90. tmp["type"]="blue";
  91. }else{
  92. tmp["type"]="green";
  93. }
  94. tmp["icon"]="";
  95. if(isZh){
  96. tmp["content"]=json[i].content;
  97. }else{
  98. tmp["content"]=json[i].content_en;
  99. }
  100. serverItemList.push(tmp);
  101. }
  102. }
  103. var serverItemList=[];
  104. queryAiCenterInfo();
  105. var app = new Vue({
  106. el: "#app",
  107. //数据 blue, green, yellow
  108. data: {
  109. itemList:serverItemList,
  110. },
  111. mounted: function () {
  112. new Rotation3D({
  113. id: '#rotation3D',
  114. farScale: 0.6,
  115. // farScale: 1,
  116. xRadius: 0, //x半径压缩
  117. yRadius: 130, //y半径压缩
  118. // yRadius: 0, //y半径压缩
  119. // autoPlay:true,
  120. // autoPlayDelay:6000,
  121. })
  122. },
  123. methods: {},
  124. });
  125. $(document).ready(function(){
  126. var pArrays=$('.itemList').find("p");
  127. for(var i=0;i<pArrays.length;i++){
  128. var p = pArrays[i];
  129. p.innerText=serverItemList[i].content;
  130. }
  131. var lines=$('.lineList').find("span");
  132. for(var i=0; i< lines.length;i++){
  133. if(jobTask[i+1] != null){
  134. lines[i].innerText = jobTask[i+1];
  135. }
  136. }
  137. });
  138. </script>
  139. {{end}}
  140. </body>
  141. </html>