diff --git a/.env.development b/.env.development index 2428309..a815dc4 100644 --- a/.env.development +++ b/.env.development @@ -1,3 +1,5 @@ # 应用模块接口 API_BASE=http://127.0.0.1:9001/api #API_BASE=https://cms-api.websoft.top/api + +#VITE_SERVER_URL=http://127.0.0.1:30000/api diff --git a/.env.production b/.env.production index 728c125..3ff109c 100644 --- a/.env.production +++ b/.env.production @@ -1,4 +1,4 @@ # 基础模块 -VITE_SERVER_URL=https://common-api.websoft.top/api +VITE_SERVER_URL=https://server.gxwebsoft.com/api # 应用模块 API_BASE=https://cms-api.websoft.top/api diff --git a/api/cms/cmsArticle/model/index.ts b/api/cms/cmsArticle/model/index.ts index f11c3a0..fd5d6e6 100644 --- a/api/cms/cmsArticle/model/index.ts +++ b/api/cms/cmsArticle/model/index.ts @@ -74,6 +74,10 @@ export interface CmsArticle { toUsers?: string; // 文章内容 content?: string; + // 是否翻译 + translation?: boolean; + // 编辑器 + editor?: number; // 是否推荐 recommend?: number; // 用户ID diff --git a/api/cms/cmsDomain/index.ts b/api/cms/cmsDomain/index.ts index cf217e5..44a2d70 100644 --- a/api/cms/cmsDomain/index.ts +++ b/api/cms/cmsDomain/index.ts @@ -1,7 +1,7 @@ import request from '~/utils/request'; import type { ApiResult, PageResult } from '@/api'; import type { CmsDomain, CmsDomainParam } from './model'; -import { SERVER_API_URL } from '@/config'; +import {COMMON_API_URL, SERVER_API_URL} from '@/config'; /** * 分页查询网站域名记录表 @@ -138,7 +138,7 @@ export async function resolvable(id: number) { export async function getTenantIdByDomain(params: CmsDomainParam) { const config = useRuntimeConfig(); const res = await request.get>>( - config.public.apiServer + '/cms/cms-domain/page', + COMMON_API_URL + '/cms/cms-domain/page', { params } diff --git a/api/cms/cmsWebsite/model/index.ts b/api/cms/cmsWebsite/model/index.ts index ff2a4bb..f86ab96 100644 --- a/api/cms/cmsWebsite/model/index.ts +++ b/api/cms/cmsWebsite/model/index.ts @@ -46,9 +46,9 @@ export interface CmsWebsite { // 应用价格 price?: string, // 交付方式 - deliveryMethod: number, + deliveryMethod?: number, // 计费方式 - chargingMethod: number, + chargingMethod?: number, // 服务到期时间 expirationTime?: string; // 模版ID @@ -59,6 +59,8 @@ export interface CmsWebsite { industryChild?: string; // 企业ID companyId?: number; + // 开发者 + developer?: string; // 所在国家 country?: string; // 所在省份 @@ -91,6 +93,12 @@ export interface CmsWebsite { official?: boolean; // 是否显示在插件市场 market?: boolean; + // 是否插件 + plugin?: boolean; + // 是否允许被搜索(案例展示) + search?: boolean; + // 主题色 + color?: string; // 运行状态 running?: number; // 状态 0未开通 1运行中 2维护中 3已关闭 4已欠费停机 5违规关停 @@ -131,6 +139,8 @@ export interface CmsWebsiteParam extends PageParam { recommend?: number; official?: boolean; market?: boolean; + plugin?: boolean; + search?: boolean; websiteType?: string; userId?: number; keywords?: string; diff --git a/api/cms/cmsWebsiteSetting/index.ts b/api/cms/cmsWebsiteSetting/index.ts new file mode 100644 index 0000000..6d2ddca --- /dev/null +++ b/api/cms/cmsWebsiteSetting/index.ts @@ -0,0 +1,105 @@ +import request from '@/utils/request'; +import type { ApiResult, PageResult } from '@/api'; +import type { CmsWebsiteSetting, CmsWebsiteSettingParam } from './model'; + +/** + * 分页查询网站设置 + */ +export async function pageCmsWebsiteSetting(params: CmsWebsiteSettingParam) { + const res = await request.get>>( + '/cms/cms-website-setting/page', + { + params + } + ); + if (res.code === 0) { + return res.data; + } + return Promise.reject(new Error(res.message)); +} + +/** + * 查询网站设置列表 + */ +export async function listCmsWebsiteSetting(params?: CmsWebsiteSettingParam) { + const res = await request.get>( + '/cms/cms-website-setting', + { + params + } + ); + if (res.code === 0 && res.data) { + return res.data; + } + return Promise.reject(new Error(res.message)); +} + +/** + * 添加网站设置 + */ +export async function addCmsWebsiteSetting(data: CmsWebsiteSetting) { + const res = await request.post>( + '/cms/cms-website-setting', + data + ); + if (res.code === 0) { + return res.message; + } + return Promise.reject(new Error(res.message)); +} + +/** + * 修改网站设置 + */ +export async function updateCmsWebsiteSetting(data: CmsWebsiteSetting) { + const res = await request.put>( + '/cms/cms-website-setting', + data + ); + if (res.code === 0) { + return res.message; + } + return Promise.reject(new Error(res.message)); +} + +/** + * 删除网站设置 + */ +export async function removeCmsWebsiteSetting(id?: number) { + const res = await request.del>( + '/cms/cms-website-setting/' + id + ); + if (res.code === 0) { + return res.message; + } + return Promise.reject(new Error(res.message)); +} + +/** + * 批量删除网站设置 + */ +export async function removeBatchCmsWebsiteSetting(data: (number | undefined)[]) { + const res = await request.del>( + '/cms/cms-website-setting/batch', + { + data + } + ); + if (res.code === 0) { + return res.message; + } + return Promise.reject(new Error(res.message)); +} + +/** + * 根据id查询网站设置 + */ +export async function getCmsWebsiteSetting(id: number) { + const res = await request.get>( + '/cms/cms-website-setting/' + id + ); + if (res.code === 0 && res.data) { + return res.data; + } + return Promise.reject(new Error(res.message)); +} diff --git a/api/cms/cmsWebsiteSetting/model/index.ts b/api/cms/cmsWebsiteSetting/model/index.ts new file mode 100644 index 0000000..1f6e30e --- /dev/null +++ b/api/cms/cmsWebsiteSetting/model/index.ts @@ -0,0 +1,51 @@ +import type { PageParam } from '@/api'; + +/** + * 网站设置 + */ +export interface CmsWebsiteSetting { + // 自增ID + id?: number; + // 关联网站ID + websiteId?: number; + // 是否官方插件 + official?: string; + // 是否展示在插件市场 + market?: string; + // 是否允许被搜索 + search?: string; + // 是否共享 + share?: string; + // 是否插件 0应用1 插件 + plugin?: string; + // 编辑器类型 1 md-editor-v3, 2 tinymce-editor + editor?: number; + // 显示站内搜索 + searchBtn?: string; + // 显示登录注册功能 + loginBtn?: string; + // 显示悬浮客服工具 + floatTool?: boolean; + // 显示版权链接 + copyrightLink?: string; + // 导航栏最多显示数量 + maxMenuNum?: string; + // 排序号 + sortNumber?: number; + // 是否删除, 0否, 1是 + deleted?: number; + // 租户id + tenantId?: number; + // 创建时间 + createTime?: string; + // 修改时间 + updateTime?: string; +} + +/** + * 网站设置搜索条件 + */ +export interface CmsWebsiteSettingParam extends PageParam { + id?: number; + keywords?: string; +} diff --git a/api/layout/index.ts b/api/layout/index.ts index f3948aa..aedf67e 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 {COMMON_API_URL} from "~/config"; +import {COMMON_API_URL, SERVER_API_URL} from "~/config"; /** * 获取网站信息 diff --git a/api/passport/login/index.ts b/api/passport/login/index.ts index d5318c4..fbefe88 100644 --- a/api/passport/login/index.ts +++ b/api/passport/login/index.ts @@ -7,7 +7,7 @@ import type { CaptchaResult, SmsCaptchaResult } from './model'; -import { SERVER_API_URL } from '~/config'; +import {SERVER_API_URL} from '~/config'; import type {UserParam} from "~/api/system/user/model"; /** diff --git a/api/shop/shopMerchant/index.ts b/api/shop/shopMerchant/index.ts index 2b41057..07b2559 100644 --- a/api/shop/shopMerchant/index.ts +++ b/api/shop/shopMerchant/index.ts @@ -1,22 +1,22 @@ import request from '@/utils/request'; import type { ApiResult, PageResult } from '@/api'; import type { ShopMerchant, ShopMerchantParam } from './model'; -import { MODULES_API_URL } from '@/config'; +import {COMMON_API_URL} from "~/config"; /** * 分页查询商户 */ export async function pageShopMerchant(params: ShopMerchantParam) { const res = await request.get>>( - MODULES_API_URL + '/shop/shop-merchant/page', + '/shop/shop-merchant/page', { params } ); - if (res.data.code === 0) { - return res.data.data; + if (res.code === 0) { + return res.data; } - return Promise.reject(new Error(res.data.message)); + return Promise.reject(new Error(res.message)); } /** @@ -24,15 +24,15 @@ export async function pageShopMerchant(params: ShopMerchantParam) { */ export async function listShopMerchant(params?: ShopMerchantParam) { const res = await request.get>( - MODULES_API_URL + '/shop/shop-merchant', + '/shop/shop-merchant', { params } ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; + if (res.code === 0 && res.data) { + return res.data; } - return Promise.reject(new Error(res.data.message)); + return Promise.reject(new Error(res.message)); } /** @@ -40,13 +40,13 @@ export async function listShopMerchant(params?: ShopMerchantParam) { */ export async function addShopMerchant(data: ShopMerchant) { const res = await request.post>( - MODULES_API_URL + '/shop/shop-merchant', + '/shop/shop-merchant', data ); - if (res.data.code === 0) { - return res.data.message; + if (res.code === 0) { + return res.message; } - return Promise.reject(new Error(res.data.message)); + return Promise.reject(new Error(res.message)); } /** @@ -54,42 +54,42 @@ export async function addShopMerchant(data: ShopMerchant) { */ export async function updateShopMerchant(data: ShopMerchant) { const res = await request.put>( - MODULES_API_URL + '/shop/shop-merchant', + '/shop/shop-merchant', data ); - if (res.data.code === 0) { - return res.data.message; + if (res.code === 0) { + return res.message; } - return Promise.reject(new Error(res.data.message)); + return Promise.reject(new Error(res.message)); } /** * 删除商户 */ export async function removeShopMerchant(id?: number) { - const res = await request.delete>( - MODULES_API_URL + '/shop/shop-merchant/' + id + const res = await request.del>( + '/shop/shop-merchant/' + id ); - if (res.data.code === 0) { - return res.data.message; + if (res.code === 0) { + return res.message; } - return Promise.reject(new Error(res.data.message)); + return Promise.reject(new Error(res.message)); } /** * 批量删除商户 */ export async function removeBatchShopMerchant(data: (number | undefined)[]) { - const res = await request.delete>( - MODULES_API_URL + '/shop/shop-merchant/batch', + const res = await request.del>( + '/shop/shop-merchant/batch', { data } ); - if (res.data.code === 0) { - return res.data.message; + if (res.code === 0) { + return res.message; } - return Promise.reject(new Error(res.data.message)); + return Promise.reject(new Error(res.message)); } /** @@ -97,10 +97,37 @@ export async function removeBatchShopMerchant(data: (number | undefined)[]) { */ export async function getShopMerchant(id: number) { const res = await request.get>( - MODULES_API_URL + '/shop/shop-merchant/' + id + '/shop/shop-merchant/' + id ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; + if (res.code === 0 && res.data) { + return res.data; } - return Promise.reject(new Error(res.data.message)); + return Promise.reject(new Error(res.message)); +} + +/** + * 根据userId查询商户 + */ +export async function getShopMerchantByUserId(id: number) { + const res = await request.get>( + '/shop/shop-merchant/' + id + ); + if (res.code === 0 && res.data) { + return res.data; + } + return Promise.reject(new Error(res.message)); +} + + +/** + * 根据phone查询商户 + */ +export async function getShopMerchantByPhone() { + const res = await request.get>( + COMMON_API_URL + '/shop/shop-merchant/getByPhone' + ); + if (res.code === 0 && res.data) { + return res.data; + } + return Promise.reject(new Error(res.message)); } diff --git a/api/shop/shopMerchantApply/index.ts b/api/shop/shopMerchantApply/index.ts index 9001fdc..3121a2b 100644 --- a/api/shop/shopMerchantApply/index.ts +++ b/api/shop/shopMerchantApply/index.ts @@ -1,22 +1,22 @@ import request from '@/utils/request'; import type { ApiResult, PageResult } from '@/api'; import type { ShopMerchantApply, ShopMerchantApplyParam } from './model'; -import { MODULES_API_URL } from '@/config'; +import {COMMON_API_URL} from "~/config"; /** * 分页查询商户入驻申请 */ export async function pageShopMerchantApply(params: ShopMerchantApplyParam) { const res = await request.get>>( - MODULES_API_URL + '/shop/shop-merchant-apply/page', + '/shop/shop-merchant-apply/page', { params } ); - if (res.data.code === 0) { - return res.data.data; + if (res.code === 0) { + return res.data; } - return Promise.reject(new Error(res.data.message)); + return Promise.reject(new Error(res.message)); } /** @@ -24,15 +24,15 @@ export async function pageShopMerchantApply(params: ShopMerchantApplyParam) { */ export async function listShopMerchantApply(params?: ShopMerchantApplyParam) { const res = await request.get>( - MODULES_API_URL + '/shop/shop-merchant-apply', + '/shop/shop-merchant-apply', { params } ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; + if (res.code === 0 && res.data) { + return res.data; } - return Promise.reject(new Error(res.data.message)); + return Promise.reject(new Error(res.message)); } /** @@ -40,13 +40,13 @@ export async function listShopMerchantApply(params?: ShopMerchantApplyParam) { */ export async function addShopMerchantApply(data: ShopMerchantApply) { const res = await request.post>( - MODULES_API_URL + '/shop/shop-merchant-apply', + COMMON_API_URL + '/shop/shop-merchant-apply', data ); - if (res.data.code === 0) { - return res.data.message; + if (res.code === 0) { + return res.message; } - return Promise.reject(new Error(res.data.message)); + return Promise.reject(new Error(res.message)); } /** @@ -54,42 +54,42 @@ export async function addShopMerchantApply(data: ShopMerchantApply) { */ export async function updateShopMerchantApply(data: ShopMerchantApply) { const res = await request.put>( - MODULES_API_URL + '/shop/shop-merchant-apply', + COMMON_API_URL + '/shop/shop-merchant-apply', data ); - if (res.data.code === 0) { - return res.data.message; + if (res.code === 0) { + return res.message; } - return Promise.reject(new Error(res.data.message)); + return Promise.reject(new Error(res.message)); } /** * 删除商户入驻申请 */ export async function removeShopMerchantApply(id?: number) { - const res = await request.delete>( - MODULES_API_URL + '/shop/shop-merchant-apply/' + id + const res = await request.del>( + '/shop/shop-merchant-apply/' + id ); - if (res.data.code === 0) { - return res.data.message; + if (res.code === 0) { + return res.message; } - return Promise.reject(new Error(res.data.message)); + return Promise.reject(new Error(res.message)); } /** * 批量删除商户入驻申请 */ export async function removeBatchShopMerchantApply(data: (number | undefined)[]) { - const res = await request.delete>( - MODULES_API_URL + '/shop/shop-merchant-apply/batch', + const res = await request.del>( + '/shop/shop-merchant-apply/batch', { data } ); - if (res.data.code === 0) { - return res.data.message; + if (res.code === 0) { + return res.message; } - return Promise.reject(new Error(res.data.message)); + return Promise.reject(new Error(res.message)); } /** @@ -97,10 +97,36 @@ export async function removeBatchShopMerchantApply(data: (number | undefined)[]) */ export async function getShopMerchantApply(id: number) { const res = await request.get>( - MODULES_API_URL + '/shop/shop-merchant-apply/' + id + '/shop/shop-merchant-apply/' + id ); - if (res.data.code === 0 && res.data.data) { - return res.data.data; + if (res.code === 0 && res.data) { + return res.data; } - return Promise.reject(new Error(res.data.message)); + return Promise.reject(new Error(res.message)); +} + +/** + * 根据userId查询商户 + */ +export async function getShopMerchantApplyByUserId() { + const res = await request.get>( + COMMON_API_URL + '/shop/shop-merchant-apply/getByUserId' + ); + if (res.code === 0 && res.data) { + return res.data; + } + return Promise.reject(new Error(res.message)); +} + +/** + * 根据phone查询商户入驻申请 + */ +export async function getShopMerchantApplyByPhone() { + const res = await request.get>( + COMMON_API_URL + '/shop/shop-merchant-apply/getByPhone' + ); + if (res.code === 0 && res.data) { + return res.data; + } + return Promise.reject(new Error(res.message)); } diff --git a/api/system/dict-data/index.ts b/api/system/dict-data/index.ts index 60f1654..1bf4729 100644 --- a/api/system/dict-data/index.ts +++ b/api/system/dict-data/index.ts @@ -1,7 +1,7 @@ import request from '~/utils/request'; import type { ApiResult, PageResult } from '@/api'; import type { DictData, DictDataParam } from './model'; -import { SERVER_API_URL } from '@/config'; +import {SERVER_API_URL} from '@/config'; /** * 分页查询字典数据 diff --git a/api/system/dict-data/model/index.ts b/api/system/dict-data/model/index.ts index d4d40a8..05f24ab 100644 --- a/api/system/dict-data/model/index.ts +++ b/api/system/dict-data/model/index.ts @@ -1,4 +1,4 @@ -import { PageParam } from '@/api'; +import type { PageParam } from '@/api'; /** * 字典数据 diff --git a/assets/css/model.css b/assets/css/model.css index 0541140..ddc0866 100644 --- a/assets/css/model.css +++ b/assets/css/model.css @@ -2616,7 +2616,7 @@ h3.map_title { position: fixed; z-index: 9999; right: 17px; - bottom: 10%; + bottom: 50%; } #toolbar li { diff --git a/components/AppFooter/Link/Link.vue b/components/AppFooter/Link/Link.vue index 65d024e..5b52887 100644 --- a/components/AppFooter/Link/Link.vue +++ b/components/AppFooter/Link/Link.vue @@ -4,7 +4,6 @@ import type {CmsLink} from "~/api/cms/cmsLink/model"; const list = ref([]) listCmsLink({}).then(res => { - console.log(res); list.value = res; }) diff --git a/components/AppFooter/ToolBar/ToolBar.vue b/components/AppFooter/ToolBar/ToolBar.vue index e06cd4d..b40a91a 100644 --- a/components/AppFooter/ToolBar/ToolBar.vue +++ b/components/AppFooter/ToolBar/ToolBar.vue @@ -1,10 +1,11 @@ diff --git a/components/TinymceEditor/util.ts b/components/TinymceEditor/util.ts deleted file mode 100644 index ce05a27..0000000 --- a/components/TinymceEditor/util.ts +++ /dev/null @@ -1,248 +0,0 @@ -import type { - Editor as TinyMCEEditor, - EditorEvent, - RawEditorSettings -} from 'tinymce'; -const BASE_URL = import.meta.env.BASE_URL; - -// 默认加载插件 -const PLUGINS: string = [ - 'code', - 'preview', - 'fullscreen', - 'paste', - 'searchreplace', - 'save', - 'autosave', - 'link', - 'autolink', - 'image', - 'media', - 'table', - 'codesample', - 'lists', - 'advlist', - 'hr', - 'charmap', - 'emoticons', - 'anchor', - 'directionality', - 'pagebreak', - 'quickbars', - 'nonbreaking', - 'visualblocks', - 'visualchars', - 'wordcount' -].join(' '); - -// 默认工具栏布局 -const TOOLBAR: string = [ - 'fullscreen', - 'preview', - 'code', - 'codesample', - 'emoticons', - 'image', - 'media', - '|', - 'undo', - 'redo', - '|', - 'forecolor', - 'backcolor', - '|', - 'bold', - 'italic', - 'underline', - 'strikethrough', - '|', - 'alignleft', - 'aligncenter', - 'alignright', - 'alignjustify', - '|', - 'outdent', - 'indent', - '|', - 'numlist', - 'bullist', - '|', - 'formatselect', - 'fontselect', - 'fontsizeselect', - '|', - 'link', - 'charmap', - 'anchor', - 'pagebreak', - '|', - 'ltr', - 'rtl' -].join(' '); - -// 默认配置 -export const DEFAULT_CONFIG: RawEditorSettings = { - height: 300, - branding: false, - skin_url: BASE_URL + 'tinymce/skins/ui/oxide', - content_css: BASE_URL + 'tinymce/skins/content/default/content.min.css', - language_url: BASE_URL + 'tinymce/langs/zh_CN.js', - language: 'zh_CN', - plugins: PLUGINS, - toolbar: TOOLBAR, - draggable_modal: true, - toolbar_mode: 'sliding', - quickbars_insert_toolbar: '', - images_upload_handler: (blobInfo: any, success: any, error: any) => { - if (blobInfo.blob().size / 1024 > 400) { - error('大小不能超过 400KB'); - return; - } - success('data:image/jpeg;base64,' + blobInfo.base64()); - }, - file_picker_types: 'media', - file_picker_callback: () => {} -}; - -// 暗黑主题配置 -export const DARK_CONFIG: RawEditorSettings = { - skin_url: BASE_URL + 'tinymce/skins/ui/oxide-dark', - content_css: BASE_URL + 'tinymce/skins/content/dark/content.min.css' -}; - -// 支持监听的事件 -export const VALID_EVENTS = [ - 'onActivate', - 'onAddUndo', - 'onBeforeAddUndo', - 'onBeforeExecCommand', - 'onBeforeGetContent', - 'onBeforeRenderUI', - 'onBeforeSetContent', - 'onBeforePaste', - 'onBlur', - 'onChange', - 'onClearUndos', - 'onClick', - 'onContextMenu', - 'onCopy', - 'onCut', - 'onDblclick', - 'onDeactivate', - 'onDirty', - 'onDrag', - 'onDragDrop', - 'onDragEnd', - 'onDragGesture', - 'onDragOver', - 'onDrop', - 'onExecCommand', - 'onFocus', - 'onFocusIn', - 'onFocusOut', - 'onGetContent', - 'onHide', - 'onInit', - 'onKeyDown', - 'onKeyPress', - 'onKeyUp', - 'onLoadContent', - 'onMouseDown', - 'onMouseEnter', - 'onMouseLeave', - 'onMouseMove', - 'onMouseOut', - 'onMouseOver', - 'onMouseUp', - 'onNodeChange', - 'onObjectResizeStart', - 'onObjectResized', - 'onObjectSelected', - 'onPaste', - 'onPostProcess', - 'onPostRender', - 'onPreProcess', - 'onProgressState', - 'onRedo', - 'onRemove', - 'onReset', - 'onSaveContent', - 'onSelectionChange', - 'onSetAttrib', - 'onSetContent', - 'onShow', - 'onSubmit', - 'onUndo', - 'onVisualAid' -]; - -let unique = 0; - -/** - * 生成编辑器 id - */ -export function uuid(prefix: string): string { - const time = Date.now(); - const random = Math.floor(Math.random() * 1000000000); - unique++; - return prefix + '_' + random + unique + String(time); -} - -/** - * 绑定事件 - */ -export function bindHandlers( - initEvent: EditorEvent, - listeners: Record, - editor: TinyMCEEditor -): void { - const validEvents = VALID_EVENTS.map((event) => event.toLowerCase()); - Object.keys(listeners) - .filter((key: string) => validEvents.includes(key.toLowerCase())) - .forEach((key: string) => { - const handler = listeners[key]; - if (typeof handler === 'function') { - if (key === 'onInit') { - handler(initEvent, editor); - } else { - editor.on(key.substring(2), (e: EditorEvent) => - handler(e, editor) - ); - } - } - }); -} - -/** - * 弹出提示框 - */ -export function openAlert( - editor: TinyMCEEditor | null, - option: AlertOption = {} -) { - editor?.windowManager?.open({ - title: option.title ?? '提示', - body: { - type: 'panel', - items: [ - { - type: 'htmlpanel', - html: `

