cms icon indicating copy to clipboard operation
cms copied to clipboard

❗️❗️❗️新增一个内容后,管理后台内容列表里面看不到新添加的内容,反而显示另外一个站点某一个栏目的内容❗️❗️❗️

Open russellyi opened this issue 1 year ago • 1 comments

查询 siteId=932 && channelId=2412 的内容列表,结果返回了 siteId=2053 && channelId=2095 的内容列表。

下面是接口请求的 cURL, 除了对部分信息进行打码,其他的信息都是真实信息。

curl 'https://xxx.xxx.xxx.xxx/api/admin/cms/contents/contents/actions/list' \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'Accept-Language: en-US,en;q=0.9,zh;q=0.8' \
  -H 'Authorization: Bearer xxxx' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: application/json;charset=UTF-8' \
  -H 'Cookie: SiteServer.BackgroundPages.Cms.Modal.SelectAttachment=mjVX2hUv9HY0equals00secret0; Hm_lvt_ddf9a5f201151b8ab7ddce17c833ddc6=1719330638,1719410527,1719923792,1720362252; .AspNetCore.Antiforgery.-bkbDBPJzbo=CfDJ8BU6vZaPNQJItHDLHxrDILIz2Z4pMPiT-73BdLRWPKoQET7dTui2enVi73g0cUjG1SbeH4x-bAiKxzX9ZIBBKEKkloYs1lxN2gUC-bI41CUxEbt36J78dbFfmGgcl5Rcs0QHCk3bJQlNJXpTLbawjUc' \
  -H 'Origin: https://xxx.xxx.xxx.xxx' \
  -H 'Pragma: no-cache' \
  -H 'Referer: https://xxx.xxx.xxx.xxx/ss-admin/cms/contents/?siteId=932' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Site: same-origin' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0' \
  -H 'sec-ch-ua: "Not/A)Brand";v="8", "Chromium";v="126", "Microsoft Edge";v="126"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  --data-raw '{"siteId":932,"channelId":2412,"page":1,"searchType":"Title","searchText":"","isAdvanced":false,"checkedLevels":[-99,0,1,-1],"isTop":false,"isRecommend":false,"isHot":false,"isColor":false,"groupNames":[],"tagNames":[]}'

通过上面的 cURL (siteId=932) 返回了下面的报文,该报文里面的内容 siteId=2053,
"sourceName": "预览插入", "sourceId": -99

