博客多门店多商户数据迁移
parent
3224b830df
commit
892b3861b5
|
|
@ -160,7 +160,7 @@
|
|||
<script>
|
||||
const app = getApp();
|
||||
var tabbar_pages = app.globalData.app_tabbar_pages();
|
||||
import { common_styles_computer, common_img_computer, gradient_computer } from '@/common/js/common/common.js';
|
||||
import { common_styles_computer, common_img_computer, gradient_computer, isEmpty } from '@/common/js/common/common.js';
|
||||
export default {
|
||||
props: {
|
||||
propValue: {
|
||||
|
|
@ -237,11 +237,24 @@
|
|||
},
|
||||
false
|
||||
);
|
||||
// 判断是自动还是手动, 取对应的数据
|
||||
let new_list = [];
|
||||
// 指定商品并且指定商品数组不为空
|
||||
if (!isEmpty(new_content.data_list) && new_content.data_type == '0') {
|
||||
new_list = new_content.data_list.map((item) => ({
|
||||
...item.data,
|
||||
name: !isEmpty(item.new_title) ? item.new_title : item.data.name,
|
||||
new_cover: item.new_cover,
|
||||
}));
|
||||
} else if (!isEmpty(new_content.data_auto_list) && new_content.data_type == '1') {
|
||||
// 筛选商品并且筛选商品数组不为空
|
||||
new_list = new_content.data_auto_list;
|
||||
}
|
||||
this.setData({
|
||||
content_title: new_content.title || '',
|
||||
content_desc: new_content.desc || '',
|
||||
// 判断是自动还是手动
|
||||
data_list: new_content.data_type == '1' ? new_content.data_list : new_content.data_auto_list,
|
||||
data_list: new_list,
|
||||
theme: temp_theme,
|
||||
theme_style: {
|
||||
price_color: new_style.price_color,
|
||||
|
|
|
|||
|
|
@ -34,9 +34,13 @@
|
|||
<componentDiyCustom v-else-if="item.key == 'custom'" :propOuterContainerPadding="outer_container_padding" :propIndex="get_prop_index(item)" :propKey="item.id + index" :propValue="item.com_data"></componentDiyCustom>
|
||||
<componentDiyImgMagic v-else-if="item.key == 'img-magic'" :propOuterContainerPadding="outer_container_padding" :propIndex="get_prop_index(item)" :propKey="item.id + index" :propValue="item.com_data"></componentDiyImgMagic>
|
||||
<componentDiyHotZone v-else-if="item.key == 'hot-zone'" :propIndex="get_prop_index(item)" :propKey="item.id + index" :propValue="item.com_data"></componentDiyHotZone>
|
||||
<componentDiySeckill v-else-if="item.key == 'seckill'" :propOuterContainerPadding="outer_container_padding" :propIndex="get_prop_index(item)" :propKey="item.id + index" :propValue="item.com_data"></componentDiySeckill>
|
||||
<!-- 插件 -->
|
||||
<componentDiySeckill v-else-if="item.key == 'seckill'" :propOuterContainerPadding="outer_container_padding" :propIndex="get_prop_index(item)" :propKey="item.id + index" :propValue="item.com_data"></componentDiySeckill>
|
||||
<componentDiyCoupon v-else-if="item.key == 'coupon'" :propIndex="get_prop_index(item)" :propKey="item.id + index" :propValue="item.com_data"></componentDiyCoupon>
|
||||
<componentDiyRealstore v-else-if="item.key == 'realstore'" :propIndex="get_prop_index(item)" :propKey="item.id + index" :propValue="item.com_data"></componentDiyRealstore>
|
||||
<componentDiyBlogList v-else-if="item.key == 'blog'" :propIndex="get_prop_index(item)" :propKey="item.id + index" :propValue="item.com_data"></componentDiyBlogList>
|
||||
<componentDiyBlogTabs v-else-if="item.key == 'blog-tabs'" :propIndex="get_prop_index(item)" :propKey="item.id + index" :propValue="item.com_data" :propTop="get_diy_prop_top(item.com_data)" :propScrollTop="scroll_top" :propCustomNavHeight="get_diy_custom_nav_height(item.com_data)" :propIsTabsUseSafeDistance="getPropIsTabsUseSafeDistance"></componentDiyBlogTabs>
|
||||
<componentDiyShop v-else-if="item.key == 'shop'" :propIndex="get_prop_index(item)" :propKey="item.id + index" :propValue="item.com_data"></componentDiyShop>
|
||||
<!-- 工具组件 -->
|
||||
<componentDiyFloatWindow v-else-if="item.key == 'float-window'" :propKey="item.id + index" :propValue="item.com_data"></componentDiyFloatWindow>
|
||||
<componentDiyTitle v-else-if="item.key == 'title'" :propKey="item.id + index" :propIndex="get_prop_index(item)" :propValue="item.com_data"></componentDiyTitle>
|
||||
|
|
@ -53,7 +57,7 @@
|
|||
</template>
|
||||
<template v-else>
|
||||
<!-- 商品九宫格列表 -->
|
||||
<view v-if="goods_list.length > 0" class="padding-horizontal-main padding-top-main oh">
|
||||
<view v-if="goods_list.length > 0" class="padding-top-main oh" :style="good_padding">
|
||||
<component-goods-list :propData="{ style_type: goods_show_type_value, goods_list: goods_list, random: random_value }" :propLabel="plugins_label_data" :propCurrencySymbol="currency_symbol"></component-goods-list>
|
||||
</view>
|
||||
<view v-else class="pr">
|
||||
|
|
@ -107,6 +111,8 @@
|
|||
import componentDiyVideo from '@/components/diy/video';
|
||||
import componentDiyArticleList from '@/components/diy/article-list';
|
||||
import componentDiyArticleTabs from '@/components/diy/article-tabs';
|
||||
import componentDiyBlogList from '@/components/diy/blog-list';
|
||||
import componentDiyBlogTabs from '@/components/diy/blog-tabs';
|
||||
import componentDiyHotZone from '@/components/diy/hot-zone';
|
||||
import componentDiyCoupon from '@/components/diy/coupon';
|
||||
import componentDiyFloatWindow from '@/components/diy/float-window';
|
||||
|
|
@ -121,6 +127,8 @@
|
|||
import componentDiyCustom from '@/components/diy/custom';
|
||||
import componentDiyImgMagic from '@/components/diy/img-magic';
|
||||
import componentDiySeckill from '@/components/diy/seckill';
|
||||
import componentDiyRealstore from '@/components/diy/realstore';
|
||||
import componentDiyShop from '@/components/diy/shop';
|
||||
import componentDiyTabsCarousel from '@/components/diy/tabs-carousel';
|
||||
import componentDataTabs from '@/components/diy/data-tabs';
|
||||
import componentGoodsList from '@/components/goods-list/goods-list';
|
||||
|
|
@ -128,6 +136,7 @@
|
|||
import componentBottomLine from '@/components/bottom-line/bottom-line';
|
||||
import componentGoodsBuy from '@/components/goods-buy/goods-buy';
|
||||
import componentSearch from '@/components/search/search';
|
||||
|
||||
var system = app.globalData.get_system_info(null, null, true);
|
||||
var sys_width = app.globalData.window_width_handle(system.windowWidth);
|
||||
|
||||
|
|
@ -163,6 +172,8 @@
|
|||
componentDiyVideo,
|
||||
componentDiyArticleList,
|
||||
componentDiyArticleTabs,
|
||||
componentDiyBlogList,
|
||||
componentDiyBlogTabs,
|
||||
componentDiyHotZone,
|
||||
componentDiyCoupon,
|
||||
componentDiyAuxiliaryLine,
|
||||
|
|
@ -177,6 +188,8 @@
|
|||
componentDiyCustom,
|
||||
componentDiyImgMagic,
|
||||
componentDiySeckill,
|
||||
componentDiyRealstore,
|
||||
componentDiyShop,
|
||||
componentDiyTabsCarousel,
|
||||
componentDataTabs,
|
||||
componentGoodsList,
|
||||
|
|
@ -254,6 +267,7 @@
|
|||
is_search_alone_row: false,
|
||||
data_alone_row_space: 0,
|
||||
content_padding: '',
|
||||
good_padding: '',
|
||||
outer_container_padding: 0,
|
||||
|
||||
// 滚动延迟器
|
||||
|
|
@ -435,7 +449,8 @@
|
|||
page_style: common_styles_computer(header_style.common_style),
|
||||
page_img_style: background_computer(header_style.common_style),
|
||||
// 内间距
|
||||
content_padding: `padding: 0px ${padding_right}px 0px ${padding_left}px;` + 'box-sizing:border-box;',
|
||||
content_padding: `padding: 0px ${padding_right * 2 }rpx 0px ${padding_left * 2}rpx;` + 'box-sizing:border-box;',
|
||||
good_padding: padding_right == 0 && padding_left == 0 ? 'padding-left: 24rpx;padding-right: 24rpx;' : `padding: 0px ${ padding_right == 0 ? padding_left * 2 : 0 }rpx 0px ${ padding_left == 0 ? padding_right * 2 : 0 }rpx;`,
|
||||
outer_container_padding: padding_right + padding_left,
|
||||
// 判断顶部导航是否置顶
|
||||
is_header_top: parseInt(header_style.up_slide_display) == 1 ? true : false,
|
||||
|
|
|
|||
Loading…
Reference in New Issue