互动功能模块 功能API 说明
调用方式: VHALL_ZK.init完成之后
API列表 使用VHALL_ZK.$api作为句柄调用
API名 |
功能描述 |
参数 |
返回值 |
备注 |
getActivityInfo |
获取活动信息 |
无 |
Object |
活动的基本信息 |
getWatchPageSetting |
获取观看页设置信息 |
无 |
Promise |
- |
activityShareRecord |
分享活动 |
无 |
Promise |
- |
getWarmInfo |
获取暖场信息 |
无 |
Promise |
- |
getActivityPlayBackInfo |
获取回放信息 |
无 |
Promise |
用于数据统计 |
getCardDetail |
获取推荐卡片信息 |
无 |
Promise |
- |
viewCard |
点击访问推荐卡片 |
无 |
Promise |
用于数据统计 |
getArea |
获取地区地理映射 |
无 |
Promise |
- |
getNaireDetail |
获取问卷信息 |
无 |
Promise |
- |
submitNaire |
提交问卷 |
Object |
Promise |
- |
unLockRedBag |
解锁红包 |
无 |
Promise |
针对条件限制红包 |
getNowRedBagInfo |
获取当前未开始的红包信息接口 |
无 |
Promise |
- |
grabRedBag |
抢红包 |
red_packet_uuid |
Promise |
- |
getRedBagInfo |
获取红包信息 |
red_packet_uuid |
Promise |
通过红包uuid获取红包信息 |
getRedBagRecord |
红包获取记录信息 |
red_packet_uuid |
Promise |
通过红包uuid获取红包中奖记录 |
getRedBagList |
观看端获取红包领取记录接口 |
red_packet_uuid |
Promise |
通过红包uuid获取红包中奖用户列表 |
getAllInviteLotteryUsers |
获取当前活动下所有被邀请抽奖人 |
无 |
Promise |
- |
getWinLotteryList |
获取中奖列表 |
{lottery_id:'奖品id',page:'',page_size:''} |
Promise |
- |
unLockLottery |
解锁抽奖 |
{lottery_id:'',password:'口令'} |
Promise |
- |
getLotteryInfo |
获取奖品信息 |
lottery_id(非必传) |
Promise |
如果不传递奖品id,讲查询当前活动正在进行的奖品信息 |
checkLotteryAddress |
检测是否填写抽奖地址 |
lottery_id(必传) |
Promise |
- |
submitLotteryAddress |
提交填写的抽奖地址 |
{lottery_id:'',name: '昵称',phone: '',address: ''} |
Promise |
- |
checkIsLottery |
检测是否中奖 |
lottery_id(必传) |
Promise |
- |
checkHasOrder |
检测用户是否下过单 |
无 |
Promise |
- |
sendZan |
点赞 |
无 |
Promise |
- |
getChatSetting |
获取聊天审核信息 |
无 |
Promise |
- |
getShareCount |
获取资料分享次数 |
无 |
Promise |
- |
getActivityMenuList |
获取自定义菜单 |
无 |
Promise |
- |
getRankMenuList |
排行榜菜单 |
menu_id |
Promise |
- |
getRankList |
排行榜类型列表 |
{ menu_id: '',type:''} |
Promise |
type:传reward:打赏,传gift:礼物 |
getMySelfRankInfo |
自己的排行榜信息 |
{ menu_id: '',type:''} |
Promise |
type:share=》分享,invite=〉邀请,buyer=》土豪,watch=〉观看,gift=》礼物,reward=〉打赏 |
getMenuLive |
热门直播菜单 |
menu_id |
Promise |
- |
getMenuPromote |
推广列表菜单 |
menu_id |
Promise |
- |
getDocDownloadSetting |
获取文档下载设置 |
无 |
Promise |
- |
getInviteCardList |
获取邀请卡列表信息 |
无 |
Promise |
- |
logInviteCard |
邀请卡数据上报 |
object |
Promise |
- |
代码示例
/* 获取活动信息 */
const activityInfo = VHALL_ZK.$api.getActivityInfo()
/* 解锁红包 */
VHALL_ZK.$api.unLockRedBag({
red_packet_uuid: '' // 红包uuid
condition: '', // 红包类型0:默认 1:分享红包 2:口令红包 3:问卷红包 4:邀请红包
password: '' // 红包口令
}).then((res) => {
console.log(res)
})
/* 获取问卷信息 */
VHALL_ZK.$api.getNaireDetail().then((res) => {
console.log(res)
/* 样例 */
{
"code": 200,
"data": {
"id": 11910,
"title": "问卷-test",
"description": "请您仔细填写下面的信息!",
"img_url": "mp-test/ba/45/ba45c8f60456a672e003a875e469d0eb.jpg",
"publish": "Y",
"app_id": "02391153",
"detail": [
{
"id": 39991,
"title": "姓名",
"type": "text",
"placeholder": "请输入姓名",
"verification": "N",
"required": "N", // 是否必填: Y必填, N非必填
"style": "text",
"ext": "{\"name\":\"姓名\",\"key\":\"name\"}",
"custom_ques": 2,
"created_at": "2021-06-29 10:48:21",
"updated_at": "2021-06-29 10:48:21",
"detail": {
"is_answer": null,
"format": "none",
"min": null,
"max": 0
}
},
{
"id": 39992,
"title": "性别",
"type": "select",
"placeholder": "请选择性别",
"verification": "N",
"required": "N",
"ext": "{\"fixedness\":true,\"name\":\"性别\",\"key\":\"sex\"}",
"custom_ques": 2,
"created_at": "2021-06-29 10:48:21",
"updated_at": "2021-06-29 10:48:21",
"detail": {
"list": [
{
"id": 75403,
"is_answer": 0,
"key": "60da89f596b2f",
"value": "男"
},
{
"id": 75404,
"is_answer": 0,
"key": "60da89f596f9e",
"value": "女"
}
]
}
},
{
"id": 39996,
"title": "手机号",
"type": "text",
"placeholder": "请输入手机号",
"verification": "Y",
"required": "Y",
"style": "text",
"ext": "{\"name\":\"手机号\",\"key\":\"phone\"}",
"app_id": "02391153",
"custom_ques": 2,
"detail": {
"format": "phone",
"min": null,
"max": 11
}
}
]
}
}
})
let params = {
"naire_id": 11911,
"ext_data": JSON.stringify({
"real_name":"刘德华",
"sex":"M",
"phone":"17600801597",
"verify_code":"111111"
}),
"naire_data": JSON.stringify({
"39994":"刘德华",
"39995":"60da8e74ecbf1",
"39996":"17600801597"
})
}
/* 提交问卷 */
VHALL_ZK.$api.submitNaire(params).then((res) => {
console.log(res)
})
/* 邀请卡数据上报 */
VHALL_ZK.$api.logInviteCard({
business_uid: 'b端用户id',
inviter_type: '邀请人类型', // ,1:主办方,2:c端用户
invitation_card_id: '邀请卡id', // 邀请卡id
inviter_id: '邀请人用户id或者邀请人游客id' // 邀请人用户id
}).then((res) => {
console.log(res)
})