Merge remote-tracking branch 'origin/dev-yxl' into dev-sws
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 9.0 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
|
@ -255,6 +255,7 @@ const get_products = () => {
|
|||
// 获取商品列表
|
||||
ShopAPI.getShopLists(params).then((res: any) => {
|
||||
form.value.data_auto_list = res.data;
|
||||
console.log(form.value);
|
||||
if (!isEmpty(res.data)) {
|
||||
list.value = res.data;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -32,7 +32,8 @@ watch(tabs_list.value, (val) => {
|
|||
new_data.content.order_by_type = new_data.content.tabs_list[0].order_by_type;
|
||||
new_data.content.order_by_rule = new_data.content.tabs_list[0].order_by_rule;
|
||||
new_data.content.data_list = new_data.content.tabs_list[0].data_list;
|
||||
|
||||
new_data.content.data_auto_list = new_data.content.tabs_list[0].data_auto_list;
|
||||
|
||||
tabs_list.value = new_data;
|
||||
// 公共样式
|
||||
style_container.value += common_styles_computer(new_style.common_style);
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<img class="img" :style="`Filter: brightness(${new_style.function_buttons_type == 'black' ? 0 : 100})`" src="@/assets/images/layout/main/main-top.png" />
|
||||
</div>
|
||||
<div class="model-head tc re mlr-12 mt-6">
|
||||
<div v-if="['1', '2', '3'].includes(form.theme)" class="flex align-c jc-c h gap-16" :style="[{ 'justify-content': form?.indicator_location || 'center', 'padding-right': form.indicator_location == 'flex-end' || form.theme == 3 ? '95px' : '0' }, text_style]">
|
||||
<div v-if="['1', '2', '3'].includes(form.theme)" class="flex align-c jc-c h gap-16" :style="[{ 'justify-content': form?.indicator_location || 'center' }, text_style]">
|
||||
<template v-if="['2', '3'].includes(form.theme)">
|
||||
<div class="logo-outer-style"><image-empty v-model="form.logo[0]" class="logo-style" error-img-style="width:2rem;height:2rem;"></image-empty></div>
|
||||
</template>
|
||||
|
|
@ -22,14 +22,11 @@
|
|||
><icon v-if="form.is_arrows_show == '1'" name="arrow-right" size="12" color="0"></icon>
|
||||
</div>
|
||||
<template v-if="['5'].includes(form.theme)">
|
||||
<div class="flex-1" style="padding-right: 95px">
|
||||
<div class="flex-1">
|
||||
<model-search :value="pageData.com_data" :is-page-settings="true"></model-search>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div class="model-head-icon">
|
||||
<img class="function-icon" :src="url_computer(new_style.function_buttons_type == 'black' ? 'function-icon-black' : 'function-icon-white')" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -65,10 +62,7 @@ const roll_style = computed(() => {
|
|||
}
|
||||
return style;
|
||||
});
|
||||
const url_computer = (name: string) => {
|
||||
const new_url = ref(new URL(`../../assets/images/layout/main/${name}.png`, import.meta.url).href).value;
|
||||
return new_url;
|
||||
};
|
||||
|
||||
const text_style = computed(() => `font-weight:${new_style.value.header_background_title_typeface}; font-size: ${new_style.value.header_background_title_size}px; color: ${new_style.value.header_background_title_color};`);
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
|||
|
|
@ -56,11 +56,36 @@ const default_data = {
|
|||
}
|
||||
const default_config = {
|
||||
style: {
|
||||
theme_1: {},
|
||||
theme_2: {},
|
||||
theme_3: {},
|
||||
theme_4: {},
|
||||
theme_5: {},
|
||||
theme_1: {
|
||||
content: {
|
||||
indicator_location: 'center',
|
||||
},
|
||||
style: {}
|
||||
},
|
||||
theme_2: {
|
||||
content: {
|
||||
indicator_location: 'flex-start',
|
||||
},
|
||||
style: {}
|
||||
},
|
||||
theme_3: {
|
||||
content: {
|
||||
indicator_location: 'flex-start',
|
||||
},
|
||||
style: {}
|
||||
},
|
||||
theme_4: {
|
||||
content: {
|
||||
indicator_location: 'flex-start',
|
||||
},
|
||||
style: {}
|
||||
},
|
||||
theme_5: {
|
||||
content: {
|
||||
indicator_location: 'flex-start',
|
||||
},
|
||||
style: {}
|
||||
},
|
||||
},
|
||||
};
|
||||
const form = ref(props.value);
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ interface articleTabsList {
|
|||
order_by_type: string;
|
||||
order_by_rule: string;
|
||||
data_list: [];
|
||||
data_auto_list: [];
|
||||
}
|
||||
interface DefaultProductList {
|
||||
content: {
|
||||
|
|
@ -75,10 +76,10 @@ const defaultProductList: DefaultProductList = {
|
|||
theme: '0',
|
||||
carousel_col: 3,
|
||||
tabs_list: [
|
||||
{ id: '1', title: '热门推荐', img: [], desc: '简介', data_type: '0', category_ids: [], brand_ids: [], data_ids: [], number: 4, order_by_type: '0', order_by_rule: '0', data_list: [] },
|
||||
{ id: '2', title: '测试一', img: [], desc: '简介', data_type: '0', category_ids: [], brand_ids: [], data_ids: [], number: 4, order_by_type: '0', order_by_rule: '0', data_list: [] },
|
||||
{ id: '3', title: '测试二', img: [], desc: '简介', data_type: '0', category_ids: [], brand_ids: [], data_ids: [], number: 4, order_by_type: '0', order_by_rule: '0', data_list: [] },
|
||||
{ id: '4', title: '测试三', img: [], desc: '简介', data_type: '0', category_ids: [], brand_ids: [], data_ids: [], number: 4, order_by_type: '0', order_by_rule: '0', data_list: [] },
|
||||
{ id: '1', title: '热门推荐', img: [], desc: '简介', data_type: '0', category_ids: [], brand_ids: [], data_ids: [], number: 4, order_by_type: '0', order_by_rule: '0', data_list: [], data_auto_list: [] },
|
||||
{ id: '2', title: '测试一', img: [], desc: '简介', data_type: '0', category_ids: [], brand_ids: [], data_ids: [], number: 4, order_by_type: '0', order_by_rule: '0', data_list: [], data_auto_list: [] },
|
||||
{ id: '3', title: '测试二', img: [], desc: '简介', data_type: '0', category_ids: [], brand_ids: [], data_ids: [], number: 4, order_by_type: '0', order_by_rule: '0', data_list: [], data_auto_list: [] },
|
||||
{ id: '4', title: '测试三', img: [], desc: '简介', data_type: '0', category_ids: [], brand_ids: [], data_ids: [], number: 4, order_by_type: '0', order_by_rule: '0', data_list: [], data_auto_list: [] },
|
||||
],
|
||||
is_show: ['title', 'plugins_view_icon', 'price', 'sales_count', 'original_price'],
|
||||
is_shop_show: '1',
|
||||
|
|
|
|||
|
|
@ -187,18 +187,18 @@ const save_formmat_form_data = (data: diy_data_item, close: boolean = false, is_
|
|||
const clone_form = cloneDeep(data);
|
||||
clone_form.header.show_tabs = '1';
|
||||
clone_form.footer.show_tabs = '0';
|
||||
// const new_array = ['goods-list', 'goods-tabs', 'article-list', 'article-tabs', 'coupon'];
|
||||
const new_array = ['goods-list', 'goods-tabs', 'article-list', 'article-tabs', 'coupon'];
|
||||
clone_form.diy_data = clone_form.diy_data.map((item: any) => {
|
||||
// if (new_array.includes(item.key)) {
|
||||
// item.com_data.content.data_ids = item.com_data.content.data_list.map((item: any) => item.data.id).join(',') || '';
|
||||
// item.com_data.content.data_list = [];
|
||||
// item.com_data.content.data_auto_list = [];
|
||||
// } else if (item.key == 'data-magic') {
|
||||
// item.com_data.content.data_magic_list.map((item1: any) => {
|
||||
// item1.goods_ids = item.goods_list.map((item2: any) => item2.data.id).join(',') || '';
|
||||
// item1.goods_list = [];
|
||||
// });
|
||||
// }
|
||||
if (new_array.includes(item.key)) {
|
||||
item.com_data.content.data_ids = item.com_data.content.data_list.map((item: any) => item.data.id).join(',') || '';
|
||||
// item.com_data.content.data_list = [];
|
||||
// item.com_data.content.data_auto_list = [];
|
||||
} else if (item.key == 'data-magic') {
|
||||
item.com_data.content.data_magic_list.map((item1: any) => {
|
||||
item1.goods_ids = item.goods_list.map((item2: any) => item2.data.id).join(',') || '';
|
||||
// item1.goods_list = [];
|
||||
});
|
||||
}
|
||||
return {
|
||||
...item,
|
||||
show_tabs: '0',
|
||||
|
|
|
|||