Commit 39ee4fab by 李嘉林

内嵌组件

parent 0c9baf4f
...@@ -20,6 +20,11 @@ export default { ...@@ -20,6 +20,11 @@ export default {
return requestPOST(`${process.env.OLSHOP_URL}/cms/get_shop_install_pages?homePageFlag=${params.homePageFlag || false}&shopMixId=${params.shopMixId}`, return requestPOST(`${process.env.OLSHOP_URL}/cms/get_shop_install_pages?homePageFlag=${params.homePageFlag || false}&shopMixId=${params.shopMixId}`,
); );
}, },
// 查单页面
singlePageInfo(params) {
return requestPOST(`${process.env.OLSHOP_URL}/cms/get_shop_page_by_id?id=${params.id}`,
);
},
checkShowCondition(params) { checkShowCondition(params) {
return requestPOST( return requestPOST(
`${process.env.OLSHOP_URL}/cms/check_show_condition`, `${process.env.OLSHOP_URL}/cms/check_show_condition`,
......
<template>
<!-- 内嵌组件 -->
<div class="embed-module">
<transverse-label :componentType="false" :datas="datas1"></transverse-label>
</div>
</template>
<script type="text/ecmascript-6">
import transverseLabel from '@/components/basicTool/transverse-label/index.vue'
import shop from "@/api/shop"
export default {
name: "embed-module",
props: {
datas: {
type: Object,
default: {}
},
render: {
type: Boolean,
default: false
}
},
data() {
return {
datas1: {
componentData: {
tabList: [
{
contentList: [],
}
]
}
}
}
},
components: {
transverseLabel
},
computed: {
microPageId() {
return this.datas.componentData.microPageId;
},
},
created() {
this.init();
},
mounted() { },
methods: {
init() {
shop.singlePageInfo({ id: this.microPageId }).then(res => {
if (res.data.code == 200) {
this.datas1.componentData.tabList[0].contentList = res.data.data.pageData?JSON.parse(res.data.data.pageData):[];
}
})
}
}
}
</script>
<style lang="scss" scoped>
.embed-module {}
</style>
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
'tabStyle' + tabStyle, 'tabStyle' + tabStyle,
stickyTop ? 'stickyTop' : '', stickyTop ? 'stickyTop' : '',
'tabLayout' + tabLayout, 'tabLayout' + tabLayout,
componentType ? '':'hideTab'
]" ]"
> >
...@@ -203,6 +204,10 @@ export default { ...@@ -203,6 +204,10 @@ export default {
type: Number, type: Number,
default: 0, default: 0,
}, },
componentType: {
type: Boolean,
default: true,
},
}, },
data() { data() {
return { return {
...@@ -788,5 +793,11 @@ $wrapWidth: 50px; ...@@ -788,5 +793,11 @@ $wrapWidth: 50px;
background: var(--select-tab-underline-color) !important; background: var(--select-tab-underline-color) !important;
} }
} }
.hideTab{
.van-tabs__wrap{
display: none !important;
}
}
} }
</style> </style>
...@@ -116,6 +116,9 @@ ...@@ -116,6 +116,9 @@
<div v-if="item.componentCode == 'brand-list' && item.componentInfo.visible == 1"> <div v-if="item.componentCode == 'brand-list' && item.componentInfo.visible == 1">
<brandList :datas="item"></brandList> <brandList :datas="item"></brandList>
</div> </div>
<div v-if="item.componentCode == 'embed-module' && item.componentInfo.visible == 1">
<embedModule :datas="item"></embedModule>
</div>
</div> </div>
<bottomCont v-if="showbottomCont"></bottomCont> <bottomCont v-if="showbottomCont"></bottomCont>
<template> <template>
...@@ -167,6 +170,7 @@ import partition from '@/components/basicTool/partition/index.vue' ...@@ -167,6 +170,7 @@ import partition from '@/components/basicTool/partition/index.vue'
import shopPopup from '@/components/basicTool/shop-popup/index.vue' import shopPopup from '@/components/basicTool/shop-popup/index.vue'
import woTimeout from '@/components/basicTool/wo-timeout/index.vue' import woTimeout from '@/components/basicTool/wo-timeout/index.vue'
import transverseLabel from '@/components/basicTool/transverse-label/index.vue' import transverseLabel from '@/components/basicTool/transverse-label/index.vue'
import embedModule from '@/components/basicTool/embed-module/index.vue'
import information from '@/components/content/information/index.vue' import information from '@/components/content/information/index.vue'
import text from '@/components/content/text' import text from '@/components/content/text'
import imgText from '@/components/content/imgText' import imgText from '@/components/content/imgText'
...@@ -246,6 +250,7 @@ export default { ...@@ -246,6 +250,7 @@ export default {
coupon, coupon,
integralTurntable, integralTurntable,
transverseLabel, transverseLabel,
embedModule,
information, information,
spellGroup, spellGroup,
couponPopup, couponPopup,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment