营销:适配商城装修组件【营销文章】

This commit is contained in:
owen
2023-11-25 15:53:06 +08:00
parent 92e164747a
commit 343b1fd5f6
3 changed files with 17 additions and 7 deletions
@@ -23,8 +23,6 @@
<s-video-block v-if="type === 'VideoPlayer'" :data="data" :styles="styles" />
<!-- 基础组件辅助线 -->
<s-line-block v-if="type === 'lineBlock'" :data="data" />
<!-- 图文组件富文字 -->
<s-richtext-block v-if="type === 'richtext'" :data="data" :styles="styles" />
<!-- 图文组件热区 -->
<s-hotzone-block v-if="type === 'hotzone'" :data="data" :styles="styles" />
@@ -43,6 +41,8 @@
<s-live-block v-if="type === 'mplive'" :data="data" :styles="styles" />
<!-- 营销组件优惠券 -->
<s-coupon-block v-if="type === 'CouponCard'" :data="data" :styles="styles" />
<!-- 营销组件文章 -->
<s-richtext-block v-if="type === 'PromotionArticle'" :data="data" :styles="styles" />
<!-- 会员组件会员卡片 -->
<s-user-card v-if="type === 'userCard'" />
@@ -15,7 +15,7 @@
</template>
<script setup>
import { reactive, onMounted } from 'vue';
import sheep from '@/sheep';
import ArticleApi from '@/sheep/api/promotion/article';
const props = defineProps({
data: {
type: Object,
@@ -30,9 +30,7 @@
content: '',
});
onMounted(async () => {
const { error, data } = await sheep.$api.data.richtext(props.data.id);
if (error === 0) {
state.content = data.content;
}
const { data } = await ArticleApi.getArticle(props.data.id);
state.content = data.content;
});
</script>