diff --git a/src/api/mall/promotion/article/index.ts b/src/api/mall/promotion/article/index.ts index 824958ad..9184c7af 100644 --- a/src/api/mall/promotion/article/index.ts +++ b/src/api/mall/promotion/article/index.ts @@ -17,7 +17,7 @@ export interface ArticleVO { } // 查询文章管理列表 -export const getArticlePage = async (params) => { +export const getArticlePage = async (params: any) => { return await request.get({ url: `/promotion/article/page`, params }) } diff --git a/src/components/DiyEditor/components/mobile/ProductList/config.ts b/src/components/DiyEditor/components/mobile/ProductList/config.ts index 436de405..1f168323 100644 --- a/src/components/DiyEditor/components/mobile/ProductList/config.ts +++ b/src/components/DiyEditor/components/mobile/ProductList/config.ts @@ -1,6 +1,6 @@ import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' -/** 商品卡片属性 */ +/** 商品栏属性 */ export interface ProductListProperty { // 布局类型:双列 | 三列 | 水平滑动 layoutType: 'twoCol' | 'threeCol' | 'horizSwiper' diff --git a/src/components/DiyEditor/components/mobile/ProductList/index.vue b/src/components/DiyEditor/components/mobile/ProductList/index.vue index 8a35628e..3ba63677 100644 --- a/src/components/DiyEditor/components/mobile/ProductList/index.vue +++ b/src/components/DiyEditor/components/mobile/ProductList/index.vue @@ -66,7 +66,7 @@ import { ProductListProperty } from './config' import * as ProductSpuApi from '@/api/mall/product/spu' -/** 商品卡片 */ +/** 商品栏 */ defineOptions({ name: 'ProductList' }) // 定义属性 const props = defineProps<{ property: ProductListProperty }>() diff --git a/src/components/DiyEditor/components/mobile/ProductList/property.vue b/src/components/DiyEditor/components/mobile/ProductList/property.vue index 872affc3..e9cf7c01 100644 --- a/src/components/DiyEditor/components/mobile/ProductList/property.vue +++ b/src/components/DiyEditor/components/mobile/ProductList/property.vue @@ -88,7 +88,7 @@ import { ProductListProperty } from './config' import { usePropertyForm } from '@/components/DiyEditor/util' import SpuShowcase from '@/views/mall/product/spu/components/SpuShowcase.vue' -// 商品卡片属性面板 +// 商品栏属性面板 defineOptions({ name: 'ProductListProperty' }) const props = defineProps<{ modelValue: ProductListProperty }>() diff --git a/src/components/DiyEditor/components/mobile/PromotionArticle/config.ts b/src/components/DiyEditor/components/mobile/PromotionArticle/config.ts new file mode 100644 index 00000000..c6270c2a --- /dev/null +++ b/src/components/DiyEditor/components/mobile/PromotionArticle/config.ts @@ -0,0 +1,25 @@ +import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' + +/** 营销文章属性 */ +export interface PromotionArticleProperty { + // 文章编号 + id: number + // 组件样式 + style: ComponentStyle +} + +// 定义组件 +export const component = { + id: 'PromotionArticle', + name: '营销文章', + icon: 'ph:article-medium', + property: { + style: { + bgType: 'color', + bgColor: '', + marginLeft: 8, + marginRight: 8, + marginBottom: 8 + } as ComponentStyle + } +} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/PromotionArticle/index.vue b/src/components/DiyEditor/components/mobile/PromotionArticle/index.vue new file mode 100644 index 00000000..cca3635d --- /dev/null +++ b/src/components/DiyEditor/components/mobile/PromotionArticle/index.vue @@ -0,0 +1,27 @@ + + + + diff --git a/src/components/DiyEditor/components/mobile/PromotionArticle/property.vue b/src/components/DiyEditor/components/mobile/PromotionArticle/property.vue new file mode 100644 index 00000000..c3bcb21b --- /dev/null +++ b/src/components/DiyEditor/components/mobile/PromotionArticle/property.vue @@ -0,0 +1,56 @@ + + + + + diff --git a/src/components/DiyEditor/util.ts b/src/components/DiyEditor/util.ts index a8d0e095..2eb10f92 100644 --- a/src/components/DiyEditor/util.ts +++ b/src/components/DiyEditor/util.ts @@ -116,6 +116,6 @@ export const PAGE_LIBS = [ { name: '营销组件', extended: true, - components: ['CombinationCard', 'SeckillCard', 'PointCard', 'CouponCard'] + components: ['CombinationCard', 'SeckillCard', 'PointCard', 'CouponCard', 'PromotionArticle'] } ] as DiyComponentLibrary[]