diff --git a/.env.development b/.env.development index fbcc74b..b8ccd8b 100644 --- a/.env.development +++ b/.env.development @@ -1,5 +1,5 @@ VITE_APP_NAME=后台管理(开发环境) -VITE_API_URL=http://127.0.0.1:9200/api +#VITE_API_URL=http://127.0.0.1:9200/api #VITE_SERVER_API_URL=http://127.0.0.1:8000/api diff --git a/src/api/layout/index.ts b/src/api/layout/index.ts index 93650ea..7910080 100644 --- a/src/api/layout/index.ts +++ b/src/api/layout/index.ts @@ -2,7 +2,7 @@ import request from '@/utils/request'; import type { ApiResult } from '@/api'; import type { User } from '@/api/system/user/model'; import type { UpdatePasswordParam, NoticeResult } from './model'; -import {MODULES_API_URL, SERVER_API_URL} from '@/config/setting'; +import {SERVER_API_URL} from '@/config/setting'; import { Company } from '@/api/system/company/model'; import { CmsWebsite } from '@/api/cms/cmsWebsite/model'; import {Menu} from "@/api/system/menu/model"; @@ -26,7 +26,7 @@ export async function getTenantInfo(): Promise { */ export async function getSiteInfo() { const res = await request.get>( - MODULES_API_URL + '/cms/getSiteInfo', + '/shop/getShopInfo', { params: { lang: getLang() @@ -70,7 +70,7 @@ export async function updateLoginUser(data: User) { */ export async function getServerTime() { const res = await request.get>( - MODULES_API_URL + '/cms/website/getServerTime' + '/cms/website/getServerTime' ); if (res.data.code === 0 && res.data.data) { return res.data.data; @@ -84,7 +84,7 @@ export async function getServerTime() { */ export async function getNext7day() { const res = await request.get>( - MODULES_API_URL + '/cms/website/getNext7day' + '/cms/website/getNext7day' ); console.log('res.data.code: ', res.data.code); if (res.data.code === 0 && res.data.data) { diff --git a/src/views/cms/cmsArticle/index.vue b/src/views/cms/cmsArticle/index.vue index 4ce3748..356f364 100644 --- a/src/views/cms/cmsArticle/index.vue +++ b/src/views/cms/cmsArticle/index.vue @@ -272,7 +272,7 @@ const columns = ref([ key: 'createTime', align: 'center', width: 180, - customRender: ({text}) => toDateString(text, 'yyyy-MM-dd HH:mm:ss'), + customRender: ({text}) => toDateString(text, 'yyyy-MM-dd'), sorter: true }, { diff --git a/src/views/cms/cmsMpField/index.vue b/src/views/cms/cmsMpField/index.vue index f261ed5..c16de5b 100644 --- a/src/views/cms/cmsMpField/index.vue +++ b/src/views/cms/cmsMpField/index.vue @@ -155,7 +155,7 @@ const columns = ref([ align: 'center', sorter: true, ellipsis: true, - customRender: ({text}) => toDateString(text, 'yyyy-MM-dd HH:mm:ss') + customRender: ({text}) => toDateString(text, 'yyyy-MM-dd') }, { title: '操作', diff --git a/src/views/cms/cmsMpPages/index.vue b/src/views/cms/cmsMpPages/index.vue index 731596e..aad183f 100644 --- a/src/views/cms/cmsMpPages/index.vue +++ b/src/views/cms/cmsMpPages/index.vue @@ -240,7 +240,7 @@ const columns = ref([ sorter: true, hideInTable: true, ellipsis: true, - customRender: ({text}) => toDateString(text, 'yyyy-MM-dd HH:mm:ss') + customRender: ({text}) => toDateString(text, 'yyyy-MM-dd') }, { title: '操作', diff --git a/src/views/cms/cmsProduct/index.vue b/src/views/cms/cmsProduct/index.vue index 653d09e..b522a3a 100644 --- a/src/views/cms/cmsProduct/index.vue +++ b/src/views/cms/cmsProduct/index.vue @@ -224,7 +224,7 @@ const columns = ref([ align: 'center', sorter: true, ellipsis: true, - customRender: ({text}) => toDateString(text, 'yyyy-MM-dd HH:mm:ss') + customRender: ({text}) => toDateString(text, 'yyyy-MM-dd') }, { title: '操作', diff --git a/src/views/cms/cmsWebsite/index.vue b/src/views/cms/cmsWebsite/index.vue index 9f5a3df..2ce2e06 100644 --- a/src/views/cms/cmsWebsite/index.vue +++ b/src/views/cms/cmsWebsite/index.vue @@ -232,7 +232,7 @@ const columns = ref([ width: 170, sorter: true, ellipsis: true, - customRender: ({text}) => toDateString(text, 'yyyy-MM-dd HH:mm:ss') + customRender: ({text}) => toDateString(text, 'yyyy-MM-dd') }, { title: '操作', diff --git a/src/views/cms/dashboard/index.vue b/src/views/cms/dashboard/index.vue index e0ad79e..86e77d0 100644 --- a/src/views/cms/dashboard/index.vue +++ b/src/views/cms/dashboard/index.vue @@ -11,20 +11,20 @@ :height="80" :preview="false" style="border-radius: 8px" - :src="siteStore.logo" + :src="siteStore.websiteLogo" fallback="/logo.png" />
-

{{ siteStore.appName }}

-

{{ siteStore.description }}

