root 2 年 前
コミット
74f89aebe4
1 ファイル変更89 行追加89 行削除
  1. 89 89
      pages/app/header-json.js

+ 89 - 89
pages/app/header-json.js

@@ -1,98 +1,98 @@
 function getHeaderJson() {
 function getHeaderJson() {
     let headerJson = {
     let headerJson = {
-        "type": "page",
-        "initApi": "http://localhost:8081/api/userInfo",
-        "body": [
-          {
-            "type": "flex",
-            "justify": "flex-end",
-            "items": [
-              {
-                "type": "dropdown-button",
-                "label": "",
-                "className": "header-menu",
-                "buttons": [
-                  {
-                    "type": "button",
-                    "label": "中文",
-                    "id": "u:6911502c8fcc",
-                    "onEvent": {
-                      "click": {
-                        "actions": [
-                          {
-                            "script": "localStorage.setItem('language', 'zh-CN')\nlocation.reload()",
-                            "actionType": "custom",
-                            "args": {
-                            }
+      "type": "page",
+      "initApi": "http://localhost:8081/api/userInfo",
+      "body": [
+        {
+          "type": "flex",
+          "justify": "flex-end",
+          "items": [
+            {
+              "type": "dropdown-button",
+              "label": "",
+              "className": "header-menu",
+              "buttons": [
+                {
+                  "type": "button",
+                  "label": "中文",
+                  "id": "u:6911502c8fcc",
+                  "onEvent": {
+                    "click": {
+                      "actions": [
+                        {
+                          "script": "localStorage.setItem('language', 'zh-CN')\nlocation.reload()",
+                          "actionType": "custom",
+                          "args": {
                           }
                           }
-                        ],
-                        "weight": 0
-                      }
+                        }
+                      ],
+                      "weight": 0
                     }
                     }
-                  },
-                  {
-                    "type": "button",
-                    "label": "English",
-                    "id": "u:e702685a7a45",
-                    "onEvent": {
-                      "click": {
-                        "actions": [
-                          {
-                            "script": "localStorage.setItem('language', 'en-US')\r\nlocation.reload()",
-                            "actionType": "custom"
-                          }
-                        ],
-                        "weight": 0
-                      }
-                    },
-                    "actionType": "",
-                    "link": "/view/user_info"
                   }
                   }
-                ],
-                "id": "u:4fedf7a987bf",
-                "size": "md",
-                "level": "default",
-                "align": "right",
-                "block": false,
-                "hideCaret": true,
-                "trigger": "hover",
-                "icon": "./public/static/icon/language-change.png",
-                "btnClassName": "no-border"
-              },
-              {
-                "type": "dropdown-button",
-                "label": "$userName",
-                "className": "header-menu",
-                "buttons": [
-                  {
-                    "type": "button",
-                    "label": "个人信息",
-                    "actionType": "link",
-                    "link": "/view/user_info",
-                    "id": "u:57cf3ed9c568"
+                },
+                {
+                  "type": "button",
+                  "label": "English",
+                  "id": "u:e702685a7a45",
+                  "onEvent": {
+                    "click": {
+                      "actions": [
+                        {
+                          "script": "localStorage.setItem('language', 'en-US')\r\nlocation.reload()",
+                          "actionType": "custom"
+                        }
+                      ],
+                      "weight": 0
+                    }
                   },
                   },
-                  {
-                    "type": "button",
-                    "actionType": "url",
-                    "url": "/login/out",
-                    "blank": false,
-                    "confirmText": "确定要退出吗",
-                    "label": "退出登录",
-                    "id": "u:88d8afc464b5"
-                  }
-                ],
-                "id": "u:d324269526b9",
-                "size": "md",
-                "level": "default",
-                "align": "right",
-                "block": true,
-                "trigger": "hover"
-              }
-            ],
-            "id": "u:e7752d0c1dbe"
-          }
-        ],
-        "id": "u:d16525b6aae6"
+                  "actionType": "",
+                  "link": "/view/user_info"
+                }
+              ],
+              "id": "u:4fedf7a987bf",
+              "size": "md",
+              "level": "default",
+              "align": "right",
+              "block": false,
+              "hideCaret": true,
+              "trigger": "hover",
+              "icon": "./public/static/icon/language-change.png",
+              "btnClassName": "no-border"
+            },
+            {
+              "type": "dropdown-button",
+              "label": "$userName",
+              "className": "header-menu",
+              "buttons": [
+                {
+                  "type": "button",
+                  "label": "个人信息",
+                  "actionType": "link",
+                  "link": "/view/user_info",
+                  "id": "u:57cf3ed9c568"
+                },
+                {
+                  "type": "button",
+                  "actionType": "ajax",
+                  "url": "/login/out",
+                  "blank": false,
+                  "label": "退出登录",
+                  "id": "u:88d8afc464b5",
+                  "api": "http://localhost:8081/api/logout"
+                }
+              ],
+              "id": "u:d324269526b9",
+              "size": "md",
+              "level": "default",
+              "align": "right",
+              "block": true,
+              "trigger": "hover"
+            }
+          ],
+          "id": "u:e7752d0c1dbe"
+        }
+      ],
+      "id": "u:d16525b6aae6"
     }
     }
 
 
     return headerJson
     return headerJson