diff --git a/admin/.eslintrc.cjs b/admin/.eslintrc.cjs index 44a42f0b..fa81252d 100644 --- a/admin/.eslintrc.cjs +++ b/admin/.eslintrc.cjs @@ -34,7 +34,8 @@ module.exports = { 'no-prototype-builtins': 'off', 'prefer-spread': 'off', '@typescript-eslint/no-non-null-assertion': 'off', - '@typescript-eslint/no-non-null-asserted-optional-chain': 'off' + '@typescript-eslint/no-non-null-asserted-optional-chain': 'off', + 'vue/no-mutating-props': 'off' }, globals: { module: 'readonly' diff --git a/admin/src/api/decoration.ts b/admin/src/api/decoration.ts new file mode 100644 index 00000000..62945e06 --- /dev/null +++ b/admin/src/api/decoration.ts @@ -0,0 +1,11 @@ +import request from '@/utils/request' + +// 页面装修详情 +export function getDecoratePages(params: any) { + return request.get({ url: '/decorate/pages/detail', params }) +} + +// 页面装修保存 +export function setDecoratePages(params: any) { + return request.post({ url: '/decorate/pages/save', params }) +} diff --git a/admin/src/components/image-contain/index.vue b/admin/src/components/image-contain/index.vue index fc42a46a..3625cce8 100644 --- a/admin/src/components/image-contain/index.vue +++ b/admin/src/components/image-contain/index.vue @@ -1,5 +1,11 @@ - + + + + + + + diff --git a/admin/src/components/link/index.ts b/admin/src/components/link/index.ts new file mode 100644 index 00000000..8e12a67a --- /dev/null +++ b/admin/src/components/link/index.ts @@ -0,0 +1,11 @@ +export enum LinkTypeEnum { + 'SHOP_PAGES' = 'shop', + 'CUSTOM_LINK' = 'custom' +} + +export interface Link { + path: string + name?: string + type: string + params?: Record +} diff --git a/admin/src/components/link/index.vue b/admin/src/components/link/index.vue new file mode 100644 index 00000000..700305d3 --- /dev/null +++ b/admin/src/components/link/index.vue @@ -0,0 +1,71 @@ + + + + + {{ item.name }} + + + + + + + + + + + + diff --git a/admin/src/components/link/picker.vue b/admin/src/components/link/picker.vue new file mode 100644 index 00000000..b65a8a5c --- /dev/null +++ b/admin/src/components/link/picker.vue @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/admin/src/components/link/shop-pages.vue b/admin/src/components/link/shop-pages.vue new file mode 100644 index 00000000..4012dfbb --- /dev/null +++ b/admin/src/components/link/shop-pages.vue @@ -0,0 +1,42 @@ + + + + + {{ item.name }} + + + + + + diff --git a/admin/src/components/material/picker.vue b/admin/src/components/material/picker.vue index 0f6f6162..6fd96e1f 100644 --- a/admin/src/components/material/picker.vue +++ b/admin/src/components/material/picker.vue @@ -41,7 +41,8 @@ v-show="showUpload" :class="{ 'is-disabled': disabled, - 'is-one': limit == 1 + 'is-one': limit == 1, + [uploadClass]: true }" > @@ -123,6 +124,10 @@ export default defineComponent({ hiddenUpload: { type: Boolean, default: false + }, + uploadClass: { + type: String, + default: '' } }, @@ -269,8 +274,8 @@ export default defineComponent({ } } .material-upload { - .upload-btn { - @apply box-border rounded border-br border-dashed border flex flex-col justify-center items-center; + :deep(.upload-btn) { + @apply text-tx-secondary box-border rounded border-br border-dashed border flex flex-col justify-center items-center; } } } diff --git a/admin/src/layout/default/components/sidebar/menu.vue b/admin/src/layout/default/components/sidebar/menu.vue index 67c38922..a94dcc03 100644 --- a/admin/src/layout/default/components/sidebar/menu.vue +++ b/admin/src/layout/default/components/sidebar/menu.vue @@ -1,5 +1,9 @@ - + (() => route.meta?.activeMenu || route.path) const themeClass = computed(() => `theme-${props.theme}`) diff --git a/admin/src/router/index.ts b/admin/src/router/index.ts index 8227b944..69d3be48 100644 --- a/admin/src/router/index.ts +++ b/admin/src/router/index.ts @@ -86,6 +86,7 @@ export function findFirstValidRoute(routes: RouteRecordRaw[]): string | undefine } export function getRoutePath(perms: string) { + console.log(router.getRoutes().find((item) => item.meta?.perms == perms)?.path) return router.getRoutes().find((item) => item.meta?.perms == perms)?.path || '' } diff --git a/admin/src/styles/var.css b/admin/src/styles/var.css index dd4930af..e3e9e098 100644 --- a/admin/src/styles/var.css +++ b/admin/src/styles/var.css @@ -32,7 +32,7 @@ --el-border-color-dark: #d4d7de; --el-border-color-darker: #cdd0d6; --el-fill-color: #f0f2f5; - --el-fill-color-light: #f5f7fa; + --el-fill-color-light: #f8f8f8; --el-fill-color-lighter: #fafafa; --el-fill-color-extra-light: #fafcff; --el-fill-color-dark: #ebedf0; diff --git a/admin/src/views/article/lists/edit.vue b/admin/src/views/article/lists/edit.vue index e1259a88..7158bb35 100644 --- a/admin/src/views/article/lists/edit.vue +++ b/admin/src/views/article/lists/edit.vue @@ -33,9 +33,9 @@ - + - + @@ -101,7 +101,8 @@ const formData = reactive({ content: '', visit: 0, sort: 0, - isShow: '' + isShow: '', + summary: '' }) const formRef = shallowRef() diff --git a/admin/src/views/channel/h5.vue b/admin/src/views/channel/h5.vue index 841c98aa..a98d45f5 100644 --- a/admin/src/views/channel/h5.vue +++ b/admin/src/views/channel/h5.vue @@ -26,8 +26,8 @@ - https://b2cplus.likeshop.cn/mobile - 复制 + {{ formData.accessLink }} + 复制 @@ -39,13 +39,16 @@ diff --git a/admin/src/views/decoration/component/pages/menu.vue b/admin/src/views/decoration/component/pages/menu.vue new file mode 100644 index 00000000..1027e41b --- /dev/null +++ b/admin/src/views/decoration/component/pages/menu.vue @@ -0,0 +1,44 @@ + + + + {{ item.name }} + + + + + + diff --git a/admin/src/views/decoration/component/pages/preview.vue b/admin/src/views/decoration/component/pages/preview.vue new file mode 100644 index 00000000..56c51caf --- /dev/null +++ b/admin/src/views/decoration/component/pages/preview.vue @@ -0,0 +1,64 @@ + + + + + + + + + + + + + diff --git a/admin/src/views/decoration/component/widgets/banner/attr.vue b/admin/src/views/decoration/component/widgets/banner/attr.vue new file mode 100644 index 00000000..767f6ed0 --- /dev/null +++ b/admin/src/views/decoration/component/widgets/banner/attr.vue @@ -0,0 +1,73 @@ + + + + + + 开启 + 停用 + + + + + + + + + + + + + + + + + + + + + 添加图片 + + + + + + + diff --git a/admin/src/views/decoration/component/widgets/banner/content.vue b/admin/src/views/decoration/component/widgets/banner/content.vue new file mode 100644 index 00000000..16126863 --- /dev/null +++ b/admin/src/views/decoration/component/widgets/banner/content.vue @@ -0,0 +1,31 @@ + + + + + + + + + + diff --git a/admin/src/views/decoration/component/widgets/banner/options.ts b/admin/src/views/decoration/component/widgets/banner/options.ts new file mode 100644 index 00000000..e33d9211 --- /dev/null +++ b/admin/src/views/decoration/component/widgets/banner/options.ts @@ -0,0 +1,15 @@ +export default () => ({ + title: '首页轮播图', + name: 'banner', + content: { + enabled: 1, + data: [ + { + image: '', + name: '', + link: {} + } + ] + }, + styles: {} +}) diff --git a/admin/src/views/decoration/component/widgets/index.ts b/admin/src/views/decoration/component/widgets/index.ts new file mode 100644 index 00000000..e9043761 --- /dev/null +++ b/admin/src/views/decoration/component/widgets/index.ts @@ -0,0 +1,15 @@ +const widgets: Record = import.meta.glob('./**/*', { eager: true }) +interface Widget { + attr: any + content: any + options: any +} +const exportWidgets: Record = {} +Object.keys(widgets).forEach((key) => { + const widgetName = key.replace(/^\.\/([\w-]+).*/gi, '$1') + const widgetContent = key.replace(/(.*\/)*([^.]+).*/gi, '$2') as keyof Widget + exportWidgets[widgetName] = exportWidgets[widgetName] ?? {} + exportWidgets[widgetName][widgetContent] = widgets[key]?.default +}) + +export default exportWidgets diff --git a/admin/src/views/decoration/component/widgets/nav/attr.vue b/admin/src/views/decoration/component/widgets/nav/attr.vue new file mode 100644 index 00000000..f7b0cb3f --- /dev/null +++ b/admin/src/views/decoration/component/widgets/nav/attr.vue @@ -0,0 +1,77 @@ + + + + + + 开启 + 停用 + + + + + 最多可添加10个,建议图片尺寸:100px*100px + + + + + + + + + + + + + + + + + + + + + + + 添加菜单 + + + + + + + diff --git a/admin/src/views/decoration/component/widgets/nav/content.vue b/admin/src/views/decoration/component/widgets/nav/content.vue new file mode 100644 index 00000000..a9abc8ac --- /dev/null +++ b/admin/src/views/decoration/component/widgets/nav/content.vue @@ -0,0 +1,35 @@ + + + + + + {{ item.name }} + + + + + + + diff --git a/admin/src/views/decoration/component/widgets/nav/options.ts b/admin/src/views/decoration/component/widgets/nav/options.ts new file mode 100644 index 00000000..3e626feb --- /dev/null +++ b/admin/src/views/decoration/component/widgets/nav/options.ts @@ -0,0 +1,15 @@ +export default () => ({ + title: '导航菜单', + name: 'nav', + content: { + enabled: 1, + data: [ + { + image: '', + name: '导航', + link: {} + } + ] + }, + styles: {} +}) diff --git a/admin/src/views/decoration/component/widgets/search/attr.vue b/admin/src/views/decoration/component/widgets/search/attr.vue new file mode 100644 index 00000000..93f92786 --- /dev/null +++ b/admin/src/views/decoration/component/widgets/search/attr.vue @@ -0,0 +1,20 @@ + + + + + + diff --git a/admin/src/views/decoration/component/widgets/search/content.vue b/admin/src/views/decoration/component/widgets/search/content.vue new file mode 100644 index 00000000..db2a07a5 --- /dev/null +++ b/admin/src/views/decoration/component/widgets/search/content.vue @@ -0,0 +1,23 @@ + + + + + 请输入关键词搜索 + + + + + + diff --git a/admin/src/views/decoration/component/widgets/search/options.ts b/admin/src/views/decoration/component/widgets/search/options.ts new file mode 100644 index 00000000..5930b440 --- /dev/null +++ b/admin/src/views/decoration/component/widgets/search/options.ts @@ -0,0 +1,7 @@ +export default () => ({ + title: '搜索', + name: 'search', + disabled: true, + content: {}, + styles: {} +}) diff --git a/admin/src/views/decoration/pages/index.vue b/admin/src/views/decoration/pages/index.vue index e69de29b..d632c5e3 100644 --- a/admin/src/views/decoration/pages/index.vue +++ b/admin/src/views/decoration/pages/index.vue @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + 保存 + + + + + diff --git a/admin/src/views/message/short_letter/edit.vue b/admin/src/views/message/short_letter/edit.vue index 55dfa86c..c919d04e 100644 --- a/admin/src/views/message/short_letter/edit.vue +++ b/admin/src/views/message/short_letter/edit.vue @@ -18,9 +18,12 @@ - + + + + @@ -50,6 +53,7 @@ const formData = reactive({ alias: '', sign: '', appKey: '', + appId: '', secretKey: '', secretId: '', status: 0 @@ -63,6 +67,13 @@ const formRules = { trigger: 'blur' } ], + appId: [ + { + required: true, + message: '请输入APP_ID', + trigger: 'blur' + } + ], appKey: [ { required: true, diff --git a/admin/tailwind.config.js b/admin/tailwind.config.js index 36d70a3f..2d5b753f 100644 --- a/admin/tailwind.config.js +++ b/admin/tailwind.config.js @@ -30,6 +30,7 @@ module.exports = { 'br-extra-light': 'var(--el-border-color-extra-light)', 'br-dark': 'var( --el-border-color-dark)', fill: 'var(--el-fill-color)', + 'fill-light': 'var(--el-fill-color-light)', 'fill-lighter': 'var(--el-fill-color-lighter)', mask: 'var(--el-mask-color)' },