修改参数传递

master
于肖磊 2024-09-26 10:06:20 +08:00
parent e9b03b307f
commit 8edcfe4ecb
15 changed files with 35 additions and 72 deletions

View File

@ -1,9 +1,9 @@
<template>
<!-- 文章列表 -->
<view class="overflow-unset" :style="style_container">
<componentDiyModulesTabsView :propValue="article_tabs" :is-top="top_up == '1'" @tabs-click="tabs_click_event"></componentDiyModulesTabsView>
<componentDiyModulesTabsView :propValue="article_tabs" :isTop="top_up == '1'" @tabs-click="tabs_click_event"></componentDiyModulesTabsView>
<view class="padding-top oh">
<componentDiyArticleList :key="key" :propValue="article_tabs" :is-common-style="false"></componentDiyArticleList>
<componentDiyArticleList :key="key" :propValue="article_tabs" :isCommonStyle="false"></componentDiyArticleList>
</view>
</view>
</template>

View File

@ -5,7 +5,6 @@
</template>
<script>
const app = getApp();
import {
common_styles_computer
} from '@/common/js/common/common.js';

View File

@ -4,11 +4,11 @@
<block v-if="form.carousel_type == 'card'">
<swiper-item v-for="(item, index) in new_list" :key="index" class="flex-row align-c" :data-value="item.carousel_link.page" @tap="url_open">
<view class="swiper-item" :style="img_style" :class="['scale-defalt', { 'scale-1': animationData === index }]">
<image-empty :image-src="item.carousel_img[0]" class="img" :style="img_style" :img_fit="img_fit" error-style="width: 100rpx;height: 100rpx;"></image-empty>
<image-empty :imageSrc="item.carousel_img[0]" class="img" :style="img_style" :img_fit="img_fit" errorStyle="width: 100rpx;height: 100rpx;"></image-empty>
</view>
<view v-if="new_style.video_is_show == '1' && item.carousel_video.length > 0" :class="{ 'x-middle': new_style.video_location == 'center', 'right-0': new_style.video_location == 'flex-end' }" class="video-class flex-row pa gap-10 align-c oh" :style="video_style" @tap.stop="video_play(item.carousel_video)">
<block v-if="new_style.video_type == 'img'">
<image-empty :image-src="new_style.video_img[0]" class="video_img" img_fit="aspectFill" error-style="width: 28rpx;height: 28rpx;"></image-empty>
<image-empty :imageSrc="new_style.video_img[0]" class="video_img" img_fit="aspectFill" errorStyle="width: 28rpx;height: 28rpx;"></image-empty>
</block>
<block v-else>
<iconfont :name="!isEmpty(new_style.video_icon_class) ? 'icon-' + new_style.video_icon_class : 'icon-bofang'" size="'28rpx'" :color="new_style.video_icon_color"></iconfont>
@ -20,11 +20,11 @@
<block v-else>
<swiper-item v-for="(item, index) in new_list" :key="index" :style="{ 'padding-right': new_style.image_spacing * 2 + 'rpx' }">
<view class="item-image flex-row jc-c align-c wh-auto ht-auto pr" :style="img_style">
<image-empty :image-src="item.carousel_img[0]" class="img" :style="img_style" :img_fit="img_fit" error-style="width: 100rpx;height: 100rpx;"></image-empty>
<image-empty :imageSrc="item.carousel_img[0]" class="img" :style="img_style" :img_fit="img_fit" errorStyle="width: 100rpx;height: 100rpx;"></image-empty>
</view>
<view v-if="new_style.video_is_show == '1' && item.carousel_video.length > 0" :class="{ 'x-middle': new_style.video_location == 'center', 'right-0': new_style.video_location == 'flex-end' }" class="video-class flex-row pa gap-10 align-c oh" :style="video_style" @tap.stop="video_play(item.carousel_video)">
<block v-if="new_style.video_type == 'img'">
<image-empty :image-src="new_style.video_img[0]" class="video_img" img_fit="aspectFill" error-style="width: 28rpx;height: 28rpx;"></image-empty>
<image-empty :imageSrc="new_style.video_img[0]" class="video_img" img_fit="aspectFill" errorStyle="width: 28rpx;height: 28rpx;"></image-empty>
</block>
<block v-else>
<iconfont :name="!isEmpty(new_style.video_icon_class) ? 'icon-' + new_style.video_icon_class : 'icon-bofang'" size="'28rpx'" :color="new_style.video_icon_color"></iconfont>

