修改显示
|
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) => {
|
ShopAPI.getShopLists(params).then((res: any) => {
|
||||||
form.value.data_auto_list = res.data;
|
form.value.data_auto_list = res.data;
|
||||||
|
console.log(form.value);
|
||||||
if (!isEmpty(res.data)) {
|
if (!isEmpty(res.data)) {
|
||||||
list.value = res.data;
|
list.value = res.data;
|
||||||
} else {
|
} 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_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.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_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;
|
tabs_list.value = new_data;
|
||||||
// 公共样式
|
// 公共样式
|
||||||
style_container.value += common_styles_computer(new_style.common_style);
|
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" />
|
<img class="img" :style="`Filter: brightness(${new_style.function_buttons_type == 'black' ? 0 : 100})`" src="@/assets/images/layout/main/main-top.png" />
|
||||||
</div>
|
</div>
|
||||||
<div class="model-head tc re mlr-12 mt-6">
|
<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)">
|
<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>
|
<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>
|
</template>
|
||||||
|
|
@ -22,14 +22,11 @@
|
||||||
><icon v-if="form.is_arrows_show == '1'" name="arrow-right" size="12" color="0"></icon>
|
><icon v-if="form.is_arrows_show == '1'" name="arrow-right" size="12" color="0"></icon>
|
||||||
</div>
|
</div>
|
||||||
<template v-if="['5'].includes(form.theme)">
|
<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>
|
<model-search :value="pageData.com_data" :is-page-settings="true"></model-search>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -65,10 +62,7 @@ const roll_style = computed(() => {
|
||||||
}
|
}
|
||||||
return style;
|
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};`);
|
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>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
||||||
|
|
@ -56,11 +56,36 @@ const default_data = {
|
||||||
}
|
}
|
||||||
const default_config = {
|
const default_config = {
|
||||||
style: {
|
style: {
|
||||||
theme_1: {},
|
theme_1: {
|
||||||
theme_2: {},
|
content: {
|
||||||
theme_3: {},
|
indicator_location: 'center',
|
||||||
theme_4: {},
|
},
|
||||||
theme_5: {},
|
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);
|
const form = ref(props.value);
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ interface articleTabsList {
|
||||||
order_by_type: string;
|
order_by_type: string;
|
||||||
order_by_rule: string;
|
order_by_rule: string;
|
||||||
data_list: [];
|
data_list: [];
|
||||||
|
data_auto_list: [];
|
||||||
}
|
}
|
||||||
interface DefaultProductList {
|
interface DefaultProductList {
|
||||||
content: {
|
content: {
|
||||||
|
|
@ -75,10 +76,10 @@ const defaultProductList: DefaultProductList = {
|
||||||
theme: '0',
|
theme: '0',
|
||||||
carousel_col: 3,
|
carousel_col: 3,
|
||||||
tabs_list: [
|
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: '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: [] },
|
{ 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: [] },
|
{ 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: [] },
|
{ 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_show: ['title', 'plugins_view_icon', 'price', 'sales_count', 'original_price'],
|
||||||
is_shop_show: '1',
|
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);
|
const clone_form = cloneDeep(data);
|
||||||
clone_form.header.show_tabs = '1';
|
clone_form.header.show_tabs = '1';
|
||||||
clone_form.footer.show_tabs = '0';
|
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) => {
|
clone_form.diy_data = clone_form.diy_data.map((item: any) => {
|
||||||
// if (new_array.includes(item.key)) {
|
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_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_list = [];
|
||||||
// item.com_data.content.data_auto_list = [];
|
// item.com_data.content.data_auto_list = [];
|
||||||
// } else if (item.key == 'data-magic') {
|
} else if (item.key == 'data-magic') {
|
||||||
// item.com_data.content.data_magic_list.map((item1: any) => {
|
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_ids = item.goods_list.map((item2: any) => item2.data.id).join(',') || '';
|
||||||
// item1.goods_list = [];
|
// item1.goods_list = [];
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
show_tabs: '0',
|
show_tabs: '0',
|
||||||
|
|
|
||||||