diff --git a/themes/tajian/README.md b/themes/tajian/README.md index d0a7d3e..d6413cd 100644 --- a/themes/tajian/README.md +++ b/themes/tajian/README.md @@ -10,7 +10,7 @@ ## API -* 添加新视频:/api/addfav/ +* 添加新视频:/frontapi/addfav/ 参数: ``` @@ -38,7 +38,7 @@ POST 返回JSON格式数据。 -* 获取分类列表:/api/tags/ +* 获取分类列表:/frontapi/tags/ 参数: 无 @@ -59,7 +59,7 @@ GET ``` -* 获取视频列表:/api/videos/ +* 获取视频列表:/frontapi/videos/ 参数: ``` diff --git a/themes/tajian/controller/ApiController.php b/themes/tajian/controller/FrontApiController.php similarity index 99% rename from themes/tajian/controller/ApiController.php rename to themes/tajian/controller/FrontApiController.php index b698a8b..e02f084 100644 --- a/themes/tajian/controller/ApiController.php +++ b/themes/tajian/controller/FrontApiController.php @@ -7,7 +7,7 @@ require_once __DIR__ . '/../../../plugins/Parsedown.php'; require_once __DIR__ . '/../../../plugins/Html.php'; require_once __DIR__ . '/SiteController.php'; -Class ApiController extends SiteController { +Class FrontApiController extends SiteController { public function actionIndex() { $code = 0; diff --git a/www/js/tajian.js b/www/js/tajian.js index 2da8556..e0f6cc5 100644 --- a/www/js/tajian.js +++ b/www/js/tajian.js @@ -40,7 +40,7 @@ } $.ajax({ - url: '/api/addfav', + url: '/frontapi/addfav', method: 'POST', dataType: 'JSON', data: postData