*** ``` /** * desc: * * api/Douyin/getaccesstoken * * author:wh * api/douyin/getaccesstoken */ ```
按需填写其它接口参数: 测试
*** ``` /** * desc:tt.login触发调用 * 参数:code或anonymous_code * * api/Douyin/jscode2session * * "{\"anonymous_openid\":\"\",\"error\":0,\"openid\":\"_0007vGUSinv-twIOjY9MzYvzlj6U_xHa3Or\",\"session_key\":\"495rArUkMUXa4JoeT7wEVg==\",\"unionid\":\"7e1b9701-a346-5b44-9925-0acc40873cff\"} * * author:wh * api/douyin/jscode2session */ ```
按需填写其它接口参数: 测试
*** ``` /** * desc:创建二维码 * 接口说明 * 获取小程序/小游戏的二维码。该二维码可通过任意 app 扫码打开, * 能跳转到开发者指定的对应字节系 app 内拉起小程序/小游戏,并传入开发者指定的参数。 * 通过该接口生成的二维码,永久有效,暂无数量限制。 * * ⚠ Tip:在使用该功能之前请记得先配置您的默认分享文案和图片,配置方式可参考论坛。 * ⚠ Tip:小程序的 path 要 encode 一次,如 pages%3fparam%3dtrue,小游戏的 path 为 JSON 字符串, * 如{"param":true},否则会导致取不到。 * * 参数: * code和anonymous_code二选一 必须 * appname 可选,目标打开应用名称 默认douyin * background 可选,背景色,rgb格式,英文逗号隔开,默认透明色 * path 可选,小程序/小游戏启动参数,小程序则格式为 encode({path}?{query}),小游戏则格式为 JSON 字符串,默认为空 * width 宽度 可选,二维码宽度,单位 px,最小 280px,最大 1280px,默认为 430px * line_color 可选,二维码线条颜色,默认为黑色,rgb格式,英文逗号隔开,默认黑色 * set_icon 可选,是否展示小程序/小游戏 icon,默认不展示,传yes展示,no不展示,默认no * * api/douyin/createQRCode * 参数:openid * * author:wh * api/douyin/createQRCode */ ```
按需填写其它接口参数: 测试
*** ``` /** * desc:累加击杀敌人数量 * * api/enemy/addKillEnemyNum * * 参数:enemy_num * * author:wh * api/enemy/addKillEnemyNum */ ```
按需填写其它接口参数: 测试
*** ``` /** * desc:查询推荐好友 * * api/friends/getPutFriends * * 要求:不是自己和自己的好友 * author:wh * api/friends/getPutFriends */ ```
按需填写其它接口参数: 测试
*** ``` /** * desc:游戏邮件列表 * api/gameemail/getlists * * is_read 阅读状态 * is_deleted 删除标记 * api/gameemail/getlists */ ```
按需填写其它接口参数: 测试
*** ``` /** * 设置邮件为已读 * api/gameemail/read * 参数: * email_id 邮件id * api/gameemail/read */ ```
按需填写其它接口参数: 测试
*** ``` /** * 删除所有已读邮件 * api/gameemail/delete * 参数: * api/gameemail/delete */ ```
按需填写其它接口参数: 测试
*** ``` /** * desc:游戏道具已解锁、未解锁接口 * api/gameprop/getprop * 参数: * * 返回: * have_arr 已解锁 * no_arr 未解锁 * * author:wh * api/gameprop/getprop */ ```
按需填写其它接口参数: 测试
*** ``` /** * desc:获取游戏道具列表(肥料等各种道具) * * api/gameprop/getGamePropList * * author:wh * api/gameprop/getGamePropList */ ```
按需填写其它接口参数: 测试
*** ``` /** * desc:游戏公告 * api/notice/getnotice * * author:wh * @return \think\response\Json * api/notice/getnotice */ ```
按需填写其它接口参数: 测试
*** ``` /** * desc:查询系统植物列表 * api/plant/getlist * author:wh * api/plant/getlist */ ```
按需填写其它接口参数: 测试
*** ``` /** * desc:查询排行榜 * /api/rankinglist/getrankinglist * author:wh * api/rankinglist/getrankinglist */ ```
按需填写其它接口参数: 测试
*** ``` /** * desc:新增一个兑换码 * 参数: num (默认1) * author:wh * api/redeemcode/add */ ```
按需填写其它接口参数: 测试
*** ``` /** * 查询一个没使用的兑换码 * api/redeemcode/getOne */ ```
按需填写其它接口参数: 测试
*** ``` /** * 兑换码使用 * * 参数:code * * 返回用户获得的道具列表(可能获得多个道具,根据系统配置定) * api/redeemcode/use */ ```
按需填写其它接口参数: 测试
*** ``` /** * 查询当前登陆人收到的邮件(好友触发了某个操作,同时向你发送了消息,并非真实邮件) * 默认查询未读消息 * 参数:无 * api/useremail/getMyEmailMessage */ ```
按需填写其它接口参数: 测试
*** ``` /** * 用户邮件-设置已读 * 参数:dataid 邮件的数据id * api/useremail/read */ ```
按需填写其它接口参数: 测试
*** ``` /** * 用户获得游戏道具接口 * api /api/usergameprop/gainGameProp * * @param string $openid 用户openid * @param int $gameprop_id 道具id * @param int $num 道具数量 * * api/usergameprop/gainGameProp */ ```
按需填写其它接口参数: 测试
*** ``` /** * 查询用户获得的游戏道具列表接口 * api/usergameprop/listUserGameProps * * api/usergameprop/listUserGameProps */ ```
按需填写其它接口参数: 测试
*** ``` /** * desc:用户消耗游戏道具 * * api/usergameprop/cutGameProp * 参数: * usergameprop_id 用户的游戏道具id * num 消耗数量(默认1) * * author:wh * api/usergameprop/cutGameProp */ ```
按需填写其它接口参数: 测试
*** ``` /** * desc:查询用户拥有的植物列表 * * api/userplant/listUserPlants * * author:wh * api/userplant/listUserPlants */ ```
按需填写其它接口参数: 测试
*** ``` /** * desc:植物合成 * api/userplant/plantConflate * * * desc:operate_type=add时新增植物 * plant_sit 新增植物位置 * sys_plant_id 新增植物id(系统植物) * * * desc:operate_type=drag时拖拽 * old_user_plant_data_id 原用户植物数据id * new_plant_sit 新植物位置 * * * desc:operate_type=conflate时合成植物 * target_plant_sit 目标植物位置 * target_sys_plant_id 目标系统植物id * old_user_plant_data_id 旧用户植物数据id * new_sys_plant_data_id 新植物数据id * * * desc:击杀植物 * operate_type=killPlant * user_plant_data_id 用户植物数据id * api/userplant/plantConflate */ ```
按需填写其它接口参数: 测试
*** ``` /** * desc:根据游戏id查询用户 * api/Users/getUserById * 参数: * gameid 用户id * author:wh * api/users/getUserById */ ```
按需填写其它接口参数: 测试
*** ``` /** * desc:根据openid查询用户 * api/Users/getUserInfo * 参数: * openid * * 返回: * now_rank 当前排名 * all_coins: 累计获得金币 * enemy 累计击杀数 * api/users/getUserInfo */ ```
按需填写其它接口参数: 测试
*** ``` /** * desc:微信授权,登录 * * /api/users/login * * 参数:code * * author:wh * api/users/login */ ```
按需填写其它接口参数: 测试
*** ``` /** * desc:修改用户昵称、头像 * * /api/users/updateuser * * 参数: * openid 必传 * nickname,headimage * api/users/updateuser */ ```
按需填写其它接口参数: 测试
*** ``` /** * desc:更新最新关卡 * api/users/updatenowlevel * * 参数: * now_level 最新关卡 * author:wh * api/users/updateNowLevel */ ```
按需填写其它接口参数: 测试
*** ``` /** * desc:查询好友列表-计算离线奖励 * /api/users/getFriendsOfflinePrizeList * * 离线奖励:从用户下线时刻开始,每3个小时奖励一瓶随机等级的肥料,只取整数,不四舍五入。离线时长除以3取整数。 * 比如:离线 0-2.9 个小时 不奖励 离线 3-5.9 个小时 奖励 1瓶 离线 6-8.9 个小时 奖励 2瓶 * gameprop_id 道具奖品 prize_all_num 总奖励数量 self_got_num 自己保底所得数量(固定) can_lose_num 可被偷取的数量(固定) now_can_lose_num 已偷取(偷取后数值增加,数值大于可被偷取的总数量时,拒绝偷取) * author:wh * api/users/getFriendsOfflinePrizeList */ ```
按需填写其它接口参数: 测试
*** ``` /** * desc:(偷取)领取好友离线奖励(领取多少根据后台配置领取比例而定),偷取后发邮件给用户 * * api/users/offlineprizegot * 参数: * friend_openid 好友 * * author:wh * api/users/offlinePrizeGot */ ```
按需填写其它接口参数: 测试
*** ``` /** * 查询自己的离线奖励 * * 离线奖励:从用户下线时刻开始,每3个小时奖励一瓶随机等级的肥料,只取整数,不四舍五入。离线时长除以3取整数。 * 比如:离线 0-2.9 个小时 不奖励 离线 3-5.9 个小时 奖励 1瓶 离线 6-8.9 个小时 奖励 2瓶 * * api/users/getselfofflineprize * api/users/getSelfOfflinePrize */ ```
按需填写其它接口参数: 测试
*** ``` /** * desc:领取自己的离线奖励(一次性领取所有离线奖励,不能分批次领取,没有部分领取一说) * api/users/receiveSelfOfflinePrize * 参数: * is_double 是否双倍奖励 1 一倍,2 二倍 * author:wh * api/users/receiveSelfOfflinePrize */ ```
按需填写其它接口参数: 测试
*** ``` /** * desc:查询我的好友列表 * * api/users/getMyFriends * * author:wh * api/users/getMyFriends */ ```
按需填写其它接口参数: 测试
*** ``` /** * desc:添加好友 * * api/users/addFriend * 参数: * friend_openid 好友openid * 注意:如果好友在线,会向好友发送申请消息 * author:wh * api/users/addFriend */ ```
按需填写其它接口参数: 测试
*** ``` /** * desc:查询我的好友申请列表 * * api/users/getFriendApplyList * author:wh * api/users/getFriendApplyList */ ```
按需填写其它接口参数: 测试
*** ``` /** * 同意好友申请 * api/users/agreeFriendApply * 参数: * friend_openid 好友openid * api/users/agreeFriendApply */ ```
按需填写其它接口参数: 测试
*** ``` /** * 拒绝好友申请 * * api/users/refuseFriendApply * 参数: * friend_openid 好友openid * api/users/refuseFriendApply */ ```
按需填写其它接口参数: 测试
*** ``` /** * desc:增加金币,直接存用户信息里 * author:wh * 参数: * coins 金币数量 * api/users/addCoins */ ```
按需填写其它接口参数: 测试
*** ``` /** * desc:消耗金币 * author:wh * 参数: * coins 金币数量 * api/users/cutCoins */ ```
按需填写其它接口参数: 测试