{
  "pageContents": [
    {
      "addUserName": null,
      "lastEditUserName": null,
      "lastEditDate": null,
      "isChecked": null,
      "hitsByDay": null,
      "hitsByWeek": null,
      "hitsByMonth": null,
      "lastHitsDate": null,
      "settingsXml": null,
      "isTop": null,
      "isRecommend": null,
      "isHot": null,
      "isColor": null,
      "content": null,
      "imageUrlCount": 0,
      "videoUrlCount": 0,
      "fileUrlCount": 0,
      "state": "已审核",
      "sequence": 1,
      "channelName": "首页 > 信息动态",
      "adminName": "xxxxxxxxxxx(yywdxy)",
      "lastEditAdminName": "xxxxxxxxxxx(yywdxy)",
      "userName": "",
      "sourceName": "预览插入",
      "channelId": 2095,
      "siteId": 2053,
      "adminId": 49,
      "lastEditAdminId": 49,
      "userId": 0,
      "taxis": 0,
      "groupNames": [],
      "tagNames": [],
      "sourceId": -99,
      "referenceId": 0,
      "templateId": 0,
      "checked": true,
      "checkedLevel": 0,
      "hits": 0,
      "downloads": 0,
      "title": "暑假安全暨诚信考试期末主题班会",
      "subTitle": "",
      "imageUrl": "",
      "videoUrl": "",
      "fileUrl": "",
      "body": "xxxxxxxxxxx",
      "summary": "",
      "author": "",
      "source": "",
      "top": false,
      "recommend": false,
      "hot": false,
      "color": false,
      "linkType": "None",
      "linkUrl": null,
      "addDate": "2024-07-10 08:54:47",
      "id": 38453,
      "guid": "09d28284-2f27-461c-aef5-7df44a2be68a",
      "createdDate": "2024-07-10 17:27:38",
      "lastModifiedDate": "2024-07-10 17:27:38"
    }
  ],
  "total": 1,
  "pageSize": 30,
  "titleColumn": {
    "attributeName": "Title",
    "displayName": "标题",
    "inputType": "Text",
    "width": 160,
    "isList": true,
    "isSearchable": true
  },
  "columns": [
    {
      "attributeName": "Sequence",
      "displayName": "序号",
      "inputType": "Text",
      "width": 70,
      "isList": false,
      "isSearchable": false
    },
    {
      "attributeName": "Id",
      "displayName": "内容Id",
      "inputType": "Text",
      "width": 70,
      "isList": false,
      "isSearchable": true
    },
    {
      "attributeName": "Guid",
      "displayName": "识别码",
      "inputType": "Text",
      "width": 310,
      "isList": false,
      "isSearchable": true
    },
    {
      "attributeName": "SubTitle",
      "displayName": "副标题",
      "inputType": "Text",
      "width": 160,
      "isList": false,
      "isSearchable": true
    },
    {
      "attributeName": "ImageUrl",
      "displayName": "图片",
      "inputType": "Image",
      "width": 100,
      "isList": false,
      "isSearchable": true
    },
    {
      "attributeName": "VideoUrl",
      "displayName": "视频",
      "inputType": "Video",
      "width": 160,
      "isList": false,
      "isSearchable": true
    },
    {
      "attributeName": "FileUrl",
      "displayName": "附件",
      "inputType": "File",
      "width": 160,
      "isList": false,
      "isSearchable": true
    },
    {
      "attributeName": "Summary",
      "displayName": "内容摘要",
      "inputType": "TextArea",
      "width": 160,
      "isList": false,
      "isSearchable": true
    },
    {
      "attributeName": "Author",
      "displayName": "作者",
      "inputType": "Text",
      "width": 160,
      "isList": false,
      "isSearchable": true
    },
    {
      "attributeName": "Source",
      "displayName": "来源",
      "inputType": "Text",
      "width": 160,
      "isList": false,
      "isSearchable": true
    },
    {
      "attributeName": "LinkType",
      "displayName": "链接类型",
      "inputType": "Text",
      "width": 160,
      "isList": false,
      "isSearchable": true
    },
    {
      "attributeName": "LinkUrl",
      "displayName": "外部链接",
      "inputType": "Text",
      "width": 160,
      "isList": false,
      "isSearchable": true
    },
    {
      "attributeName": "ChannelId",
      "displayName": "所属栏目",
      "inputType": "Text",
      "width": 160,
      "isList": false,
      "isSearchable": false
    },
    {
      "attributeName": "AddDate",
      "displayName": "添加时间",
      "inputType": "Text",
      "width": 160,
      "isList": true,
      "isSearchable": false
    },
    {
      "attributeName": "LastModifiedDate",
      "displayName": "最后修改时间",
      "inputType": "Text",
      "width": 160,
      "isList": false,
      "isSearchable": true
    },
    {
      "attributeName": "GroupNames",
      "displayName": "内容组",
      "inputType": "Text",
      "width": 160,
      "isList": false,
      "isSearchable": false
    },
    {
      "attributeName": "TagNames",
      "displayName": "标签",
      "inputType": "Text",
      "width": 160,
      "isList": false,
      "isSearchable": false
    },
    {
      "attributeName": "AdminId",
      "displayName": "添加人",
      "inputType": "Text",
      "width": 160,
      "isList": false,
      "isSearchable": true
    },
    {
      "attributeName": "LastEditAdminId",
      "displayName": "最后修改人",
      "inputType": "Text",
      "width": 160,
      "isList": false,
      "isSearchable": true
    },
    {
      "attributeName": "UserId",
      "displayName": "投稿用户",
      "inputType": "Text",
      "width": 160,
      "isList": false,
      "isSearchable": true
    },
    {
      "attributeName": "SourceId",
      "displayName": "来源标识",
      "inputType": "Text",
      "width": 310,
      "isList": false,
      "isSearchable": false
    },
    {
      "attributeName": "TemplateId",
      "displayName": "内容模板",
      "inputType": "Text",
      "width": 160,
      "isList": false,
      "isSearchable": false
    },
    {
      "attributeName": "Hits",
      "displayName": "点击量",
      "inputType": "Text",
      "width": 70,
      "isList": false,
      "isSearchable": true
    },
    {
      "attributeName": "Downloads",
      "displayName": "下载量",
      "inputType": "Text",
      "width": 70,
      "isList": false,
      "isSearchable": true
    },
    {
      "attributeName": "CheckAdminId",
      "displayName": "审核人",
      "inputType": "Text",
      "width": 160,
      "isList": false,
      "isSearchable": false
    },
    {
      "attributeName": "CheckDate",
      "displayName": "审核时间",
      "inputType": "Text",
      "width": 160,
      "isList": false,
      "isSearchable": false
    },
    {
      "attributeName": "CheckReasons",
      "displayName": "审核原因",
      "inputType": "Text",
      "width": 160,
      "isList": false,
      "isSearchable": false
    }
  ],
  "isAllContents": false,
  "checkedLevels": [
    { "label": -99, "text": "草稿" },
    { "label": 0, "text": "待审核" },
    { "label": 1, "text": "已审核" },
    { "label": -1, "text": "终审退稿" }
  ],
  "permissions": {
    "isAdd": true,
    "isDelete": true,
    "isEdit": true,
    "isArrange": true,
    "isTranslate": true,
    "isCheck": true,
    "isCreate": true
  },
  "contentMenus": [],
  "contentsMenus": [],
  "breadcrumbItems": [
    { "value": 932, "label": "首页" },
    { "value": 934, "label": "通用栏目" },
    { "value": 2412, "label": "友情链接" }
  ]
}

