|
@@ -255,6 +255,13 @@ class Index extends Controller
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 开始游戏
|
|
|
|
|
+ * @return mixed|Json
|
|
|
|
|
+ * @throws DataNotFoundException
|
|
|
|
|
+ * @throws DbException
|
|
|
|
|
+ * @throws ModelNotFoundException
|
|
|
|
|
+ */
|
|
|
public function startGame()
|
|
public function startGame()
|
|
|
{
|
|
{
|
|
|
$activity = Db::table('awards_activity')->where('begin_at', '<=', time())
|
|
$activity = Db::table('awards_activity')->where('begin_at', '<=', time())
|
|
@@ -296,6 +303,13 @@ class Index extends Controller
|
|
|
return $this->successResponse(['gameId' => $gameId], '开始游戏成功');
|
|
return $this->successResponse(['gameId' => $gameId], '开始游戏成功');
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 结束游戏
|
|
|
|
|
+ * @return mixed|Json
|
|
|
|
|
+ * @throws DataNotFoundException
|
|
|
|
|
+ * @throws DbException
|
|
|
|
|
+ * @throws ModelNotFoundException
|
|
|
|
|
+ */
|
|
|
public function endGame()
|
|
public function endGame()
|
|
|
{
|
|
{
|
|
|
$activity = Db::table('awards_activity')->where('begin_at', '<=', time())
|
|
$activity = Db::table('awards_activity')->where('begin_at', '<=', time())
|
|
@@ -359,6 +373,13 @@ class Index extends Controller
|
|
|
return $this->successResponse(null, '提交成功');
|
|
return $this->successResponse(null, '提交成功');
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 提交彩蛋
|
|
|
|
|
+ * @return mixed|Json
|
|
|
|
|
+ * @throws DataNotFoundException
|
|
|
|
|
+ * @throws DbException
|
|
|
|
|
+ * @throws ModelNotFoundException
|
|
|
|
|
+ */
|
|
|
public function submitEasterEgg()
|
|
public function submitEasterEgg()
|
|
|
{
|
|
{
|
|
|
$easterEgg = Request::post("easterEgg");
|
|
$easterEgg = Request::post("easterEgg");
|