View File

@ -84,42 +84,6 @@
return {
form: {},
new_style: {},
//
default_list: {
title: '测试商品标题',
min_original_price: '41.2',
show_original_price_symbol: '¥',
show_original_price_unit: '/ 台',
min_price: '51',
show_price_symbol: '¥',
show_price_unit: '/ 台',
sales_count: '1000',
images: '',
new_cover: [],
plugins_view_icon_data: [
{
name: '满减活动',
bg_color: '#EA3323',
br_color: '',
color: '#fff',
url: '',
},
{
name: '包邮',
bg_color: '',
br_color: '#EA3323',
color: '#EA3323',
url: '',
},
{
name: '领劵',
bg_color: '',
br_color: '#EA9223',
color: '#EA9223',
url: '',
},
],
},
outer_spacing: '',
//
spacing: '',
@ -213,7 +177,7 @@
}
return nav_list;
} else {
return [{ split_list: Array(num).fill(this.default_list)}];
return [];
}
},
background_style(item) {

View File

@ -6,7 +6,7 @@
<view class="ring" :style="color"></view>
<view class="ring" :style="color"></view>
</block>
<image-empty :image-src="form.button_img[0]" class="img" :type_style="color" img_fit="aspectFill" error-style="width: 60rpx;height: 60rpx;"></image-empty>
<image-empty :imageSrc="form.button_img[0]" class="img" :typeStyle="color" img_fit="aspectFill" errorStyle="width: 60rpx;height: 60rpx;"></image-empty>
</view>
</view>
</view>

View File

@ -16,10 +16,10 @@
<block v-else>
<block v-if="!isEmpty(item)">
<block v-if="!isEmpty(item.new_cover)">
<image-empty :image-src="item.new_cover[0]" :class="'flex-img' + theme" :style="content_img_radius" error-style="width: 100rpx;height: 100rpx;"></image-empty>
<image-empty :imageSrc="item.new_cover[0]" :class="'flex-img' + theme" :style="content_img_radius" errorStyle="width: 100rpx;height: 100rpx;"></image-empty>
</block>
<block v-else>
<image-empty :image-src="item.images" :class="'flex-img' + theme" :style="content_img_radius" error-style="width: 100rpx;height: 100rpx;"></image-empty>
<image-empty :imageSrc="item.images" :class="'flex-img' + theme" :style="content_img_radius" errorStyle="width: 100rpx;height: 100rpx;"></image-empty>
</block>
</block>
<view class="flex-col flex-1 jc-sb content gap-10" :style="content_style">
@ -106,10 +106,10 @@
<view v-for="(item, index) in item1.split_list" :key="index" class="pr" :class="layout_type" :style="layout_style" :data-value="item.goods_url" @tap="url_event">
<block v-if="!isEmpty(item)">
<block v-if="!isEmpty(item.new_cover)">
<image-empty :image-src="item.new_cover[0]" :class="'flex-img' + theme" :style="content_img_radius" error-style="width: 100rpx;height: 100rpx;"></image-empty>
<image-empty :imageSrc="item.new_cover[0]" :class="'flex-img' + theme" :style="content_img_radius" errorStyle="width: 100rpx;height: 100rpx;"></image-empty>
</block>
<block v-else>
<image-empty :image-src="item.images" :class="'flex-img' + theme" :style="content_img_radius" error-style="width: 100rpx;height: 100rpx;"></image-empty>
<image-empty :imageSrc="item.images" :class="'flex-img' + theme" :style="content_img_radius" errorStyle="width: 100rpx;height: 100rpx;"></image-empty>
</block>
</block>
<view class="flex-col flex-1 jc-sb content gap-10" :style="content_style">

View File

@ -1,8 +1,8 @@
<template>
<view class="overflow-unset" :style="style_container">
<componentDiyModulesTabsView :propValue="goods_tabs" :is-top="top_up == '1'" @tabs-click="tabs_click_event"></componentDiyModulesTabsView>
<componentDiyModulesTabsView :propValue="goods_tabs" :isTop="top_up == '1'" @tabs-click="tabs_click_event"></componentDiyModulesTabsView>
<view class="padding-top oh">
<componentGoodsList :key="key" :propValue="goods_tabs" :is-common-style="false"></componentGoodsList>
<componentGoodsList :key="key" :propValue="goods_tabs" :isCommonStyle="false"></componentGoodsList>
</view>
</view>
</template>

View File

@ -9,7 +9,7 @@
<view v-if="['1', '2', '3'].includes(form.content.theme)" class="flex-1 flex-row align-c jc-c ht-auto gap-16" :style="text_style + 'justify-content:' + form.content.indicator_location || 'center'">
<template v-if="['2', '3'].includes(form.content.theme)">
<view class="logo-outer-style">
<image-empty :image-src="form.content.logo[0].url" class="logo-style" error-style="width:40rpx;height:40rpx;"></image-empty>
<image-empty :imageSrc="form.content.logo[0].url" class="logo-style" errorStyle="width:40rpx;height:40rpx;"></image-empty>
</view>
</template>
<view v-if="['1', '2'].includes(form.content.theme)">{{ form.content.title }}</view>
@ -33,7 +33,7 @@
</view>
<view v-if="!isEmpty(form.content.icon_setting)" class="flex-row align-c" :class="['1'].includes(form.content.theme) ? 'pa right-0 padding-right-main' : ''" :style="{ gap: form.style.img_space * 2 + 'rpx' }">
<view v-for="(item, index) in form.content.icon_setting" :key="index" :style="{ width: form.style.img_size * 2 + 'rpx', height: form.style.img_size * 2 + 'rpx' }" :data-value="item.link.page" @tap="url_event">
<image-empty v-if="item.img.length > 0" :image-src="item.img[0].url" :error-style="'width: ' + Number(form.style.img_size) * 2 + 'rpx;height:' + Number(form.style.img_size) * 2 + 'rpx;'"></image-empty>
<image-empty v-if="item.img.length > 0" :imageSrc="item.img[0].url" :errorStyle="'width: ' + Number(form.style.img_size) * 2 + 'rpx;height:' + Number(form.style.img_size) * 2 + 'rpx;'"></image-empty>
<iconfont v-else :name="'icon-' + item.icon" :size="form.style.img_size * 2 + 'rpx'" color="#666"></iconfont>
</view>
</view>

View File

@ -1,6 +1,6 @@
<template>
<view class="img-outer pr wh-auto ht-auto" :style="border_style" @tap="url_open(form.link)">
<image-empty :image-src="img" :type_style="image_style" error-style="width: 60rpx;height: 60rpx;"></image-empty>
<image-empty :imageSrc="img" :typeStyle="image_style" errorStyle="width: 60rpx;height: 60rpx;"></image-empty>
</view>
</template>
<script>

View File

@ -3,7 +3,7 @@
<swiper-item v-for="(item1, index1) in value.data_content.list" :key="index1">
<template v-if="type === 'img'">
<view :data-value="item1.carousel_link.page" @tap="url_event">
<image-empty :image-src="item1.carousel_img[0]" :style="contentImgRadius" error-style="width: 80rpx;height: 80rpx;"></image-empty>
<image-empty :imageSrc="item1.carousel_img[0]" :style="contentImgRadius" errorStyle="width: 80rpx;height: 80rpx;"></image-empty>
</view>
</template>
<template v-else>
@ -17,7 +17,6 @@
const app = getApp();
import imageEmpty from '@/components/diy/modules/image-empty.vue';
import productListShow from '@/components/diy/modules/data-magic/product-list-show.vue';
import { isEmpty } from '@/common/js/common/common.js';
export default {
components: {
imageEmpty,

View File

@ -4,10 +4,10 @@
<template v-if="flex === 'row'">
<view v-for="(item, index) in value" :key="index" class="flex-row gap-10 half-width ht-auto" :data-value="item.goods_url" @tap="url_event">
<template v-if="!isEmpty(item.new_cover)">
<image-empty :image-src="item.new_cover[0]" class="wh-auto ht-auto" :style="contentImgRadius" error-style="width: 80rpx;height: 80rpx;"></image-empty>
<image-empty :imageSrc="item.new_cover[0]" class="wh-auto ht-auto" :style="contentImgRadius" errorStyle="width: 80rpx;height: 80rpx;"></image-empty>
</template>
<template v-else>
<image-empty :image-src="item.images" class="wh-auto ht-auto" :style="contentImgRadius" error-style="width: 80rpx;height: 80rpx;"></image-empty>
<image-empty :imageSrc="item.images" class="wh-auto ht-auto" :style="contentImgRadius" errorStyle="width: 80rpx;height: 80rpx;"></image-empty>
</template>
<view v-if="!isEmpty(isShow)" class="flex-col wh-auto ht-auto tl gap-10">
<view v-if="isShow.includes('title')" class="text-line-2 text-size-md shop-title">{{ item.title }}</view>
@ -25,10 +25,10 @@
<view v-for="(item, index) in value" :key="index" :class="['flex-col gap-10 ht-auto', { 'half-width': num !== 1, 'wh-auto': num == 1 }]" :data-value="item.goods_url" @tap="url_event">
<view class="wh-auto ht-auto pr">
<template v-if="!isEmpty(item.new_cover)">
<image-empty :image-src="item.new_cover[0]" class="wh-auto ht-auto" :style="contentImgRadius" error-style="width: 80rpx;height: 80rpx;"></image-empty>
<image-empty :imageSrc="item.new_cover[0]" class="wh-auto ht-auto" :style="contentImgRadius" errorStyle="width: 80rpx;height: 80rpx;"></image-empty>
</template>
<template v-else>
<image-empty :image-src="item.images" class="wh-auto ht-auto" :style="contentImgRadius" error-style="width: 80rpx;height: 80rpx;"></image-empty>
<image-empty :imageSrc="item.images" class="wh-auto ht-auto" :style="contentImgRadius" errorStyle="width: 80rpx;height: 80rpx;"></image-empty>
</template>
<view v-if="isShow.includes('price')" class="price-suspension text-line-1">
{{ item.show_price_symbol }}{{ item.min_price }}
@ -43,10 +43,10 @@
<template v-else>
<view v-for="(item, index) in value" :key="index" class="flex-col wh-auto ht-auto" :data-value="item.goods_url" @tap="url_event">
<template v-if="!isEmpty(item.new_cover)">
<image-empty :image-src="item.new_cover[0]" class="wh-auto ht-auto" :style="contentImgRadius" error-style="width: 80rpx;height: 80rpx;"></image-empty>
<image-empty :imageSrc="item.new_cover[0]" class="wh-auto ht-auto" :style="contentImgRadius" errorStyle="width: 80rpx;height: 80rpx;"></image-empty>
</template>
<template v-else>
<image-empty :image-src="item.images" class="wh-auto ht-auto" :style="contentImgRadius" error-style="width: 80rpx;height: 80rpx;"></image-empty>
<image-empty :imageSrc="item.images" class="wh-auto ht-auto" :style="contentImgRadius" errorStyle="width: 80rpx;height: 80rpx;"></image-empty>
</template>
<view v-if="!isEmpty(isShow)" class="flex-col wh-auto tl gap-10" :style="img_padding_computer">
<view v-if="isShow.includes('title')" class="text-line-2 text-size-md shop-title">{{ item.title }}</view>
@ -67,10 +67,10 @@
<template v-if="flex === 'row'">
<view v-for="(item, index) in value" :key="index" class="flex-row gap-10 align-c wh-auto ht-auto shop-max-height" :data-value="item.goods_url" @tap="url_event">
<template v-if="!isEmpty(item.new_cover)">
<image-empty :image-src="item.new_cover[0]" class="wh-auto ht-auto" :style="contentImgRadius" error-style="width: 80rpx;height: 80rpx;"></image-empty>
<image-empty :imageSrc="item.new_cover[0]" class="wh-auto ht-auto" :style="contentImgRadius" errorStyle="width: 80rpx;height: 80rpx;"></image-empty>
</template>
<template v-else>
<image-empty :image-src="item.images" class="wh-auto ht-auto" :style="contentImgRadius" error-style="width: 80rpx;height: 80rpx;"></image-empty>
<image-empty :imageSrc="item.images" class="wh-auto ht-auto" :style="contentImgRadius" errorStyle="width: 80rpx;height: 80rpx;"></image-empty>
</template>
<view v-if="!isEmpty(isShow)" class="flex-col wh-auto ht-auto tl gap-20">
<view v-if="isShow.includes('title')" class="text-line-2 text-size-md shop-title">{{ item.title }}</view>

View File

@ -5,7 +5,7 @@
<view class="bannerImg flex-row flex-wrap wh-auto gap-x-10">
<view v-for="(item1, index1) in item.split_list" :key="index1" class="flex-col gap-10 align-c" :style="{ width: group_width }" :data-value="item1.link.page" @tap="url_open_event">
<view v-if="['image_with_text', 'image'].includes(nav_style)" class="top-img flex-row align-c jc-c">
<image-empty :image-src="item1.img[0]" :style="img_style" error-style="width: 60rpx;height: 60rpx;"></image-empty>
<image-empty :imageSrc="item1.img[0]" :style="img_style" errorStyle="width: 60rpx;height: 60rpx;"></image-empty>
</view>
<view v-if="['image_with_text', 'text'].includes(nav_style)" class="size-12 ma-0" :style="text_style">{{ item1.title }}</view>
</view>

View File

@ -4,7 +4,7 @@
<view v-if="form.head_state == '1'" class="seckill-head flex-row align-c jc-sb oh" :style="seckill_head_style">
<view :class="['flex-row align-c', { 'gap-10': form.theme != '1', 'jc-sb wh-auto': form.theme == '2' }]">
<view class="seckill-title">
<image-empty v-if="form.title_type == 'image'" :image-src="form.title_src[0]" img_fit="heightFix" error-style="width:42rpx; height: 20rpx;"></image-empty>
<image-empty v-if="form.title_type == 'image'" :imageSrc="form.title_src[0]" img_fit="heightFix" errorStyle="width:42rpx; height: 20rpx;"></image-empty>
<text v-else :style="{ color: new_style.title_color, 'font-size': new_style.title_size * 2 + 'rpx', 'line-height': '42rpx', 'font-weight': 600 }">{{ form.title_text }}</text>
</view>
<view v-if="form.theme == '1'" class="padding-horizontal-sm cr-white">|</view>
@ -40,10 +40,10 @@
<template v-if="!isEmpty(item)">
<view class="oh pr" :class="'flex-img' + form.shop_style_type">
<template v-if="!isEmpty(item.new_cover)">
<image-empty :image-src="item.new_cover[0]" :class="'flex-img' + form.shop_style_type" :type_style="content_img_radius" error-style="width:100rpx; height: 100rpx;"></image-empty>
<image-empty :imageSrc="item.new_cover[0]" :class="'flex-img' + form.shop_style_type" :typeStyle="content_img_radius" errorStyle="width:100rpx; height: 100rpx;"></image-empty>
</template>
<template v-else>
<image-empty :image-src="item.images" :class="'flex-img' + form.shop_style_type" :type_style="content_img_radius" error-style="width:100rpx; height: 100rpx;"></image-empty>
<image-empty :imageSrc="item.images" :class="'flex-img' + form.shop_style_type" :typeStyle="content_img_radius" errorStyle="width:100rpx; height: 100rpx;"></image-empty>
</template>
<view v-if="form.seckill_subscript_show == '1'" class="text-size-xs nowrap corner-marker" :style="corner_marker">
<text class="text-line-1">{{ form.subscript_text }}</text>
@ -103,10 +103,10 @@
<template v-if="!isEmpty(item)">
<view class="oh pr wh-auto ht-auto">
<template v-if="!isEmpty(item.new_cover)">
<image-empty :image-src="item.new_cover[0]" :class="'flex-img' + form.shop_style_type" :type_style="content_img_radius" error-style="width:100rpx; height: 100rpx;"></image-empty>
<image-empty :imageSrc="item.new_cover[0]" :class="'flex-img' + form.shop_style_type" :typeStyle="content_img_radius" errorStyle="width:100rpx; height: 100rpx;"></image-empty>
</template>
<template v-else>
<image-empty :image-src="item.images" :class="'flex-img' + form.shop_style_type" :type_style="content_img_radius" error-style="width:100rpx; height: 100rpx;"></image-empty>
<image-empty :imageSrc="item.images" :class="'flex-img' + form.shop_style_type" :typeStyle="content_img_radius" errorStyle="width:100rpx; height: 100rpx;"></image-empty>
</template>
<view v-if="form.seckill_subscript_show == '1'" class="text-size-xs nowrap corner-marker" :style="corner_marker">
<text class="text-line-1">{{ form.subscript_text }}</text>

View File

@ -1,7 +1,7 @@
<template>
<div class="flex-col oh" :style="style_container">
<componentDiyTabs :value="value" :is-common="false" :spacing-common-style="spacing_common_style" @tabs-click="tabs_click_event"></componentDiyTabs>
<componentDiycarousel :value="value" :is-common="false"></componentDiycarousel>
<componentDiyTabs :value="value" :isCommon="false" :spacingCommonStyle="spacing_common_style" @tabs-click="tabs_click_event"></componentDiyTabs>
<componentDiycarousel :value="value" :isCommon="false"></componentDiycarousel>
</div>
</template>

View File

@ -43,6 +43,7 @@
new_style: {},
style_container: '',
title_center: '',
subtitle_style: '',
keyword_list: [],
keyword_style: '',
right_style: '',