该报文为正常的报文

{
    "pageContents": [
        {
            "addUserName": null,
            "lastEditUserName": null,
            "lastEditDate": null,
            "isChecked": null,
            "hitsByDay": null,
            "hitsByWeek": null,
            "hitsByMonth": null,
            "lastHitsDate": null,
            "settingsXml": null,
            "isTop": null,
            "isRecommend": null,
            "isHot": null,
            "isColor": null,
            "content": null,
            "imageUrlCount": 0,
            "videoUrlCount": 0,
            "fileUrlCount": 0,
            "state": "已审核",
            "sequence": 1,
            "channelName": "友情链接",
            "adminName": "admin",
            "lastEditAdminName": "admin",
            "userName": "",
            "sourceName": "",
            "channelId": 2412,
            "siteId": 932,
            "adminId": 1,
            "lastEditAdminId": 1,
            "userId": 0,
            "taxis": 1,
            "groupNames": [],
            "tagNames": [],
            "sourceId": 0,
            "referenceId": 0,
            "templateId": 0,
            "checked": true,
            "checkedLevel": 0,
            "hits": 0,
            "downloads": 0,
            "title": "广东省教育厅",
            "subTitle": "",
            "imageUrl": "",
            "videoUrl": "",
            "fileUrl": "",
            "body": "",
            "summary": "",
            "author": "",
            "source": "",
            "top": false,
            "recommend": false,
            "hot": false,
            "color": false,
            "linkType": "None",
            "linkUrl": "https://edu.gd.gov.cn/",
            "addDate": "2024-07-10 20:12:13",
            "id": 38453,
            "guid": "f914e636-8f78-48a6-82fe-20fbf3611016",
            "createdDate": "2024-07-10 20:12:43",
            "lastModifiedDate": "2024-07-10 20:12:43"
        }
    ],
    "total": 1,
    "pageSize": 30,
    "titleColumn": {
        "attributeName": "Title",
        "displayName": "标题",
        "inputType": "Text",
        "width": 160,
        "isList": true,
        "isSearchable": true
    },
    "columns": [
        {
            "attributeName": "Sequence",
            "displayName": "序号",
            "inputType": "Text",
            "width": 70,
            "isList": false,
            "isSearchable": false
        },
        {
            "attributeName": "Id",
            "displayName": "内容Id",
            "inputType": "Text",
            "width": 70,
            "isList": false,
            "isSearchable": true
        },
        {
            "attributeName": "Guid",
            "displayName": "识别码",
            "inputType": "Text",
            "width": 310,
            "isList": false,
            "isSearchable": true
        },
        {
            "attributeName": "SubTitle",
            "displayName": "副标题",
            "inputType": "Text",
            "width": 160,
            "isList": false,
            "isSearchable": true
        },
        {
            "attributeName": "ImageUrl",
            "displayName": "图片",
            "inputType": "Image",
            "width": 100,
            "isList": false,
            "isSearchable": true
        },
        {
            "attributeName": "VideoUrl",
            "displayName": "视频",
            "inputType": "Video",
            "width": 160,
            "isList": false,
            "isSearchable": true
        },
        {
            "attributeName": "FileUrl",
            "displayName": "附件",
            "inputType": "File",
            "width": 160,
            "isList": false,
            "isSearchable": true
        },
        {
            "attributeName": "Summary",
            "displayName": "内容摘要",
            "inputType": "TextArea",
            "width": 160,
            "isList": false,
            "isSearchable": true
        },
        {
            "attributeName": "Author",
            "displayName": "作者",
            "inputType": "Text",
            "width": 160,
            "isList": false,
            "isSearchable": true
        },
        {
            "attributeName": "Source",
            "displayName": "来源",
            "inputType": "Text",
            "width": 160,
            "isList": false,
            "isSearchable": true
        },
        {
            "attributeName": "LinkType",
            "displayName": "链接类型",
            "inputType": "Text",
            "width": 160,
            "isList": false,
            "isSearchable": true
        },
        {
            "attributeName": "LinkUrl",
            "displayName": "外部链接",
            "inputType": "Text",
            "width": 160,
            "isList": false,
            "isSearchable": true
        },
        {
            "attributeName": "ChannelId",
            "displayName": "所属栏目",
            "inputType": "Text",
            "width": 160,
            "isList": false,
            "isSearchable": false
        },
        {
            "attributeName": "AddDate",
            "displayName": "添加时间",
            "inputType": "Text",
            "width": 160,
            "isList": true,
            "isSearchable": false
        },
        {
            "attributeName": "LastModifiedDate",
            "displayName": "最后修改时间",
            "inputType": "Text",
            "width": 160,
            "isList": false,
            "isSearchable": true
        },
        {
            "attributeName": "GroupNames",
            "displayName": "内容组",
            "inputType": "Text",
            "width": 160,
            "isList": false,
            "isSearchable": false
        },
        {
            "attributeName": "TagNames",
            "displayName": "标签",
            "inputType": "Text",
            "width": 160,
            "isList": false,
            "isSearchable": false
        },
        {
            "attributeName": "AdminId",
            "displayName": "添加人",
            "inputType": "Text",
            "width": 160,
            "isList": false,
            "isSearchable": true
        },
        {
            "attributeName": "LastEditAdminId",
            "displayName": "最后修改人",
            "inputType": "Text",
            "width": 160,
            "isList": false,
            "isSearchable": true
        },
        {
            "attributeName": "UserId",
            "displayName": "投稿用户",
            "inputType": "Text",
            "width": 160,
            "isList": false,
            "isSearchable": true
        },
        {
            "attributeName": "SourceId",
            "displayName": "来源标识",
            "inputType": "Text",
            "width": 310,
            "isList": false,
            "isSearchable": false
        },
        {
            "attributeName": "TemplateId",
            "displayName": "内容模板",
            "inputType": "Text",
            "width": 160,
            "isList": false,
            "isSearchable": false
        },
        {
            "attributeName": "Hits",
            "displayName": "点击量",
            "inputType": "Text",
            "width": 70,
            "isList": false,
            "isSearchable": true
        },
        {
            "attributeName": "Downloads",
            "displayName": "下载量",
            "inputType": "Text",
            "width": 70,
            "isList": false,
            "isSearchable": true
        },
        {
            "attributeName": "CheckAdminId",
            "displayName": "审核人",
            "inputType": "Text",
            "width": 160,
            "isList": false,
            "isSearchable": false
        },
        {
            "attributeName": "CheckDate",
            "displayName": "审核时间",
            "inputType": "Text",
            "width": 160,
            "isList": false,
            "isSearchable": false
        },
        {
            "attributeName": "CheckReasons",
            "displayName": "审核原因",
            "inputType": "Text",
            "width": 160,
            "isList": false,
            "isSearchable": false
        }
    ],
    "isAllContents": false,
    "checkedLevels": [
        {
            "label": -99,
            "text": "草稿"
        },
        {
            "label": 0,
            "text": "待审核"
        },
        {
            "label": 1,
            "text": "已审核"
        },
        {
            "label": -1,
            "text": "终审退稿"
        }
    ],
    "permissions": {
        "isAdd": true,
        "isDelete": true,
        "isEdit": true,
        "isArrange": true,
        "isTranslate": true,
        "isCheck": true,
        "isCreate": true
    },
    "contentMenus": [],
    "contentsMenus": [],
    "breadcrumbItems": [
        {
            "value": 932,
            "label": "首页"
        },
        {
            "value": 934,
            "label": "通用栏目"
        },
        {
            "value": 2412,
            "label": "友情链接"
        }
    ]
}

russellyi avatar Jul 10 '24 13:07 russellyi

https://sscms.com/docs/v7/api/contents/create.html 使用REST API新增内容试试

starlying avatar Jul 11 '24 02:07 starlying