Merge remote-tracking branch 'origin/dev-yxl' into dev-sws
commit
90721acc05
|
|
@ -4,14 +4,14 @@
|
|||
<div v-if="form.head_state == '1'" class="seckill-head flex-row align-c jc-sb oh" :style="seckill_head_style">
|
||||
<div :class="['flex-row align-c', { 'gap-10': form.theme != '1', 'jc-sb w': form.theme == '2' }]">
|
||||
<div class="seckill-title">
|
||||
<image-empty v-if="form.topic_type == 'image'" v-model="form.topic_src[0]" error-img-style="width:2.1rem; height: 1rem;"></image-empty>
|
||||
<span v-else :style="`color: ${new_style.title_color};font-size: ${new_style.title_size}px;line-height:21px;font-weight:600;`">{{ form.topic_text }}</span>
|
||||
<image-empty v-if="form.title_type == 'image'" v-model="form.title_src[0]" error-img-style="width:2.1rem; height: 1rem;"></image-empty>
|
||||
<span v-else :style="`color: ${new_style.title_color};font-size: ${new_style.title_size}px;line-height:21px;font-weight:600;`">{{ form.title_text }}</span>
|
||||
</div>
|
||||
<div v-if="form.theme == '1'" class="pl-6 pr-6 cr-f">|</div>
|
||||
<div v-if="intervalId != undefined" class="flex-row align-c gap-4">
|
||||
<span class="size-10" :style="`color: ${new_style.end_text_color}`">{{ seckill_time.time_first_text }}</span>
|
||||
<div class="flex-row gap-3 jc-c align-c" :style="[form.theme == '4' ? `${time_bg};padding: 0.3rem 0.4rem;border-radius: 1.1rem;` : '']">
|
||||
<img v-if="form.theme == '4'" class="seckill-head-icon radius-xs" :src="new_url" />
|
||||
<img v-if="form.theme == '4'" class="seckill-head-icon radius-xs" :src="form.theme_4_static_img[0].url" />
|
||||
<template v-for="(item, index) in time_config" :key="item.key">
|
||||
<template v-if="form.theme == '4'">
|
||||
<div class="size-12" :style="`color: ${new_style.countdown_color}`">{{ item.value }}</div>
|
||||
|
|
@ -162,7 +162,6 @@
|
|||
import { background_computer, common_styles_computer, get_math, gradient_computer, gradient_handle, padding_computer, radius_computer } from '@/utils';
|
||||
import { isEmpty, throttle } from 'lodash';
|
||||
import SeckillAPI from '@/api/seckill';
|
||||
import { online_url } from '@/utils';
|
||||
import { Swiper, SwiperSlide } from 'swiper/vue';
|
||||
import { Autoplay } from 'swiper/modules';
|
||||
import 'swiper/css';
|
||||
|
|
@ -176,11 +175,7 @@ const props = defineProps({
|
|||
},
|
||||
},
|
||||
});
|
||||
const new_url = ref('');
|
||||
onBeforeMount(async () => {
|
||||
const url = await online_url('/static/plugins/seckill/images/diy/').then((res) => res);
|
||||
new_url.value = url + 'time.png';
|
||||
});
|
||||
|
||||
const form = computed(() => props.value?.content || {});
|
||||
const new_style = computed(() => props.value?.style || {});
|
||||
const time_bg = computed(() => {
|
||||
|
|
|
|||
|
|
@ -11,19 +11,19 @@
|
|||
<theme-select v-model="form.theme" :data="base_list.themeList" @update:model-value="themeChange"></theme-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="主题类型">
|
||||
<el-radio-group v-model="form.topic_type">
|
||||
<el-radio-group v-model="form.title_type">
|
||||
<el-radio value="text">文字</el-radio>
|
||||
<el-radio value="image">图片</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<template v-if="form.topic_type == 'image'">
|
||||
<template v-if="form.title_type == 'image'">
|
||||
<el-form-item label="标题图片">
|
||||
<upload v-model="form.topic_src" :limit="1" size="50"></upload>
|
||||
<upload v-model="form.title_src" :limit="1" size="50"></upload>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-form-item label="标题文字">
|
||||
<el-input v-model="form.topic_text" placeholder="请输入标题文字" clearable></el-input>
|
||||
<el-input v-model="form.title_text" placeholder="请输入标题文字" clearable></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-if="form.theme != '2'">
|
||||
|
|
|
|||
|
|
@ -39,9 +39,9 @@ onBeforeMount(async () => {
|
|||
// 全部的默认数据
|
||||
default_data = {
|
||||
content: {
|
||||
topic_type: 'image',
|
||||
topic_src: [{ id: 1, url: new_url.value + 'header-title.png', original: '标题', title: '标题', ext: '.png', type: 'img' }],
|
||||
topic_text: '限时秒杀',
|
||||
title_type: 'image',
|
||||
title_src: [{ id: 1, url: new_url.value + 'header-title.png', original: '标题', title: '标题', ext: '.png', type: 'img' }],
|
||||
title_text: '限时秒杀',
|
||||
},
|
||||
style: {
|
||||
title_color: '#fff',
|
||||
|
|
@ -122,8 +122,8 @@ onBeforeMount(async () => {
|
|||
theme_1: {},
|
||||
theme_2: {
|
||||
content: {
|
||||
topic_type: 'image',
|
||||
topic_src: [{ id: 1, url: new_url.value + 'header-title-2.png', original: '标题2', title: '标题2', ext: '.png', type: 'img' }],
|
||||
title_type: 'image',
|
||||
title_src: [{ id: 1, url: new_url.value + 'header-title-2.png', original: '标题2', title: '标题2', ext: '.png', type: 'img' }],
|
||||
button_status: '0',
|
||||
},
|
||||
style: {
|
||||
|
|
@ -138,8 +138,8 @@ onBeforeMount(async () => {
|
|||
},
|
||||
theme_3: {
|
||||
content: {
|
||||
topic_type: 'text',
|
||||
topic_src: [],
|
||||
title_type: 'text',
|
||||
title_src: [],
|
||||
button_status: '1',
|
||||
},
|
||||
style: {
|
||||
|
|
@ -155,8 +155,8 @@ onBeforeMount(async () => {
|
|||
},
|
||||
theme_4: {
|
||||
content: {
|
||||
topic_type: 'text',
|
||||
topic_src: [],
|
||||
title_type: 'text',
|
||||
title_src: [],
|
||||
button_status: '1',
|
||||
},
|
||||
style: {
|
||||
|
|
|
|||
|
|
@ -5,9 +5,10 @@ interface DefaultSeckill {
|
|||
content: {
|
||||
head_state: string;
|
||||
theme: string;
|
||||
topic_type: string;
|
||||
topic_src: uploadList[];
|
||||
topic_text: string;
|
||||
title_type: string;
|
||||
title_src: uploadList[];
|
||||
title_text: string;
|
||||
theme_4_static_img: uploadList[];
|
||||
button_status: string;
|
||||
button_text: string;
|
||||
shop_style_type: string;
|
||||
|
|
@ -72,9 +73,10 @@ const defaultSeckill: DefaultSeckill = {
|
|||
content: {
|
||||
head_state: '1',
|
||||
theme: '1',
|
||||
topic_type: 'image',
|
||||
topic_src: [{ id: 1, url: new_url + 'header-title.png', original: '标题', title: '标题', ext: '.png', type: 'img' }],
|
||||
topic_text: '限时秒杀',
|
||||
title_type: 'image',
|
||||
title_src: [{ id: 1, url: new_url + 'header-title.png', original: '标题', title: '标题', ext: '.png', type: 'img' }],
|
||||
theme_4_static_img: [{ id: 2, url: new_url + 'time.png', original: '时钟', title: '时钟', ext: '.png', type: 'img' }],
|
||||
title_text: '限时秒杀',
|
||||
button_status: '1',
|
||||
button_text: '更多',
|
||||
shop_style_type: '1',
|
||||
|
|
|
|||
Loading…
Reference in New Issue