|
- {{/*
- <html>
- <body>
- <div>
- */}}
-
- {{template "custom/body_inner_post" .}}
-
- </div>
-
- {{template "custom/body_outer_post" .}}
-
- {{template "base/footer_content" .}}
-
- <script src="{{StaticUrlPrefix}}/js/jquery.js?v={{MD5 AppVer}}"></script>
-
-
-
- {{if .RequireSimpleMDE}}
- <script src="{{StaticUrlPrefix}}/vendor/plugins/simplemde/simplemde.min.js?v={{MD5 AppVer}}"></script>
- <script src="{{StaticUrlPrefix}}/vendor/plugins/codemirror/addon/mode/loadmode.js?v={{MD5 AppVer}}"></script>
- <script src="{{StaticUrlPrefix}}/vendor/plugins/codemirror/mode/meta.js?v={{MD5 AppVer}}"></script>
- <script>
- CodeMirror.modeURL = "{{StaticUrlPrefix}}/vendor/plugins/codemirror/mode/%N/%N.js";
- </script>
- {{end}}
-
- <!-- Third-party libraries -->
- {{if .RequireMinicolors}}
- <script src="{{StaticUrlPrefix}}/vendor/plugins/jquery.minicolors/jquery.minicolors.min.js?v={{MD5 AppVer}}"></script>
- {{end}}
- {{if .RequireU2F}}
- <script src="{{StaticUrlPrefix}}/vendor/plugins/u2f/index.js?v={{MD5 AppVer}}"></script>
- {{end}}
- {{if .EnableCaptcha}}
- {{if eq .CaptchaType "recaptcha"}}
- <script src='{{ URLJoin .RecaptchaURL "api.js"}}' async></script>
- {{end}}
- {{end}}
- {{if .RequireTribute}}
- <script src="{{StaticUrlPrefix}}/vendor/plugins/tribute/tribute.min.js?v={{MD5 AppVer}}"></script>
- {{end}}
- {{if .PageIsHome}}
- <script rel="stylesheet" src="{{StaticUrlPrefix}}/vendor/plugins/jquery.particleground/jquery.particleground.min.js?v={{MD5 AppVer}}"></script>
- {{end}}
- <script src="{{StaticUrlPrefix}}/fomantic/semantic.min.js?v={{MD5 AppVer}}"></script>
- <script src="{{StaticUrlPrefix}}/js/index.js?v={{MD5 AppVer}}"></script>
- {{template "custom/footer" .}}
- {{if .PageIsHome}}
- <!--script src="https://www.jq22.com/jquery/jquery-1.10.2.js?v={{MD5 AppVer}}"></script-->
- <script src="/rotation3D/vue-2.6.10.min.js?v={{MD5 AppVer}}"></script>
- <script src="/rotation3D/rotation3D.js?v={{MD5 AppVer}}"></script>
- <script>
- var jobTask={};
- var html =document.documentElement;
- var lang = html.attributes["lang"]
- var isZh = true;
- if(lang != null && lang.nodeValue =="en-US" ){
- isZh=false;
- }
- function queryAiCenterInfo(){
- $.ajax({
- type:"GET",
- url:"/api/v1/cloudbrain/get_newest_job",
- headers: {
- authorization:token,
- },
- dataType:"json",
- async:false,
- success:function(json){
- for(var i=0;i < json.length;i++){
- jobTask[json[i].ai_center_id] =json[i].job_name;
- }
- },
- error:function(response) {
- console.log("query task info error.");
- }
- });
-
- $.ajax({
- type:"GET",
- url:"/api/v1/cloudbrain/get_center_info",
- headers: {
- authorization:token,
- },
- dataType:"json",
- async:false,
- success:function(json){
- displayAiCenterInfo(json);
- },
- error:function(response) {
- }
- });
- }
- function displayAiCenterInfo(json){
- for(var i=0;i<json.length;i++){
- var tmp ={};
- tmp["name"]=json[i].name;
- if(jobTask[json[i].id] != null){
- tmp["type"]="blue";
- }else{
- tmp["type"]="green";
- }
- tmp["icon"]="";
- if(isZh){
- tmp["content"]=json[i].content;
- }else{
- tmp["content"]=json[i].content_en;
- }
- serverItemList.push(tmp);
- }
- }
-
- var serverItemList=[];
- queryAiCenterInfo();
- var app = new Vue({
- el: "#app",
- //数据 blue, green, yellow
- data: {
- itemList:serverItemList,
- },
- mounted: function () {
- new Rotation3D({
- id: '#rotation3D',
- farScale: 0.6,
- // farScale: 1,
- xRadius: 0, //x半径压缩
- yRadius: 130, //y半径压缩
- // yRadius: 0, //y半径压缩
- // autoPlay:true,
- // autoPlayDelay:6000,
- })
-
- },
- methods: {},
- });
- $(document).ready(function(){
- var pArrays=$('.itemList').find("p");
- for(var i=0;i<pArrays.length;i++){
- var p = pArrays[i];
- p.innerText=serverItemList[i].content;
- }
- var lines=$('.lineList').find("span");
- for(var i=0; i< lines.length;i++){
- if(jobTask[i+1] != null){
- lines[i].innerText = jobTask[i+1];
- }
- }
- });
- </script>
- {{end}}
-
- </body>
- </html>
|