获取投票主题列表

接口地址:[接口根]/plugin/vote2-api/list
请求类型:get

  • 可选参数:page,当前页,下标从1开始
  • 可选参数:pagesize,分页大小,默认为8
[
    {
        "click": 100,
        "title": "地方",
        "votepic": null,
        "limitItem": "20",
        "starttime": "2015-12-24 14:06:00",
        "endtime": "2015-12-25 14:06:00",
        "content": "<p>gdgdgdfgdfg</p>\r\n",
        "createtime": 1450939428,
        "key": "567b942442d9031c1000002b"
    },
    {
        "click": 100,
        "title": "dfdsf",
        "votepic": null,
        "limitItem": "30",
        "starttime": "2015-12-25 14:11:00",
        "endtime": "2016-01-02 14:11:00",
        "content": "<p>fsfsdfdsfd</p>\r\n",
        "createtime": 1450937508,
        "key": "567b8ca442d9031c1000002a"
    },
    {
        "click": 100,
        "title": "dfdsfdsf",
        "votepic": null,
        "limitItem": "30",
        "starttime": "2015-12-25 14:09:00",
        "endtime": "2016-01-07 14:09:00",
        "content": "<p>fdfdsfdsf</p>\r\n",
        "createtime": 1450937416,
        "key": "567b8c4842d9031c10000029"
    }]


获取投票详情

接口地址:[接口根]/plugin/vote2-api/content
请求类型:get

  • 必须参数:key,投票主题编号
  • 可选参数:user_openid,当前登录用户
{
    "items": [
        {
            "title": "的",
            "indexpic": "http://storage.tmtsp.com/other/72251aef21148b3883149df872fcf070.png",
            "contact": "222",
            "content": "<p>常委服务</p>\r\n",
            "itemkey": "d9d2d69f6719e16ab91e0a918552e91d",
            "count": 0,
            "no":12,
        },
        {
            "title": "额",
            "indexpic": "http://storage.tmtsp.com/other/f30124b0e47621e7cfc351de52c09310.png",
            "contact": "13123123123",
            "content": "<p>的撒打算的</p>\r\n",
            "itemkey": "b0d73b29cdca995e0458421a9c8309f9",
            "count": 2,
             "no":12,
        }
    ],
    "title": "测试",
    "starttime": 1447119180,
    "endtime": 1447896780,
    "content": "<p>分公司答复</p>\r\n",
    "createtime": 1447032825,
    "click": 2,
    "key": "563ff7f9c137e05c1400002a",
     "limititem":'20'
    "isvote": 0
}

新增isvote参数,如果为1代表当前用于已投票



投票接口

接口地址:[接口根]/plugin/vote2-api/post
请求类型:get

  • 必须参数:key,投票主题标志
  • 必须参数:itemkey,投票项标识,多选用逗号隔开
  • 必须参数:user_openid,用户编号
{
    "state": 0,
    "errors": {
        "platform": ["归属平台不能为空。"]
    },
    "message": "投票失败,请检查或重试!"
}

{
    "state": 0,
    "errors": {
        "user_openid": ["请勿重复投票!"]
    },
    "message": "投票失败,请检查或重试!"
}

{
    "state": 1,
    "message": "投票成功!"
}


投票排行榜

获取投票项排行

接口地址:[接口根]/plugin/vote2-api/ranking
请求类型:get

  • 必须参数:key,投票主题标志
[
    {
        "count": 0,
        "title": "问",
        "no": 1
    },
    {
        "count": 0,
        "title": "玩儿玩儿234234",
        "no": 2
    }
]