Page History

Votedetail

Last edited by 国亚奇

返回

投票详情接口


URL: https://mobile.cnlive.com/CnliveMobile/hd/getVoteDetail.action?spId=xxx&token=xxx


请求方式: HTTP GET


返回格式: JSON


版本:互动电视5.3开始


请求参数说明:

参数名 参数类型 必选 参数说明
spId String true 服务提供商
token String true 参数加密串
----plat String true 客户端平台
----id Integer true 投票ID
----sid Integer true 用户ID

返回格式说明:

{
    errorCode:"",
    errorMsg:"",
    data:{
        id:"",          // 问题ID
        question:"",    // 问题
        active:"",      // 0(不可互动)| 1(可互动)
        type:""         // 0(单选)|1(多选)
        tip:""          // 互动规则
                awardCnCoin: "", //投票此字段无意义
        options:[
            {
                id:"",          // 选项ID
                index:"",       // 选项序号
                detail:"",      // 文字描述
                rating:"",      // 当前被选择的数量
                correct:""      // 是否正确:  0(非) | 1(是) | -1(没有答案)
                choose:""      // 用户是否已选:0(未选) | 1(已选)

            }
        ]
    }
}

返回格式样例:

{
    "errorCode": "0",
    "errorMessage": "success",
    "data": {
        "id": "1",
        "question": "送给吴莫愁什么礼物?",
        "active": "0",
        "type": "1",
        "tip": "http://baidu.com",
        "awardCnCoin": "0",
        "options": [
            {
                "id": "3",
                "index": "A",
                "detail": "围巾",
                "rating": "6",
                "correct": "-1",
                "choose": "0"
            },
            {
                "id": "4",
                "index": "B",
                "detail": "裙子",
                "rating": "5",
                "correct": "-1",
                "choose": "0"
            },
            {
                "id": "5",
                "index": "C",
                "detail": "衬衫",
                "rating": "3",
                "correct": "-1",
                "choose": "0"
            }
        ]
    }
}