# 获取门户页 热门/最新 活动

## 接口

请求地址

```
GET api/page/:id/activities
```

## 授权

请求header

```
Authorization: Bearer <accessToken>
Content-Type: application/json
```

> 注：请将上方的`<accessToken>`替换为分配给您的秘钥串。关于如何获取 accessToken ，请咨询杨经理（18968187008）。

## 参数

| 参数       | 参数类型    | 是否必填 | 描述                                                   |
| -------- | ------- | ---- | ---------------------------------------------------- |
| id       | string  | 是    | 门户页id                                                |
| page     | integer | 否    | 当前页                                                  |
| pageSize | integer | 否    | 每页条数                                                 |
| orderBy  | enum    | 否    | <p>popular： 热门活动 </p><p>latest ：   最新活动（default）</p> |

```
GET /api/page/:id/activities?page=1&pageSize=10&orderBy=popular
```

## 响应参数

| 参数        | 参数类型    | 参数说明     |
| --------- | ------- | -------- |
| id        | integer | 活动id     |
| name      | string  | 活动名字     |
| status    | string  | 直播线路状态   |
| isPushing | boolean | 是否正在推流   |
| startedAt | string  | 活动开始时间   |
| endedAt   | string  | 活动结束时间   |
| createdAt | string  | 创建时间     |
| link      | string  | 活动观看页地址  |
| pv        | integer | 活动观看人数   |
| template  | object  | 活动一些配置参数 |

## 响应示例

```
{
    "pager":{
        "page":1,
        "pageSize":99,
        "total":10
    },
    "items":[
        {
            "id":"10269952",
            "name":"色白花青",
            "status":"disabled",
            "agentId":120489,
            "isPushing":false,
            "startedAt":"2021-02-24T11:10:00.000Z",
            "endedAt":"2021-03-05T09:40:15.000Z",
            "createdAt":"2021-01-26T10:14:42.000Z",
            "updatedAt":"2021-03-05T09:40:30.000Z",
            "link":"http://shangzhibo.tv/watch/10269952",
            "pv":3004,
            "template":{
                "imgLogo":"https://doc.shangzhibo.tv/system/custom/shangzhibo/logo.svg",
                "imgCover":"https://doc.shangzhibo.tv/client/user/121765/1587869188431/1587869188394_158786918839399.png",
                "imgMobileCover":"https://doc.shangzhibo.tv/system/activity/template/default-mobile-index.png",
                "followImg":"https://doc.shangzhibo.tv/system/activity/template/followImg.jpg",
                "share":{
                    "wechat":{
                        "text":"",
                        "image":"https://doc.shangzhibo.tv/system/activity/template/default-share-img.png"
                    },
                    "qq":{
                        "text":"",
                        "image":"https://doc.shangzhibo.tv/system/activity/template/default-share-img.png"
                    },
                    "weibo":{
                        "text":"",
                        "image":"https://doc.shangzhibo.tv/system/activity/template/default-share-img.png"
                    }
                },
                "isCRMSignupEnabled":false,
                "isNoRepeatDrawEnabled":false,
                "auth":{
                    "methods":[

                    ],
                    "payPrompt":"欢迎观看直播",
                    "payPrice":1,
                    "isTrailEnabled":false,
                    "trailTimeout":300,
                    "payExpiredTimeout":0,
                    "isSinglePasscodeEnabled":false
                },
                "isWechatShareDisabled":true,
                "isHideDraw":false,
                "isLikeEnabled":true,
                "isAutoLikesEnabled":false,
                "colorBackground":"",
                "imgBackground":"https://doc.shangzhibo.tv/resources/120489/10269952/b2a32e93e25d9fd9e6513a56a0d0d9aa.jpg",
                "positionLogo":"hide",
                "imgLogoScale":100,
                "imgLogoTransparency":100,
                "countdownPosition":"leftTop",
                "liveMode":"online",
                "followName":"官方公众号",
                "followDescription":"关注后可收到最新动态哦",
                "mobileLayout":"overlay",
                "mobileTitleType":"text",
                "isResolutionEnabled":false,
                "resolutionTypes":[

                ],
                "isSubscribeEnabled":false,
                "subscribeMessage":"",
                "isDocEnabled":false,
                "isDocFlatingEnabled":true,
                "isDocUnfoldEnabled":false,
                "isDocNotifyEnabled":false,
                "isDocTurningEnabled":true,
                "isGiftEnabled":true,
                "isGiftFloatingEnabled":true,
                "isGiftChatboxEnabled":false,
                "isGraphicEnabled":false,
                "isCountdownEnabled":false,
                "isAdEnabled":false,
                "isFaqEnabled":false,
                "isFaqFloatingEnabled":true,
                "isFaqChatboxEnabled":false,
                "isVoteFloatingEnabled":true,
                "isVoteBannerEnabled":true,
                "isVoteChatboxEnabled":false,
                "isVoteDisableClose":false,
                "isShareCardEnabled":true,
                "isLiveTranscodeEnabled":false,
                "isPageEnabled":false,
                "isLiveProtectionEnabled":false,
                "promotions":[

                ],
                "checkinScene":"before",
                "isCommentDisabled":false,
                "wechatLoginPattern":"normal",
                "transcribeGuardConf":{
                    "fontSize":18,
                    "fontColor":"#FFF",
                    "opacity":90,
                    "showType":"level",
                    "text":"${username}"
                },
                "commentStyleCustomized":{
                    "template":0,
                    "tabsColor":"FFFFFF",
                    "backgroundImg":"",
                    "inputColor":"FFFFFF",
                    "fontColor":"000000",
                    "backgroundColor":"EEEEEE"
                },
                "commentAllowed":[
                    "agent",
                    "subagent"
                ]
            }
        }
    ]
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://shangzhibo.gitbook.io/api/huo-qu-zhi-ding-ju-he-ye-de-huo-dong-xin-xi/huo-qu-men-hu-ye-re-men-zui-xin-huo-dong.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
