From 682e264a6f9a9abe62308c3f64dcc6181f751293 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Thu, 29 Jan 2026 16:21:22 +0800 Subject: [PATCH] =?UTF-8?q?feat(router):=20=E6=9B=B4=E6=96=B0=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E7=BB=93=E6=9E=84=E5=B9=B6=E4=BC=98=E5=8C=96=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除经营范围按钮,精简导航栏 - 实现文章标题链接功能,提升用户体验 - 添加商品详情页面包屑导航,支持分类跳转 - 引入配送管理相关页面(区域、接单台、配送员、派单) - 替换控制台布局为站点头部和底部组件 - 重构商品分类页面,集成CMS导航功能 - 新增文章详情页面,支持多种访问方式 - 删除已迁移的创建应用和空应用页面 - 优化样式和组件导入,提升代码质量 --- app/api/cms/cmsArticle/index.ts | 2 +- app/components/SiteHeader.vue | 26 +- app/components/shop/GoodsCategoryPage.vue | 21 +- app/config/nav.ts | 1 + app/layouts/console.vue | 17 +- app/pages/[...slug].vue | 1 - app/pages/apps.vue | 11 - app/pages/article-item/index.vue | 374 ++++++++++++ app/pages/article/[id].vue | 21 +- app/pages/{contact.vue => contact/index.vue} | 55 +- app/pages/create-app.vue | 595 ------------------- app/pages/delivery/areas.vue | 23 + app/pages/delivery/board.vue | 27 + app/pages/delivery/couriers.vue | 27 + app/pages/delivery/dispatch.vue | 27 + app/pages/delivery/index.vue | 204 +++++++ app/pages/delivery/settings.vue | 27 + app/pages/goods-item/[id].vue | 28 +- app/pages/index.vue | 6 +- app/pages/join/index.vue | 311 ++++++++++ app/pages/login.vue | 305 +++++----- app/pages/products.vue | 81 --- 22 files changed, 1309 insertions(+), 881 deletions(-) delete mode 100644 app/pages/apps.vue create mode 100644 app/pages/article-item/index.vue rename app/pages/{contact.vue => contact/index.vue} (66%) delete mode 100644 app/pages/create-app.vue create mode 100644 app/pages/delivery/areas.vue create mode 100644 app/pages/delivery/board.vue create mode 100644 app/pages/delivery/couriers.vue create mode 100644 app/pages/delivery/dispatch.vue create mode 100644 app/pages/delivery/index.vue create mode 100644 app/pages/delivery/settings.vue create mode 100644 app/pages/join/index.vue delete mode 100644 app/pages/products.vue diff --git a/app/api/cms/cmsArticle/index.ts b/app/api/cms/cmsArticle/index.ts index 2ce4d7d..ddbf7e1 100644 --- a/app/api/cms/cmsArticle/index.ts +++ b/app/api/cms/cmsArticle/index.ts @@ -132,7 +132,7 @@ export async function getByCode(code: string) { } export async function getCount(params: CmsArticleParam) { - const res = await request.get('/cms/cms-article/data', { + const res = await request.get>('/cms/cms-article/data', { params }); if (res.data.code === 0) { diff --git a/app/components/SiteHeader.vue b/app/components/SiteHeader.vue index b9ac94d..bd21392 100644 --- a/app/components/SiteHeader.vue +++ b/app/components/SiteHeader.vue @@ -8,8 +8,9 @@
菜单 @@ -107,6 +108,7 @@ 联系我们 经营范围 + 招商加盟
@@ -116,10 +118,16 @@ import { mainNav } from '@/config/nav' import type { CmsNavigation } from '@/api/cms/cmsNavigation/model' import { COMPANY } from '@/config/company' +import { getToken } from '@/utils/token-util' const route = useRoute() const open = ref(false) const isAffixed = ref(false) +const isHydrated = ref(false) +const token = ref('') + +const TOKEN_EVENT = 'auth-token-changed' +const isLoggedIn = computed(() => isHydrated.value && !!token.value) type HeaderNavItem = { key: string @@ -286,6 +294,20 @@ const todayText = computed(() => { function onAffixChange(affixed: boolean) { isAffixed.value = affixed } + +function syncToken() { + token.value = getToken() +} + +onMounted(() => { + isHydrated.value = true + syncToken() + window.addEventListener(TOKEN_EVENT, syncToken) +}) + +onBeforeUnmount(() => { + window.removeEventListener(TOKEN_EVENT, syncToken) +}) + diff --git a/app/pages/article/[id].vue b/app/pages/article/[id].vue index f2f77d2..de945fc 100644 --- a/app/pages/article/[id].vue +++ b/app/pages/article/[id].vue @@ -86,7 +86,9 @@ @@ -251,6 +253,22 @@ function resolveArticleTitle(a: CmsArticle) { return String(a.title || a.code || '未命名文章').trim() } +function resolveArticleLink(a: CmsArticle) { + const articleId = typeof a.articleId === 'number' && Number.isFinite(a.articleId) ? a.articleId : NaN + const code = String(a.code || '').trim() + return { + path: '/article-item', + query: { + id: Number.isFinite(articleId) ? String(articleId) : undefined, + code: !Number.isFinite(articleId) && code ? code : undefined, + navId: Number.isFinite(navigationId.value) ? String(navigationId.value) : undefined, + page: String(page.value), + limit: String(limit.value), + q: keywords.value || undefined + } + } +} + function resolveArticleImage(a: CmsArticle) { const img = String(a.image || '').trim() return img || '' @@ -350,6 +368,7 @@ useHead(() => ({ font-size: 18px; font-weight: 800; color: rgba(0, 0, 0, 0.88); + text-decoration: none; } .article-meta { diff --git a/app/pages/contact.vue b/app/pages/contact/index.vue similarity index 66% rename from app/pages/contact.vue rename to app/pages/contact/index.vue index b36d6b6..c100720 100644 --- a/app/pages/contact.vue +++ b/app/pages/contact/index.vue @@ -2,7 +2,7 @@
联系我们 - 填写需求后我们将尽快联系你,为你规划产品套餐、交付开通链路与部署方案(SaaS/私有化)。 + 填写需求后我们将尽快联系你,为你对接供货报价、资质资料与合作方案(渠道/团购/企业采购/门店合作等)。 @@ -29,11 +29,13 @@ - - - 售前咨询 - 售后服务 - 留意反馈 + + + 合作咨询 + 企业采购 + 渠道经销 + 技术服务 + 其他 @@ -43,7 +45,7 @@ @@ -66,7 +68,7 @@
@@ -82,8 +84,8 @@ import { addCmsOrder } from '@/api/cms/cmsOrder' import { usePageSeo } from '@/composables/usePageSeo' usePageSeo({ - title: '联系我们 - 预约演示 / 私有化部署 / 产品开通', - description: '预约演示与咨询:SaaS 平台、私有化部署、模板/插件市场与支付即开通业务链路。', + title: '联系我们 - 合作咨询 / 供货与采购对接', + description: '合作咨询与采购对接:供货报价、资质资料、配送方案与长期合作建议。', path: '/contact' }) @@ -91,7 +93,7 @@ const form = reactive({ name: '', phone: '', company: '', - delivery: undefined as undefined | 'saas' | 'private' | 'hybrid', + consultType: undefined as undefined | 'cooperation' | 'purchase' | 'dealer' | 'service' | 'other', need: '' }) @@ -106,30 +108,35 @@ const rules = { } const tips = [ - '你希望售卖哪些产品(官网/电商/小程序/门户等)?', - '是否需要模板/插件市场(购买、授权、更新)?', - '是否需要“支付即开通”(自动创建租户/初始化模块与数据)?', - '交付方式:SaaS 或私有化部署?是否有合规要求?' + '合作方向:渠道经销/团购/企业采购/门店合作/技术服务?', + '所在城市与可覆盖区域(渠道/门店/客户类型)?', + '预计需求规模与周期(首批/月度/长期)?', + '资质与结算:是否需要资质文件、开票类型与账期?', + '交付与配送:自提/同城/快递/冷链,期望时效?' ] async function onSubmit() { if (submitting.value) return submitting.value = true try { - const deliveryLabel = - form.delivery === 'saas' - ? 'SaaS(云端)' - : form.delivery === 'private' - ? '私有化部署' - : form.delivery === 'hybrid' - ? '混合部署' - : '未选择' + const consultTypeLabel = + form.consultType === 'cooperation' + ? '合作咨询' + : form.consultType === 'purchase' + ? '企业采购' + : form.consultType === 'dealer' + ? '渠道经销' + : form.consultType === 'service' + ? '技术服务' + : form.consultType === 'other' + ? '其他' + : '未选择' const content = [ `姓名:${form.name || '-'}`, `手机号:${form.phone || '-'}`, `公司/团队:${form.company || '-'}`, - `交付方式:${deliveryLabel}`, + `咨询方向:${consultTypeLabel}`, '', '需求描述:', form.need || '-' diff --git a/app/pages/create-app.vue b/app/pages/create-app.vue deleted file mode 100644 index 6e9a5a7..0000000 --- a/app/pages/create-app.vue +++ /dev/null @@ -1,595 +0,0 @@ - - - - - diff --git a/app/pages/delivery/areas.vue b/app/pages/delivery/areas.vue new file mode 100644 index 0000000..cf3bf38 --- /dev/null +++ b/app/pages/delivery/areas.vue @@ -0,0 +1,23 @@ + + + + diff --git a/app/pages/delivery/board.vue b/app/pages/delivery/board.vue new file mode 100644 index 0000000..10ad2ec --- /dev/null +++ b/app/pages/delivery/board.vue @@ -0,0 +1,27 @@ + + + + diff --git a/app/pages/delivery/couriers.vue b/app/pages/delivery/couriers.vue new file mode 100644 index 0000000..e7e4c55 --- /dev/null +++ b/app/pages/delivery/couriers.vue @@ -0,0 +1,27 @@ + + + + diff --git a/app/pages/delivery/dispatch.vue b/app/pages/delivery/dispatch.vue new file mode 100644 index 0000000..f67c6f9 --- /dev/null +++ b/app/pages/delivery/dispatch.vue @@ -0,0 +1,27 @@ + + + + diff --git a/app/pages/delivery/index.vue b/app/pages/delivery/index.vue new file mode 100644 index 0000000..4f31728 --- /dev/null +++ b/app/pages/delivery/index.vue @@ -0,0 +1,204 @@ + + + + + diff --git a/app/pages/delivery/settings.vue b/app/pages/delivery/settings.vue new file mode 100644 index 0000000..3bb1308 --- /dev/null +++ b/app/pages/delivery/settings.vue @@ -0,0 +1,27 @@ + + + + diff --git a/app/pages/goods-item/[id].vue b/app/pages/goods-item/[id].vue index 3d96553..85f5805 100644 --- a/app/pages/goods-item/[id].vue +++ b/app/pages/goods-item/[id].vue @@ -5,8 +5,8 @@ 首页 - - 商品 + + {{ categoryTitle || `分类 ${categoryId}` }} {{ title }} @@ -117,6 +117,8 @@ + + diff --git a/app/pages/login.vue b/app/pages/login.vue index 7587139..79ecaad 100644 --- a/app/pages/login.vue +++ b/app/pages/login.vue @@ -1,164 +1,180 @@ - - + + + 立即发送 + + - - - - - - - - 立即发送 - - - - - - - - + @@ -183,6 +199,7 @@ import { TEMPLATE_ID } from '@/config/setting' import { setToken } from '@/utils/token-util' import type { QrCodeStatusResponse } from '@/api/passport/qrLogin' +// Login page is a public page: keep a lightweight layout and render header/footer locally. definePageMeta({ layout: 'blank' }) const route = useRoute() @@ -387,10 +404,16 @@ onUnmounted(() => { -