fix: 修复session、模板页脚页头初始化

This commit is contained in:
Ying
2022-08-29 19:29:46 +08:00
parent c665082f4f
commit 78aab734e1
8 changed files with 59 additions and 38 deletions

View File

@@ -12,6 +12,8 @@ declare(strict_types=1);
// +----------------------------------------------------------------------
namespace app\common\library;
use Psr\SimpleCache\InvalidArgumentException;
/**
* 全局模型数据处理类
* 1、自动设置字段属性
@@ -162,14 +164,13 @@ class ParseData
* @param string $image 图片地址
* @param bool $bool 链接OR替换
* @return string
* @throws \Psr\SimpleCache\InvalidArgumentException
*/
protected static function changeImages(string $image, bool $bool = true): string
{
$prefix = cdn_Prefix();
var_dump($prefix);
if (!empty($prefix) && $image) {
// 过滤base64
if (!stristr($image, 'data:image')) {
if (!strpos($image, 'data:image')) {
return $bool ? $prefix . $image : str_replace($prefix, '', $image);
}
}