+

{{ siteStore.websiteName }}

+

{{ siteStore.websiteComments }}

- {{ siteStore.version }} - {{ siteStore.statusText }} + 版本 {{ systemInfo.version }} + {{ systemInfo.status }} diff --git a/src/views/cms/help/index.vue b/src/views/cms/help/index.vue index e5d35bc..3c92aa8 100644 --- a/src/views/cms/help/index.vue +++ b/src/views/cms/help/index.vue @@ -205,7 +205,7 @@ const columns = ref([ key: 'createTime', align: 'center', width: 180, - customRender: ({text}) => toDateString(text, 'yyyy-MM-dd HH:mm:ss'), + customRender: ({text}) => toDateString(text, 'yyyy-MM-dd'), sorter: true }, // { diff --git a/src/views/shop/components/search.vue b/src/views/shop/dashboard/components/search.vue similarity index 100% rename from src/views/shop/components/search.vue rename to src/views/shop/dashboard/components/search.vue diff --git a/src/views/shop/components/websiteEdit.vue b/src/views/shop/dashboard/components/websiteEdit.vue similarity index 85% rename from src/views/shop/components/websiteEdit.vue rename to src/views/shop/dashboard/components/websiteEdit.vue index 77f3ec7..d68758f 100644 --- a/src/views/shop/components/websiteEdit.vue +++ b/src/views/shop/dashboard/components/websiteEdit.vue @@ -20,7 +20,7 @@ styleResponsive ? { md: 19, sm: 19, xs: 24 } : { flex: '1' } " > - + + + {{ form.type }} + - - {{ form.websiteType }} - - - + - - - - - - - - @@ -123,6 +114,7 @@ v-model:value="form.statusText" /> + @@ -135,9 +127,10 @@ import {addCmsWebsite, updateCmsWebsite} from '@/api/cms/cmsWebsite'; import {CmsWebsite} from '@/api/cms/cmsWebsite/model'; import {useThemeStore} from '@/store/modules/theme'; import {storeToRefs} from 'pinia'; -import {FormInstance} from 'ant-design-vue/es/form'; +import {FormInstance, type Rule} from 'ant-design-vue/es/form'; import {ItemType} from 'ele-admin-pro/es/ele-image-upload/types'; import {FileRecord} from '@/api/system/file/model'; +import {checkExistence} from '@/api/cms/cmsDomain'; import {updateCmsDomain} from '@/api/cms/cmsDomain'; import {updateTenant} from "@/api/system/tenant"; @@ -203,14 +196,14 @@ const updateVisible = (value: boolean) => { // 表单验证规则 const rules = reactive({ - comments: [ - { - required: true, - type: 'string', - message: '请填写小程序描述', - trigger: 'blur' - } - ], + // comments: [ + // { + // required: true, + // type: 'string', + // message: '请填写小程序描述', + // trigger: 'blur' + // } + // ], keywords: [ { required: true, @@ -243,6 +236,31 @@ const rules = reactive({ trigger: 'blur' } ], + // websiteCode: [ + // { + // required: true, + // type: 'string', + // message: '该域名已被使用', + // validator: (_rule: Rule, value: string) => { + // return new Promise((resolve, reject) => { + // if (!value) { + // return reject('请输入二级域名'); + // } + // checkExistence('domain', `${value}.wsdns.cn`) + // .then(() => { + // if (value === oldDomain.value) { + // return resolve(); + // } + // reject('已存在'); + // }) + // .catch(() => { + // resolve(); + // }); + // }); + // }, + // trigger: 'blur' + // } + // ], adminUrl: [ { required: true, @@ -286,26 +304,28 @@ const chooseImage = (data: FileRecord) => { form.websiteLogo = data.downloadUrl; }; -const chooseQrcode = (data: FileRecord) => { - websiteQrcode.value.push({ - uid: data.id, - url: data.path, - status: 'done' - }); - form.websiteDarkLogo = data.downloadUrl; -} - - const onDeleteItem = (index: number) => { images.value.splice(index, 1); form.websiteLogo = ''; }; -const onDeleteQrcode = (index: number) => { - websiteQrcode.value.splice(index, 1); - form.websiteDarkLogo = ''; +const chooseFile = (data: FileRecord) => { + form.websiteCode = data.url; + files.value.push({ + uid: data.id, + url: data.url, + status: 'done' + }); }; +const onDeleteFile = (index: number) => { + files.value.splice(index, 1); +}; + +// const onWebsiteType = (text: string) => { +// form.websiteType = text; +// }; + const {resetFields} = useForm(form, rules); /* 保存编辑 */ @@ -374,13 +394,6 @@ watch( status: 'done' }); } - if (props.data.websiteDarkLogo) { - websiteQrcode.value.push({ - uid: uuid(), - url: props.data.websiteDarkLogo, - status: 'done' - }); - } if (props.data.files) { files.value = JSON.parse(props.data.files); } diff --git a/src/views/shop/dashboard/index.vue b/src/views/shop/dashboard/index.vue new file mode 100644 index 0000000..e0ad79e --- /dev/null +++ b/src/views/shop/dashboard/index.vue @@ -0,0 +1,258 @@ + + + + + diff --git a/src/views/shop/index.vue b/src/views/shop/index.vue deleted file mode 100644 index e757feb..0000000 --- a/src/views/shop/index.vue +++ /dev/null @@ -1,430 +0,0 @@ - - - - - - - -