${option.content ?? ''}

` - } - ] - }, - buttons: [ - { - type: 'cancel', - name: 'closeButton', - text: '确定', - primary: true - } - ] - }); -} - -export interface AlertOption { - title?: string; - content?: string; -} diff --git a/composables/configState.ts b/composables/configState.ts index d9cd6c1..6d4c4d5 100644 --- a/composables/configState.ts +++ b/composables/configState.ts @@ -6,14 +6,18 @@ import type {Company} from "~/api/system/company/model"; import type {Layout} from "~/api/layout/model"; import type {Config} from "~/types/global"; import type {CmsWebsiteField} from "~/api/cms/cmsWebsiteField/model"; +import type {CmsWebsiteSetting} from "~/api/cms/cmsWebsiteSetting/model"; // 网站信息 -export const useWebsite = () => - useState('website', () => { - return {}; - }); +export const useWebsite = () => useState('website', undefined); -// 参数配置 +// 网站设置 +export const useSetting = () => + useState('setting', () => { + return {}; + }); + +// 扩展字段 export const useConfigInfo = () => useState('config', () => { return { diff --git a/config/index.ts b/config/index.ts index c7778c3..7f62581 100644 --- a/config/index.ts +++ b/config/index.ts @@ -5,10 +5,10 @@ export const APP_SECRET = 'ffd6eee985af45e4a75098422d1decbb'; export const domain = 'https://websoft.top'; // 主节点 -export const SERVER_API_URL = import.meta.env.VITE_SERVER_URL || 'https://common-api.websoft.top/api'; +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://common-api.websoft.top/api'; +export const COMMON_API_URL = import.meta.env.VITE_THINK_URL || 'https://server.gxwebosoft.com/api'; // 文件服务器地址 export const FILE_SERVER = 'https://file.wsdns.cn'; diff --git a/layouts/default.vue b/layouts/default.vue index 8548512..a855af4 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -1,22 +1,24 @@ diff --git a/pages/case/components/Comments.vue b/pages/case/components/Comments.vue new file mode 100644 index 0000000..9139709 --- /dev/null +++ b/pages/case/components/Comments.vue @@ -0,0 +1,195 @@ + + + diff --git a/pages/case/components/PageBanner.vue b/pages/case/components/PageBanner.vue new file mode 100644 index 0000000..9011604 --- /dev/null +++ b/pages/case/components/PageBanner.vue @@ -0,0 +1,102 @@ + + + + diff --git a/pages/case/components/SearchBar.vue b/pages/case/components/SearchBar.vue new file mode 100644 index 0000000..4c0aa8c --- /dev/null +++ b/pages/case/components/SearchBar.vue @@ -0,0 +1,45 @@ + + + + diff --git a/pages/case/index.vue b/pages/case/index.vue index 8ca7a07..734ecf7 100644 --- a/pages/case/index.vue +++ b/pages/case/index.vue @@ -4,116 +4,94 @@
+ - - - -
-
-
- {{ item.title }} + + + +
+
+ +
+ {{ item.websiteName }} +
+ + {{ id == item.websiteId ? item.domain : item.comments || '暂无描述' }} + + 获取 +
+
+
+
+ +
-
-
{{ item.comments }}
-
-
- -
{{ getViews(item) }}
-
-
- {{ dayjs(item.createTime).format('YYYY-MM-DD') }} -
-
-
+ - +
+ + diff --git a/pages/components/Carousel.vue b/pages/components/Carousel.vue index 7400e81..7d7b178 100644 --- a/pages/components/Carousel.vue +++ b/pages/components/Carousel.vue @@ -1,11 +1,13 @@ +
@@ -44,9 +56,13 @@ import { ArrowLeft,View,Search } from '@element-plus/icons-vue' import type {CmsArticleParam} from "~/api/cms/cmsArticle/model"; import {pageCmsWebsiteAll} from "~/api/cms/cmsWebsite"; import type {CmsWebsite, CmsWebsiteParam} from "~/api/cms/cmsWebsite/model"; +import {getShopMerchantByPhone} from "~/api/shop/shopMerchant"; +import type {ShopMerchant} from "~/api/shop/shopMerchant/model"; const route = useRoute(); const router = useRouter(); +const isDeveloper = ref(false); +const developer = ref(); // 页面信息 const list = ref([]); const total = ref(0); @@ -69,8 +85,14 @@ const goBack = () => { } // 加载页面数据 -const reload = async () => { - await pageCmsWebsiteAll(where).then(response => { +const reload = () => { + getShopMerchantByPhone().then((data) => { + isDeveloper.value = true + developer.value = data + }).catch(() => { + isDeveloper.value = false + }) + pageCmsWebsiteAll(where).then(response => { if(response?.list){ list.value = response?.list; total.value = response.count; diff --git a/pages/index.vue b/pages/index.vue index c16710b..7176c55 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -1,6 +1,7 @@ + + + + - -
-
- + +
+
+ -
- {{ item.websiteName }} -
- - {{ id == item.websiteId ? item.domain : item.comments || '暂无描述' }} - - 获取 +
+ {{ item.websiteName }} +
+ + {{ id == item.websiteId ? item.domain : item.comments || '暂无描述' }} + + 获取 +
+
+ + +
-
- - -
-
+ - +
diff --git a/pages/page/[id].vue b/pages/page/[id].vue index 28ef3e9..0d3275a 100644 --- a/pages/page/[id].vue +++ b/pages/page/[id].vue @@ -2,13 +2,13 @@ -
+
- +
diff --git a/pages/passport/login.vue b/pages/passport/login.vue index a2c295e..565226d 100644 --- a/pages/passport/login.vue +++ b/pages/passport/login.vue @@ -231,8 +231,7 @@ const changeCaptcha = async () => { useHead({ - title: `登录页 - ${config.value?.siteName || 'WEB应用开发平台'}`, - meta: [{ name: website.value.keywords, content: website.value.comments }] + title: `登录页 - ${config.value?.siteName || 'WEB应用开发平台'}` }); /** diff --git a/pages/user/auth.vue b/pages/user/auth.vue index 5b39bbb..af42eec 100644 --- a/pages/user/auth.vue +++ b/pages/user/auth.vue @@ -4,59 +4,51 @@ - - diff --git a/pages/user/index.vue b/pages/user/index.vue index f2eefb2..8cbf6ed 100644 --- a/pages/user/index.vue +++ b/pages/user/index.vue @@ -2,7 +2,7 @@