初始化代码
This commit is contained in:
30
application/api/controller/Game.php
Normal file
30
application/api/controller/Game.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace app\api\controller;
|
||||
|
||||
use think\Controller;
|
||||
|
||||
class Game extends Common
|
||||
{
|
||||
//获取游戏列表
|
||||
public function get_game_list()
|
||||
{
|
||||
$reslut = model('game')->get_game_list($this->uid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//获取游戏详情
|
||||
public function get_game_info()
|
||||
{
|
||||
$gid = input('gid', 0);
|
||||
$reslut = model('game')->get_game_info($gid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//添加游戏点击日志
|
||||
public function add_game_click_log()
|
||||
{
|
||||
$gid = input('gid', 0);
|
||||
$reslut = model('game')->add_game_click_log($this->uid, $gid);
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user