[关闭]
@ruiqh 2016-11-07T08:20:49.000000Z 字数 1006 阅读 531

VIP 体系

plu.cn


接口(只修改逻辑不赘述入参返回结果)

1. 购买vip

地址

/vip/buy

入参

字段 类型 说明
type int 会员类型
option int 时长

返回结果

  1. {
  2. "type":1,
  3. "option":1,
  4. "code": 0,
  5. "message": "操作成功"
  6. }

2. 获取用户信息

地址

http://userapi.plu.cn/user/getcurrentuserinfo

3. 进入房间 [入场通知,最近礼物]

地址

http://mb.tga.plu.cn/chatroom/joinroom

4. 送礼物 [聊天框输出vip标识]

地址

http://giftapi.plu.cn/chatroom/sendgift

5. 房间状态 [输出用户日榜]

地址

http://roomapicdn.plu.cn/room/roomstatus

6. 日榜/月榜 [输出用户日榜]

地址

http://roomapicdn.plu.cn/room/getdailyrankList
http://roomapicdn.plu.cn/room/getweeklyrankList

7. 个人中心页面

路由未定

Mysql

1. 用户vip信息 PluHome.VipInfos

字段 类型 说明
UserId int(11) 用户编号 primary key not null
Type int(3) 会员类型 not null
ExpireTime DateTime 过期时间 not null
CreateTime DateTime 创建时间 not null
UpdateTime DateTime 更新时间 not null

Redis

1. 入场通知

- -
KEY vip:joinroom:{roomId}
SERVER 未定
TYPE HASH
FIELD UserId
VALUE 时间戳
REMARK 用于VIP用户进入房间是否进行入场通知

2. 用户VIP

- -
KEY vip:info
SERVER 未定
TYPE HASH
FIELD UserId
VALUE {viptype},{expireTicks}
REMARK 用户VIP信息

字典说明

1.vip类型 type

说明
1 白银
2 黄金
3 白金
4 钻石

2. 时长 option

说明
1 30天
2 100天
3 210天
4 450天

用户中心页面

  1. var vipConfig=null; // 代表无VIP
  2. var vipConfig = {
  3. type:1 //vip类型
  4. expireTime: '2016-11-13' //到期时间
  5. duration: 12 //有效期
  6. };
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注