2023-12-19 15:10:50 +00:00
|
|
|
|
<!-- 装修营销组件:营销文章 -->
|
2022-11-22 07:45:36 +00:00
|
|
|
|
<template>
|
|
|
|
|
<view
|
|
|
|
|
:style="[
|
|
|
|
|
{
|
|
|
|
|
marginLeft: styles.marginLeft + 'px',
|
|
|
|
|
marginRight: styles.marginRight + 'px',
|
|
|
|
|
marginBottom: styles.marginBottom + 'px',
|
|
|
|
|
marginTop: styles.marginTop + 'px',
|
|
|
|
|
padding: styles.padding + 'px',
|
|
|
|
|
},
|
|
|
|
|
]"
|
|
|
|
|
>
|
2023-01-29 17:18:48 +00:00
|
|
|
|
<mp-html class="richtext" :content="state.content"></mp-html>
|
2022-11-22 07:45:36 +00:00
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
<script setup>
|
|
|
|
|
import { reactive, onMounted } from 'vue';
|
2023-11-25 07:53:06 +00:00
|
|
|
|
import ArticleApi from '@/sheep/api/promotion/article';
|
2023-12-19 15:10:50 +00:00
|
|
|
|
|
2022-11-22 07:45:36 +00:00
|
|
|
|
const props = defineProps({
|
|
|
|
|
data: {
|
|
|
|
|
type: Object,
|
|
|
|
|
default: {},
|
|
|
|
|
},
|
|
|
|
|
styles: {
|
|
|
|
|
type: Object,
|
|
|
|
|
default() {},
|
|
|
|
|
},
|
|
|
|
|
});
|
2023-12-19 15:10:50 +00:00
|
|
|
|
|
2022-11-22 07:45:36 +00:00
|
|
|
|
const state = reactive({
|
|
|
|
|
content: '',
|
|
|
|
|
});
|
2023-12-19 15:10:50 +00:00
|
|
|
|
|
2022-11-22 07:45:36 +00:00
|
|
|
|
onMounted(async () => {
|
2023-11-25 07:53:06 +00:00
|
|
|
|
const { data } = await ArticleApi.getArticle(props.data.id);
|
|
|
|
|
state.content = data.content;
|
2022-11-22 07:45:36 +00:00
|
|
|
|
});
|
|
|
|
|
</script>
|