commonSetting


URI

<uiConfig_uri>/commonsetting[.<format>]

支持的方法

GETPUTHEAD

父资源

uiConfig

介绍

全站通用 UI 配置信息资源。iPortal 全站通用的 UI 包括页面的 导航栏、菜单项、页脚等。

支持的方法:

支持的表述格式:JSON。

资源层次

HTTP 请求方法

对如下 URI 执行 HTTP 请求,以 json 输出格式为例加以说明,其中,supermapiportal 是服务器名。

http://supermapiportal:8190/iportal/web/uiconfig/commonsetting.json

GET 请求

获取 iPortal 中全站通用的 UI 配置信息。

请求参数

设置参数后,会返回指定语言的 UI 配置信息,请求参数必须包含在 URI 中。

名称 类型 含义
language String 配置信息的语言版本。目前支持 zh(中文)与 en(英文)。

响应结构

iPortal 全站通用的 UI 配置信息由以下字段组成:

字段 类型 说明
common String 通用配置。
header String 导航栏配置。
footer String 页脚配置。
languageConfig String 语言配置。
menus String 导航栏菜单配置。

响应示例

对 commonSetting 资源:http://localhost:8190/iportal/web/uiconfig/commonsetting.json 执行 GET 请求,返回的 json 格式的资源表述如下:

{

    "common": {

        "app": true,

        "subTitle": "SuperMap iPortal 10i",

        "beta": " ",

        "desc": "您可以非常方便的对本门户站点首页的几乎所有内容进行定制,定制方法请参见"

    },

    "footer": {

        "title": "Powered by SuperMap iPortal 10i (10.0.0-linux64) © 2000-2019 北京超图软件股份有限公司"

    },

    "header": {

        "isShowHelp": true,

        "logo": "{webUiRoot}homePageImg/iportal_logo.svg",

        "title": ""

    },

    "languageConfig": {

        "language": [

            {

                "identity": "zh",

                "title": "中文"

            },

            {

                "identity": "en",

                "title": "English"

            }

        ],

        "defaultLan": "zh"

    },

    "menus": [

        {

            "isCustomColumn": false,

            "newUrl": "/home",

            "isDefined": false,

            "id": "headerHome",

            "isVisible": false,

            "title": "首页",

            "url": ""

        },

        {

            "isCustomColumn": false,

            "isDefined": true,

            "id": "mod_16",

            "isVisible": true,

            "title": "新版首页",

            "url": "{portalRoot}/web-ui/index.html"

        },

        {

            "isCustomColumn": false,

            "newUrl": "/resource-center",

            "children": [

                {

                    "isCustomColumn": false,

                    "newUrl": "/resource-center/map",

                    "isDefined": false,

                    "id": "childMod_Maps",

                    "isVisible": true,

                    "title": "地图",

                    "url": ""

                },

                {

                    "isCustomColumn": false,

                    "newUrl": "/resource-center/service",

                    "isDefined": false,

                    "id": "childMod_Services",

                    "isVisible": true,

                    "title": "服务",

                    "url": ""

                },

                {

                    "isCustomColumn": false,

                    "newUrl": "/resource-center/scene",

                    "isDefined": false,

                    "id": "childMod_Scene",

                    "isVisible": true,

                    "title": "场景",

                    "url": ""

                },

                {

                    "isCustomColumn": false,

                    "newUrl": "/resource-center/data",

                    "isDefined": true,

                    "id": "childMod_Datas",

                    "isVisible": true,

                    "title": "数据",

                    "url": ""

                },

                {

                    "isCustomColumn": false,

                    "newUrl": "/resource-center/mapdashboard",

                    "isDefined": true,

                    "id": "childMod_MapDashboards",

                    "isVisible": true,

                    "title": "大屏",

                    "url": ""

                },

                {

                    "isCustomColumn": false,

                    "newUrl": "/resource-center/insightsworkspace",

                    "isDefined": true,

                    "id": "childMod_Insights",

                    "isVisible": true,

                    "title": "洞察",

                    "url": ""

                }

            ],

            "isDefined": false,

            "id": "headerResources",

            "isVisible": true,

            "title": "资源中心",

            "url": ""

        },

        {

            "isCustomColumn": false,

            "newUrl": "/app",

            "isDefined": false,

            "id": "headerApps",

            "isVisible": true,

            "title": "应用中心",

            "url": ""

        },

        {

            "isCustomColumn": false,

            "isDefined": true,

            "id": "mod_0da2e3d625a",

            "isVisible": true,

            "title": "数据洞察",

            "url": "{portalRoot}/apps/insights/edit.html"

        },

        {

            "isCustomColumn": false,

            "isDefined": true,

            "id": "mod_16",

            "isVisible": true,

            "title": "数据上图",

            "url": "{portalRoot}/apps/dataviz/edit.html"

        },

        {

            "isCustomColumn": false,

            "isDefined": false,

            "id": "headerMapViews",

            "isVisible": false,

            "title": "数据上图",

            "url": "{portalRoot}/apps/viewer?action=create"

        },

        {

            "isCustomColumn": "{portalRoot}web/menus/开发指南",

            "isDefined": true,

            "id": "mod_11",

            "isVisible": false,

            "title": "开发指南",

            "url": "http://iclient.supermapol.com/"

        },

        {

            "isCustomColumn": false,

            "isDefined": true,

            "id": "mod_13",

            "isVisible": true,

            "title": "地图大屏",

            "url": "{portalRoot}/apps/mapdashboard/index.html?action=create"

        },

        {

            "isCustomColumn": false,

            "isDefined": false,

            "id": "mod_f2d02a332e3",

            "isVisible": false,

            "title": "群组",

            "url": "{portalRoot}/web/groups"

        },

        {

            "isCustomColumn": "{portalRoot}web/menus/其他云产品",

            "children": [

                {

                    "isCustomColumn": false,

                    "isDefined": true,

                    "id": "childMod_1",

                    "isVisible": false,

                    "title": "iManager",

                    "url": "http://192.168.169.4:31111"

                },

                {

                    "isCustomColumn": false,

                    "isDefined": true,

                    "id": "childMod_2",

                    "isVisible": false,

                    "title": "iServer",

                    "url": "http://rdc.ispeco.com:8080/iserver"

                },

                {

                    "isCustomColumn": "{portalRoot}web/menus/SuperMap Online",

                    "isDefined": true,

                    "id": "childMod_3",

                    "isVisible": false,

                    "title": "SuperMap Online",

                    "url": "https://www.supermapol.com"

                }

            ],

            "isDefined": true,

            "id": "mod_17",

            "isVisible": false,

            "title": "其他云产品",

            "url": "http://192.168.169.4:31111"

        },

        {

            "isCustomColumn": false,

            "isDefined": true,

            "id": "mod_21",

            "isVisible": true,

            "title": "群组",

            "url": "{portalRoot}/web-ui/groups"

        },

        {

            "isCustomColumn": false,

            "isDefined": true,

            "id": "mod_22",

            "isVisible": true,

            "title": "新版管理",

            "url": "{portalRoot}/manager-ui/index.html"

        }

    ]

}

