This commit is contained in:
Default
2025-03-28 21:56:51 +08:00
parent 817dadf876
commit 04005aba7c
11 changed files with 251 additions and 55 deletions

View File

@@ -27,4 +27,24 @@ class DomainModel extends BaseModel
$strKey = "D:" . $strDomain;
return Cache::delete($strKey);
}
/**
* Undocumented function
*
* @param string $strWords
* @return string
*/
static public function wordsEncode($strWords): string
{
$Request = request();
$intEncode = $Request->DomainModel->d_content_encode;
if ($intEncode == 1) {
$strWords = customEntities($strWords);
}
return $strWords;
}
}

View File

@@ -0,0 +1,38 @@
<?php
declare(strict_types=1);
namespace app\model;
use DateTime;
use Exception;
use storage\StorageCore;
use think\facade\Cache;
use think\Model;
/**
* @mixin think\Model
*/
class GanRaoMaModel extends MongoModel
{
/**
* Undocumented variable
*
* @var string
*/
protected $strCollection = 'gan_rao_ma';
/**
* Undocumented function
*
* @param string $strDomain
* @param string $strPageCode
* @param int $intLine
* @param string $strDifference
* @return string
*/
static public function getGrmCode($strDomain, $strPageCode, $intLine, $strDifference): string
{
return (string)mt_rand(1, 100);
}
}

View File

@@ -326,4 +326,32 @@ class NovelModel extends MongoModel
return [];
}
}
/**
* Undocumented function
*
* @param int $intNId
* @param string $intPinYin
* @return string
*/
static public function getNovelInfoUrl($intNId, $intPinYin): string
{
$Request = request();
$strFomart = $Request->DomainModel->d_novel_info_url_fomart;
return str_replace(
[
'{intNId}',
'{strPinYin}',
],
[
$intNId,
$intPinYin
],
$strFomart
);
return $strUrl;
}
}