From 6cd1b1ad76dcc0457ea91da75555844ab590171a Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Mon, 30 Jun 2025 09:12:24 +0800 Subject: [PATCH 1/5] =?UTF-8?q?refactor:=20=E5=90=8E=E5=8F=B0=E6=A8=AA?= =?UTF-8?q?=E5=B9=85=E6=B7=BB=E5=8A=A0extra=5Fimage=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/controller/v1/BannerItem.php | 4 ++++ app/admin/validate/v1/SysBannerItemValidate.php | 2 ++ app/common/model/SysBannerItemBaseModel.php | 1 + database/migrations/20241231020620_create_sys_banner_item.php | 1 + 4 files changed, 8 insertions(+) diff --git a/app/admin/controller/v1/BannerItem.php b/app/admin/controller/v1/BannerItem.php index 7c4c3625..b1936dcc 100644 --- a/app/admin/controller/v1/BannerItem.php +++ b/app/admin/controller/v1/BannerItem.php @@ -105,6 +105,7 @@ class BannerItem 'desc_txt_color', 'type', 'image', + 'extra_image', 'video', 'link_to' => 'custom', 'link', @@ -159,6 +160,7 @@ class BannerItem 'desc_txt_color', 'type', 'image', + 'extra_image', 'video', 'link_to', 'link', @@ -242,6 +244,7 @@ class BannerItem 'desc_txt_color' => '描述字体颜色', 'type' => '前台显示类型', 'image' => '图片地址', + 'extra_image' => '额外图片地址', 'video' => '视频地址', 'link_to' => '链接类型', 'link' => '链接地址', @@ -274,6 +277,7 @@ class BannerItem 'item.desc_txt_color', 'item.type', 'item.image', + 'item.extra_image', 'item.video', 'item.link_to', 'item.link', diff --git a/app/admin/validate/v1/SysBannerItemValidate.php b/app/admin/validate/v1/SysBannerItemValidate.php index 39b8d285..05870cb8 100644 --- a/app/admin/validate/v1/SysBannerItemValidate.php +++ b/app/admin/validate/v1/SysBannerItemValidate.php @@ -22,6 +22,7 @@ class SysBannerItemValidate extends Validate 'desc_txt_color' => 'max:7', 'type' => 'in:image,video', 'image' => 'max:255', + 'extra_image' => 'max:255', 'video' => 'max:255', 'link_to' => 'requireIf:type,image|max:64|in:article,article_category,product,product_category,system_page,custom', 'link' => 'max:255', @@ -47,6 +48,7 @@ class SysBannerItemValidate extends Validate 'desc_txt_color.max' => '描述字体颜色最多不能超过7个字符', 'type.in' => '显示类型必须是image或video', 'image.max' => '图片地址最多不能超过255个字符', + 'extra_image.max' => '额外图片地址最多不能超过255个字符', 'video.max' => '视频地址最多不能超过255个字符', 'link_to.requireIf' => '链接类型不能为空', 'link_to.max' => '链接类型最多不能超过64个字符', diff --git a/app/common/model/SysBannerItemBaseModel.php b/app/common/model/SysBannerItemBaseModel.php index 964f89f2..ba6933ee 100644 --- a/app/common/model/SysBannerItemBaseModel.php +++ b/app/common/model/SysBannerItemBaseModel.php @@ -25,6 +25,7 @@ class SysBannerItemBaseModel extends BaseModel 'desc_txt_color' => 'string', 'type' => 'string', 'image' => 'string', + 'extra_image' => 'string', 'video' => 'string', 'link_to' => 'string', 'link' => 'string', diff --git a/database/migrations/20241231020620_create_sys_banner_item.php b/database/migrations/20241231020620_create_sys_banner_item.php index 4f72625e..e7512b92 100644 --- a/database/migrations/20241231020620_create_sys_banner_item.php +++ b/database/migrations/20241231020620_create_sys_banner_item.php @@ -36,6 +36,7 @@ class CreateSysBannerItem extends Migrator ->addColumn('desc_txt_color', 'string', ['limit' => 7, 'null' => false, 'default' => '', 'comment' => '描述文本颜色']) ->addColumn('type', 'string', ['limit' => 16, 'null' => false, 'comment' => '类型: image为图片, video为视频']) ->addColumn('image', 'string', ['limit' => 255, 'null' => true, 'default' => null, 'comment' => '图片']) + ->addColumn('extra_image', 'string', ['limit' => 255, 'null' => true, 'default' => null, 'comment' => '额外的图片']) ->addColumn('video', 'string', ['limit' => 255, 'null' => true, 'default' => null, 'comment' => '视频']) ->addColumn('link_to', 'string', ['limit' => 64, 'null' => true, 'default' => null, 'comment' => '链接到(类型): article:文章, article_category:文章分类, product:产品, product_category:产品分类, custom:自定义链接']) ->addColumn('link', 'string', ['limit' => 255, 'null' => true, 'default' => null, 'comment' => '链接']) From 51450677e50f2437449fb819ba37313b4f5c684d Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Mon, 30 Jun 2025 10:57:06 +0800 Subject: [PATCH 2/5] =?UTF-8?q?fix:=20pc/mobile=20banner=E7=9A=84extra=5Fi?= =?UTF-8?q?mage=E5=8F=96=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/index/controller/ContactUs.php | 9 +----- app/index/view/mobile/contact_us/index.html | 12 ++++---- app/index/view/mobile/topic_nas/help.html | 5 ++-- app/index/view/pc/contact_us/index.html | 12 +++----- app/index/view/pc/topic_nas/help.html | 32 ++++++++++++--------- 5 files changed, 32 insertions(+), 38 deletions(-) diff --git a/app/index/controller/ContactUs.php b/app/index/controller/ContactUs.php index 5f8b474b..44c4a74f 100644 --- a/app/index/controller/ContactUs.php +++ b/app/index/controller/ContactUs.php @@ -45,14 +45,7 @@ class ContactUs extends Common $banner_map[$v->unique_label] = $v; } $focus_image = data_get($banner_map, 'BANNER_6805e3d32dcc2')?->items->first()?->toArray(); - $info_datas = data_get($banner_map, 'BANNER_6806090c1838f')?->items->each(function($item) { - if (Str::contains($item->title, '
')) { - $title = explode('
', $item->title); - $item->title = $title[0]; - $item->title_short = $title[1]; - } - return $item; - })->toArray(); + $info_datas = data_get($banner_map, 'BANNER_6806090c1838f')?->items->toArray(); } View::assign('focus_image', $focus_image); View::assign('info_datas', $info_datas); diff --git a/app/index/view/mobile/contact_us/index.html b/app/index/view/mobile/contact_us/index.html index a96b9414..45550253 100644 --- a/app/index/view/mobile/contact_us/index.html +++ b/app/index/view/mobile/contact_us/index.html @@ -24,13 +24,13 @@
{$item.title} - {notempty name="item.title_short"} - {$item.title_short} - {/notempty} {notempty name="item.desc"} - {if condition="str_contains($item.desc, '
- {/if} + {$item.desc|raw} + {/notempty} + {notempty name="item.extra_image"} + {/notempty} {/volist} diff --git a/app/index/view/mobile/topic_nas/help.html b/app/index/view/mobile/topic_nas/help.html index b4d7435b..22564d0c 100644 --- a/app/index/view/mobile/topic_nas/help.html +++ b/app/index/view/mobile/topic_nas/help.html @@ -49,8 +49,9 @@ {notempty name="contacts"}

{:lang_i18n('联系我们')}

+ {assign name="first_section" value=":array_splice($contacts, 0, count($contacts) - 3)"}
- {volist name="contacts" id="co" key="idx" offset="0" length="4"} + {volist name="first_section" id="co"} $co.title_txt_color])}>{$co.title} @@ -61,7 +62,7 @@ {/volist}
- {volist name="contacts" id="co" key="idx" offset="4"} + {volist name="contacts" id="co"} $co.title_txt_color])}>{$co.title}
diff --git a/app/index/view/pc/contact_us/index.html b/app/index/view/pc/contact_us/index.html index 46e0cbc6..75b14e1c 100644 --- a/app/index/view/pc/contact_us/index.html +++ b/app/index/view/pc/contact_us/index.html @@ -24,16 +24,12 @@
{$item.title} - {notempty name="item.title_short"} - {$item.title_short} - {/notempty} {notempty name="item.desc"} - {if condition="str_contains($item.desc, '{$item.desc|raw} + {/notempty} + {notempty name="item.extra_image"}
- {else/} -
- {/if} - {$item.desc|raw} +
{/notempty}
diff --git a/app/index/view/pc/topic_nas/help.html b/app/index/view/pc/topic_nas/help.html index 8e5cf071..e0752832 100644 --- a/app/index/view/pc/topic_nas/help.html +++ b/app/index/view/pc/topic_nas/help.html @@ -57,33 +57,37 @@

{:lang_i18n('联系我们')}

{/notempty} From b237ddb9a1c1cfe9d1d003f106d9ff9afff77010 Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Mon, 30 Jun 2025 15:17:09 +0800 Subject: [PATCH 3/5] =?UTF-8?q?refactor:=20=E4=BF=AE=E6=94=B9=E5=90=84?= =?UTF-8?q?=E8=A1=A8user=5Fagent=E5=AD=97=E6=AE=B5=E9=95=BF=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migrations/20241220062635_create_article_leave_message.php | 2 +- database/migrations/20241224025811_create_leave_message.php | 2 +- .../migrations/20241230060309_create_sys_user_login_log.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/database/migrations/20241220062635_create_article_leave_message.php b/database/migrations/20241220062635_create_article_leave_message.php index e280c4a9..86fa2ff6 100644 --- a/database/migrations/20241220062635_create_article_leave_message.php +++ b/database/migrations/20241220062635_create_article_leave_message.php @@ -33,7 +33,7 @@ class CreateArticleLeaveMessage extends Migrator ->addColumn('email', 'string', ['limit' => 128, 'null' => false, 'comment' => '邮箱']) ->addColumn('content', 'text', ['null' => false, 'comment' => '内容']) ->addColumn('ip', 'string', ['limit' => 64, 'null' => false, 'comment' => 'IP']) - ->addColumn('user_agent', 'string', ['limit' => 255, 'null' => false, 'comment' => 'UserAgent']) + ->addColumn('user_agent', 'string', ['limit' => 1024, 'null' => false, 'comment' => 'UserAgent']) ->addColumn('is_audited', 'boolean', ['null' => false, 'default' => 0, 'comment' => '0待审核,1已审核']) ->addColumn('created_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP', 'comment' => '创建时间']) ->addColumn('deleted_at', 'timestamp', ['null' => true, 'comment' => '删除时间']) diff --git a/database/migrations/20241224025811_create_leave_message.php b/database/migrations/20241224025811_create_leave_message.php index afd7e43e..7aaac7e4 100644 --- a/database/migrations/20241224025811_create_leave_message.php +++ b/database/migrations/20241224025811_create_leave_message.php @@ -33,7 +33,7 @@ class CreateLeaveMessage extends Migrator ->addColumn('email', 'string', ['limit' => 128, 'null' => false, 'comment' => '邮箱']) ->addColumn('content', 'text', ['null' => false, 'comment' => '内容']) ->addColumn('ip', 'string', ['limit' => 64, 'null' => false, 'comment' => 'IP']) - ->addColumn('user_agent', 'string', ['limit' => 255, 'null' => false, 'comment' => 'UserAgent']) + ->addColumn('user_agent', 'string', ['limit' => 1024, 'null' => false, 'comment' => 'UserAgent']) ->addColumn('created_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP', 'comment' => '创建时间']) ->create(); } diff --git a/database/migrations/20241230060309_create_sys_user_login_log.php b/database/migrations/20241230060309_create_sys_user_login_log.php index 873b9ece..b567e856 100644 --- a/database/migrations/20241230060309_create_sys_user_login_log.php +++ b/database/migrations/20241230060309_create_sys_user_login_log.php @@ -31,7 +31,7 @@ class CreateSysUserLoginLog extends Migrator $table = $this->table('sys_user_login_log', ['engine' => 'MyISAM', 'comment' => '系统用户登录日志表']); $table->addColumn('user_id', 'integer', ['null' => false, 'comment' => '用户ID']) ->addColumn('ip', 'integer', ['limit' => 11, 'signed' => false, 'null' => false, 'comment' => '登录IP']) - ->addColumn('user_agent', 'string', ['limit' => 255, 'null' => true, 'default' => null, 'comment' => '登录设备UA信息']) + ->addColumn('user_agent', 'string', ['limit' => 1024, 'null' => true, 'default' => null, 'comment' => '登录设备UA信息']) ->addColumn('created_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP', 'comment' => '创建时间']) ->create(); } From 5f3cf4b58fedbe642e2f473f4800ddcd32f9e4c3 Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Mon, 30 Jun 2025 16:48:35 +0800 Subject: [PATCH 4/5] =?UTF-8?q?fix:=20pc=20=E8=A7=86=E9=A2=91=E6=90=9C?= =?UTF-8?q?=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/index/view/pc/attachment/video.html | 1 + 1 file changed, 1 insertion(+) diff --git a/app/index/view/pc/attachment/video.html b/app/index/view/pc/attachment/video.html index 7037147c..68297f82 100644 --- a/app/index/view/pc/attachment/video.html +++ b/app/index/view/pc/attachment/video.html @@ -14,6 +14,7 @@
+
From 8b65c6f9d49885b373eb2889658a4c844f0574b9 Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Tue, 1 Jul 2025 09:31:35 +0800 Subject: [PATCH 5/5] =?UTF-8?q?feat:=20analytics=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/index/view/mobile/public/base.html | 20 ++++++++++++++++++++ app/index/view/pc/public/base.html | 22 ++++++++++++++++++++++ app/index/view/pc/public/nas_base.html | 20 ++++++++++++++++++++ 3 files changed, 62 insertions(+) diff --git a/app/index/view/mobile/public/base.html b/app/index/view/mobile/public/base.html index 369f255f..992ba8fb 100644 --- a/app/index/view/mobile/public/base.html +++ b/app/index/view/mobile/public/base.html @@ -18,8 +18,28 @@ + + + + {block name="header"} {include file="public/header"/} {/block} diff --git a/app/index/view/pc/public/base.html b/app/index/view/pc/public/base.html index 78af66e7..65a8d5c7 100644 --- a/app/index/view/pc/public/base.html +++ b/app/index/view/pc/public/base.html @@ -102,9 +102,31 @@ } }) + + + + + + {block name="header"} {include file="public/header"/} {/block} diff --git a/app/index/view/pc/public/nas_base.html b/app/index/view/pc/public/nas_base.html index 86bf7176..52564514 100644 --- a/app/index/view/pc/public/nas_base.html +++ b/app/index/view/pc/public/nas_base.html @@ -14,8 +14,28 @@ {block name="style"}{/block} + + + + {block name="header"} {include file="public/nas_header"/} {/block}