PUT 请求

修改 iPortal 中全站通用的 UI 配置。

请求参数

发送请求时,需要在请求体中传递如下参数:

字段 类型 说明
common String 通用配置。
header String 导航栏配置。
footer String 页脚配置。
languageConfig String 语言配置。
menus String 导航栏菜单配置。

响应结构

返回的资源表述结构如下:

字段 类型 说明
succeed boolean 修改全站通用 UI 配置是否成功。
error HttpError 出错信息,如果修改成功,则没有本字段。

响应示例

修改 iPortal 中全站通用的 UI 配置信息,对 commonSetting 资源:http://localhost/iportal/web/uiconfig/commonsetting.json 执行 PUT 请求,发送请求体如下:

{

    "common": {

        "app": true,

        "subTitle": "SuperMap iPortal 10i",

        "beta": " ",

        "desc": "您可以非常方便的对本门户站点首页的几乎所有内容进行定制,定制方法请参见"

    },

    "footer": {

        "title": "Powered by SuperMap iPortal 10i (10.0.0-linux64) © 2000-2019 北京超图软件股份有限公司"

    },

    "header": {

        "isShowHelp": true,

        "logo": "{webUiRoot}homePageImg/iportal_logo.svg",

        "title": ""

    },

    "languageConfig": {

        "language": [

            {

                "identity": "zh",

                "title": "中文"

            },

            {

                "identity": "en",

                "title": "English"

            }

        ],

        "defaultLan": "zh"

    },

    "menus": [

        {

            "isCustomColumn": false,

            "newUrl": "/home",

            "isDefined": false,

            "id": "headerHome",

            "isVisible": false,

            "title": "首页",

            "url": ""

        },

        {

            "isCustomColumn": false,

            "isDefined": true,

            "id": "mod_16",

            "isVisible": true,

            "title": "新版首页",

            "url": "{portalRoot}/web-ui/index.html"

        },

        {

            "isCustomColumn": false,

            "newUrl": "/resource-center",

            "children": [

                {

                    "isCustomColumn": false,

                    "newUrl": "/resource-center/map",

                    "isDefined": false,

                    "id": "childMod_Maps",

                    "isVisible": true,

                    "title": "地图",

                    "url": ""

                },

                {

                    "isCustomColumn": false,

                    "newUrl": "/resource-center/service",

                    "isDefined": false,

                    "id": "childMod_Services",

                    "isVisible": true,

                    "title": "服务",

                    "url": ""

                },

                {

                    "isCustomColumn": false,

                    "newUrl": "/resource-center/scene",

                    "isDefined": false,

                    "id": "childMod_Scene",

                    "isVisible": true,

                    "title": "场景",

                    "url": ""

                },

                {

                    "isCustomColumn": false,

                    "newUrl": "/resource-center/data",

                    "isDefined": true,

                    "id": "childMod_Datas",

                    "isVisible": true,

                    "title": "数据",

                    "url": ""

                },

                {

                    "isCustomColumn": false,

                    "newUrl": "/resource-center/mapdashboard",

                    "isDefined": true,

                    "id": "childMod_MapDashboards",

                    "isVisible": true,

                    "title": "大屏",

                    "url": ""

                },

                {

                    "isCustomColumn": false,

                    "newUrl": "/resource-center/insightsworkspace",

                    "isDefined": true,

                    "id": "childMod_Insights",

                    "isVisible": true,

                    "title": "洞察",

                    "url": ""

                }

            ],

            "isDefined": false,

            "id": "headerResources",

            "isVisible": true,

            "title": "资源中心",

            "url": ""

        },

        {

            "isCustomColumn": false,

            "newUrl": "/app",

            "isDefined": false,

            "id": "headerApps",

            "isVisible": true,

            "title": "应用中心",

            "url": ""

        },

        {

            "isCustomColumn": false,

            "isDefined": true,

            "id": "mod_0da2e3d625a",

            "isVisible": true,

            "title": "数据洞察",

            "url": "{portalRoot}/apps/insights/edit.html"

        },

        {

            "isCustomColumn": false,

            "isDefined": true,

            "id": "mod_16",

            "isVisible": true,

            "title": "数据上图",

            "url": "{portalRoot}/apps/dataviz/edit.html"

        },

        {

            "isCustomColumn": false,

            "isDefined": false,

            "id": "headerMapViews",

            "isVisible": false,

            "title": "数据上图",

            "url": "{portalRoot}/apps/viewer?action=create"

        },

        {

            "isCustomColumn": "{portalRoot}web/menus/开发指南",

            "isDefined": true,

            "id": "mod_11",

            "isVisible": false,

            "title": "开发指南",

            "url": "http://iclient.supermapol.com/"

        },

        {

            "isCustomColumn": false,

            "isDefined": true,

            "id": "mod_13",

            "isVisible": true,

            "title": "地图大屏",

            "url": "{portalRoot}/apps/mapdashboard/index.html?action=create"

        },

        {

            "isCustomColumn": false,

            "isDefined": false,

            "id": "mod_f2d02a332e3",

            "isVisible": false,

            "title": "群组",

            "url": "{portalRoot}/web/groups"

        },

        {

            "isCustomColumn": false,

            "isDefined": true,

            "id": "mod_21",

            "isVisible": true,

            "title": "群组",

            "url": "{portalRoot}/web-ui/groups"

        }

    ]

}

则返回的 json 格式的资源表述如下:

{"succeed": true}

HEAD 请求

返回跟 GET 请求一样的 HTTP 响应头,但是没有响应实体。可以在不必传输整个响应内容的情况下,获取包含在响应消息头中的元数据信息。元数据信息包括媒体类型,字符编码,压缩编码,实体内容长度等。

HEAD 请求可以用来判断 commonSetting 资源是否存在,或者客户端是否有权限访问 commonSetting 资源。通过对加.<format>的 URI 执行 HEAD 请求,还可以快速判断 commonSetting 资源是否支持<format>格式的表述。

请参见