Compare commits
94 Commits
65ccd97e32
...
3ff0137e4b
| Author | SHA1 | Date | |
|---|---|---|---|
| 3ff0137e4b | |||
| 15c18d5fc1 | |||
| 91b083f0e5 | |||
| a3dccb8b19 | |||
| 974f561c5a | |||
| 8fd52854cc | |||
| b9b865ece0 | |||
| acc39f4580 | |||
| e82c201a2b | |||
| 6927bdbc42 | |||
| 3db7e42e71 | |||
| 12bd511d0b | |||
| 4a52be183c | |||
| 58324ebb33 | |||
| 8ccca36e44 | |||
| d6c7a0f11e | |||
| 858468b72b | |||
| 3eadc5c3eb | |||
| fe324bc62f | |||
| 2329b1bbe6 | |||
| 134c75cc4b | |||
| 3b737b0bd0 | |||
| 2da153e935 | |||
| 271f22ea18 | |||
| 4a56e7e980 | |||
| b3475a7d06 | |||
| 988bdde6f1 | |||
| 456209121e | |||
| 8186a424de | |||
| ebc8c6431a | |||
| 7cbb6adb5d | |||
| 4b8963161f | |||
| eeb79e8c56 | |||
| 2a503cbf68 | |||
| aed2ce4655 | |||
| 70b524ce04 | |||
| db82564148 | |||
| 386cd613ee | |||
| dc8a3dc5da | |||
| 4ec2985468 | |||
| 796231a50e | |||
| 6b082f2de9 | |||
|
|
83287098ee | ||
|
|
b67959163b | ||
| ba04d6d220 | |||
| 457c06948c | |||
| c0b6ddf11b | |||
| a8960c3c81 | |||
| d4be3ff937 | |||
| 751d4ce12d | |||
| 9c6e26ce05 | |||
| 25a55ba9f5 | |||
| b8b8d8d58f | |||
| 31d747a0b0 | |||
| 0025b0a5bb | |||
| 002c4055eb | |||
| 738986d715 | |||
| 673f4d101a | |||
| 553c010dc2 | |||
| c18ba2dbc2 | |||
| 13eec27ea9 | |||
| 84e41958c9 | |||
| 7045bd7b7d | |||
| cbb0699fae | |||
| e1b4266513 | |||
| c109748c79 | |||
| 87b4917120 | |||
| 48e3ec7c2c | |||
| 92679d3ebc | |||
| dc94ec5f5f | |||
| c67ae635d8 | |||
| 4233efe422 | |||
| 28e3e08f86 | |||
| be7f4edff5 | |||
| 3d777043e8 | |||
| 9aafb6321b | |||
| 942a5706ca | |||
| 73b8562d71 | |||
| c3733e24a7 | |||
| eeaa27d0b4 | |||
| a5e20a3840 | |||
| d809690724 | |||
| 447885529e | |||
| 89e46189bd | |||
| 29ea63199c | |||
| 3ef1fc634a | |||
| 4d988c316b | |||
| 9182ed29d9 | |||
| e1388c63b7 | |||
| a0d53c6e0e | |||
| 6603af60ef | |||
| 336f27bc23 | |||
| 256975b592 | |||
| 90508c8c37 |
32
.env.dev
32
.env.dev
@@ -1,32 +0,0 @@
|
||||
APP_DEBUG = true
|
||||
|
||||
DB_TYPE = mysql
|
||||
DB_HOST = localhost
|
||||
DB_NAME = orico-official-website
|
||||
DB_USER = orico-ow
|
||||
DB_PASS = 14Xi17NIK8V2qAXE8oMataHEsaR8lE
|
||||
DB_PORT = 3306
|
||||
DB_CHARSET = utf8mb4
|
||||
DB_PREFIX = ow_
|
||||
|
||||
DEFAULT_LANG = zh-cn
|
||||
|
||||
# 前端代理服务器ip(影响使用代理访问情况下的客户端ip获取)
|
||||
PROXY_SERVER_IP[] = 120.79.27.160
|
||||
|
||||
[JWT]
|
||||
TTL=3600
|
||||
REFRESH_TTL=20160
|
||||
SECRET=b43e6276644ed60e65c50d1b324ba10b
|
||||
|
||||
# 后台不需要登录的接口
|
||||
[ADMIN_AUTH]
|
||||
WHITE_LIST[] = v1/user/login
|
||||
WHITE_LIST[] = v1/user/captcha
|
||||
|
||||
# 不需记录日志的接口
|
||||
[ADMIN_API]
|
||||
IGNORE_LOGGING_LIST[] = v1/OperateLog/index
|
||||
MAX_IMAGE_SIZE = 5mb # 图片上传最大限制
|
||||
MAX_VIDEO_SIZE = 150mb # 视频上传最大限制
|
||||
MAX_ATTACHMENT_SIZE = 100mb # 附件上传最大限制
|
||||
55
.env.local
55
.env.local
@@ -1,55 +0,0 @@
|
||||
APP_DEBUG = true
|
||||
|
||||
DB_TYPE = mysql
|
||||
DB_HOST = 127.0.0.1
|
||||
DB_NAME = orico-official-website
|
||||
DB_USER = orico-official-website
|
||||
DB_PASS = 14Xi17NIK8V2qAXE8oMataHEsaR8lE
|
||||
DB_PORT = 3306
|
||||
DB_CHARSET = utf8mb4
|
||||
DB_PREFIX = ow_
|
||||
|
||||
DEFAULT_LANG = zh-cn
|
||||
|
||||
# 前端代理服务器ip(影响使用代理访问情况下的客户端ip获取)
|
||||
PROXY_SERVER_IP[] = 120.79.27.160
|
||||
|
||||
[JWT]
|
||||
TTL=3600
|
||||
REFRESH_TTL=20160
|
||||
SECRET=b43e6276644ed60e65c50d1b324ba10b
|
||||
|
||||
# 后台不需要登录的接口
|
||||
[ADMIN_AUTH]
|
||||
WHITE_LIST[] = v1/user/login
|
||||
WHITE_LIST[] = v1/user/captcha
|
||||
|
||||
# 不需记录日志的接口
|
||||
[ADMIN_API]
|
||||
IGNORE_LOGGING_LIST[] = v1/OperateLog/index
|
||||
MAX_IMAGE_SIZE = 5mb; # 图片上传最大限制
|
||||
MAX_VIDEO_SIZE = 150mb; # 视频上传最大限制
|
||||
MAX_ATTACHMENT_SIZE = 100mb; # 附件上传最大限制
|
||||
|
||||
# 开放API
|
||||
[OPENAPI]
|
||||
RESOURCE_IMAGES_DOMAIN = http://local.orico.com; # 图片资源服务器地址
|
||||
RESOURCE_VIDEOS_DOMAIN = http://local.orico.com; # 视频资源服务器地址
|
||||
|
||||
# 视图模板规则配置
|
||||
[VIEW_TPL]
|
||||
# 视图目录
|
||||
# query 规则:URL参数 mtpl=1 表示移动端访问
|
||||
# 例如:http://xxxx.com?mtpl=1
|
||||
# domain 规则:根据特定域名,判断是否移动端访问
|
||||
# 例如:http://mobile.orico.cn
|
||||
RULE = query
|
||||
# query 规则参数名
|
||||
RULE_QUERY_NAME = mtpl
|
||||
# query 规则参数值
|
||||
RULE_QUERY_VALUE = 1
|
||||
# domain 规则协议
|
||||
RULE_DOMAIN_SCHEME[] = http
|
||||
RULE_DOMAIN_SCHEME[] = https
|
||||
# domain 规则域名
|
||||
RULE_DOMAIN_HOST = mobile.orico.cn
|
||||
63
.example.env
63
.example.env
@@ -1,11 +1,64 @@
|
||||
APP_DEBUG = true
|
||||
|
||||
DB_TYPE = mysql
|
||||
DB_HOST = 127.0.0.1
|
||||
DB_NAME = test
|
||||
DB_USER = username
|
||||
DB_PASS = password
|
||||
DB_HOST = localhost
|
||||
DB_NAME = orico-official-website
|
||||
DB_USER = orico-ow
|
||||
DB_PASS = 14Xi17NIK8V2qAXE8oMataHEsaR8lE
|
||||
DB_PORT = 3306
|
||||
DB_CHARSET = utf8
|
||||
DB_CHARSET = utf8mb4
|
||||
DB_PREFIX = ow_
|
||||
DB_VERSION = 8
|
||||
|
||||
DEFAULT_LANG = zh-cn
|
||||
|
||||
# 前端代理服务器ip(影响使用代理访问情况下的客户端ip获取)
|
||||
PROXY_SERVER_IP[] = 120.79.27.160
|
||||
|
||||
# redis 配置
|
||||
REDIS_HOST = 127.0.0.1
|
||||
REDIS_PORT = 6379
|
||||
REDIS_PASSWORD = ''
|
||||
REDIS_PREFIX = ow:
|
||||
|
||||
[JWT]
|
||||
TTL=3600
|
||||
REFRESH_TTL=20160
|
||||
SECRET=b43e6276644ed60e65c50d1b324ba10b
|
||||
|
||||
# 后台不需要登录的接口
|
||||
[ADMIN_AUTH]
|
||||
WHITE_LIST[] = v1/user/login
|
||||
WHITE_LIST[] = v1/user/captcha
|
||||
WHITE_LIST[] = receive_sync/category
|
||||
WHITE_LIST[] = receive_sync/product
|
||||
|
||||
# 不需记录日志的接口
|
||||
[ADMIN_API]
|
||||
IGNORE_LOGGING_LIST[] = v1/OperateLog/index
|
||||
MAX_IMAGE_SIZE = 5mb # 图片上传最大限制
|
||||
MAX_VIDEO_SIZE = 150mb # 视频上传最大限制
|
||||
MAX_ATTACHMENT_SIZE = 100mb # 附件上传最大限制
|
||||
|
||||
# 开放API
|
||||
[OPENAPI]
|
||||
RESOURCE_IMAGES_DOMAIN = http://local.orico.com; # 图片资源服务器地址
|
||||
RESOURCE_VIDEOS_DOMAIN = http://local.orico.com; # 视频资源服务器地址
|
||||
|
||||
# 视图模板规则配置
|
||||
[VIEW_TPL]
|
||||
# 视图目录
|
||||
# query 规则:URL参数 mtpl=1 表示移动端访问
|
||||
# 例如:http://xxxx.com?mtpl=1
|
||||
# domain 规则:根据特定域名,判断是否移动端访问
|
||||
# 例如:http://mobile.orico.cn
|
||||
RULE = query
|
||||
# query 规则参数名
|
||||
RULE_QUERY_NAME = mtpl
|
||||
# query 规则参数值
|
||||
RULE_QUERY_VALUE = 1
|
||||
# domain 规则协议
|
||||
RULE_DOMAIN_SCHEME[] = http
|
||||
RULE_DOMAIN_SCHEME[] = https
|
||||
# domain 规则域名
|
||||
RULE_DOMAIN_HOST = mobile.orico.cn
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -3,6 +3,8 @@ composer.phar
|
||||
composer.lock
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
.env.dev
|
||||
.env.local
|
||||
|
||||
/.idea
|
||||
/.vscode
|
||||
|
||||
@@ -162,7 +162,7 @@ class ReceiveProductSync
|
||||
}
|
||||
|
||||
try {
|
||||
$product_tco_category = ProductTcoCategoryModel::language($lang_id)->erpCade($data['category_erp_code'])->find();
|
||||
$product_tco_category = ProductTcoCategoryModel::language($lang_id)->erpCode($data['category_erp_code'])->find();
|
||||
if (empty($product_tco_category)) {
|
||||
throw new \Exception('官网未找到产品目录同步分类');
|
||||
}
|
||||
@@ -186,10 +186,10 @@ class ReceiveProductSync
|
||||
'is_sale' => 0,
|
||||
'is_new' => 0,
|
||||
'is_hot' => 0,
|
||||
'is_show' => Operate_Of_ReceiveSync::Disable == $data['operate'] ? 0 : 1,
|
||||
'is_show' => 0,
|
||||
'sort' => 0,
|
||||
'detail' => '',
|
||||
'status' => 1,
|
||||
'status' => Operate_Of_ReceiveSync::Disable == $data['operate'] ? -1 : 1,
|
||||
'seo_title' => '',
|
||||
'seo_keywords' => '',
|
||||
'seo_desc' => '',
|
||||
@@ -203,7 +203,7 @@ class ReceiveProductSync
|
||||
$product->spu = $data['spu'];
|
||||
$product->name = $data['name'];
|
||||
$product->category_id = $product_category['id'];
|
||||
$product->is_show = Operate_Of_ReceiveSync::Disable == $data['operate'] ? 0 : 1;
|
||||
$product->status = Operate_Of_ReceiveSync::Disable == $data['operate'] ? -1 : 1;
|
||||
if (!$product->save()) {
|
||||
throw new \Exception('产品更新失败');
|
||||
}
|
||||
|
||||
@@ -45,17 +45,39 @@ class Upload
|
||||
// 获取图片上传配置
|
||||
list(
|
||||
'filename_keep' => $filename_keep,
|
||||
'filemd5_unique' => $filemd5_unique
|
||||
'filemd5_unique' => $filemd5_unique,
|
||||
'filetype_to' => $filetype_to,
|
||||
) = $this->getUploadOptions('upload_image');
|
||||
|
||||
// 获取文件大小
|
||||
$file_size = $file->getSize();
|
||||
// 获取文件mime类型
|
||||
$mime_type = $file->getOriginalMime();
|
||||
|
||||
// 是否需要根据文件MD5值检查文件是否已存在
|
||||
$image_model = $filemd5_unique ? SysImageUploadRecordModel::md5($filemd5)->find() : null;
|
||||
if (is_null($image_model)) {
|
||||
// 检查是否需要保留原文件名生成器
|
||||
$name_rule = fn() => $filename_keep ? $this->filenameGenerator($file) : null;
|
||||
$filename = Filesystem::disk('image')->putFile($param['module'], $file, $name_rule());
|
||||
|
||||
// 处理图片
|
||||
$image_manager = ImageManager::imagick();
|
||||
$image = $image_manager->read('.' . $storage . '/' . $filename);
|
||||
$image_manager = ImageManager::gd();
|
||||
if ($filetype_to == 'original') {
|
||||
$filename = Filesystem::disk('image')->putFile($param['module'], $file, $name_rule());
|
||||
$image = $image_manager->read('.' . $storage . '/' . $filename);
|
||||
}
|
||||
else if ($filetype_to == 'webp') {
|
||||
$image = $image_manager->read($file->getRealPath());
|
||||
// 转换为webp格式
|
||||
$webp = $image->toWebp(75);
|
||||
$root = config('filesystem.disks.image.root');
|
||||
$filename = $param['module'] . '/' . ($name_rule() ?? date('Ymd') . '/' . md5((string)time()) . '.webp');
|
||||
$webp->save($this->checkPath($root . '/' . $filename));
|
||||
// 获取webp文件大小
|
||||
$file_size = $webp->size();
|
||||
// 获取webp文件mime类型
|
||||
$mime_type = $webp->mimetype();
|
||||
}
|
||||
|
||||
// 水印
|
||||
list(
|
||||
@@ -133,8 +155,8 @@ class Upload
|
||||
$image_model->module = $param['module'];
|
||||
$image_model->image_path = $filename;
|
||||
$image_model->image_thumb = $thumb_filename;
|
||||
$image_model->file_size = $file->getSize();
|
||||
$image_model->file_type = $file->getOriginalMime();
|
||||
$image_model->file_size = $file_size;
|
||||
$image_model->file_type = $mime_type;
|
||||
$image_model->file_md5 = $filemd5;
|
||||
$image_model->file_sha1 = $filesha1;
|
||||
if (!$image_model->save()) {
|
||||
@@ -154,6 +176,30 @@ class Upload
|
||||
|
||||
return error('上传失败');
|
||||
}
|
||||
/**
|
||||
* 检查路径
|
||||
*
|
||||
* @param string $path
|
||||
* @return string
|
||||
*/
|
||||
private function checkPath($path): string
|
||||
{
|
||||
$ok = true;
|
||||
$filename = basename($path);
|
||||
$dirname = dirname($path);
|
||||
if (!is_dir($dirname)) {
|
||||
$ok = @mkdir($dirname, 0755, true);
|
||||
}
|
||||
else if (!is_writable($dirname)) {
|
||||
$ok = @chmod($dirname,0755);
|
||||
}
|
||||
|
||||
if ($ok) {
|
||||
return $dirname . '/' . $filename;
|
||||
}
|
||||
|
||||
throw new \Exception("上传目标目录不可用");
|
||||
}
|
||||
/**
|
||||
* 文件名生成回调
|
||||
*
|
||||
@@ -175,10 +221,11 @@ class Upload
|
||||
$config_model = new \app\admin\controller\v1\SiteConfig;
|
||||
$config = $config_model->getByGroupUniqueLabel('upload');
|
||||
$options = data_get($config, $module, []);
|
||||
throw_if(empty($options), '上传配置错误');
|
||||
|
||||
return [
|
||||
'filename_keep' => (int)data_get($options, 'filename_keep.value', 0) == 1,
|
||||
'filemd5_unique' => (int)data_get($options, 'filemd5_unique.value', 0) == 1,
|
||||
'filetype_to' => data_get($options, 'filetype_to.value', 'original'),
|
||||
];
|
||||
}
|
||||
/**
|
||||
@@ -220,7 +267,7 @@ class Upload
|
||||
];
|
||||
}
|
||||
/**
|
||||
* 计算文体水印偏移量
|
||||
* 计算文本水印偏移量
|
||||
*
|
||||
* @param string $position
|
||||
* @param integer $offset_x
|
||||
|
||||
@@ -616,6 +616,12 @@ Route::group('v1', function () {
|
||||
});
|
||||
})->prefix('v1.');
|
||||
|
||||
// 接收产品目录同步数据
|
||||
Route::group('receive_sync', function () {
|
||||
Route::post('category', 'ReceiveProductSync/category');
|
||||
Route::post('product', 'ReceiveProductSync/product');
|
||||
});
|
||||
|
||||
Route::miss(function() {
|
||||
return '404 Not Found!';
|
||||
});
|
||||
|
||||
@@ -64,19 +64,36 @@ class ArticleCategoryValidate extends Validate
|
||||
if ($value == 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$children = [];
|
||||
$table_name = (new ArticleCategoryModel)->getTable();
|
||||
$children = Db::query(
|
||||
preg_replace(
|
||||
'/\s+/u',
|
||||
' ',
|
||||
"WITH RECURSIVE article_tree_by AS (
|
||||
SELECT a.id, a.pid FROM $table_name a WHERE a.id = {$data['id']}
|
||||
UNION ALL
|
||||
SELECT k.id, k.pid FROM $table_name k INNER JOIN article_tree_by t ON t.id = k.pid
|
||||
if (env('DB_VERSION', '5') == '8') {
|
||||
$children = Db::query(
|
||||
preg_replace(
|
||||
'/\s+/u',
|
||||
' ',
|
||||
"WITH RECURSIVE article_tree_by AS (
|
||||
SELECT a.id, a.pid FROM $table_name a WHERE a.id = {$data['id']}
|
||||
UNION ALL
|
||||
SELECT k.id, k.pid FROM $table_name k INNER JOIN article_tree_by t ON t.id = k.pid
|
||||
)
|
||||
SELECT id FROM article_tree_by WHERE id <> {$data['id']};"
|
||||
)
|
||||
SELECT id FROM article_tree_by WHERE id <> {$data['id']};"
|
||||
)
|
||||
);
|
||||
);
|
||||
} else {
|
||||
$children = \think\facade\Db::query("
|
||||
SELECT t2.id
|
||||
FROM (
|
||||
SELECT
|
||||
@r AS _id, (SELECT @r := GROUP_CONCAT(id) FROM $table_name WHERE FIND_IN_SET(pid, _id)) AS parent_id
|
||||
FROM
|
||||
(SELECT @r := {$data['id']}) vars, $table_name h
|
||||
WHERE @r <> 0) t1
|
||||
JOIN $table_name t2
|
||||
ON FIND_IN_SET(t2.pid, t1._id)
|
||||
ORDER BY t2.id;
|
||||
");
|
||||
}
|
||||
if (!empty($children) && in_array($data['pid'], array_column($children, 'id'))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -23,9 +23,9 @@ class ArticleValidate extends Validate
|
||||
'sort' => 'integer',
|
||||
'recommend' => 'require|in:0,1',
|
||||
'release_time' => 'dateFormat:Y-m-d H:i:s',
|
||||
'seo_title' => 'max:255',
|
||||
'seo_keywords' => 'max:255',
|
||||
'seo_desc' => 'max:255'
|
||||
'seo_title' => 'max:512',
|
||||
'seo_keywords' => 'max:512',
|
||||
'seo_desc' => 'max:1024'
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -48,8 +48,8 @@ class ArticleValidate extends Validate
|
||||
'recommend.require' => '推荐状态不能为空',
|
||||
'recommend.in' => '推荐状态的值必须是0或1',
|
||||
'release_time.dateFormat' => '发布时间格式不正确',
|
||||
'seo_title.max' => 'SEO标题长度不能超过255个字符',
|
||||
'seo_keywords.max' => 'SEO关键字长度不能超过255个字符',
|
||||
'seo_desc.max' => 'SEO描述长度不能超过255个字符'
|
||||
'seo_title.max' => 'SEO标题长度不能超过512个字符',
|
||||
'seo_keywords.max' => 'SEO关键字长度不能超过512个字符',
|
||||
'seo_desc.max' => 'SEO描述长度不能超过1024个字符'
|
||||
];
|
||||
}
|
||||
|
||||
@@ -49,19 +49,36 @@ class AttachmentCategoryValidate extends Validate
|
||||
if ($value == 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$children = [];
|
||||
$table_name = (new AttachmentCategoryModel)->getTable();
|
||||
$children = Db::query(
|
||||
preg_replace(
|
||||
'/\s+/u',
|
||||
' ',
|
||||
"WITH RECURSIVE attachment_tree_by AS (
|
||||
SELECT a.id, a.pid FROM $table_name a WHERE a.id = {$data['id']}
|
||||
UNION ALL
|
||||
SELECT k.id, k.pid FROM $table_name k INNER JOIN attachment_tree_by t ON t.id = k.pid
|
||||
if (env('DB_VERSION', '5') == '8') {
|
||||
$children = Db::query(
|
||||
preg_replace(
|
||||
'/\s+/u',
|
||||
' ',
|
||||
"WITH RECURSIVE attachment_tree_by AS (
|
||||
SELECT a.id, a.pid FROM $table_name a WHERE a.id = {$data['id']}
|
||||
UNION ALL
|
||||
SELECT k.id, k.pid FROM $table_name k INNER JOIN attachment_tree_by t ON t.id = k.pid
|
||||
)
|
||||
SELECT id FROM attachment_tree_by WHERE id <> {$data['id']};"
|
||||
)
|
||||
SELECT id FROM attachment_tree_by WHERE id <> {$data['id']};"
|
||||
)
|
||||
);
|
||||
);
|
||||
} else {
|
||||
$children = \think\facade\Db::query("
|
||||
SELECT t2.id
|
||||
FROM (
|
||||
SELECT
|
||||
@r AS _id, (SELECT @r := GROUP_CONCAT(id) FROM $table_name WHERE FIND_IN_SET(pid, _id)) AS parent_id
|
||||
FROM
|
||||
(SELECT @r := {$data['id']}) vars, $table_name h
|
||||
WHERE @r <> 0) t1
|
||||
JOIN $table_name t2
|
||||
ON FIND_IN_SET(t2.pid, t1._id)
|
||||
ORDER BY t2.id;
|
||||
");
|
||||
}
|
||||
if (!empty($children) && in_array($data['pid'], array_column($children, 'id'))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -61,19 +61,36 @@ class NavigationItemValidate extends Validate
|
||||
if ($value == 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$children = [];
|
||||
$table_name = (new SysNavigationItemModel)->getTable();
|
||||
$children = Db::query(
|
||||
preg_replace(
|
||||
'/\s+/u',
|
||||
' ',
|
||||
"WITH RECURSIVE tree_by AS (
|
||||
SELECT a.id, a.pid FROM $table_name a WHERE a.id = {$data['id']}
|
||||
UNION ALL
|
||||
SELECT k.id, k.pid FROM $table_name k INNER JOIN tree_by t ON t.id = k.pid
|
||||
if (env('DB_VERSION', '5') == '8') {
|
||||
$children = Db::query(
|
||||
preg_replace(
|
||||
'/\s+/u',
|
||||
' ',
|
||||
"WITH RECURSIVE tree_by AS (
|
||||
SELECT a.id, a.pid FROM $table_name a WHERE a.id = {$data['id']}
|
||||
UNION ALL
|
||||
SELECT k.id, k.pid FROM $table_name k INNER JOIN tree_by t ON t.id = k.pid
|
||||
)
|
||||
SELECT id FROM tree_by WHERE id <> {$data['id']};"
|
||||
)
|
||||
SELECT id FROM tree_by WHERE id <> {$data['id']};"
|
||||
)
|
||||
);
|
||||
);
|
||||
} else {
|
||||
$children = \think\facade\Db::query("
|
||||
SELECT t2.id
|
||||
FROM (
|
||||
SELECT
|
||||
@r AS _id, (SELECT @r := GROUP_CONCAT(id) FROM $table_name WHERE FIND_IN_SET(pid, _id)) AS parent_id
|
||||
FROM
|
||||
(SELECT @r := {$data['id']}) vars, $table_name h
|
||||
WHERE @r <> 0) t1
|
||||
JOIN $table_name t2
|
||||
ON FIND_IN_SET(t2.pid, t1._id)
|
||||
ORDER BY t2.id;
|
||||
");
|
||||
}
|
||||
if (!empty($children) && in_array($data['pid'], array_column($children, 'id'))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -74,19 +74,36 @@ class SysMenuValidate extends Validate
|
||||
if ($value == 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$children = [];
|
||||
$table_name = (new SysMenuModel)->getTable();
|
||||
$children = Db::query(
|
||||
preg_replace(
|
||||
'/\s+/u',
|
||||
' ',
|
||||
"WITH RECURSIVE menu_tree_by AS (
|
||||
SELECT a.id, a.pid FROM $table_name a WHERE a.id = {$data['id']}
|
||||
UNION ALL
|
||||
SELECT k.id, k.pid FROM $table_name k INNER JOIN menu_tree_by t ON t.id = k.pid
|
||||
if (env('DB_VERSION', '5') == '8') {
|
||||
$children = Db::query(
|
||||
preg_replace(
|
||||
'/\s+/u',
|
||||
' ',
|
||||
"WITH RECURSIVE menu_tree_by AS (
|
||||
SELECT a.id, a.pid FROM $table_name a WHERE a.id = {$data['id']}
|
||||
UNION ALL
|
||||
SELECT k.id, k.pid FROM $table_name k INNER JOIN menu_tree_by t ON t.id = k.pid
|
||||
)
|
||||
SELECT id FROM menu_tree_by WHERE id <> {$data['id']};"
|
||||
)
|
||||
SELECT id FROM menu_tree_by WHERE id <> {$data['id']};"
|
||||
)
|
||||
);
|
||||
);
|
||||
} else {
|
||||
$children = \think\facade\Db::query("
|
||||
SELECT t2.id
|
||||
FROM (
|
||||
SELECT
|
||||
@r AS _id, (SELECT @r := GROUP_CONCAT(id) FROM $table_name WHERE FIND_IN_SET(pid, _id)) AS parent_id
|
||||
FROM
|
||||
(SELECT @r := {$data['id']}) vars, $table_name h
|
||||
WHERE @r <> 0) t1
|
||||
JOIN $table_name t2
|
||||
ON FIND_IN_SET(t2.pid, t1._id)
|
||||
ORDER BY t2.id;
|
||||
");
|
||||
}
|
||||
if (!empty($children) && in_array($data['pid'], array_column($children, 'id'))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ class VideoValidate extends Validate
|
||||
'language_id' => 'require|integer',
|
||||
'category_id' => 'require|integer',
|
||||
'name' => 'require|max:64',
|
||||
'desc' => 'max:255',
|
||||
'desc' => 'max:512',
|
||||
'image' => 'max:125',
|
||||
'video' => 'max:125',
|
||||
'link' => 'url|max:125',
|
||||
@@ -44,7 +44,7 @@ class VideoValidate extends Validate
|
||||
'category_id.integer' => '分类参数类型错误',
|
||||
'name.require' => '名称不能为空',
|
||||
'name.max' => '名称不能超过64个字符',
|
||||
'desc.max' => '描述不能超过255个字符',
|
||||
'desc.max' => '描述不能超过512个字符',
|
||||
'image.max' => '图片不能超过125个字符',
|
||||
'video.max' => '视频不能超过125个字符',
|
||||
'link.url' => '链接格式错误',
|
||||
|
||||
@@ -61,6 +61,9 @@ class DataMigration extends Command
|
||||
|
||||
// 迁移文章
|
||||
// $this->migrateArticle([
|
||||
// 16 => 7,
|
||||
// 31 => 9,
|
||||
// 32 => 8,
|
||||
// 68 => 10,
|
||||
// 69 => 11,
|
||||
// 70 => 12,
|
||||
@@ -290,14 +293,15 @@ class DataMigration extends Command
|
||||
$old_db = Db::connect('old');
|
||||
|
||||
$success_map = [];
|
||||
$success_arr = include_once(runtime_path() . 'product_success.php');
|
||||
$success_arr = []; // include_once(runtime_path() . 'product_success.php');
|
||||
foreach ($success_arr as $so) {
|
||||
$success_map['p_' . $so['cod_product_id']] = $so;
|
||||
}
|
||||
|
||||
$arr = include_once(runtime_path() . 'product_ids.php');
|
||||
$products = $old_db->name('product')
|
||||
->where('country_code', 'in', ['ZH', 'US'])
|
||||
->where('id', '>', 15789)
|
||||
->where('id', 'in', array_unique(array_column($arr, 'cod_product_id')))
|
||||
->order(['id' => 'asc'])
|
||||
->cursor();
|
||||
|
||||
@@ -374,7 +378,16 @@ class DataMigration extends Command
|
||||
'deleted_at' => $v['stat'] == -1 ? date('Y-m-d H:i:s') : null,
|
||||
];
|
||||
// 保存产品数据
|
||||
$id = Db::name('product')->insertGetId($item);
|
||||
$prod = Db::name('product')
|
||||
->where('language_id', '=', $item['language_id'])
|
||||
->where('spu', '=', $item['spu'])
|
||||
->find();
|
||||
if (!empty($prod)) {
|
||||
$id = $prod['id'];
|
||||
Db::name('product')->where('id', '=', $prod['id'])->update($item);
|
||||
} else {
|
||||
$id = Db::name('product')->insertGetId($item);
|
||||
}
|
||||
|
||||
// 保存产品参数数据
|
||||
if (!empty($v['product_view'])) {
|
||||
@@ -387,7 +400,21 @@ class DataMigration extends Command
|
||||
'value' => $p['desc_desc']
|
||||
];
|
||||
}
|
||||
Db::name('product_params')->insertAll($prarms);
|
||||
$old_params = Db::name('product_params')
|
||||
->where('product_id', '=', $id)
|
||||
->select();
|
||||
if ($old_params->isEmpty()) {
|
||||
Db::name('product_params')->insertAll($prarms);
|
||||
} else {
|
||||
foreach ($old_params as $op) {
|
||||
Db::name('product_params')
|
||||
->where('product_id', '=', $id)
|
||||
->where('name', '=', $op['name'])
|
||||
->update([
|
||||
'value' => $op['value']
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 保存sku数据
|
||||
@@ -444,7 +471,7 @@ class DataMigration extends Command
|
||||
if ($k != 'sort') {
|
||||
$attr_value = $at;
|
||||
if (in_array($k, ['颜色', 'Color'])) {
|
||||
if ($k == 'Color') $k = '颜色';
|
||||
// if ($k == 'Color') $k = '颜色';
|
||||
$attr_value = '/static/common/images/colors/' . $at . '.png';
|
||||
}
|
||||
$images[$pkey]['color'] = $at;
|
||||
@@ -468,7 +495,7 @@ class DataMigration extends Command
|
||||
}
|
||||
}
|
||||
$attr_arr = [
|
||||
'attr_id' => $attrs_map[$v['country_code']]['颜色'],
|
||||
'attr_id' => $attrs_map[$v['country_code']][$v['country_code'] == 'ZH' ? '颜色' : 'Color'],
|
||||
'attr_value' => $attr_value,
|
||||
];
|
||||
if (
|
||||
@@ -514,7 +541,7 @@ class DataMigration extends Command
|
||||
$skus[] = [
|
||||
'main_image' => $ti['image_url'],
|
||||
'attrs' => [[
|
||||
'attr_id' => $attrs_map[$v['country_code']]['颜色'],
|
||||
'attr_id' => $attrs_map[$v['country_code']][$v['country_code'] == 'ZH' ? '颜色' : 'Color'],
|
||||
'attr_value' => $ti['image_color'],
|
||||
]],
|
||||
'pkey' => $tpkey
|
||||
@@ -575,6 +602,7 @@ class DataMigration extends Command
|
||||
}
|
||||
|
||||
foreach ($skus as $sku) {
|
||||
Db::name('product_sku')->where('product_id', '=', $sku['product_id'])->delete();
|
||||
$sku_id = Db::name('product_sku')->insertGetId([
|
||||
'product_id' => $sku['product_id'],
|
||||
'sku' => $sku['sku']??'',
|
||||
@@ -584,6 +612,7 @@ class DataMigration extends Command
|
||||
if (!empty($sku['attrs'])) {
|
||||
foreach ($sku['attrs'] as $attr) {
|
||||
if (!empty($sku_id)) {
|
||||
Db::name('product_sku_attr')->where('sku_id', '=', $sku_id)->delete();
|
||||
Db::name('product_sku_attr')->insert([
|
||||
'sku_id' => $sku_id,
|
||||
'attr_id' => $attr['attr_id'],
|
||||
@@ -601,7 +630,7 @@ class DataMigration extends Command
|
||||
sprintf('["ow_product_id" => %d, "cod_product_id" => %d]'.PHP_EOL, $id, $v['id']),
|
||||
FILE_APPEND
|
||||
);
|
||||
$this->println(sprintf('迁移产品ID:%s => %s 【耗时:%s】', $v['id'], 0, round(microtime(true) - $start, 2) . 's'));
|
||||
$this->println(sprintf('迁移产品ID:%s => %s 【耗时:%s】', $v['id'], $id, round(microtime(true) - $start, 2) . 's'));
|
||||
} catch (\Throwable $th) {
|
||||
Db::rollback();
|
||||
file_put_contents(
|
||||
@@ -694,9 +723,12 @@ class DataMigration extends Command
|
||||
throw new \Exception('请确认分类ID');
|
||||
}
|
||||
|
||||
// 1634
|
||||
$article = Db::connect('old')
|
||||
->name('article')
|
||||
->where('country_code', 'in', ['ZH', 'US'])
|
||||
->where('cid', 'in', array_keys($category_map))
|
||||
->where('id', '=', 351)
|
||||
->order(['id' => 'asc'])
|
||||
->cursor();
|
||||
|
||||
@@ -745,7 +777,16 @@ class DataMigration extends Command
|
||||
'release_time' => date('Y-m-d H:i:s', $v['createtime']),
|
||||
'deleted_at' => $v['stat'] == -1 ? date('Y-m-d H:i:s') : null
|
||||
];
|
||||
$id = Db::name('article')->insertGetId($item);
|
||||
$ret = Db::name('article')
|
||||
->where('language_id', '=', $item['language_id'])
|
||||
->where('title', '=', $item['title'])
|
||||
->find();
|
||||
if (empty($ret)) {
|
||||
$id = Db::name('article')->insertGetId($item);
|
||||
} else {
|
||||
$id = $ret['id'];
|
||||
Db::name('article')->where('id', '=', $ret['id'])->update($item);
|
||||
}
|
||||
|
||||
$this->println(sprintf('迁移文章ID:%s => %s', $v['id'], $id));
|
||||
}
|
||||
@@ -779,7 +820,15 @@ class DataMigration extends Command
|
||||
'recommend' => $val['is_home'],
|
||||
'sort' => $val['sort'] == 9999 ? 0 : $val['sort']
|
||||
];
|
||||
Db::name('faq')->insert($item);
|
||||
$ret = Db::name('faq')
|
||||
->where('language_id', '=', $item['language_id'])
|
||||
->where('question', '=', $item['question'])
|
||||
->find();
|
||||
if (empty($ret)) {
|
||||
Db::name('faq')->insert($item);
|
||||
} else {
|
||||
Db::name('faq')->where('id', '=', $ret['id'])->update($item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -881,7 +930,8 @@ class DataMigration extends Command
|
||||
{
|
||||
$videos = Db::connect('old')
|
||||
->name('video')
|
||||
->where('id', '>', 844)
|
||||
// ->where('id', '>', 844)
|
||||
->where('cid', 'in', array_keys($category_map))
|
||||
->where('country_code', 'in', ['ZH', 'US'])
|
||||
->order(['id' => 'asc'])
|
||||
->cursor();
|
||||
@@ -921,7 +971,16 @@ class DataMigration extends Command
|
||||
'seo_desc' => $val['seo_description'],
|
||||
'deleted_at' => $val['stat'] == -1 ? date('Y-m-d H:i:s') : null
|
||||
];
|
||||
Db::name('video')->insert($item);
|
||||
$ret = Db::name('video')
|
||||
->where('language_id', '=', $item['language_id'])
|
||||
->where('name', '=', $item['name'])
|
||||
->find();
|
||||
if (empty($ret)) {
|
||||
Db::name('video')->insert($item);
|
||||
} else {
|
||||
Db::name('video')->where('id', '=', $ret['id'])->update($item);
|
||||
}
|
||||
|
||||
$this->println('迁移视频ID:' . $val['id']);
|
||||
}
|
||||
}
|
||||
@@ -929,7 +988,7 @@ class DataMigration extends Command
|
||||
|
||||
class UploadMannager
|
||||
{
|
||||
const UPLOAD_BASE_API = 'http://dev.ow.f2b211.com';
|
||||
const UPLOAD_BASE_API = 'http://ow.f2b211.com';
|
||||
const DOWNLOAD_BASE_API = 'http://www.orico.com.cn';
|
||||
const DOWNLOAD_TEMP_PATH = '/var/www/html/orico-official-website/public/migrate_temp_images';
|
||||
private $username = 'admin';
|
||||
@@ -942,7 +1001,7 @@ class UploadMannager
|
||||
{
|
||||
// 登录获取token
|
||||
$this->token = $this->getAuthorization();
|
||||
$this->maps = include_once(runtime_path() . 'fiber_product_image_mapping.php');
|
||||
$this->maps = []; // include_once(runtime_path() . 'fiber_product_image_mapping.php');
|
||||
}
|
||||
|
||||
// 下载图片
|
||||
@@ -1062,6 +1121,7 @@ class UploadMannager
|
||||
print($http_code . PHP_EOL);
|
||||
}
|
||||
|
||||
file_put_contents(runtime_path() . 'upload.txt', $response . PHP_EOL, FILE_APPEND);
|
||||
$ret = json_decode($response, true);
|
||||
if (empty($ret)) {
|
||||
throw new \Exception($response);
|
||||
|
||||
@@ -106,6 +106,7 @@ abstract class Common extends BaseController
|
||||
'language_id' => $language,
|
||||
'status' => 1
|
||||
])
|
||||
->where('status', '=', 1)
|
||||
->order(['sort' => 'asc', 'id' => 'asc'])
|
||||
->select();
|
||||
if ($nav->isEmpty()) {
|
||||
|
||||
@@ -396,8 +396,11 @@ class Product extends Common
|
||||
->order(['sort' => 'asc', 'id' => 'desc'])
|
||||
->select()
|
||||
->hidden(['platform'])
|
||||
->bindAttr('platform', ['platform_name' => 'platform'])
|
||||
->bindAttr('platform', ['platform_name' => 'platform', 'platform_sort' => 'sort'])
|
||||
->toArray();
|
||||
// 根据购买链接平台排序
|
||||
$sort_by_arr = array_column($product_purchase_links, 'platform_sort');
|
||||
array_multisort($sort_by_arr, SORT_ASC, $product_purchase_links);
|
||||
|
||||
// 获取相关产品信息
|
||||
$related = ProductRelatedModel::with(['product' => function($query) {
|
||||
|
||||
@@ -274,17 +274,33 @@ class TopicNas extends Common
|
||||
->value('id');
|
||||
|
||||
// 获取帮且中心分类子分类
|
||||
$categorys = [];
|
||||
$table_name = (new ArticleCategoryModel)->getTable();
|
||||
$categorys = \think\facade\Db::query(preg_replace(
|
||||
'/\s+/u',
|
||||
' ',
|
||||
"WITH RECURSIVE article_tree_by AS (
|
||||
SELECT a.id, a.pid FROM $table_name a WHERE a.id = {$parent}
|
||||
UNION ALL
|
||||
SELECT k.id, k.pid FROM $table_name k INNER JOIN article_tree_by t ON t.id = k.pid
|
||||
)
|
||||
SELECT id FROM article_tree_by WHERE id <> {$parent}"
|
||||
));
|
||||
if (env('DB_VERSION', '5') == '8') {
|
||||
$categorys = \think\facade\Db::query(preg_replace(
|
||||
'/\s+/u',
|
||||
' ',
|
||||
"WITH RECURSIVE article_tree_by AS (
|
||||
SELECT a.id, a.pid FROM $table_name a WHERE a.id = {$parent}
|
||||
UNION ALL
|
||||
SELECT k.id, k.pid FROM $table_name k INNER JOIN article_tree_by t ON t.id = k.pid
|
||||
)
|
||||
SELECT id FROM article_tree_by WHERE id <> {$parent}"
|
||||
));
|
||||
} else {
|
||||
$categorys = \think\facade\Db::query("
|
||||
SELECT t2.id
|
||||
FROM (
|
||||
SELECT
|
||||
@r AS _id, (SELECT @r := GROUP_CONCAT(id) FROM $table_name WHERE FIND_IN_SET(pid, _id)) AS parent_id
|
||||
FROM
|
||||
(SELECT @r := $parent) vars, $table_name h
|
||||
WHERE @r <> 0) t1
|
||||
JOIN $table_name t2
|
||||
ON FIND_IN_SET(t2.pid, t1._id)
|
||||
ORDER BY t2.id;
|
||||
");
|
||||
}
|
||||
if (empty($categorys)) return success('success', []);
|
||||
|
||||
// 获取文章数据
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
<link rel="stylesheet" type="text/css" href="__CSS__/header.css" />
|
||||
<link rel="stylesheet" type="text/css" href="__CSS__/footer.css" />
|
||||
{block name="style"}{/block}
|
||||
<link rel="stylesheet" href="https://unpkg.com/swiper@9/swiper-bundle.min.css">
|
||||
<script type="text/javascript" src='https://code.jquery.com/jquery-3.6.0.min.js'></script>
|
||||
<script type="text/javascript" src="https://unpkg.com/swiper@9.4.1/swiper-bundle.min.js"></script>
|
||||
<link rel="stylesheet" href="__JS__/swiper-bundle9.4.1.min.css" />
|
||||
<script src="__JS__/jquery-3.6.0.min.js"></script>
|
||||
<script type="text/javascript" src="__JS__/swiper-bundle9.4.1.min.js"></script>
|
||||
<!-- Matomo -->
|
||||
<script>
|
||||
var _paq = window._paq = window._paq || [];
|
||||
@@ -27,7 +27,7 @@
|
||||
(function() {
|
||||
var u="//analytics.f2b211.com/";
|
||||
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
||||
_paq.push(['setSiteId', '1']);
|
||||
_paq.push(['setSiteId', '2']);
|
||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
|
||||
})();
|
||||
@@ -37,7 +37,7 @@
|
||||
<body>
|
||||
<noscript>
|
||||
<!-- Matomo Image Tracker-->
|
||||
<img referrerpolicy="no-referrer-when-downgrade" src="https://analytics.f2b211.com/matomo.php?idsite=1&rec=1" style="border:0" alt="" />
|
||||
<img referrerpolicy="no-referrer-when-downgrade" src="https://analytics.f2b211.com/matomo.php?idsite=2&rec=1" style="border:0" alt="" />
|
||||
<!-- End Matomo -->
|
||||
</noscript>
|
||||
{block name="header"}
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
<div class="copy-text">
|
||||
{$basic_config.website_powerby.value}
|
||||
{notempty name="$basic_config.website_icp"}
|
||||
<a href="https://beian.miit.gov.cn/" style="color:white;">({$basic_config.website_icp.value})</a>
|
||||
<a href="https://beian.miit.gov.cn/" style="color:white;">{$basic_config.website_icp.value|raw}</a>
|
||||
{/notempty}
|
||||
</div>
|
||||
{/notempty}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="orico_Page_brand">
|
||||
<!--内容 -->
|
||||
<div class="brandMain">
|
||||
<img src="__IMAGES__/OurBrand.png" class="img-responsive" />
|
||||
<img src="__IMAGES__/OurBrand.webp" class="img-responsive" />
|
||||
{notempty name="banners"}
|
||||
<div class="our_brand_con">
|
||||
{volist name="banners" id="ba" offset="0" length="2"}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<!-- 内容 -->
|
||||
<div class="downloadMain">
|
||||
<div class="topimg">
|
||||
<img src="__IMAGES__/banner_01.png" />
|
||||
<img src="__IMAGES__/banner_01.webp" />
|
||||
<div class="banner_title">{:lang_i18n('软件和驱动程序')}</div>
|
||||
</div>
|
||||
<div class="contact_c">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<!-- 内容 -->
|
||||
<div class="downloadMain">
|
||||
<div class="topimg">
|
||||
<img src="__IMAGES__/banner_01.png" />
|
||||
<img src="__IMAGES__/banner_01.webp" />
|
||||
<div class="banner_title">{:lang_i18n('软件和驱动程序')}</div>
|
||||
</div>
|
||||
<div class="contact_c">
|
||||
|
||||
@@ -112,12 +112,12 @@
|
||||
<div class="sceneIntroduction">
|
||||
{volist name="scenes" id="scene"}
|
||||
<div class="sceneitem">
|
||||
<div class="sceneInfo">
|
||||
<p class="scenetitle" {notempty name="scene.title_txt_color" }style="color:{$scene.title_txt_color};" {/notempty}>{$scene.title}</p>
|
||||
<a class="sceneInfo" href="{$scene.link}">
|
||||
<!-- <p class="scenetitle" {notempty name="scene.title_txt_color" }style="color:{$scene.title_txt_color};" {/notempty}>{$scene.title}</p>
|
||||
<p class="subtitle" {notempty name="scene.desc_txt_color" }style="color:{$scene.desc_txt_color};" {/notempty}>
|
||||
{$scene.desc|raw}</p>
|
||||
<a class="sceneMore" href="{$scene.link}">{:lang_i18n('了解更多')} ></a>
|
||||
</div>
|
||||
<a class="sceneMore" href="{$scene.link}">{:lang_i18n('了解更多')} ></a> -->
|
||||
</a>
|
||||
<div style="background-image: url('{$scene.image}');" class="sceneimg"></div>
|
||||
</div>
|
||||
{/volist}
|
||||
|
||||
@@ -38,11 +38,11 @@
|
||||
<div id="imageMenu_{$sku.id}" class="imageMenu">
|
||||
<ul class="image_list">
|
||||
{volist name="sku.photo_album" id="photo"}
|
||||
<li id="onlickImg"><img src="{:thumb($photo)}" data-url="{$photo}" /></li>
|
||||
<li class="onlickImg"><img src="{:thumb($photo)}" data-url="{$photo}" /></li>
|
||||
{/volist}
|
||||
{if condition="!empty($product.video_img) && !empty($product.video_url) && $idx == 1"}
|
||||
<!-- 产品视频 -->
|
||||
<li id="onlickImg"><img src="{:thumb($product.video_img)}" data-url="{$product.video_url}" /></li>
|
||||
<li class="onlickImg"><img src="{:thumb($product.video_img)}" data-url="{$product.video_url}" /></li>
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
@@ -50,7 +50,7 @@
|
||||
<div class="scrollbutton smallImgDown"></div>
|
||||
</div>
|
||||
<!-- 产品大图 -->
|
||||
<div class="bigImg" id="vertical">
|
||||
<div class="bigImg" id="vertical" style="width: 75%;">
|
||||
<!-- 主图 -->
|
||||
{notempty name="sku.photo_album[0]"}
|
||||
<img src="{$sku.photo_album[0]}" id="midimg" />
|
||||
@@ -107,6 +107,7 @@
|
||||
{volist name="product_purchase_links" id="ppp" key="k"}
|
||||
<a class="thebt bttype{$k}" href="{$ppp.link}">{$ppp.platform_name}</a>
|
||||
{/volist}
|
||||
<br/>
|
||||
{eq name=":cookie('think_lang')" value="en-us"}
|
||||
<a class="thebt bttype3" id="open_form_modal">{:lang_i18n('发送查询')}</a>
|
||||
{/eq}
|
||||
|
||||
@@ -24,23 +24,19 @@
|
||||
// 直接输出对应的 HTML 标签
|
||||
if (isUCBrowser()) {
|
||||
document.write(`
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@8.4.7/swiper-bundle.min.css">
|
||||
<script src="https://cdn.jsdelivr.net/npm/swiper@8.4.7/swiper-bundle.min.js"><\/script>
|
||||
<link rel="stylesheet" href="__JS__/swiper-bundle8.4.7.min.css">
|
||||
<script type="text/javascript" src="__JS__/swiper-bundle8.4.7.min.js"><\/script>
|
||||
`);
|
||||
} else {
|
||||
document.write(`
|
||||
<link rel="stylesheet" href="https://unpkg.com/swiper@9.4.1/swiper-bundle.min.css">
|
||||
<script src="https://unpkg.com/swiper@9.4.1/swiper-bundle.min.js"><\/script>
|
||||
<link rel="stylesheet" href="__JS__/swiper-bundle9.4.1.min.css">
|
||||
<script type="text/javascript" src="__JS__/swiper-bundle9.4.1.min.js"><\/script>
|
||||
`);
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- 你的 jQuery 和其他脚本 -->
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||
<!-- <link rel="stylesheet" href="https://unpkg.com/swiper@9/swiper-bundle.min.css">
|
||||
<script type="text/javascript" src="https://unpkg.com/swiper@9.4.1/swiper-bundle.min.js"></script> -->
|
||||
<script type="text/javascript" src='https://code.jquery.com/jquery-3.6.0.min.js'></script>
|
||||
|
||||
<script src="__JS__/jquery-3.6.0.min.js"></script>
|
||||
<script type="text/javascript" src="__JS__/before-after.min.js"></script>
|
||||
<script type="text/javascript" src="__JS__/large.js"></script>
|
||||
<script type="text/javascript">
|
||||
@@ -112,7 +108,7 @@
|
||||
(function() {
|
||||
var u="//analytics.f2b211.com/";
|
||||
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
||||
_paq.push(['setSiteId', '1']);
|
||||
_paq.push(['setSiteId', '2']);
|
||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
|
||||
})();
|
||||
@@ -124,7 +120,7 @@
|
||||
<body>
|
||||
<noscript>
|
||||
<!-- Matomo Image Tracker-->
|
||||
<img referrerpolicy="no-referrer-when-downgrade" src="https://analytics.f2b211.com/matomo.php?idsite=1&rec=1" style="border:0" alt="" />
|
||||
<img referrerpolicy="no-referrer-when-downgrade" src="https://analytics.f2b211.com/matomo.php?idsite=2&rec=1" style="border:0" alt="" />
|
||||
<!-- End Matomo -->
|
||||
</noscript>
|
||||
{block name="header"}
|
||||
|
||||
@@ -27,7 +27,9 @@
|
||||
<p class="ftitle">{:lang_i18n('产品')}</p>
|
||||
<ul>
|
||||
{volist name="header_categorys" id="vo"}
|
||||
<li><a href="{:url('product/category', ['id' => $vo.id])}" class="fline">{$vo.name}</a></li>
|
||||
{if condition="!empty($vo.name)"}
|
||||
<li><a href="{:url('product/category', ['id' => $vo.id])}" class="fline">{$vo.name}</a></li>
|
||||
{/if}
|
||||
{/volist}
|
||||
</ul>
|
||||
</div>
|
||||
@@ -38,7 +40,7 @@
|
||||
{if condition="!empty($vo.children)"}
|
||||
<ul>
|
||||
{volist name="vo.children" id="vc"}
|
||||
<li><a href="{$vc.link}" class="fline">{$vc.name}</a></li>
|
||||
<li><a href="{$vc.link}" class="fline" target="{$vc.blank==1?'_blank':'_self'}">{$vc.name}</a></li>
|
||||
{/volist}
|
||||
</ul>
|
||||
{/if}
|
||||
@@ -80,7 +82,7 @@
|
||||
<div class="ftcopyright">
|
||||
<span>{$basic_config.website_powerby.value}</span>
|
||||
{if condition="!empty($basic_config.website_icp)"}
|
||||
<a href="https://beian.miit.gov.cn/">({$basic_config.website_icp.value})</a>
|
||||
<a href="https://beian.miit.gov.cn/">{$basic_config.website_icp.value|raw}</a>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
@@ -89,12 +91,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
{eq name=":cookie('think_lang')" value="zh-cn"}
|
||||
<div class="backtop">
|
||||
<img src="__IMAGES__/ic-backtop.png" class="ictop" />
|
||||
<span>返回顶部</span>
|
||||
<span>{eq name=":cookie('think_lang')" value="en-us"}TOP{else /}返回顶部{/eq}</span>
|
||||
</div>
|
||||
{/eq}
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
// 获取窗口高度
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
</div>
|
||||
{eq name=":cookie('think_lang')" value="en-us"}
|
||||
{notempty name="basic_config['navigation_store_url']['value']"}
|
||||
<a class="storetopbt" href="{$basic_config['navigation_store_url']['value']}">
|
||||
<a class="storetopbt" href="{$basic_config['navigation_store_url']['value']}" target="_blank">
|
||||
<img src="__IMAGES__/shopico.png" class="storeImgico" />{:lang_i18n('店铺')}
|
||||
</a>
|
||||
{/notempty}
|
||||
@@ -115,7 +115,7 @@
|
||||
<div class="popmain">
|
||||
{volist name="header_hot_products" id="vo"}
|
||||
<div class="popitem">
|
||||
<a href="{:url('product/detail', ['id' => $vo.id])}"><img src="{$vo.cover_image}" class="popimg" /></a>
|
||||
<a href="{:url('product/detail', ['id' => $vo.id])}"><img src="{:thumb($vo.cover_image)}" class="popimg" /></a>
|
||||
<div class="productName">{$vo.name}</div>
|
||||
<div class="produc-dec">{$vo.short_name}</div>
|
||||
</div>
|
||||
@@ -155,26 +155,53 @@
|
||||
|
||||
return history;
|
||||
}
|
||||
|
||||
// 封装一个函数用于处理鼠标悬停显示和隐藏内容
|
||||
function handleHover($element, $content) {
|
||||
$element.mouseenter(function () {
|
||||
$content.stop(true, true).slideDown(60);
|
||||
}).mouseleave(function () {
|
||||
$content.stop(true, true).slideUp(60);
|
||||
});
|
||||
// 同时支持鼠标悬停和点击事件
|
||||
$element
|
||||
.mouseenter(function () {
|
||||
$content.stop(true, true).slideDown(60);
|
||||
})
|
||||
.mouseleave(function () {
|
||||
$content.stop(true, true).slideUp(60);
|
||||
})
|
||||
.click(function (e) {
|
||||
// 阻止链接默认跳转(如果有链接的话)
|
||||
if ($content.is(':visible')) {
|
||||
$content.stop(true, true).slideUp(60);
|
||||
} else {
|
||||
$content.stop(true, true).slideDown(60);
|
||||
}
|
||||
// 防止点击事件冒泡到a标签
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
});
|
||||
}
|
||||
// 处理第一个导航项
|
||||
handleHover($('.navItem').eq(0), $('.navItem').eq(0).find('.navItemConten'));
|
||||
// 鼠标移入navItem_cyleft里面的li标签添加类,移除其他li的类
|
||||
|
||||
// 处理产品列表的下拉菜单
|
||||
var $firstNav = $('.navItem').eq(0);
|
||||
if ($firstNav.find('.navItemConten').length) {
|
||||
handleHover($firstNav, $firstNav.find('.navItemConten'));
|
||||
}
|
||||
|
||||
// 鼠标移入左侧子菜单切换显示
|
||||
$('.navItem_cyleft li').mouseenter(function () {
|
||||
$(this).addClass('it_active').siblings().removeClass('it_active');
|
||||
$('.navItem_cyright').hide();
|
||||
$('.navItem_cyright').eq($(this).index()).show();
|
||||
});
|
||||
// 处理第5 - 8个导航项
|
||||
for (let i = 4; i < 8; i++) {
|
||||
handleHover($('.navItem').eq(i), $('.navItem').eq(i).find('.navItemConten1'));
|
||||
}
|
||||
|
||||
// 动态处理所有带有navItemConten1的导航项
|
||||
$('.navItem').each(function () {
|
||||
var $this = $(this);
|
||||
var $dropdown = $this.find('.navItemConten1');
|
||||
// 只给有下拉菜单的导航项绑定事件
|
||||
if ($dropdown.length) {
|
||||
handleHover($this, $dropdown);
|
||||
}
|
||||
});
|
||||
|
||||
// 点击搜索
|
||||
$('#openModalBtn').click(function () {
|
||||
$('#scmodal').toggle();
|
||||
@@ -182,8 +209,20 @@
|
||||
$('.close-btn').click(function () {
|
||||
$('#scmodal').hide();
|
||||
});
|
||||
|
||||
// 点击空白处关闭下拉菜单
|
||||
$(document).click(function () {
|
||||
$('.navItemConten, .navItemConten1, #top-country').slideUp(60);
|
||||
});
|
||||
|
||||
// 防止下拉菜单内部点击触发空白处关闭事件
|
||||
$('.navItemConten, .navItemConten1, #top-country').click(function (e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
// 搜索历史记录回显
|
||||
history();
|
||||
|
||||
// 执行搜索
|
||||
$('#serrchinput').keydown(function (event) {
|
||||
if (event.originalEvent.keyCode == 13) {
|
||||
@@ -198,9 +237,11 @@
|
||||
window.location.href = "{:url('product/search')}" + '?keywords=' + keywords;
|
||||
}
|
||||
});
|
||||
|
||||
// 点击选择国家
|
||||
$('#countrycheck').click(function () {
|
||||
$('#countrycheck').click(function (e) {
|
||||
$('#top-country').toggle();
|
||||
e.stopPropagation();
|
||||
});
|
||||
$('.closecountrybt').click(function () {
|
||||
$('#top-country').hide();
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<link rel="stylesheet" type="text/css" href="__CSS__/topic_nas_header.css" />
|
||||
<link rel="stylesheet" type="text/css" href="__CSS__/orico_footer.css" />
|
||||
{block name="style"}{/block}
|
||||
<script type="text/javascript" src='https://code.jquery.com/jquery-3.6.0.min.js'></script>
|
||||
<script src="__JS__/jquery-3.6.0.min.js"></script>
|
||||
<script>
|
||||
// 增强型 UC 浏览器检测
|
||||
function isUCBrowser() {
|
||||
@@ -24,13 +24,13 @@
|
||||
// 直接输出对应的 HTML 标签
|
||||
if (isUCBrowser()) {
|
||||
document.write(`
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@8.4.7/swiper-bundle.min.css">
|
||||
<script src="https://cdn.jsdelivr.net/npm/swiper@8.4.7/swiper-bundle.min.js"><\/script>
|
||||
<link rel="stylesheet" href="__JS__/swiper-bundle8.4.7.min.css">
|
||||
<script type="text/javascript" src="__JS__/swiper-bundle8.4.7.min.js"><\/script>
|
||||
`);
|
||||
} else {
|
||||
document.write(`
|
||||
<link rel="stylesheet" href="https://unpkg.com/swiper@9.4.1/swiper-bundle.min.css">
|
||||
<script src="https://unpkg.com/swiper@9.4.1/swiper-bundle.min.js"><\/script>
|
||||
<link rel="stylesheet" href="__JS__/swiper-bundle9.4.1.min.css">
|
||||
<script type="text/javascript" src="__JS__/swiper-bundle9.4.1.min.js"><\/script>
|
||||
`);
|
||||
}
|
||||
</script>
|
||||
@@ -55,7 +55,7 @@
|
||||
(function() {
|
||||
var u="//analytics.f2b211.com/";
|
||||
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
||||
_paq.push(['setSiteId', '1']);
|
||||
_paq.push(['setSiteId', '2']);
|
||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
|
||||
})();
|
||||
@@ -65,7 +65,7 @@
|
||||
<body>
|
||||
<noscript>
|
||||
<!-- Matomo Image Tracker-->
|
||||
<img referrerpolicy="no-referrer-when-downgrade" src="https://analytics.f2b211.com/matomo.php?idsite=1&rec=1" style="border:0" alt="" />
|
||||
<img referrerpolicy="no-referrer-when-downgrade" src="https://analytics.f2b211.com/matomo.php?idsite=2&rec=1" style="border:0" alt="" />
|
||||
<!-- End Matomo -->
|
||||
</noscript>
|
||||
{block name="header"}
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<div class="ftcopyright">
|
||||
<span>{$basic_config.website_powerby.value}</span>
|
||||
{if condition="!empty($basic_config.website_icp)"}
|
||||
<a href="https://beian.miit.gov.cn/">({$basic_config.website_icp.value})</a>
|
||||
<a href="https://beian.miit.gov.cn/">{$basic_config.website_icp.value|raw}</a>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
@@ -66,6 +66,8 @@ class Article
|
||||
])
|
||||
->withoutField([
|
||||
'language_id',
|
||||
'author',
|
||||
'source',
|
||||
'seo_title',
|
||||
'seo_keywords',
|
||||
'seo_desc',
|
||||
|
||||
@@ -27,6 +27,8 @@ class ArticleCategory
|
||||
$categories = ArticleCategoryModel::withoutField([
|
||||
'language_id',
|
||||
'unique_label',
|
||||
'short_name',
|
||||
'desc',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
])
|
||||
|
||||
@@ -35,7 +35,6 @@ class Product
|
||||
'name',
|
||||
'short_name',
|
||||
'cover_image',
|
||||
'desc',
|
||||
'deleted_at'
|
||||
])
|
||||
->where(function($query) use($params) {
|
||||
@@ -76,14 +75,16 @@ class Product
|
||||
'params' => fn($query) => $query->field(['product_id', 'name', 'value'])
|
||||
->hidden(['product_id']),
|
||||
// 关联sku
|
||||
'skus' => fn($query) => $query->withoutField(['created_at', 'updated_at'])
|
||||
'skus' => fn($query) => $query->withoutField(['sort', 'created_at', 'updated_at'])
|
||||
->with([
|
||||
'sku_attr' => fn($query) => $query->with('attr')->hidden(['sku_id', 'attr_id'])
|
||||
])
|
||||
->hidden(['id', 'product_id']),
|
||||
// 关联购买链接
|
||||
'links' => fn($query) => $query->field(['product_id', 'platform_id', 'link'])
|
||||
->with(['platform' => fn($query) => $query->field(['id', 'platform'])])
|
||||
->with([
|
||||
'platforms' => fn($query) => $query->field(['id', 'platform'])
|
||||
])
|
||||
->hidden(['product_id', 'platform_id']),
|
||||
// 关联相关产品
|
||||
'related' => fn($query) => $query->field(['product_id', 'related_product_id'])
|
||||
@@ -99,6 +100,7 @@ class Product
|
||||
])
|
||||
->withoutField([
|
||||
'language_id',
|
||||
'desc',
|
||||
'stock_qty',
|
||||
'seo_title',
|
||||
'seo_keywords',
|
||||
|
||||
@@ -27,6 +27,8 @@ class ProductCategory
|
||||
$categories = ProductCategoryModel::withoutField([
|
||||
'language_id',
|
||||
'unique_id',
|
||||
'icon',
|
||||
'desc',
|
||||
'related_tco_category',
|
||||
'created_at',
|
||||
'updated_at'
|
||||
|
||||
@@ -12,7 +12,7 @@ use app\common\model\ProductPurchaseLinkBaseModel;
|
||||
class ProductPurchaseLinkModel extends ProductPurchaseLinkBaseModel
|
||||
{
|
||||
// 关联购买平台
|
||||
public function platform()
|
||||
public function platforms()
|
||||
{
|
||||
return $this->belongsTo(ProductPurchasePlatformModel::class, 'platform_id', 'id')->bind(['platform']);
|
||||
}
|
||||
|
||||
@@ -29,15 +29,15 @@ return [
|
||||
// 驱动方式
|
||||
'type' => 'redis',
|
||||
// 服务器地址
|
||||
'host' => '127.0.0.1',
|
||||
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||
// 端口
|
||||
'port' => 6379,
|
||||
'port' => env('REDIS_PORT', 6379),
|
||||
// 密码
|
||||
'password' => 'orico@f2b211',
|
||||
'password' => env('REDIS_PASSWORD', 'orico@f2b211'),
|
||||
// 缓存有效期 0表示永久缓存
|
||||
'expire' => 0,
|
||||
// 缓存前缀
|
||||
'prefix' => 'ow:',
|
||||
'prefix' => env('REDIS_PREFIX', 'ow:'),
|
||||
]
|
||||
],
|
||||
];
|
||||
|
||||
@@ -105,18 +105,20 @@ class SysConfigInit extends Seeder
|
||||
["id" => 88, "group_id" => 6, "title" => "位置", "name" => "watermark_position", "value" => "top-left", "extra" => "top-left:左上角\ntop-right:右上角\ntop:上 - 水平居中\nleft:左 - 垂直居中\ncenter:水平垂直居中\nright:右 - 垂直居中\nbottom:下 - 水平居中\nbottom-left:左下角\nbottom-right:右下角", "type" => "radio", "sort" => 11, "remark" => null, "created_at" => "2025-06-10 16:02:17", "updated_at" => "2025-06-12 09:55:21", "deleted_at" => null],
|
||||
["id" => 89, "group_id" => 6, "title" => "外边距 - X轴", "name" => "watermark_offset_x", "value" => "", "extra" => "", "type" => "text", "sort" => 12, "remark" => "在“位置”基础上的x轴偏移量", "created_at" => "2025-06-10 16:06:23", "updated_at" => "2025-06-12 09:55:21", "deleted_at" => null],
|
||||
["id" => 90, "group_id" => 6, "title" => "外边距 - Y轴", "name" => "watermark_offset_y", "value" => "", "extra" => null, "type" => "text", "sort" => 13, "remark" => "在“位置”基础上的y轴偏移量", "created_at" => "2025-06-10 16:09:23", "updated_at" => "2025-06-12 09:55:21", "deleted_at" => null],
|
||||
["id" => 91, "group_id" => 14, "title" => "图片 - 保留原文件名", "name" => "upload_image.filename_keep", "value" => NULL, "extra" => "0:否\n1:是", "type" => "radio", "sort" => 1, "remark" => "默认为否", "created_at" => "2025-06-12 11:08:59", "updated_at" => "2025-06-12 11:29:24", "deleted_at" => NULL],
|
||||
["id" => 92, "group_id" => 14, "title" => "图片 - 唯一性保持", "name" => "upload_image.filemd5_unique", "value" => "1", "extra" => "0:否\n1:是", "type" => "radio", "sort" => 2, "remark" => "如果保持图片文件唯一,重复图片上传时将立即返回已存在的地址;如果不保持,则同模块同一天上传的文件根据原文件名覆盖。", "created_at" => "2025-06-12 11:16:46", "updated_at" => "2025-06-12 11:24:39", "deleted_at" => NULL],
|
||||
["id" => 93, "group_id" => 14, "title" => "视频 - 保留原文件名", "name" => "upload_video.filename_keep", "value" => NULL, "extra" => "0:否\n1:是", "type" => "radio", "sort" => 3, "remark" => "默认为否", "created_at" => "2025-06-12 11:22:27", "updated_at" => "2025-06-12 11:29:24", "deleted_at" => NULL],
|
||||
["id" => 94, "group_id" => 14, "title" => "视频 - 唯一性保持", "name" => "upload_video.filemd5_unique", "value" => "1", "extra" => "0:否\n1:是", "type" => "radio", "sort" => 4, "remark" => "如果保持视频文件唯一,重复视频上传时将立即返回已存在的地址;如果不保持,则同模块同一天上传的文件根据原文件名覆盖。", "created_at" => "2025-06-12 11:24:24", "updated_at" => "2025-06-12 11:25:18", "deleted_at" => NULL],
|
||||
["id" => 95, "group_id" => 14, "title" => "附件 - 保留原文件名", "name" => "upload_attachment.filename_keep", "value" => NULL, "extra" => "0:否\n1:是", "type" => "radio", "sort" => 5, "remark" => "默认为否", "created_at" => "2025-06-12 11:27:08", "updated_at" => "2025-06-12 11:27:08", "deleted_at" => NULL],
|
||||
["id" => 96, "group_id" => 14, "title" => "附件 - 唯一性保持", "name" => "upload_attachment.filemd5_unique", "value" => "1", "extra" => "0:否\n1:是", "type" => "radio", "sort" => 6, "remark" => "如果保持附件文件唯一,重复附件上传时将立即返回已存在的地址;如果不保持,则同模块同一天上传的文件根据原文件名覆盖。", "created_at" => "2025-06-12 11:28:22", "updated_at" => "2025-06-12 11:28:22", "deleted_at" => NULL],
|
||||
["id" => 97, "group_id" => 13, "title" => "图片 - 保留原文件名", "name" => "upload_image.filename_keep", "value" => NULL, "extra" => "0:否\n1:是", "type" => "radio", "sort" => 1, "remark" => "默认为否", "created_at" => "2025-06-12 11:08:59", "updated_at" => "2025-06-12 11:29:24", "deleted_at" => NULL],
|
||||
["id" => 98, "group_id" => 13, "title" => "图片 - 唯一性保持", "name" => "upload_image.filemd5_unique", "value" => "1", "extra" => "0:否\n1:是", "type" => "radio", "sort" => 2, "remark" => "如果保持图片文件唯一,重复图片上传时将立即返回已存在的地址;如果不保持,则同模块同一天上传的文件根据原文件名覆盖。", "created_at" => "2025-06-12 11:16:46", "updated_at" => "2025-06-12 11:24:39", "deleted_at" => NULL],
|
||||
["id" => 99, "group_id" => 13, "title" => "视频 - 保留原文件名", "name" => "upload_video.filename_keep", "value" => NULL, "extra" => "0:否\n1:是", "type" => "radio", "sort" => 3, "remark" => "默认为否", "created_at" => "2025-06-12 11:22:27", "updated_at" => "2025-06-12 11:29:24", "deleted_at" => NULL],
|
||||
["id" => 100, "group_id" => 13, "title" => "视频 - 唯一性保持", "name" => "upload_video.filemd5_unique", "value" => "1", "extra" => "0:否\n1:是", "type" => "radio", "sort" => 4, "remark" => "如果保持视频文件唯一,重复视频上传时将立即返回已存在的地址;如果不保持,则同模块同一天上传的文件根据原文件名覆盖。", "created_at" => "2025-06-12 11:24:24", "updated_at" => "2025-06-12 11:25:18", "deleted_at" => NULL],
|
||||
["id" => 101, "group_id" => 13, "title" => "附件 - 保留原文件名", "name" => "upload_attachment.filename_keep", "value" => NULL, "extra" => "0:否\n1:是", "type" => "radio", "sort" => 5, "remark" => "默认为否", "created_at" => "2025-06-12 11:27:08", "updated_at" => "2025-06-12 11:27:08", "deleted_at" => NULL],
|
||||
["id" => 102, "group_id" => 13, "title" => "附件 - 唯一性保持", "name" => "upload_attachment.filemd5_unique", "value" => "1", "extra" => "0:否\n1:是", "type" => "radio", "sort" => 6, "remark" => "如果保持附件文件唯一,重复附件上传时将立即返回已存在的地址;如果不保持,则同模块同一天上传的文件根据原文件名覆盖。", "created_at" => "2025-06-12 11:28:22", "updated_at" => "2025-06-12 11:28:22", "deleted_at" => NULL],
|
||||
["id" => 91, "group_id" => 14, "title" => "图片 - 格式转为", "name" => "upload_image.filetype_to", "value" => "original", "extra" => "original:原格式\nwebp:webp格式", "type" => "radio", "sort" => 1, "remark" => "webp格式图片质量为原图75%,可大幅压缩图片大小;选定webp格式时,所有上传图片均保存为webp格式。", "created_at" => "2025-06-12 11:28:22", "updated_at" => "2025-06-12 11:28:22", "deleted_at" => NULL],
|
||||
["id" => 92, "group_id" => 14, "title" => "图片 - 保留原文件名", "name" => "upload_image.filename_keep", "value" => NULL, "extra" => "0:否\n1:是", "type" => "radio", "sort" => 2, "remark" => "默认为否", "created_at" => "2025-06-12 11:08:59", "updated_at" => "2025-06-12 11:29:24", "deleted_at" => NULL],
|
||||
["id" => 93, "group_id" => 14, "title" => "图片 - 唯一性保持", "name" => "upload_image.filemd5_unique", "value" => "1", "extra" => "0:否\n1:是", "type" => "radio", "sort" => 3, "remark" => "如果保持图片文件唯一,重复图片上传时将立即返回已存在的地址;如果不保持,则同模块同一天上传的文件根据原文件名覆盖。", "created_at" => "2025-06-12 11:16:46", "updated_at" => "2025-06-12 11:24:39", "deleted_at" => NULL],
|
||||
["id" => 94, "group_id" => 14, "title" => "视频 - 保留原文件名", "name" => "upload_video.filename_keep", "value" => NULL, "extra" => "0:否\n1:是", "type" => "radio", "sort" => 4, "remark" => "默认为否", "created_at" => "2025-06-12 11:22:27", "updated_at" => "2025-06-12 11:29:24", "deleted_at" => NULL],
|
||||
["id" => 95, "group_id" => 14, "title" => "视频 - 唯一性保持", "name" => "upload_video.filemd5_unique", "value" => "1", "extra" => "0:否\n1:是", "type" => "radio", "sort" => 5, "remark" => "如果保持视频文件唯一,重复视频上传时将立即返回已存在的地址;如果不保持,则同模块同一天上传的文件根据原文件名覆盖。", "created_at" => "2025-06-12 11:24:24", "updated_at" => "2025-06-12 11:25:18", "deleted_at" => NULL],
|
||||
["id" => 96, "group_id" => 14, "title" => "附件 - 保留原文件名", "name" => "upload_attachment.filename_keep", "value" => NULL, "extra" => "0:否\n1:是", "type" => "radio", "sort" => 6, "remark" => "默认为否", "created_at" => "2025-06-12 11:27:08", "updated_at" => "2025-06-12 11:27:08", "deleted_at" => NULL],
|
||||
["id" => 97, "group_id" => 14, "title" => "附件 - 唯一性保持", "name" => "upload_attachment.filemd5_unique", "value" => "1", "extra" => "0:否\n1:是", "type" => "radio", "sort" => 7, "remark" => "如果保持附件文件唯一,重复附件上传时将立即返回已存在的地址;如果不保持,则同模块同一天上传的文件根据原文件名覆盖。", "created_at" => "2025-06-12 11:28:22", "updated_at" => "2025-06-12 11:28:22", "deleted_at" => NULL],
|
||||
["id" => 98, "group_id" => 13, "title" => "图片 - 格式转为", "name" => "upload_image.filetype_to", "value" => "original", "extra" => "original:原格式\nwebp:webp格式", "type" => "radio", "sort" => 1, "remark" => "webp格式图片质量为原图75%,可大幅压缩图片大小;选定webp格式时,所有上传图片均保存为webp格式。", "created_at" => "2025-06-12 11:28:22", "updated_at" => "2025-06-12 11:28:22", "deleted_at" => NULL],
|
||||
["id" => 99, "group_id" => 13, "title" => "图片 - 保留原文件名", "name" => "upload_image.filename_keep", "value" => NULL, "extra" => "0:否\n1:是", "type" => "radio", "sort" => 2, "remark" => "默认为否", "created_at" => "2025-06-12 11:08:59", "updated_at" => "2025-06-12 11:29:24", "deleted_at" => NULL],
|
||||
["id" => 100, "group_id" => 13, "title" => "图片 - 唯一性保持", "name" => "upload_image.filemd5_unique", "value" => "1", "extra" => "0:否\n1:是", "type" => "radio", "sort" => 3, "remark" => "如果保持图片文件唯一,重复图片上传时将立即返回已存在的地址;如果不保持,则同模块同一天上传的文件根据原文件名覆盖。", "created_at" => "2025-06-12 11:16:46", "updated_at" => "2025-06-12 11:24:39", "deleted_at" => NULL],
|
||||
["id" => 101, "group_id" => 13, "title" => "视频 - 保留原文件名", "name" => "upload_video.filename_keep", "value" => NULL, "extra" => "0:否\n1:是", "type" => "radio", "sort" => 4, "remark" => "默认为否", "created_at" => "2025-06-12 11:22:27", "updated_at" => "2025-06-12 11:29:24", "deleted_at" => NULL],
|
||||
["id" => 102, "group_id" => 13, "title" => "视频 - 唯一性保持", "name" => "upload_video.filemd5_unique", "value" => "1", "extra" => "0:否\n1:是", "type" => "radio", "sort" => 5, "remark" => "如果保持视频文件唯一,重复视频上传时将立即返回已存在的地址;如果不保持,则同模块同一天上传的文件根据原文件名覆盖。", "created_at" => "2025-06-12 11:24:24", "updated_at" => "2025-06-12 11:25:18", "deleted_at" => NULL],
|
||||
["id" => 103, "group_id" => 13, "title" => "附件 - 保留原文件名", "name" => "upload_attachment.filename_keep", "value" => NULL, "extra" => "0:否\n1:是", "type" => "radio", "sort" => 6, "remark" => "默认为否", "created_at" => "2025-06-12 11:27:08", "updated_at" => "2025-06-12 11:27:08", "deleted_at" => NULL],
|
||||
["id" => 104, "group_id" => 13, "title" => "附件 - 唯一性保持", "name" => "upload_attachment.filemd5_unique", "value" => "1", "extra" => "0:否\n1:是", "type" => "radio", "sort" => 7, "remark" => "如果保持附件文件唯一,重复附件上传时将立即返回已存在的地址;如果不保持,则同模块同一天上传的文件根据原文件名覆盖。", "created_at" => "2025-06-12 11:28:22", "updated_at" => "2025-06-12 11:28:22", "deleted_at" => NULL],
|
||||
];
|
||||
|
||||
$table = $this->table('sys_config');
|
||||
|
||||
@@ -200,11 +200,11 @@
|
||||
padding-top: 1rem;
|
||||
padding-bottom: 0.5625rem;
|
||||
font-weight: bold;
|
||||
width: 70%;
|
||||
white-space: nowrap;
|
||||
/* width: 70%; */
|
||||
/* white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
text-align: center;
|
||||
text-align: center; */
|
||||
|
||||
}
|
||||
.oricoEGapp-Contact .narskfPage .narskf-content .narskf-ct-row .narskfit .narskf-sm {
|
||||
|
||||
@@ -30,7 +30,8 @@
|
||||
margin: 0 5%;
|
||||
}
|
||||
.oricoEGapp .oricoEGapp-index .oidx-cate .cateit {
|
||||
margin: 0 3.5%;
|
||||
margin: 0 1%;
|
||||
width: 50%;
|
||||
}
|
||||
.oricoEGapp .oricoEGapp-index .oidx-cate .cateit a{
|
||||
display: flex;
|
||||
@@ -45,8 +46,8 @@
|
||||
}
|
||||
.oricoEGapp .oricoEGapp-index .oidx-cate .cateit span {
|
||||
font-size: 0.9rem;
|
||||
white-space: nowrap;
|
||||
word-break: keep-all;
|
||||
word-break: break-word;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
.oricoEGapp .oricoEGapp-index .oidx-gg {
|
||||
width: 100%;
|
||||
|
||||
@@ -34,4 +34,5 @@
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
@@ -1194,9 +1194,11 @@ video img {
|
||||
text-align: center;
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
word-break: break-all;
|
||||
}
|
||||
.faq-title h3 {
|
||||
font-size: 1.685rem;
|
||||
word-break: break-all;
|
||||
}
|
||||
.faq-title h5 {
|
||||
font-size: 1.25rem;
|
||||
@@ -1209,6 +1211,7 @@ video img {
|
||||
height: 1.5rem;
|
||||
font-family: 'Montserrat-Medium';
|
||||
font-weight: 400;
|
||||
word-break: break-all;
|
||||
}
|
||||
.faq-title p {
|
||||
font-size: 1.125rem;
|
||||
@@ -1742,7 +1745,7 @@ video img {
|
||||
padding-left: 1.5rem;
|
||||
line-height: 0.64rem;
|
||||
height: 0.54rem;
|
||||
font-size: 1.2rem;
|
||||
font-size: 1rem;
|
||||
}
|
||||
.goods_details .cpa li:nth-child(2) {
|
||||
border-left: 1px solid #009fdf;
|
||||
|
||||
2
public/static/index/mobile/js/jquery-3.6.0.min.js
vendored
Normal file
2
public/static/index/mobile/js/jquery-3.6.0.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
13
public/static/index/mobile/js/swiper-bundle8.4.7.min.css
vendored
Normal file
13
public/static/index/mobile/js/swiper-bundle8.4.7.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
14
public/static/index/mobile/js/swiper-bundle8.4.7.min.js
vendored
Normal file
14
public/static/index/mobile/js/swiper-bundle8.4.7.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
13
public/static/index/mobile/js/swiper-bundle9.4.1.min.css
vendored
Normal file
13
public/static/index/mobile/js/swiper-bundle9.4.1.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
14
public/static/index/mobile/js/swiper-bundle9.4.1.min.js
vendored
Normal file
14
public/static/index/mobile/js/swiper-bundle9.4.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -152,7 +152,7 @@
|
||||
}
|
||||
.orico_Page_achievement .achievementMain .achTimes .timecontent .timelist .timeline-con .con_event_list .event_list div li {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
width: 94%;
|
||||
font-family: Montserrat-Medium, Montserrat;
|
||||
line-height: 1.5625rem;
|
||||
font-size: 1rem;
|
||||
@@ -160,6 +160,11 @@
|
||||
color: #707070;
|
||||
padding: 0 0 1.24rem 4.6875rem;
|
||||
}
|
||||
.orico_Page_achievement .achievementMain .achTimes .timecontent .timelist .timeline-con .con_event_list .event_list div li p{
|
||||
white-space: normal;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.orico_Page_achievement .achievementMain .tech {
|
||||
background: #fff;
|
||||
width: 100%;
|
||||
|
||||
@@ -125,13 +125,13 @@
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.orico_Page_download .downloadMain .contact_c .softlist .softit .left_img {
|
||||
width: 320px;
|
||||
height: 320px;
|
||||
margin-right: 64px;
|
||||
width: 140px;
|
||||
height: 140px;
|
||||
margin-right: 50px;
|
||||
}
|
||||
.orico_Page_download .downloadMain .contact_c .softlist .softit .left_img img {
|
||||
width: 320px;
|
||||
height: 320px;
|
||||
width: 140px;
|
||||
height: 140px;
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
}
|
||||
@@ -162,7 +162,7 @@
|
||||
color: #004bfa;
|
||||
background-color: rgba(0, 75, 250, 0.05);
|
||||
cursor: pointer;
|
||||
font-size: 0.9rem;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
.orico_Page_download .downloadMain .page-box {
|
||||
text-align: center;
|
||||
|
||||
@@ -40,11 +40,11 @@
|
||||
font-size: 1.125rem;
|
||||
padding-top: 1.6875rem;
|
||||
padding-bottom: 0.375rem;
|
||||
width: 70%;
|
||||
white-space: nowrap;
|
||||
/* width: 70%; */
|
||||
/* white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
text-align: center;
|
||||
text-align: center; */
|
||||
}
|
||||
.narskfPage .narskf-content .narskf-ct-row .narskfit .narskf-sm {
|
||||
color: #9a9a9a;
|
||||
|
||||
@@ -35,11 +35,13 @@
|
||||
font-size: 1.125em;
|
||||
color: #101010;
|
||||
margin-bottom: 2%;
|
||||
word-break: break-all;
|
||||
}
|
||||
.orico_Page_fq .fqMain .Table-Row .Table-Cell .faq-all-text .faq-des {
|
||||
font-size: 0.875em;
|
||||
color: #737373;
|
||||
line-height: 1.875em;
|
||||
word-break: break-all;
|
||||
}
|
||||
.orico_Page_fq .fqMain .pagination {
|
||||
zoom: 1;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@
|
||||
.header-PC #header {
|
||||
margin: 0 auto;
|
||||
height: 3.75rem;
|
||||
width: 100%;
|
||||
width: var(--max-width);
|
||||
position: fixed;
|
||||
top: 0;
|
||||
display: flex;
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
margin-right: 10px;
|
||||
}
|
||||
.orico_Page_prdetail .charging.on{
|
||||
border: 2px solid #999;
|
||||
border: 2px solid #009FDF;
|
||||
}
|
||||
.orico_Page_prdetail .oriprdetail {
|
||||
display: flex;
|
||||
@@ -90,17 +90,20 @@
|
||||
overflow: hidden;
|
||||
height: 31.875rem;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.orico_Page_prdetail .oriprdetail .cp .cpfl .preview .smallImg {
|
||||
width: 80px;
|
||||
overflow: hidden;
|
||||
float: left;
|
||||
}
|
||||
.orico_Page_prdetail .oriprdetail .cp .cpfl .preview .smallImg #imageMenu {
|
||||
.orico_Page_prdetail .oriprdetail .cp .cpfl .preview .smallImg .imageMenu {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.orico_Page_prdetail .oriprdetail .cp .cpfl .preview .smallImg #imageMenu li {
|
||||
.orico_Page_prdetail .oriprdetail .cp .cpfl .preview .smallImg .imageMenu li {
|
||||
width: 5rem;
|
||||
height: 5.4375rem;
|
||||
overflow: hidden;
|
||||
@@ -111,14 +114,14 @@
|
||||
.cpfl
|
||||
.preview
|
||||
.smallImg
|
||||
#imageMenu
|
||||
.imageMenu
|
||||
.imageMenu
|
||||
li
|
||||
img {
|
||||
width: 98%;
|
||||
cursor: pointer;
|
||||
}
|
||||
#onlickImg img{
|
||||
.onlickImg img{
|
||||
width: 100%;
|
||||
}
|
||||
.bigImg {
|
||||
@@ -226,6 +229,7 @@
|
||||
}
|
||||
.orico_Page_prdetail .oriprdetail .cp .cprh .cpcon .proTfg {
|
||||
margin-top: 0.5rem;
|
||||
margin-bottom: 0.875rem;
|
||||
padding: 1rem 0;
|
||||
font-size: 0.75rem;
|
||||
border-bottom: 1px solid #ddd;
|
||||
|
||||
@@ -38,12 +38,12 @@
|
||||
.orico_Page_subcategory .pageMain .ori-pd-title {
|
||||
font-size: 1.5em;
|
||||
color: #101010;
|
||||
margin-bottom: 1.25rem;
|
||||
}
|
||||
.orico_Page_subcategory .pageMain .ori-pd-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap; /* 自动换行 */
|
||||
justify-content: flex-start; /* 水平方向均匀分布 */
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
margin-bottom: 2% ;
|
||||
}
|
||||
.orico_Page_subcategory .pageMain .ori-pd-list .oripditem {
|
||||
width: 24%;
|
||||
|
||||
@@ -43,6 +43,9 @@ body {
|
||||
font-size: 1.2em;
|
||||
font-weight: 400;
|
||||
color: #333;
|
||||
--max-width: 1920px;
|
||||
max-width: var(--max-width);
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
select,
|
||||
|
||||
@@ -54,7 +54,6 @@
|
||||
}
|
||||
|
||||
.narsPage-head .headcenter .logico {
|
||||
width: 10rem;
|
||||
/* width: 10rem; */
|
||||
height: 2.875rem;
|
||||
/* width:100% */
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.4 MiB |
BIN
public/static/index/pc/images/OurBrand.webp
Normal file
BIN
public/static/index/pc/images/OurBrand.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 185 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 MiB |
BIN
public/static/index/pc/images/banner_01.webp
Normal file
BIN
public/static/index/pc/images/banner_01.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 44 KiB |
2
public/static/index/pc/js/jquery-3.6.0.min.js
vendored
Normal file
2
public/static/index/pc/js/jquery-3.6.0.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
13
public/static/index/pc/js/swiper-bundle8.4.7.min.css
vendored
Normal file
13
public/static/index/pc/js/swiper-bundle8.4.7.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
14
public/static/index/pc/js/swiper-bundle8.4.7.min.js
vendored
Normal file
14
public/static/index/pc/js/swiper-bundle8.4.7.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
13
public/static/index/pc/js/swiper-bundle9.4.1.min.css
vendored
Normal file
13
public/static/index/pc/js/swiper-bundle9.4.1.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
14
public/static/index/pc/js/swiper-bundle9.4.1.min.js
vendored
Normal file
14
public/static/index/pc/js/swiper-bundle9.4.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user