获取首页信息
- 访问URL:jiemi.ch/ApiGame/homepage
- 请求方式:GET
- 入参:
{"openid":"XXXXXX"}
- 返回:
{
"code": 0, //除了0以外,其他均为有错误
"data": {
"game": {
"id": 1,
"title": "拼图解谜1",
"photo": "https:\/\/nurloc.oss-cn-hangzhou.aliyuncs.com\/sys\/2019-04-19\/QMxXlA8ClHCe825EkCXicLDkNrAZDZ917.jpg", //活动图片
"num": 2, //活动期号
"rule": "112", //活动规则
"start_time": 1555516800, //活动起始时间戳
"end_time": 1555603200, //活动截止时间戳
"sort": 0, //排序,此字段可以忽略,没啥用
"status": 1, //活动是否上线
"c_time": 1555643416,
"u_time": 1555674269,
"del": 0 //0=正常,1=已删除
},
"clueList": [ //该游戏下的9条线索列表
{
"clue_title": "线索2", //线索标题
"clue_id": 3, //线索ID
"clue_key": 1, //线索key值
"clue_letter": "A", //字母标识
"done_status": 1 //该用户的完成状态
}, {
"clue_title": "11",
"clue_id": 4,
"clue_key": 2,
"clue_letter": "B",
"done_status": 0
}, {
"clue_title": "3",
"clue_id": 5,
"clue_key": 3,
"clue_letter": "C",
"done_status": 0
},
{
"clue_title": "4",
"clue_id": 6,
"clue_key": 4,
"clue_letter": "D",
"done_status": 0
}, {
"clue_title": "5",
"clue_id": 7,
"clue_key": 5,
"clue_letter": "E",
"done_status": 0
}, {
"clue_title": "6",
"clue_id": 8,
"clue_key": 6,
"clue_letter": "F",
"done_status": 0
},
{
"clue_title": "7",
"clue_id": 9,
"clue_key": 7,
"clue_letter": "G",
"done_status": 0
}, {
"clue_title": "8",
"clue_id": 10,
"clue_key": 8,
"clue_letter": "H",
"done_status": 0
}, {
"clue_title": "9",
"clue_id": 11,
"clue_key": 9,
"clue_letter": "I",
"done_status": 0
}
],
"doneNum": 2, //该用户完成的线索数量
"userDoneList": [{ //该用户的线索收集列表
"clue_key": 1, //key值
"done_status": 1, //完成状态
"c_time": 0,
"u_time": 0
}]
},
"msg": "Success"
}
获取线索信息
- 访问URL:jiemi.ch/ApiGame/getClueInfo
- 请求方式:GET
- 入参:该参数可以为A,B,C,D...I
{"key":"A"}
返回:
{
"code": 0,
"data": {
"id": 3, //线索ID
"clue_key": 1, //线索KEY
"title": "线索2", //线索标题
"note": "1122", //线索描述
"status": 1 //是否上线
},
"msg": "Success"
}
扫一扫,检验二维码
- 访问URL:jiemi.ch/ApiGame/checkQrcode
- 请求方式:GET
- 说明:如果二维码是正确的,则会增加一条记录到用户已搜集线索里去
入参:
key
{
"openid": "xxxx",
"qrcode": "xxxxxx",
"key": "A" //这里可以接受A-I的9个字母
}
成功返回:
{
"code": 0,
"data": {
"qrInfo": {
"id": 217,
"game_id": 1,
"game_num": 2,
"clue_id": 4,
"clue_key": 2,
"qrcode": "2d9c605fb1c29e8f74068e7af4f2e088"
},
"doneNum": 2 //该用户目前最新的完成数量
},
"msg": "线索匹配成功"
}
找不到对应记录返回:
{
"code": 1002,
"data": [],
"msg": "找不到该线索"
}
获取微信的用户信息
- 访问URL:jiemi.ch/ApiGame/getWxOpenid
- 请求方式:GET
- 说明:无
入参:
{"js_code":"xxxx","appid":"xxxxxx","secret":"xxxxxx"}
返回:
{
"code": 0,
"data": "",
"msg": ""
}