diff --git a/.env.development b/.env.development index 013ec41..aa39b41 100644 --- a/.env.development +++ b/.env.development @@ -1,11 +1,11 @@ VITE_APP_NAME=后台管理系统 VITE_SOCKET_URL=wss://server.gxwebsoft.com -#VITE_SERVER_URL=https://server.gxwebsoft.com/api +VITE_SERVER_URL=https://server.gxwebsoft.com/api VITE_THINK_URL=https://gxtyzx-api.websoft.top/api #VITE_API_URL=https://modules.gxwebsoft.com/api -VITE_SERVER_URL=http://127.0.0.1:9090/api +#VITE_SERVER_URL=http://127.0.0.1:9090/api VITE_API_URL=http://127.0.0.1:9001/api #VITE_THINK_URL=http://127.0.0.1:9099/api #/booking/bookingItem diff --git a/src/api/cms/design/model/index.ts b/src/api/cms/design/model/index.ts index e8e6cdc..4bd18bc 100644 --- a/src/api/cms/design/model/index.ts +++ b/src/api/cms/design/model/index.ts @@ -42,7 +42,13 @@ export interface Design { backgroundColor?: string; // 关联网站导航ID navigationId?: number; + showLayout?: boolean; + btn?: any[]; + showBanner?: boolean; buyUrl?: string; + demoUrl?: string; + account?: string; + docUrl?: string; } /** diff --git a/src/layout/index.vue b/src/layout/index.vue index fde902a..ff0f785 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -50,10 +50,11 @@ @@ -117,6 +118,7 @@ setHomeComponents } from '@/utils/page-tab-util'; import type { TabCtxMenuOption } from 'ele-admin-pro/es/ele-pro-layout/types'; + import { openUrl } from '@/utils/common'; const { push } = useRouter(); const { t, locale } = useI18n(); @@ -126,7 +128,9 @@ // 租户信息 const { company } = storeToRefs(tenantStore); // 网站名称 - const projectName = company.value?.shortName; + const projectName = !company.value?.companyLogo + ? company.value?.shortName + : ''; // 网站LOGO const logoPath = company.value?.companyLogo || 'https://www.gxwebsoft.com/ws-logo.svg'; diff --git a/src/utils/domain.ts b/src/utils/domain.ts index 6e0af3b..1fdb318 100644 --- a/src/utils/domain.ts +++ b/src/utils/domain.ts @@ -118,6 +118,10 @@ export function getSiteDomain(): string { } }); } + // 开发环境调试域名 + if (localStorage.getItem('DevDomain')) { + return `${localStorage.getItem('DevDomain')}`; + } return `${localStorage.getItem('Domain')}`; } diff --git a/src/views/cms/article/components/articleEdit.vue b/src/views/cms/article/components/articleEdit.vue index fd13177..8fb2fee 100644 --- a/src/views/cms/article/components/articleEdit.vue +++ b/src/views/cms/article/components/articleEdit.vue @@ -21,7 +21,7 @@ > - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - (); @@ -204,8 +176,6 @@ const spec = ref([]); const showSpecForm = ref(false); - const name = ref(); - const value = ref(); const files = ref([]); const category = ref([]); const takeaway = ref([]); @@ -264,14 +234,14 @@ trigger: 'blur' } ], - image: [ - { - required: true, - message: '请上传图片', - type: 'string', - trigger: 'blur' - } - ], + // image: [ + // { + // required: true, + // message: '请上传图片', + // type: 'string', + // trigger: 'blur' + // } + // ], // files: [ // { // required: true, @@ -316,27 +286,6 @@ ], }); - const onType = (index: number) => { - form.type = index; - }; - - // /* 搜索 */ - // const chooseMerchantId = (item: Merchant) => { - // form.merchantName = item.merchantName; - // form.merchantId = item.merchantId; - // }; - // - // const chooseArticleCategory = (item: ArticleCategory,value: any) => { - // form.categoryId = value[1].value; - // form.categoryParent = value[0].label; - // form.categoryChildren = value[1].label; - // } - // const chooseTakeawayCategory = (item: ArticleCategory, value: any) => { - // form.categoryParent = '店铺分类'; - // form.categoryChildren = value[0].label; - // form.categoryId = item[0]; - // } - const chooseImage = (data: FileRecord) => { images.value.push({ uid: data.id, @@ -360,14 +309,6 @@ form.image = ''; }; - const onClose = (index) => { - spec.value.splice(index, 1); - }; - - const openSpecForm = () => { - showSpecForm.value = !showSpecForm.value; - }; - const onComments = () => { if (form.comments == undefined) { form.comments = htmlToText(content.value) @@ -375,33 +316,6 @@ } } - const onSpec = (row: Spec) => { - // form.specName = row.specName; - if(row.specValue){ - spec.value = JSON.parse(row?.specValue); - } - } - - // 新增规格 - const addSpecValue = () => { - if (!name.value || !value.value) { - message.error(`请输入规格和规格值`); - return false; - } - const findIndex = spec.value.findIndex((d) => d.value == name.value); - if (findIndex == 0) { - message.error(`${name.value}已存在)`); - return false; - } - spec.value.push({ - value: name.value, - detail: [value.value] - }); - name.value = ''; - value.value = ''; - openSpecForm(); - }; - const chooseFile = (data: FileRecord) => { files.value.push({ uid: data.id, @@ -531,6 +445,9 @@ watch( () => props.visible, (visible) => { + if(props.categoryId){ + form.categoryId = props.categoryId; + } if (visible) { images.value = []; category.value = []; diff --git a/src/views/cms/article/components/search.vue b/src/views/cms/article/components/search.vue index 3cdeee0..e04b709 100644 --- a/src/views/cms/article/components/search.vue +++ b/src/views/cms/article/components/search.vue @@ -63,6 +63,7 @@ selection?: []; merchantId?: number; navigationList?: Navigation[]; + categoryId?: number; model?: string; }>(), {} @@ -99,7 +100,6 @@ const handleSearch = (e) => { const text = e.target.value; - resetFields(); if (text === '已发布') { where.status = 0; } @@ -113,6 +113,7 @@ }; const reload = () => { + console.log(where); getCount(where).then((data: any) => { articleCount.value = data; }); @@ -141,14 +142,18 @@ watch( () => props.merchantId, - (id) => { - if (Number(id) > 0) { - where.merchantId = id; - reload(); - } else { - where.merchantId = undefined; - reload(); + () => { + if (props.categoryId) { + where.categoryId = props.categoryId; } + reload(); + // if (Number(id) > 0) { + // where.merchantId = id; + // reload(); + // } else { + // where.merchantId = undefined; + // reload(); + // } }, { immediate: true } ); diff --git a/src/views/cms/article/index.vue b/src/views/cms/article/index.vue index 1e1e8eb..8db0a22 100644 --- a/src/views/cms/article/index.vue +++ b/src/views/cms/article/index.vue @@ -18,6 +18,7 @@ :selection="selection" :navigationList="navigationList" :merchantId="merchantId" + :categoryId="categoryId" :model="model" @add="openEdit" @remove="removeBatch" @@ -26,7 +27,8 @@ - + {{ record.comments }} +