您最多选择25个标签 标签必须以中文、字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

10 年前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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. function queryAiCenterInfo(){
  47. $.ajax({
  48. type:"GET",
  49. url:"/api/v1/cloudbrain/get_newest_job",
  50. headers: {
  51. authorization:token,
  52. },
  53. dataType:"json",
  54. async:false,
  55. success:function(json){
  56. for(var i=0;i < json.length;i++){
  57. jobTask[json[i].ai_center_id] =json[i].job_name;
  58. }
  59. },
  60. error:function(response) {
  61. console.log("query task info error.");
  62. }
  63. });
  64. $.ajax({
  65. type:"GET",
  66. url:"/api/v1/cloudbrain/get_center_info",
  67. headers: {
  68. authorization:token,
  69. },
  70. dataType:"json",
  71. async:false,
  72. success:function(json){
  73. displayAiCenterInfo(json);
  74. },
  75. error:function(response) {
  76. }
  77. });
  78. }
  79. function displayAiCenterInfo(json){
  80. for(var i=0;i<json.length;i++){
  81. var tmp ={};
  82. tmp["name"]=json[i].name;
  83. if(jobTask[json[i].id] != null){
  84. tmp["type"]="blue";
  85. }else{
  86. tmp["type"]="green";
  87. }
  88. tmp["icon"]="";
  89. tmp["content"]=json[i].content;
  90. serverItemList.push(tmp);
  91. }
  92. }
  93. var serverItemList=[];
  94. queryAiCenterInfo();
  95. var app = new Vue({
  96. el: "#app",
  97. //数据 blue, green, yellow
  98. data: {
  99. itemList:serverItemList,
  100. },
  101. mounted: function () {
  102. new Rotation3D({
  103. id: '#rotation3D',
  104. farScale: 0.6,
  105. // farScale: 1,
  106. xRadius: 0, //x半径压缩
  107. yRadius: 130, //y半径压缩
  108. // yRadius: 0, //y半径压缩
  109. // autoPlay:true,
  110. // autoPlayDelay:6000,
  111. })
  112. },
  113. methods: {},
  114. });
  115. $(document).ready(function(){
  116. var pArrays=$('.itemList').find("p");
  117. for(var i=0;i<pArrays.length;i++){
  118. var p = pArrays[i];
  119. p.innerText=serverItemList[i].content;
  120. }
  121. var lines=$('.lineList').find("span");
  122. for(var i=0; i< lines.length;i++){
  123. if(jobTask[i+1] != null){
  124. lines[i].innerText = jobTask[i+1];
  125. }
  126. }
  127. });
  128. </script>
  129. {{end}}
  130. </body>
  131. </html>