From 8d19a58e9d91ad003dcba4f71c8b1c1e0e306d3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Sat, 1 Mar 2025 10:52:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E9=80=82=E9=85=8D=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 7 +- .gitignore | 9 + .vscode/settings.json | 3 + api/cms/cmsArticle/index.ts | 4 +- api/cms/cmsArticle/model/index.ts | 2 + api/cms/cmsOrder/model/index.ts | 2 + api/cms/cmsWebsite/model/index.ts | 6 +- api/layout/index.ts | 4 +- api/shop/shopMerchant/index.ts | 4 +- api/shop/shopMerchantApply/index.ts | 4 +- components/AppFooter/AppFooter.vue | 8 +- components/AppFooter/Link/Link.vue | 8 +- components/AppFooter/TabBar/TabBar.vue | 53 ++++ components/AppFooter/ToolBar/ToolBar.vue | 44 ++- components/AppHeader/Login/Login.vue | 2 +- components/Banner.vue | 2 +- .../Index}/Carousel.vue | 0 components/Index/Customized.vue | 18 ++ .../Index/LandingHero.vue | 157 ++++------ components/Index/LandingLogos.vue | 41 +++ components/Index/MarketList.vue | 92 ++++++ components/Index/Partners.vue | 76 +++++ components/Index/SiteList.vue | 93 ++++++ components/NextArticle.vue | 36 ++- components/Pagination.vue | 2 +- components/PricingCard.vue | 30 ++ components/SiteList.vue | 83 ------ config/index.ts | 2 +- lang/en.json | 2 + lang/zh.json | 2 + layouts/default.vue | 10 +- nuxt.config.ts | 8 +- pages/app/index.vue | 12 + pages/article/[id].vue | 12 +- pages/ask/[id].vue | 130 +++++++++ pages/bsnx-h5/index.vue | 74 +++++ pages/case/[id].vue | 11 +- pages/case/index.vue | 9 +- pages/detail/[id].vue | 2 + pages/developer/[id].vue | 2 +- pages/developer/index.vue | 9 - pages/docs/[id].vue | 1 - pages/docs/index.vue | 3 +- pages/index.vue | 217 ++------------ pages/links/[id].vue | 158 +++++----- pages/links/index.vue | 142 +++++++++ pages/m.vue | 28 -- pages/market/[id].vue | 7 + pages/market/components/AppInfo.vue | 38 ++- pages/market/components/SearchBar.vue | 49 ++-- pages/market/index.vue | 8 +- pages/order/[id].vue | 178 +++++++++--- pages/order/index.vue | 272 ++++++++++++++++++ pages/page/[id].vue | 41 ++- pages/product/[id].vue | 185 ------------ pages/product/code/[id].vue | 131 +++++++++ pages/product/docs/[id].vue | 131 +++++++++ pages/product/index.vue | 141 +++++++++ pages/support/authorize/index.vue | 113 ++++++++ pages/user/auth.vue | 6 +- pages/user/components/UserMenu.vue | 2 +- pages/user/index.vue | 16 +- pages/user/logout.vue | 4 +- pages/user/modify.vue | 8 +- pages/user/order.vue | 6 +- pages/user/password.vue | 4 +- public/favicon.ico | Bin 4286 -> 796 bytes public/favicon2.ico | Bin 0 -> 4286 bytes 68 files changed, 2117 insertions(+), 847 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 components/AppFooter/TabBar/TabBar.vue rename {pages/components => components/Index}/Carousel.vue (100%) create mode 100644 components/Index/Customized.vue rename pages/components/Flash.vue => components/Index/LandingHero.vue (60%) create mode 100644 components/Index/LandingLogos.vue create mode 100644 components/Index/MarketList.vue create mode 100644 components/Index/Partners.vue create mode 100644 components/Index/SiteList.vue create mode 100644 components/PricingCard.vue delete mode 100644 components/SiteList.vue create mode 100644 pages/app/index.vue create mode 100644 pages/ask/[id].vue create mode 100644 pages/bsnx-h5/index.vue create mode 100644 pages/links/index.vue delete mode 100644 pages/m.vue create mode 100644 pages/order/index.vue delete mode 100644 pages/product/[id].vue create mode 100644 pages/product/code/[id].vue create mode 100644 pages/product/docs/[id].vue create mode 100644 pages/product/index.vue create mode 100644 pages/support/authorize/index.vue create mode 100644 public/favicon2.ico diff --git a/.env.development b/.env.development index df51d24..5d2f580 100644 --- a/.env.development +++ b/.env.development @@ -1,5 +1,6 @@ # 应用模块接口 -API_BASE=http://127.0.0.1:9001/api -#API_BASE=https://cms-api.websoft.top/api +VITE_SERVER_URL=https://server.gxwebsoft.com/api +API_BASE=https://cms-api.websoft.top/api -VITE_SERVER_URL=http://127.0.0.1:8000/api +#API_BASE=http://127.0.0.1:9001/api +#VITE_SERVER_URL=http://127.0.0.1:8000/api diff --git a/.gitignore b/.gitignore index f40cf02..c08d101 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,11 @@ /.nuxt/ /.output/ +node_modules +.env +.env.local +.env.development +.env.production +.env.test +.output +.nuxt +.idea diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..3b66410 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "git.ignoreLimitWarning": true +} \ No newline at end of file diff --git a/api/cms/cmsArticle/index.ts b/api/cms/cmsArticle/index.ts index 3ac5ea2..7ea3843 100644 --- a/api/cms/cmsArticle/index.ts +++ b/api/cms/cmsArticle/index.ts @@ -128,7 +128,7 @@ export async function getPrevious(params?: CmsArticleParam) { if (res.code === 0) { return res.data; } - return Promise.reject(new Error(res.message)); + return Promise.reject(); } /** @@ -145,7 +145,7 @@ export async function getNext(params?: CmsArticleParam) { if (res.code === 0) { return res.data; } - return Promise.reject(new Error(res.message)); + return Promise.reject(); } /** diff --git a/api/cms/cmsArticle/model/index.ts b/api/cms/cmsArticle/model/index.ts index fd5d6e6..822a2e3 100644 --- a/api/cms/cmsArticle/model/index.ts +++ b/api/cms/cmsArticle/model/index.ts @@ -112,6 +112,8 @@ export interface CmsArticle { */ export interface CmsArticleParam extends PageParam { articleId?: number; + websiteId?: number; + websiteUserId?: number; articleIds?: string; parentId?: number; status?: number; diff --git a/api/cms/cmsOrder/model/index.ts b/api/cms/cmsOrder/model/index.ts index ce7c809..1ed4553 100644 --- a/api/cms/cmsOrder/model/index.ts +++ b/api/cms/cmsOrder/model/index.ts @@ -28,6 +28,8 @@ export interface CmsOrder { address?: string; // 订单内容 content?: string; + // 参考网址 + reference?: string; // 订单总额 totalPrice?: string; // 实际付款 diff --git a/api/cms/cmsWebsite/model/index.ts b/api/cms/cmsWebsite/model/index.ts index f86ab96..36233d8 100644 --- a/api/cms/cmsWebsite/model/index.ts +++ b/api/cms/cmsWebsite/model/index.ts @@ -1,5 +1,6 @@ import type { PageParam } from '@/api'; import type {CmsNavigation} from "~/api/cms/cmsNavigation/model"; +import type {CmsWebsiteSetting} from "~/api/cms/cmsWebsiteSetting/model"; /** * 网站信息记录表 @@ -123,10 +124,12 @@ export interface CmsWebsite { createTime?: string; // 修改时间 updateTime?: string; - // 网站配置 + // 网站配置参数 config?: any; topNavs?: CmsNavigation[]; bottomNavs?: CmsNavigation[]; + // 网站设置 + setting?: CmsWebsiteSetting; loginUser?: any; } @@ -143,5 +146,6 @@ export interface CmsWebsiteParam extends PageParam { search?: boolean; websiteType?: string; userId?: number; + limit?: number; keywords?: string; } diff --git a/api/layout/index.ts b/api/layout/index.ts index 7ed4627..dc2f5b6 100644 --- a/api/layout/index.ts +++ b/api/layout/index.ts @@ -3,7 +3,7 @@ import type { ApiResult } from '@/api'; import type { User } from '@/api/system/user/model'; import type { UpdatePasswordParam } from './model'; import type {CmsWebsite, CmsWebsiteParam} from "~/api/cms/cmsWebsite/model"; -import {SERVER_API_URL} from "~/config"; +import {COMMON_API_URL, SERVER_API_URL} from "~/config"; /** * 获取网站信息 @@ -26,7 +26,7 @@ export async function getSiteInfo(params: CmsWebsiteParam) { */ export async function getUserInfo(): Promise { const config = useRuntimeConfig(); - const res = await request.get>(SERVER_API_URL + '/auth/user',{ + const res = await request.get>(COMMON_API_URL + '/auth/user',{ headers: { TenantId: `${localStorage.getItem('ServerTenantId')}` } diff --git a/api/shop/shopMerchant/index.ts b/api/shop/shopMerchant/index.ts index a389771..922e192 100644 --- a/api/shop/shopMerchant/index.ts +++ b/api/shop/shopMerchant/index.ts @@ -1,7 +1,7 @@ import request from '@/utils/request'; import type { ApiResult, PageResult } from '@/api'; import type { ShopMerchant, ShopMerchantParam } from './model'; -import {SERVER_API_URL} from "~/config"; +import {COMMON_API_URL, SERVER_API_URL} from "~/config"; /** * 分页查询商户 @@ -124,7 +124,7 @@ export async function getShopMerchantByUserId(id: number) { */ export async function getShopMerchantByPhone() { const res = await request.get>( - SERVER_API_URL + '/shop/shop-merchant/getByPhone' + COMMON_API_URL + '/shop/shop-merchant/getByPhone' ); if (res.code === 0 && res.data) { return res.data; diff --git a/api/shop/shopMerchantApply/index.ts b/api/shop/shopMerchantApply/index.ts index 4448083..3f8e41e 100644 --- a/api/shop/shopMerchantApply/index.ts +++ b/api/shop/shopMerchantApply/index.ts @@ -1,7 +1,7 @@ import request from '@/utils/request'; import type { ApiResult, PageResult } from '@/api'; import type { ShopMerchantApply, ShopMerchantApplyParam } from './model'; -import {SERVER_API_URL} from "~/config"; +import {COMMON_API_URL, SERVER_API_URL} from "~/config"; /** * 分页查询商户入驻申请 @@ -123,7 +123,7 @@ export async function getShopMerchantApplyByUserId() { */ export async function getShopMerchantApplyByPhone() { const res = await request.get>( - SERVER_API_URL + '/shop/shop-merchant-apply/getByPhone' + COMMON_API_URL + '/shop/shop-merchant-apply/getByPhone' ); if (res.code === 0 && res.data) { return res.data; diff --git a/components/AppFooter/AppFooter.vue b/components/AppFooter/AppFooter.vue index 75daaa8..2880175 100644 --- a/components/AppFooter/AppFooter.vue +++ b/components/AppFooter/AppFooter.vue @@ -1,12 +1,15 @@ @@ -14,6 +17,9 @@ import SubMenu from "~/components/AppFooter/SubMenu/SubMenu.vue"; import Copyright from "~/components/AppFooter/Copyright/Copyright.vue"; import ToolBar from "~/components/AppFooter/ToolBar/ToolBar.vue"; +import TabBar from "~/components/AppFooter/TabBar/TabBar.vue"; +import Partners from "~/components/Index/Partners.vue"; +import Customized from "~/components/Index/Customized.vue"; diff --git a/components/AppFooter/ToolBar/ToolBar.vue b/components/AppFooter/ToolBar/ToolBar.vue index 5cdcc05..a4d6e11 100644 --- a/components/AppFooter/ToolBar/ToolBar.vue +++ b/components/AppFooter/ToolBar/ToolBar.vue @@ -1,31 +1,45 @@ diff --git a/pages/components/Flash.vue b/components/Index/LandingHero.vue similarity index 60% rename from pages/components/Flash.vue rename to components/Index/LandingHero.vue index 9c1aef4..d10b72e 100644 --- a/pages/components/Flash.vue +++ b/components/Index/LandingHero.vue @@ -1,17 +1,17 @@ - - diff --git a/components/Index/LandingLogos.vue b/components/Index/LandingLogos.vue new file mode 100644 index 0000000..fa242c9 --- /dev/null +++ b/components/Index/LandingLogos.vue @@ -0,0 +1,41 @@ + + + + + diff --git a/components/Index/MarketList.vue b/components/Index/MarketList.vue new file mode 100644 index 0000000..fc40c18 --- /dev/null +++ b/components/Index/MarketList.vue @@ -0,0 +1,92 @@ + + + diff --git a/components/Index/Partners.vue b/components/Index/Partners.vue new file mode 100644 index 0000000..81c9b64 --- /dev/null +++ b/components/Index/Partners.vue @@ -0,0 +1,76 @@ + + + diff --git a/components/Index/SiteList.vue b/components/Index/SiteList.vue new file mode 100644 index 0000000..2909a5d --- /dev/null +++ b/components/Index/SiteList.vue @@ -0,0 +1,93 @@ + + + diff --git a/components/NextArticle.vue b/components/NextArticle.vue index ddf0bbc..4b19f5d 100644 --- a/components/NextArticle.vue +++ b/components/NextArticle.vue @@ -5,10 +5,10 @@ import type {CmsArticle} from "~/api/cms/cmsArticle/model"; import {getNext, getPrevious} from "~/api/cms/cmsArticle"; const props = withDefaults( - defineProps<{ - articleId?: number; - }>(), - {} + defineProps<{ + articleId?: number; + }>(), + {} ); const i18n = useI18n(); @@ -16,28 +16,36 @@ const previousArticle = ref(); const nextArticle = ref(); // 上一篇 -previousArticle.value = await getPrevious({ +getPrevious({ articleId: props.articleId, lang: i18n.locale.value +}).then(res => { + previousArticle.value = res; +}).catch(() => { }) // 下一篇 -nextArticle.value = await getNext({ +getNext({ articleId: props.articleId, lang: i18n.locale.value +}).then(data => { + nextArticle.value = data; +}).catch(() => { }) diff --git a/components/Pagination.vue b/components/Pagination.vue index f5ff2a6..bf26cd2 100644 --- a/components/Pagination.vue +++ b/components/Pagination.vue @@ -29,7 +29,7 @@ const mobile = useIsMobile(); const where = reactive({ keywords: '', page: 1, - limit: props.pageSize || 12, + limit: props.pageSize || 10, status: 0, parentId: undefined, categoryId: undefined, diff --git a/components/PricingCard.vue b/components/PricingCard.vue new file mode 100644 index 0000000..1170930 --- /dev/null +++ b/components/PricingCard.vue @@ -0,0 +1,30 @@ + + + + + diff --git a/components/SiteList.vue b/components/SiteList.vue deleted file mode 100644 index 75816d8..0000000 --- a/components/SiteList.vue +++ /dev/null @@ -1,83 +0,0 @@ - - - diff --git a/config/index.ts b/config/index.ts index 5be141e..6b74ce3 100644 --- a/config/index.ts +++ b/config/index.ts @@ -8,7 +8,7 @@ export const domain = 'https://websoft.top'; export const SERVER_API_URL = import.meta.env.VITE_SERVER_URL || 'https://server.gxwebsoft.com/api'; // 模块节点 export const MODULES_API_URL = import.meta.env.VITE_API_URL || 'https://cms-api.websoft.top/api'; -export const COMMON_API_URL = import.meta.env.VITE_THINK_URL || 'https://server.gxwebsoft.com/api'; +export const COMMON_API_URL = import.meta.env.VITE_THINK_URL || 'https://common-api.websoft.top/api'; // 文件服务器地址 export const FILE_SERVER = 'https://file.wsdns.cn'; diff --git a/lang/en.json b/lang/en.json index edc22d4..8dec920 100644 --- a/lang/en.json +++ b/lang/en.json @@ -41,6 +41,8 @@ "content": "Content", "realName": "Name", "phone": "Phone", + "reference": "Reference Website", + "files": "Upload attachments", "email": "E-mail", "address": "Address", "code": "Verification code", diff --git a/lang/zh.json b/lang/zh.json index d09cc53..4fcc79e 100644 --- a/lang/zh.json +++ b/lang/zh.json @@ -41,6 +41,8 @@ "content": "留言内容", "realName": "您的姓名", "phone": "联系电话", + "reference": "参考网站", + "files": "上传附件", "email": "电子邮箱", "address": "收货地址", "code": "验证码", diff --git a/layouts/default.vue b/layouts/default.vue index a855af4..fd0ece3 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -12,7 +12,6 @@ import {getLoacl, setLocal} from "~/utils/state"; import {useI18n} from "#imports"; import {getSiteInfo} from "~/api/layout"; import {getTenantIdByDomain} from "~/api/cms/cmsDomain"; -import {getCmsWebsiteSetting} from "~/api/cms/cmsWebsiteSetting"; // 加载状态 const website = useWebsite() @@ -69,9 +68,12 @@ const reload = async () => { localStorage.setItem('SysDomain', data.config.SysDomain); } // 网站设置信息 - getCmsWebsiteSetting(Number(data.websiteId)).then(res => { - setting.value = res; - }) + if(data.setting){ + setting.value = data.setting; + } + // getCmsWebsiteSetting(Number(data.websiteId)).then(res => { + // setting.value = res; + // }) // seo useSeoMeta({ description: data.comments || data.websiteName, diff --git a/nuxt.config.ts b/nuxt.config.ts index 857f849..cfbfec6 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -61,10 +61,11 @@ export default defineNuxtConfig({ content: 'weSite企业建站系统,助力企业信息化建设和转型,主要产品有:企业官网,电商系统,微信公众号,微信小程序应用等,使用目前最流行的技术栈打造。https://websoft.top' }, { name: 'apple-mobile-web-app-capable', content: 'yes'}, - { name: 'apple-mobile-web-app-status-bar-style', content: 'black'} + { name: 'apple-mobile-web-app-status-bar-style', content: 'black'}, + { charset: 'utf-8' }, + { viewport: 'width=device-width, initial-scale=1' }, ], link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }], - viewport: 'width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no', script: [ { innerHTML: 'var备案号 = "备案号:桂ICP备13003666号";', type: 'text/javascript' } ] @@ -89,7 +90,8 @@ export default defineNuxtConfig({ domain: 'websoft.top', // 核心接口 apiServer: 'https://server.gxwebsoft.com/api', - appSecret: '' + appSecret: '', + appName: '你的网站名称' } } }) diff --git a/pages/app/index.vue b/pages/app/index.vue new file mode 100644 index 0000000..633f0d4 --- /dev/null +++ b/pages/app/index.vue @@ -0,0 +1,12 @@ + + + + + diff --git a/pages/article/[id].vue b/pages/article/[id].vue index aa18d10..3b41916 100644 --- a/pages/article/[id].vue +++ b/pages/article/[id].vue @@ -7,21 +7,18 @@ {{ page.title }} - + + :lazy="true" class="w-full md:h-[166px] h-[199px] cursor-pointer bg-gray-50 transition-transform duration-300 ease-in-out hover:scale-110"/>
{{ item.title }}
- - -
{{ getViews(item) }}
@@ -36,7 +33,7 @@ - +
+ + + diff --git a/pages/bsnx-h5/index.vue b/pages/bsnx-h5/index.vue new file mode 100644 index 0000000..bcc816b --- /dev/null +++ b/pages/bsnx-h5/index.vue @@ -0,0 +1,74 @@ + + + + diff --git a/pages/case/[id].vue b/pages/case/[id].vue index 1860023..72451cd 100644 --- a/pages/case/[id].vue +++ b/pages/case/[id].vue @@ -20,15 +20,15 @@ - - + +
-
+
{{ item.title }}
@@ -89,8 +89,11 @@ const layout = useLayout(); const where = reactive({ keywords: '', page: 1, - limit: 20, + limit: 12, status: 0, + recommend: 1, + order: 'desc', + sort: 'actualViews', parentId: undefined, categoryId: undefined, lang: i18n.locale.value diff --git a/pages/case/index.vue b/pages/case/index.vue index ca44408..53c6b68 100644 --- a/pages/case/index.vue +++ b/pages/case/index.vue @@ -53,8 +53,8 @@
-
- +
+
@@ -116,7 +116,10 @@ const hideDomain = () => { // 加载页面数据 const reload = async () => { - await pageCmsWebsiteAll(where).then(response => { + await pageCmsWebsiteAll({ + ...where, + plugin: false + }).then(response => { if (response?.list) { list.value = response?.list; total.value = response.count; diff --git a/pages/detail/[id].vue b/pages/detail/[id].vue index c1a960c..d69e332 100644 --- a/pages/detail/[id].vue +++ b/pages/detail/[id].vue @@ -223,6 +223,8 @@ const reload = async () => { showPassword.value = true; return; } + }).catch(() => { + navigateTo('/404'); }) // seo diff --git a/pages/developer/[id].vue b/pages/developer/[id].vue index 18be82a..dce6302 100644 --- a/pages/developer/[id].vue +++ b/pages/developer/[id].vue @@ -5,7 +5,7 @@ 插件编辑 -