<!-- TOC -->
- [PHP 协议格式](#PHP协议格式)
- [定义](#定义)
- [协议格式](#协议格式)
- [协议数据](#协议数据)
    - [红包雨](#红包雨)
    - [重置支付宝账号](#重置支付宝账号)
    - [提现成功](#提现成功)
    - [重置保险箱密码](#重置保险箱密码)
    - [客服未读消息](#客服未读消息)
    - [任务配置](#任务配置)
    - [领取全民推广佣金](#领取全民推广佣金)
    - [下注信息推送](#下注信息推送)
    - [活动](#活动)
    - [服务器状态](#服务器状态)
    - [服务器列表](#服务器列表)
    - [服务器下线](#服务器下线)
    - [提现](#提现)
    - [踢人](#踢人)
    - [修改玩家金币](#修改玩家金币)
    - [修改玩家银行金币](#修改玩家银行金币)
    - [封号与解封](#封号与解封)
    - [改变品牌排序](#改变品牌排序)
    - [改变游戏排序](#改变游戏排序)
    - [在线玩家](#在线玩家)
    - [私信通知](#私信通知)
    - [系统通知-跑马灯-大厅公告](#系统通知-跑马灯-大厅公告)
    - [紧急公告](#紧急公告)
    - [删除系统通知](#删除系统通知)
    - [改变客户端配置](#改变客户端配置)
    - [充值加币](#充值加币)
    - [JDB游戏结算](#JDB游戏结算)
- [推广类](#推广类)
- [记录类](#记录类)


<!-- TOC -->

# PHP协议格式

## 定义

- key: 双方一致，保密
- host: 服务器地址
- if: 接口地址

## 协议格式

- 地址 if: host:port/manager?s="sign"
- POST
- Header: Content-Type: application/json
- 请求格式
- sign = md5(strcat(json, KEY))

```json

{
	"cmd":"any_command",	// 命令字段
	"params":{
		"field1":"value1",	// 必要的参数列表
		//...
		"fieldn":"valuen"
	}
}
```

- 返回格式

```json
{
	"cmd":"any_command",
	"result":{
		"ec": 0,	// error code
		"optional":"optional"
	}
}
```

## 协议数据
### 重置支付宝账号
request
```json
{
    "cmd":"reset_alipay",
    "params":[
        172673
    ]
}
```

response
```json
{
	"cmd":"reset_alipay",
	"result":{
		"ec":0
	}
}
```
### 提现成功
request
```json
{
    "cmd":"withdraw_success",
    "params":[
        172673
    ]
}
```

response
```json
{
	"cmd":"withdraw_success",
	"result":{
		"ec":0
	}
}
```
### 红包雨
request
```json
{
    "cmd":"red_packets",
    "params":{
        "num":10,//int 红包个数
        "money":100000,//int 金额，分
        "type":1//红包类型 1拼手气，2均分
    }
}
```

response
```json
{
	"cmd":"red_packets",
	"result":{
		"ec":0
	}
}
```
### 重置保险箱密码
request
```json
{
    "cmd":"reset_bank_pass",
    "params":[
        172673
    ]
}
```

response
```json
{
	"cmd":"reset_bank_pass",
	"result":{
		"ec":0
	}
}
```
### 客服未读消息
request
```json
{
    "cmd":"not_read_message",
    "params":{
                         "176709":1
                     }
}
```

response
```json
{
	"cmd":"not_read_message",
	"result":{
		"ec":0
	}
}
```
### 任务配置
request
```json
{
    "cmd":"task_config",
    "params":[
                     {
                         "name":"123",
                         "taskId":7,
                         "gameId":2003,
                         "target":1,
                         "received":1,
                         "reward":100,
                         "limit":0,
                         "gameParam":[
                             12
                         ],
                         "state":2
                     }
                    
                 ]
}
```
response
```json
{
	"cmd":"task_config",
	"result":{
		"ec":0
	}
}
```
### 领取全民推广佣金
request
```json
{
    "cmd":"get_promote",
    "params":{
        "guid":14001,
        "money":15709
    }
}
```
response
```json
{
	"cmd":"get_promote",
	"result":{
		"ec":0
	}
}
```
### 下注信息推送
request
```json
{
    "cmd":"chip_info",
    "params":{
        "168014":75000,
        "168058":47300
    }
}
```

response
```json
{
	"cmd":"chip_info",
	"result":{
		"ec":0
	}
}
```
### JDB游戏结算

request

```json
{
    "id":4001,
    "guid":0,
    "orig":5010101,
    "ts":1569842190,
    "aux":"game",
    "params":{
        "balance":500,
        "tax":0,
        "winLose":100,
        "game_id":4001001,
        "channel_id":4001,
        "bet_id":"yhg12309709872",
        "bet":100,
        "start_time": 156909787,
        "end_time": 156887077
    }
}
```
### 活动

request
```json
{
    "cmd":"activity",
    "params":{
        "id":4,
        "banner":"http://192.168.0.100:8500/active/banner_4_1569069199.png",
        "details":"http://192.168.0.100:8500/active/details_4_1569069199.png",
        "title":"测试",
        "start":1568995200,
        "end":1569254400,
        "type":4//1，棋牌活动，2捕鱼，3电子，4视讯，5体育
    }
}
```
response
```json
{
	"cmd":"activity",
	"result":{
		"ec":0
	}
}
```

### 服务器状态

request

```json
{
    "cmd":"server_info",
    "params":{

    }
}
```

response

```json
{
	"cmd":"server_info",
	"result":{
		"ec":0,
		"list": [
            "1010101": {
                "users": 100,   // 在線人數
                "online": 1/0,  // 是否已下线 (下线後不能再次上线，只能启动新实例)
                "uptime": 23435,    // 程序运行时间
                "...": "others",
            }
		]
	}
}
```
### 服务器列表
request
```json
{
    "cmd":"server_list",
    "params":"server_list"
}
```
response
```json
{
	"cmd":"server_list",
	"result":{
		"ec":0,
		"list": [
		
		]
	}
}
```
### 服务器下线
request
```json
{
    "cmd":"server_offline",
    "params":{
        "id":1010101//int
      
    }
}
```
response
```json
{
	"cmd":"server_offline",
	"result":{
		"ec":0
	}
}
```
### 提现
request
```json
{
    "cmd":"withdraw",
    "params":{
        "guid":515844,//int
        "money":100//int,单位分
    }
}
```
response
```json
{
	"cmd":"withdraw",
	"result":{
		"ec":0
	}
}
```
### 踢人

request
```json
{
	"cmd":"kickoff",
	"params":{
		"guids": [10000,10001]
	}
}
```
response
```json
{
	"cmd":"kickoff",
	"result":{
		"ec":0,         // 1 表示正在处理
		"guids":[10000]	// 无法处理的 guid
	}
}
```

### 修改玩家金币
request
```json
{
    "cmd":"change_money",
    "sign":"716f80f2e7272eef7f641970dd6a16b7",
    "params":{
        "guid":515844,//int
        "money":100//int,单位分
    }
}
```
response
```json
{
	"cmd":"change_money",
	"result":{
		"ec":0
	}
}
```
### 修改玩家银行金币
request
```json
{
    "cmd":"change_bank_money",
    "sign":"0f88683c2fc17b0c727919c964f06ced",
    "params":{
        "guid":515844,//int
        "money":12300//int，单位分
    }
}
```
response
```json
{
	"cmd":"change_bank_money",
	"result":{
		"ec":0
	}
}
```
### 封号与解封

（账号，设备，IP一起封）

request
```json
{
    "cmd":"disable",
    "params":{
        "guid":515844,//int
        "status":1//int,1封号，0解封
    },
    "sign":"1b5e34272637b051f8fa57ba12c2543f"
}
```
response
```json
{
	"cmd":"disable",
	"result":{
		"ec":0
	}
}
```

### 改变品牌排序
request
```json
{
    "cmd":"change_channel",
    "params":[
        {
            "channel_id":2000,
            "is_start":1,
            "is_top":1,
            "order":1,
            "big_icon":"http://192.168.0.100:8500/icon/channel/2000_big_1568449203.png",//大图标地址
            "normal_icon":"http://192.168.0.100:8500/icon/channel/2000_onclick_icon_1568449506.png",//正常
            "big_icon_size":2,//大图标类型
            "click_icon":"http://192.168.0.100:8500/icon/channel/2000_onclick_icon_1568449203.png",//选中
            "lobby_id":2,
            "is_game":false
        },
        {
            "channel_id":3000,
            "is_start":1,
            "is_top":1,
            "order":2,
            "big_icon":"http://192.168.0.100:8500/icon/channel/3000_big_1568449551.png",
            "normal_icon":"",
            "big_icon_size":2,
            "click_icon":"",
            "lobby_id":5,
            "is_game":true
        },
        {
            "channel_id":4000,
            "is_start":1,
            "is_top":1,
            "order":1,
            "big_icon":"http://192.168.0.100:8500/icon/channel/4000_big_1568449391.png",
            "normal_icon":"http://192.168.0.100:8500/icon/channel/4000_onclick_1568449391.png",
            "big_icon_size":3,
            "click_icon":"http://192.168.0.100:8500/icon/channel/4000_click_1568449391.png",
            "lobby_id":4,
            "is_game":false
        }
    ]
}
```
response
```json
{
	"cmd":"change_channel",
	"result":{
		"ec":0
	}
}
```
### 改变游戏排序

request
```json
{
    "cmd":"change_game",
    "params":[
        {
                "game_id":2001,//int游戏ID
                "is_start":1,//int 1开启，0关闭
                "is_top":1,//int 1置顶
                "order":1,//int 排序
                "icon":"http://192.168.0.168:8500/icon/game/2001_1569155049.png",//srting下载地址
                "icon_size":1,//int 图片类型
                "limit_coin":0,//int 入场限制
                "limit_bet":0,//int 最小下注
                "limit_people":1000,//int 人数限制
                "name":"斗地主",//string 游戏名称
                "channel_id":1,//int 父级ID
                "channel":2000,//int 所属品牌
                "lately_icon" : "http://www.baidu.com",//最近游戏ICON地址
                "lately_icon_size" : 4,//int最近游戏ICON类型
                "hot_icon":"http://192.168.0.168:8500/icon/game/2001_1569155049.png",//srting channel_id == 1 才有
                "hot_icon_size":1,//int 图片类型 channel_id == 1 才有
                "is_game":true,//bool 是否为游戏
                "is_show": 1,//int 1正常显示 0置灰
                "game_param":[
                    "55"//string 额外参数
                ],
                "view_type": 0// int 0横屏，1竖屏幕
            }
    ]
}
```
response
```json
{
	"cmd":"change_game",
	"result":{
		"ec":0
	}
}
```
### 在线玩家
request
```json
{
    "cmd":"online_list",
    "params":"online_list"
    ],
    "sign":"611c821835a456b39aedb36dc7b6918a"
}
```
response
```json
{
    "cmd":"online_list",
    "result":{
        "ec":0,
        "list": [
            {
                "1000846": 101010101 // guid: logic_id 都为整型，logicId 可解析出详细信息
            }
            //....
        ]
    }
}
```
### 私信通知
request
```json
{
     "cmd":"private_notice",
     "params":{
         "title":"1504",
         "guid":1504,
         "content":"lll",
         "created_at":1568541940,
         "id":6
     }
 }
```
response
```json
{
    "cmd":"private_notice",
    "result":{
        "ec":0
    }
}
```

### 系统通知-跑马灯-大厅公告
request
```json
{
    "cmd":"system_notice",
    "params":{
        "type":1,//1跑马灯
        "id":6,//唯一ID
        "content":"test content",//消息内容
        "turn_count":333,//轮播i次数，可忽略
        "turn_time":1,//轮播时间间隔，可忽略
      
        "start_time":1568563200,//开始时间
        "end_time":1568649600,//结束时间
        "created_at":1568542909//创建时间
    }
}
{
    "cmd":"system_notice",
    "params":{
        "id":5,//唯一ID
        "type":2,//类型，2大厅公告
      
        "title": "asdad",//标题
        "content":"奥斯卡，的金发科技",//内容
        "created_at":1568542909,
        "start_time":1568563200,//开始时间
        "end_time":1568649600,//结束时间
    }
}
```
response
```json
{
    "cmd":"system_notice",
    "result":{
        "ec":0
    }
}
```
### 紧急公告
```json
{
    "cmd":"critical_notice",
    "params":{
        "id":5,//唯一ID
        "title": "asdad",//标题
        "content":"奥斯卡，的金发科技",//内容
        "created_at":1568542909,
        "start_time":1568563200,//开始时间
        "end_time":1568649600,//结束时间
    }
}
```
response
```json
{
    "cmd":"critical_notice",
    "result":{
        "ec":0
    }
}
```
### 删除系统通知
request
```json
{
    "cmd":"delete_system_notice",
    "params":{
        "id":6,
        "type": 1//1跑马灯，2大厅公告
    }
}
```
response
```json
{
    "cmd":"delete_system_notice",
    "result":{
        "ec":0
    }
}
```
### 改变客户端配置
request
```json
{
    "cmd":"change_client_config",
    "params":{
        "recharge":"http://192.168.0.100:8504",
        "recharge_button":"[
            {"name" : "proxypay", "value":[ "proxypay" ]},
            {"name" : "alipay", "value" : [ "alipayex","alipay","alipaycode" ]},
            {"name" : "alipayex", "value" : [ "alipayex","alipay","alipaycode" ]},
            {"name" : "wxcodepay", "value" : [ "wxcodepay" ]},
            {"name" : "wxpayex", "value" : [ "wxpayex" ]},
            {"name" : "bankpay", "value" : [ "bankpay" ]}
        ]",
        "www":"http://192.168.0.100",
        "promote_url":"http://192.168.0.100?type=2&promote",
        "php_index":"http://192.168.0.100:8502",
        "active":"http://192.168.0.100"
    }
}
```
response
```json
{
    "cmd":"change_client_config",
    "result":{
        "ec":0
    }
}
```
### 充值加币
request
```json
{
    "cmd":"recharge",
    "params":{
        "id":1,//订单主键ID
        "guid":1504,
        "money":5000,//int 分
        "created_at":1568541940//成功时间
    }
}
```
response
```json
{
    "cmd":"recharge",
    "result":{
        "ec":0
    }
}
```
## 客户端配置

- 充值(recharge): 192.168.0.100:8504
- 客服(custom): 192.168.0.100:9011
- 官网(www): https://192.168.0.100
- 推广链接(promote_url)：https://192.168.0.100?promote=123&type=2
- 接口-数据相关查询类(php_index):192.168.0.100:8502
- 活动-html页面地址(active):https:192.168.0.100

## 客户端配置接口说明
### 充值类
request-get
- http://192.168.0.100:8504/api/pay/store   充值请求

```json
['mask' => 时间戳,'msaksign'=>客户端签名,'guid'=>代理ID,'channel'=>'wxpay']
```

'channel'说明：
```json
[
        'alipay' => '支付宝',
        'alipayex' => '支付宝定额',
        'alicodepay' => '支付宝扫码',
        'wxpay' => '微信',
        'wxcodepay' => '微信扫码',
        'wxpayex' => '微信定额',
        'bankpay' => '银联',
        'bankcodepay' => '银联扫码',
        'bankpayex' => '银联定额',
        'fastpay' => '快捷支付',
        'qqpay' => 'QQ支付',
        'qqcodepay' => 'QQ扫码支付',
        'qqpayex' => 'QQ定额支付',
        'jdpay' => '京东支付',
        'jdcodepay' => '京东扫码支付',
        'jdpayex' => '京东定额',
]
```

response success:  

```json
{
    "status":1,
    "message":"生成订单成功",
    "data":{
        "serial_order_no":"hw1256278782587680461",
        "url":"http://103.51.15.136:8504/api/pay/66/pay?order_id=hw1256278782587680461&sign=91ffe52c437b6e25db5abfeeaf7ccdf1"
    }
}
```

response error:

```json

{
    "status":0,
    "message":"当前充值通道正在维护",
    "data":{
        "url":"http://www.baidu.com"
    }
}

```
## 推广类
request
- http://192.168.0.100:8502/api/promote/promoteInfo 代理信息
request

```json
['mask' => 时间戳,'masksign'=>客户端签名,'promote_id'=>代理ID]
```

response

```json
{
    "status":"1",
    "message":"OK",
    "data":{
        "last_login_ip":"180.102.200.48",
        "create_time":"2018-01-28 14:55:54",
        "login_time":"2018-04-25 23:56:22",
        "f_id":0,
        "teamAchievement":0,
        "ownAgentTodayAchievement":0,
        "newAgentCount":0,
        "teamCount":6,
        "yesterdayMyCommission":0,
        "newTeamCount":1
    }
}
```

request
- http://192.168.0.100:8502/api/promote/promoteMannage 代理管理

```json
['mask' => 时间戳,'masksign'=>客户端签名,'promote_id'=>代理ID]
['mask' => 时间戳,'masksign'=>客户端签名,'promote_id'=>代理ID,'search'=>搜索ID]
```

response
//不搜索情况成功返回：
```json
{
    "status":"1",
    "message":"ok",
    "data":{
        "ownAgentCount":1,
        "newAgentCount":0,
        "allAgentInfo":[
            {
                "nickname":"洪门大飞哥",
                "money":1100000,
                "promote_id":2222,
                "teamCount":1
            },
            {
                "nickname":null,
                "money":1100000,
                "promote_id":2223,
                "teamCount":0
            }
        ]
    }
}

```
//搜索情况成功返回：
```json
{
    "status":1,
    "message":"ok",
    "data":{
        "ownAgentCount":2,
        "newAgentCount":0,
        "allAgentInfo":[
            {
                "nickname":"洪门大飞哥",
                "money":1100000,
                "promote_id":2222,
                "teamCount":1
            }
        ]
    }
}
```
request 
- http://192.168.0.100:8502/api/promote/queryAchievement 业绩查询
 
```json
['mask' => 时间戳,'masksign'=>客户端签名,'promote_id'=>代理ID]
```
response
```json
{
    "status":"1",
    "message":"ok",
    "data":{
        "todayMyCommission":0,
        "todayAgentCommission":0,
        "todayTeamCommission":0,
        "yesterdayMyCommission":34400,
        "yesterdayAgentCommission":7000,
        "yesterdayTeamCommission":41400,
        "teamTodayAchievement":0,
        "teamYesterdayAchievement":5600000,
        "ownAgentTodayAchievement":0,
        "ownAgentYesterdayAchievement":0,
        "ownAgentWeekAchievement":4100000,
        "ownAgentLastWeekAchievement":0
    }
}
```
request
- http://192.168.0.100:8502/api/promote/queryAchievementToday 业绩查询今日直属代理  

```json
['mask' => 时间戳,'masksign'=>客户端签名,'promote_id'=>代理ID]
```
response
```json
{
    "status":"1",
    "message":"ok",
    "data":[
        {
            "nickname":"玩家1502",
            "money":3000000,
            "promote_id":3333
        },
        {
            "nickname":"洪门大飞哥",
            "money":1100000,
            "promote_id":2222
        }
    ]
}
```
request
- http://192.168.0.100:8502/api/promote/queryAchievementYesterday 业绩查询昨天直属代理  

```json
['mask' => 时间戳,'masksign'=>客户端签名,'promote_id'=>代理ID]
```
response
```json
{
    "status":"1",
    "message":"ok",
    "data":[
        {
            "nickname":"玩家1502",
            "money":3000000,
            "promote_id":3333
        },
        {
            "nickname":"洪门大飞哥",
            "money":1100000,
            "promote_id":2222
        }
    ]
}
```
request
- http://192.168.0.100:8502/api/promote/queryAchievementWeek 业绩查询本周直属代理  

```json
['mask' => 时间戳,'masksign'=>客户端签名,'promote_id'=>代理ID]
```
response
```json
{
    "status":"1",
    "message":"ok",
    "data":[
        {
            "nickname":"玩家1502",
            "money":3000000,
            "promote_id":3333
        },
        {
            "nickname":"洪门大飞哥",
            "money":1100000,
            "promote_id":2222
        }
    ]
}
```
request
- http://192.168.0.100:8502/api/promote/queryAchievementLastWeek 业绩查询上周直属代理

```json
['mask' => 时间戳,'masksign'=>客户端签名,'promote_id'=>代理ID]
```
response
```json
{
    "status":"1",
    "message":"ok",
    "data":[
        {
            "nickname":"玩家1502",
            "money":3000000,
            "promote_id":3333
        },
        {
            "nickname":"洪门大飞哥",
            "money":1100000,
            "promote_id":2222
        }
    ]
}
```
request-get
- http://192.168.0.100:8502/api/promote/promoteQrcode 二维码

```json
['promote_id'=>代理ID]
```
response
```json
{
    "status":1,
    "message":"ok",
    "data":{
        "url":"http://www.baidu.com"
    }
}
```
request
- http://192.168.0.100:8502/api/promote/message 推广匹配json信息上传
```json
['guid'=>玩家ID,'mask' => 时间戳,'masksign'=>客户端签名,'phone'=>'ios','type'=>1,'promote'=>6666]
```
response
```json
{
    "status":1,
    "message":"ok",
    "data":{
        
    }
}
```
## 记录类
request-get
- http://192.168.0.100:8502/api/account/getRechargeRecord 充值记录  

```json
['guid'=>玩家ID,'mask' => 时间戳,'masksign'=>客户端签名]
```
response
```json
{
    "status":1,
    "message":"ok",
    "data":[
        {
            "order_id":"yren201809161913227096402407492",
            "payment_amt":1000,
            "pay_status":1,
            "pay_type":"支付宝",
            "created_at":"2018-09-16 19:14:26"
        },
        {
            "order_id":"hw201809161912577096377994787",
            "payment_amt":1000,
            "pay_status":0,
            "pay_type":"支付宝",
            "created_at":"2018-09-16 19:12:58"
        }
    ]
     
}
```
request-get
- http://192.168.0.100:8502/api/account/getCashRecord 提现记录  

```json
['guid'=>玩家ID,'mask' => 时间戳,'masksign'=>客户端签名]
```
response
```json
{
    "status":1,
    "message":"ok",
    "data":[
        {
            "created_at":"2018-09-15 16:58:24",
            "guid":659123,
            "status":"通过审核",
            "money":3100
        },
        {
            "created_at":"2018-09-14 22:34:45",
            "guid":659123,
            "status":"通过审核",
            "money":2050
        }
       
    ]
}
```
request

- http://192.168.0.100:8502/api/account/getChipRecord 投注记录

```json
{"guid": 1504,"mask":"时间戳","masksign":"签名","lobby_id":"2","channel_id": "2000","times_type": "查询时间类型"}
//lobby_id,大厅ID，channel_id:品牌ID，所有时为0，times_type:请求查询时间类型，1今天，2昨天。3一个月以内，默认今天

```

response

```json
{
    "status":1,
    "message":"ok",
    "data":[
        {
            "created_at":"2019-09-17 18:20:51",
            "id_p":"2000_125001000119091715520000010",
            "game_name":"龙虎斗",
            "chip":"0.65"
        },
        {
            "created_at":"2019-09-17 18:20:51",
            "id_p":"2000_193001000119091715500000007",
            "game_name":"捕鱼",
            "chip":"14.12"
        },
        {
            "created_at":"2019-09-17 18:20:51",
            "id_p":"2000_125001000119091715530000016",
            "game_name":"龙虎斗",
            "chip":"0.70"
        }
    ]
}
```

request

- http://192.168.0.100:8502/api/account/getAccountDetail 账户明细

```json
{"guid": 1504,"mask":"时间戳","masksign":"签名","times_type": "查询时间类型","opt_type": 2}
//times_type:请求查询时间类型，1今天，2昨天。3一个月以内，默认今天
//opt_type查询类型，1所有，2，平台资金切换，3，充值，4，会员取款，5，人工存，6，活动，7人工取
```

response

```json
{
    "status":1,
    "message":"ok",
    "data":[
        {
            "created_at":"2019-09-06 21:25:26",
            "out":0,//支出
            "in":1000,//收入
            "money":2000,//余额
            "status":2//1所有，2，平台资金切换，3，充值，4，会员取款，5，人工存，6，活动，7人工取
        }
    ]
}
```
request-get
- http://192.168.0.100:8502/api/account/getBankRecord 银行记录  

```json
['guid'=>玩家ID,'mask' => 时间戳,'masksign'=>客户端签名]
```
response
```json
{
    "status":1,
    "message":"ok",
    "data":[
        {
            "created_at":"2019-09-21 15:16:23",
            "money":10,//元
            "type":1//1存2取
        }
    ]
}
```

### 活动类
- https://192.168.0.100/active/ 所有活动
- https://192.168.0.100/active/qp 棋牌
- https://192.168.0.100/active/fish 捕鱼
- https://192.168.0.100/active/electron 电子游戏活动
- https://192.168.0.100/active/video 真人视讯活动 
- https://192.168.0.100/active/sport 体育活动
### 公告类
- https://192.168.0.100/system/
### 提现
request
- http://192.168.0.100:8502/api/account/withdraw
```json
{"guid": 1504,"money": 50,"mask": 783648655,"masksign": "as;kljdhfjkashdf"}
```
response
```json
{
    "status":0,//1成功，0失败
    "message":"失败原因",
    "data":[
       
    ]
}
```
### 我的推广

request-get-http://192.168.0.102:8500/api/promote/info

```json
{
    "promote_id":168001,
    "mask":168001,
    "masksign":"asdasdasd"
}
```

response

```json
{
    "status":1,
    "message":"ok",
    "data":{
        "f_id":0,//父级ID
        "team_count":3,//团队人数
        "team_count_new":3,//团队新增人数
        "agent_count":1,//直属代理
        "agent_count_new":1,//直属代理新增
        "people_count":1,//直属人数
        "people_count_new":1,//直属人数新增
        "yeji":"1823163",//直推业绩
        "team_yj":"1309084",//团队业绩
        "my_yongjin_ex":33770,//佣金预估
        "yes_yongjin":28142,//昨日佣金
        "can_get" : 10000,//可领取金额
        'total_yj' : 128316,//历史总佣金
        "promote_url":"http://192.168.0.100:8502/?type=2&promote=123123"
    }
}
```

### 直属查询

request-get-http://192.168.0.102:8500/api/promote/queryYj

```json
{
    "promote_id":168001,
    "mask":168001,
    "c_id": 14002,//下级推广ID
    "times": 0,//注册时间搜索，0所有，1，今天，2昨天
    "masksign":"asdasdasd"
}
```

response

```json
{
    "status":1,
    "message":"ok",
    "data":{
        "todayYeji":"3132247",
        "people_count":1,
        "agent_count":1,
        "data":[
            {
                "promote_id":14000,
                "c_id":14001,//下级推广ID
                "nickname":"玩家168001",
                "liushui":904856,//今日流水
                "team_count":1,//团队人数
                "people_count":1,//直属人数
                "total_liushui":904856//总流水
            },
            {
                "promote_id":14000,
                "c_id":14003,
                "nickname":"玩家168002",
                "liushui":918307,
                "team_count":0,
                "people_count":0,
                "total_liushui":918307
            }
        ]
    }
}
```

```json
{
    "status":1,
    "message":"ok",
    "data":{
        "c_id":14001,//下级ID
        "team_count":1,//团队人数
        "team_count_new":1,//团队人数新增
        "agent_count":0,//直属代理
        "agent_count_new":0,//直属代理新增
        "people_count":1,//直属人数
        "people_count_new":1,//直属人数新增
        "team_yj":0,//团队业绩
        "my_yongjin_ex":15709,//佣金预估
        "total_yj":15709,//总业绩
        "yes_yj":0,//昨日业绩
        "nickname":"玩家168001",//昵称
        "created_at":"2019-10-05 00:48:54",//创建时间
        "today_liushui":904856,//今日流水
        "total_liushui":904856//昨日流水
    }
}
```

### 业绩查询

request-get-http://192.168.0.102:8500/api/promote/queryYeJi

```json
{
    "promote_id":168001,
    "mask":168001,
    "masksign":"asdasdasd"
}
```

response

```json
{
    "status":1,
    "message":"ok",
    "data":[
        {
            "lobby_id":4,//大厅ID
            "times":20190904,//时间
            "promote_id":14000,//推广ID
            "ziyingyeji":1000,//自营业绩
            "teamyeji":1000,//团队业绩
            "my_yongjin":100,//我的佣金
            "team_count":0,//团队人数
            "people_count":0//直属人数
        },
        {
            "lobby_id":5,
            "times":20191005,
            "promote_id":14000,
            "ziyingyeji":1823163,
            "teamyeji":1309084,
            "my_yongjin":28142,
            "team_count":3,
            "people_count":1
        }
    ]
}
```

### 领取佣金

request-get-http://192.168.0.102:8500/api/promote/getYongJin

```json
{
    "promote_id":168001,
    "mask":168001,
    "masksign":"asdasdasd"
}
```

response

```json
{
    "status":1,
    "message":"ok",
    "data":[
        
    ]
}
```

### 领取佣金记录

request-get-http://192.168.0.102:8500/api/promote/getYongJinRecord

```json
{
    "promote_id":168001,
    "mask":168001,
    "masksign":"asdasdasd"
}
```
response

```json
{
    "status":1,
    "message":"ok",
    "data":[
        {
            "times":"2019-10-05",//出帐时间
            "get_time":"2019-10-10",//领取时间
            "my_money":28142//领取金额
        },
        {
            "times":"2019-10-06",
            "get_time":"2019-10-10",
            "my_money":100
        }
    ]
}
```

### 玩家银行卡转账

request-get-http://192.168.0.168:8500/api/account/bankTransfer

```json
{
    "guid":168001,
    "msg":"324123",
    "money": 10000,//分
    "mask":168001,
    "masksign":"asdasdasd"
}
```
response

```json
{
    "status":1,
    "message":"ok",
    "data":[
        
    ]
}
```