This commit is contained in:
Default
2025-05-03 23:54:37 +08:00
parent 0cd2fdcdfe
commit 577a4dab02
26 changed files with 1320 additions and 132 deletions

View File

@@ -15,19 +15,27 @@ Route::post("/publish", [Statis::class, 'publish'])
->name('Statis@publish');
Route::get("/search", [Novel::class, 'search'])
// Route::get("/search", [Novel::class, 'search'])
// ->middleware(\think\middleware\Throttle::class, [
// 'visit_rate' => '1/m',
// 'key' => '__CONTROLLER__/__ACTION__/__IP__',
// ])
// ->name('Novel@search');
Route::post("/publishv", [Statis::class, 'publishV'])
// ->middleware(\think\middleware\Throttle::class, [
// 'visit_rate' => '1/m',
// 'key' => '__CONTROLLER__/__ACTION__/__IP__',
// ])
->name('Novel@search');;
->name('Statis@publishV');
Route::get("/test", [Statis::class, 'test'])
Route::get("/test0909", [Statis::class, 'test0909'])
// ->middleware(\think\middleware\Throttle::class, [
// 'visit_rate' => '1/m',
// 'key' => '__CONTROLLER__/__ACTION__/__IP__',
// ])
->name('Statis@test');
->name('Statis@test0909');

View File

@@ -8,6 +8,7 @@ use app\api\BaseController;
use app\model\CategoryModel;
use app\model\NovelClicksModel;
use app\model\NovelModel;
use app\model\VideoClicksModel;
use DateTime;
use db\mongo\MongoBase;
use ddl\DDLManage;
@@ -41,4 +42,118 @@ class Statis extends BaseController
return Response::create()->code(204);
}
/**
* novel statis
*
* @param Request $Request
* @return Response
*/
public function publishV(Request $Request): Response
{
$intNId = $Request->post('v_id/d');
if ($intNId <= 0) {
return Response::create('非法请求!')->code(400);
}
$NovelClicksModel = VideoClicksModel::getInstance();
try {
$NovelClicksModel->addStatis($intNId);
} catch (\Exception $e) {
// throw $e;
}
return Response::create()->code(204);
}
public function test0909()
{
$a = [
'Hindi',
'Malay',
'Swahili',
'Tamil',
'上海',
'丹麦语',
'乌克兰',
'乌尔都语',
'他加',
'俄语',
'其它',
'匈牙利语',
'北印度语',
'印地语',
'印地语Hindi',
'印尼语',
'印度尼西亚语',
'印度语',
'印度语Hindi',
'因纽特语',
'国语',
'土库曼语',
'土耳',
'土耳其语',
'基库尤语',
'希腊',
'希腊语',
'库尔德语',
'德语',
'意大',
'意大利',
'意大利语',
'挪威语',
'捷克语',
'日语',
'普通话',
'林加拉语',
'毛利语',
'汉语',
'汉语普通',
'汉语普通话',
'汉语普通话Manda',
'河南方言',
'法语',
'波兰语',
'波斯语',
'泰卢固语',
'泰米尔',
'泰米尔语',
'泰米尔语Tamil',
'泰语',
'澳大利亚语',
'瑞典语',
'粤语',
'美国手语',
'英语',
'英语手语',
'荷兰语',
'菲律宾语',
'葡萄',
'葡萄牙语',
'藏语',
'西班',
'西班牙语',
'越南语',
'闽南语',
'阿拉',
'阿拉伯',
'阿拉伯语',
'韩语',
'马拉雅拉姆语',
'马来西亚语',
'马来语'
];
$arrArea = [];
foreach ($a as $v) {
$arrArea[zhToPinYin($v)] = $v;
}
echo '<pre>';
krsort($arrArea);
echo var_export($arrArea, true);
}
}