Compare commits
No commits in common. "13eb6a75a964476cd718ecc77e9325b64c343a8f" and "0da862a1801e6534374b0b5ac6f968b3b754f886" have entirely different histories.
13eb6a75a9
...
0da862a180
Before Width: | Height: | Size: 640 B |
Before Width: | Height: | Size: 573 B |
Before Width: | Height: | Size: 462 B |
Before Width: | Height: | Size: 615 B |
Before Width: | Height: | Size: 369 B |
Before Width: | Height: | Size: 534 B |
Before Width: | Height: | Size: 466 B |
Before Width: | Height: | Size: 480 B |
Before Width: | Height: | Size: 514 B |
Before Width: | Height: | Size: 404 B |
Before Width: | Height: | Size: 545 B |
Before Width: | Height: | Size: 335 B |
Before Width: | Height: | Size: 529 B |
Before Width: | Height: | Size: 759 B |
Before Width: | Height: | Size: 609 B |
Before Width: | Height: | Size: 440 B |
Before Width: | Height: | Size: 821 B |
Before Width: | Height: | Size: 814 B |
Before Width: | Height: | Size: 604 B |
Before Width: | Height: | Size: 339 B |
Before Width: | Height: | Size: 573 B |
Before Width: | Height: | Size: 36 KiB |
@ -23,11 +23,8 @@
|
||||
<div>
|
||||
<div class="drag-placement">组件放置区域</div>
|
||||
<div class="component">
|
||||
<!-- <Icon :icon="element.icon" :size="32" /> -->
|
||||
<div>
|
||||
<img :src="element.icon" />
|
||||
</div>
|
||||
<span class="text-12px">{{ element.name }}</span>
|
||||
<Icon :icon="element.icon" :size="32" />
|
||||
<span class="mt-4px text-12px">{{ element.name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -145,9 +142,8 @@ const handleCloneComponent = (component: DiyComponent<any>) => {
|
||||
|
||||
.component.active,
|
||||
.component:hover {
|
||||
// color: var(--el-color-white);
|
||||
// background: var(--el-color-primary);
|
||||
background: #f6f6f6;
|
||||
color: var(--el-color-white);
|
||||
background: var(--el-color-primary);
|
||||
|
||||
.el-icon {
|
||||
color: var(--el-color-white);
|
||||
|
@ -26,13 +26,12 @@ export interface CarouselItemProperty {
|
||||
// 跳转链接
|
||||
url: string
|
||||
}
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-09.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'Carousel',
|
||||
name: '轮播图',
|
||||
// icon: 'system-uicons:carousel',
|
||||
icon: logo,
|
||||
icon: 'system-uicons:carousel',
|
||||
property: {
|
||||
type: 'default',
|
||||
indicator: 'dot',
|
||||
|
@ -67,8 +67,7 @@ export const CouponValidTerm = defineComponent({
|
||||
coupon.validEndTime,
|
||||
'YYYY-MM-DD'
|
||||
)}`
|
||||
// : `领取后第 ${coupon.fixedStartTerm} - ${coupon.fixedEndTerm} 天内可用`
|
||||
: `领取后 ${coupon.fixedEndTerm} 天内可用`
|
||||
: `领取后第 ${coupon.fixedStartTerm} - ${coupon.fixedEndTerm} 天内可用`
|
||||
return () => <div>{text}</div>
|
||||
}
|
||||
})
|
||||
|
@ -22,13 +22,12 @@ export interface CouponCardProperty {
|
||||
// 组件样式
|
||||
style: ComponentStyle
|
||||
}
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-19.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'CouponCard',
|
||||
name: '优惠券',
|
||||
// icon: 'ep:ticket',
|
||||
icon: logo,
|
||||
icon: 'ep:ticket',
|
||||
property: {
|
||||
columns: 1,
|
||||
bgImg: '',
|
||||
|
@ -13,13 +13,12 @@ export interface DividerProperty {
|
||||
// 类型
|
||||
borderType: 'solid' | 'dashed' | 'dotted' | 'none'
|
||||
}
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-12.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'Divider',
|
||||
name: '分割线',
|
||||
// icon: 'tdesign:component-divider-vertical',
|
||||
icon: logo,
|
||||
icon: 'tdesign:component-divider-vertical',
|
||||
property: {
|
||||
height: 30,
|
||||
lineWidth: 1,
|
||||
|
@ -21,13 +21,12 @@ export interface FloatingActionButtonItemProperty {
|
||||
// 文字颜色
|
||||
textColor: string
|
||||
}
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-07.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'FloatingActionButton',
|
||||
name: '悬浮按钮',
|
||||
// icon: 'tabler:float-right',
|
||||
icon: logo,
|
||||
icon: 'tabler:float-right',
|
||||
position: 'fixed',
|
||||
property: {
|
||||
direction: 'vertical',
|
||||
|
@ -25,13 +25,12 @@ export interface HotZoneItemProperty {
|
||||
// 左
|
||||
left: number
|
||||
}
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-14.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'HotZone',
|
||||
name: '热区',
|
||||
// icon: 'tabler:hand-click',
|
||||
icon: logo,
|
||||
icon: 'tabler:hand-click',
|
||||
property: {
|
||||
imgUrl: '',
|
||||
list: [] as HotZoneItemProperty[],
|
||||
|
@ -9,13 +9,12 @@ export interface ImageBarProperty {
|
||||
// 组件样式
|
||||
style: ComponentStyle
|
||||
}
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-08.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'ImageBar',
|
||||
name: '图片展示',
|
||||
// icon: 'ep:picture',
|
||||
icon: logo,
|
||||
icon: 'ep:picture',
|
||||
property: {
|
||||
imgUrl: '',
|
||||
url: '',
|
||||
|
@ -29,13 +29,12 @@ export interface MagicCubeItemProperty {
|
||||
// 左
|
||||
left: number
|
||||
}
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-13.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'MagicCube',
|
||||
name: '广告魔方',
|
||||
// icon: 'bi:columns',
|
||||
icon: logo,
|
||||
icon: 'bi:columns',
|
||||
property: {
|
||||
borderRadiusTop: 0,
|
||||
borderRadiusBottom: 0,
|
||||
|
@ -49,13 +49,12 @@ export const EMPTY_MENU_GRID_ITEM_PROPERTY = {
|
||||
bgColor: '#FF6000'
|
||||
}
|
||||
} as MenuGridItemProperty
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-04.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'MenuGrid',
|
||||
name: '宫格导航',
|
||||
// icon: 'bi:grid-3x3-gap',
|
||||
icon: logo,
|
||||
icon: 'bi:grid-3x3-gap',
|
||||
property: {
|
||||
column: 3,
|
||||
list: [cloneDeep(EMPTY_MENU_GRID_ITEM_PROPERTY)],
|
||||
|
@ -6,7 +6,6 @@
|
||||
<el-radio-group v-model="formData.column">
|
||||
<el-radio :label="3">3个</el-radio>
|
||||
<el-radio :label="4">4个</el-radio>
|
||||
<el-radio :label="5">5个</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
|
@ -31,13 +31,12 @@ export const EMPTY_MENU_LIST_ITEM_PROPERTY = {
|
||||
subtitle: '副标题',
|
||||
subtitleColor: '#bbb'
|
||||
}
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-05.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'MenuList',
|
||||
name: '列表导航',
|
||||
// icon: 'fa-solid:list',
|
||||
icon: logo,
|
||||
icon: 'fa-solid:list',
|
||||
property: {
|
||||
list: [cloneDeep(EMPTY_MENU_LIST_ITEM_PROPERTY)],
|
||||
style: {
|
||||
|
@ -46,13 +46,12 @@ export const EMPTY_MENU_SWIPER_ITEM_PROPERTY = {
|
||||
bgColor: '#FF6000'
|
||||
}
|
||||
} as MenuSwiperItemProperty
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-03.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'MenuSwiper',
|
||||
name: '菜单导航',
|
||||
// icon: 'bi:grid-3x2-gap',
|
||||
icon: logo,
|
||||
icon: 'bi:grid-3x2-gap',
|
||||
property: {
|
||||
layout: 'iconText',
|
||||
row: 1,
|
||||
|
@ -21,13 +21,12 @@ export interface NoticeContentProperty {
|
||||
// 链接地址
|
||||
url: string
|
||||
}
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-02.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'NoticeBar',
|
||||
name: '公告栏',
|
||||
// icon: 'ep:bell',
|
||||
icon: logo,
|
||||
icon: 'ep:bell',
|
||||
property: {
|
||||
iconUrl: 'http://mall.yudao.iocoder.cn/static/images/xinjian.png',
|
||||
contents: [
|
||||
|
@ -13,13 +13,12 @@ export interface PopoverItemProperty {
|
||||
// 显示类型:仅显示一次、每次启动都会显示
|
||||
showType: 'once' | 'always'
|
||||
}
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-06.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'Popover',
|
||||
name: '弹窗广告',
|
||||
// icon: 'carbon:popup',
|
||||
icon: logo,
|
||||
icon: 'carbon:popup',
|
||||
position: 'fixed',
|
||||
property: {
|
||||
list: [{ showType: 'once' }]
|
||||
|
@ -57,13 +57,12 @@ export interface ProductCardFieldProperty {
|
||||
// 颜色
|
||||
color: string
|
||||
}
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-15.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'ProductCard',
|
||||
name: '商品卡片',
|
||||
// icon: 'fluent:text-column-two-left-24-filled',
|
||||
icon: logo,
|
||||
icon: 'fluent:text-column-two-left-24-filled',
|
||||
property: {
|
||||
layoutType: 'oneColBigImg',
|
||||
fields: {
|
||||
|
@ -36,13 +36,12 @@ export interface ProductListFieldProperty {
|
||||
// 颜色
|
||||
color: string
|
||||
}
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-16.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'ProductList',
|
||||
name: '商品栏',
|
||||
// icon: 'fluent:text-column-two-24-filled',
|
||||
icon: logo,
|
||||
icon: 'fluent:text-column-two-24-filled',
|
||||
property: {
|
||||
layoutType: 'twoCol',
|
||||
fields: {
|
||||
|
@ -7,13 +7,12 @@ export interface PromotionArticleProperty {
|
||||
// 组件样式
|
||||
style: ComponentStyle
|
||||
}
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-20.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'PromotionArticle',
|
||||
name: '营销文章',
|
||||
// icon: 'ph:article-medium',
|
||||
icon: logo,
|
||||
icon: 'ph:article-medium',
|
||||
property: {
|
||||
style: {
|
||||
bgType: 'color',
|
||||
|
@ -37,13 +37,12 @@ export interface PromotionCombinationFieldProperty {
|
||||
// 颜色
|
||||
color: string
|
||||
}
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-17.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'PromotionCombination',
|
||||
name: '拼团',
|
||||
// icon: 'mdi:account-group',
|
||||
icon: logo,
|
||||
icon: 'mdi:account-group',
|
||||
property: {
|
||||
layoutType: 'oneCol',
|
||||
fields: {
|
||||
|
@ -58,13 +58,12 @@ export interface PromotionPointFieldProperty {
|
||||
// 颜色
|
||||
color: string
|
||||
}
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-21.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'PromotionPoint',
|
||||
name: '积分商城',
|
||||
// icon: 'ep:present',
|
||||
icon: logo,
|
||||
icon: 'ep:present',
|
||||
property: {
|
||||
layoutType: 'oneColBigImg',
|
||||
fields: {
|
||||
|
@ -36,13 +36,12 @@ export interface PromotionSeckillFieldProperty {
|
||||
// 颜色
|
||||
color: string
|
||||
}
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-18.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'PromotionSeckill',
|
||||
name: '秒杀',
|
||||
// icon: 'mdi:calendar-time',
|
||||
icon: logo,
|
||||
icon: 'mdi:calendar-time',
|
||||
property: {
|
||||
activityId: undefined,
|
||||
layoutType: 'oneCol',
|
||||
|
@ -15,12 +15,12 @@ export interface SearchProperty {
|
||||
|
||||
// 文字位置
|
||||
export type PlaceholderPosition = 'left' | 'center'
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-01.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'SearchBar',
|
||||
name: '搜索框',
|
||||
icon: logo,
|
||||
icon: 'ep:search',
|
||||
property: {
|
||||
height: 28,
|
||||
showScan: false,
|
||||
|
@ -38,13 +38,12 @@ export interface TitleBarProperty {
|
||||
// 组件样式
|
||||
style: ComponentStyle
|
||||
}
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-10.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'TitleBar',
|
||||
name: '标题栏',
|
||||
icon: 'material-symbols:line-start',
|
||||
icon: logo,
|
||||
property: {
|
||||
title: '主标题',
|
||||
description: '副标题',
|
||||
|
@ -1,115 +1,29 @@
|
||||
<template>
|
||||
<div class="flex flex-col" style=" margin-bottom: 27px;">
|
||||
|
||||
<div class="new-main">
|
||||
<div class="flex items-center justify-between p-x-18px p-y-24px " style="padding-bottom:15px;">
|
||||
<div class="flex flex-1 items-center gap-16px">
|
||||
<el-avatar :size="60">
|
||||
<Icon icon="ep:avatar" :size="60" />
|
||||
</el-avatar>
|
||||
<span class="text-18px font-bold">用户名称</span>
|
||||
</div>
|
||||
<Icon icon="tdesign:qrcode" :size="20" />
|
||||
</div>
|
||||
|
||||
<div class="new-usercard" style="z-index: 9999;">
|
||||
<div class="menu-item ss-flex-1 ss-flex-col ss-row-center ss-col-center">
|
||||
<div class="value-box ss-flex ss-col-bottom">
|
||||
<div class="value-text ss-line-1">0.00</div>
|
||||
<div class="unit-text ss-m-l-6">
|
||||
<!-- 元 -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="menu-title ss-m-t-28">余额</div>
|
||||
</div>
|
||||
|
||||
<div class="menu-item ss-flex-1 ss-flex-col ss-row-center ss-col-center">
|
||||
<div class="value-box ss-flex ss-col-bottom">
|
||||
<div class="value-text">0</div>
|
||||
<div class="unit-text ss-m-l-6">
|
||||
<!-- 张 -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="menu-title ss-m-t-28">优惠券</div>
|
||||
</div>
|
||||
<div class="menu-item ss-flex-1 ss-flex-col ss-row-center ss-col-center">
|
||||
<div class="value-box ss-flex ss-col-bottom">
|
||||
<div class="value-text">0</div>
|
||||
<div class="unit-text ss-m-l-6">
|
||||
<!-- 个 -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="menu-title ss-m-t-28">积分</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="new-bottom">
|
||||
<img src="https://zysc.fjptzykj.com:3000/shangcheng/64776e2edc3c2f15295e7c3976ba301e08f9170f99a2e845d8f33bd65179b177.png"
|
||||
alt="" />
|
||||
<div class="btn">
|
||||
立即开通
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div
|
||||
<div class="flex flex-col">
|
||||
<div class="flex items-center justify-between p-x-18px p-y-24px">
|
||||
<div class="flex flex-1 items-center gap-16px">
|
||||
<el-avatar :size="60">
|
||||
<Icon icon="ep:avatar" :size="60" />
|
||||
</el-avatar>
|
||||
<span class="text-18px font-bold">芋道源码</span>
|
||||
</div>
|
||||
<Icon icon="tdesign:qrcode" :size="20" />
|
||||
</div>
|
||||
<div
|
||||
class="flex items-center justify-between justify-between bg-white p-x-20px p-y-8px text-12px"
|
||||
>
|
||||
<span class="color-#ff690d">点击绑定手机号</span>
|
||||
<span class="rounded-26px bg-#ff6100 p-x-8px p-y-5px color-white">去绑定</span>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { UserCardProperty } from './config'
|
||||
import { UserCardProperty } from './config'
|
||||
|
||||
/** 用户卡片 */
|
||||
defineOptions({ name: 'UserCard' })
|
||||
// 定义属性
|
||||
defineProps<{ property : UserCardProperty }>()
|
||||
/** 用户卡片 */
|
||||
defineOptions({ name: 'UserCard' })
|
||||
// 定义属性
|
||||
defineProps<{ property: UserCardProperty }>()
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.new-main {
|
||||
position: relative;
|
||||
background: url('@/assets/imgs/userCar/seckilbg.png') no-repeat;
|
||||
background-size: cover;
|
||||
padding-bottom: 53px;
|
||||
|
||||
.value-box {
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.new-usercard {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
div {
|
||||
text-align: center;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.new-bottom {
|
||||
position: absolute;
|
||||
bottom: -28px;
|
||||
width: 100%;
|
||||
z-index: 999999999999999;
|
||||
|
||||
img {
|
||||
width: 92%;
|
||||
}
|
||||
|
||||
.btn {
|
||||
position: absolute;
|
||||
bottom: 19px;
|
||||
right: 29px;
|
||||
background: white;
|
||||
border-radius: 12px;
|
||||
padding: 4px 8px;
|
||||
font-size: 14px;
|
||||
color: #946d2d;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="scss"></style>
|
||||
|
@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<!-- <el-image src="https://shopro.sheepjs.com/admin/static/images/shop/decorate/orderCardStyle.png" /> -->
|
||||
<el-image src=" https://zysc.fjptzykj.com:3000/shangcheng/0ba158a1a2de7d39c6cec22cfe54736237438f63893b09c7453b5b5e3482f826.png" />
|
||||
<el-image src="https://shopro.sheepjs.com/admin/static/images/shop/decorate/orderCardStyle.png" />
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { UserOrderProperty } from './config'
|
||||
|
@ -17,13 +17,12 @@ export interface VideoPlayerStyle extends ComponentStyle {
|
||||
// 视频高度
|
||||
height: number
|
||||
}
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-11.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'VideoPlayer',
|
||||
name: '视频播放',
|
||||
// icon: 'ep:video-play',
|
||||
icon: logo,
|
||||
icon: 'ep:video-play',
|
||||
property: {
|
||||
videoUrl: '',
|
||||
posterUrl: '',
|
||||
|
@ -28,8 +28,7 @@ export const validityTypeFormat = (row: CouponTemplateVO) => {
|
||||
return `${formatDate(row.validStartTime)} 至 ${formatDate(row.validEndTime)}`
|
||||
}
|
||||
if (row.validityType === CouponTemplateValidityTypeEnum.TERM.type) {
|
||||
// return `领取后第 ${row.fixedStartTerm} - ${row.fixedEndTerm} 天内可用`
|
||||
return `领取后 ${row.fixedEndTerm + 1} 天内可用`
|
||||
return `领取后第 ${row.fixedStartTerm} - ${row.fixedEndTerm} 天内可用`
|
||||
}
|
||||
return '未知【' + row.validityType + '】'
|
||||
}
|
||||
|
@ -38,7 +38,7 @@
|
||||
<el-form-item label="优惠类型" prop="discountType">
|
||||
<el-radio-group v-model="formData.discountType">
|
||||
<el-radio
|
||||
v-for="dict in filteredDictOptions()"
|
||||
v-for="dict in getIntDictOptions(DICT_TYPE.PROMOTION_DISCOUNT_TYPE)"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>
|
||||
@ -151,10 +151,10 @@
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="formData.validityType === CouponTemplateValidityTypeEnum.TERM.type"
|
||||
label="有效日期"
|
||||
label="领取日期"
|
||||
prop="fixedStartTerm"
|
||||
>
|
||||
<!-- 第
|
||||
第
|
||||
<el-input-number
|
||||
v-model="formData.fixedStartTerm"
|
||||
:min="0"
|
||||
@ -162,13 +162,13 @@
|
||||
class="mx-2"
|
||||
placeholder="0 为今天生效"
|
||||
/>
|
||||
至 -->
|
||||
至
|
||||
<el-input-number
|
||||
v-model="formData.fixedEndTerm"
|
||||
:min="1"
|
||||
:min="0"
|
||||
:precision="0"
|
||||
class="mx-2"
|
||||
placeholder="请输入有效天数"
|
||||
placeholder="请输入结束天数"
|
||||
/>
|
||||
天有效
|
||||
</el-form-item>
|
||||
@ -215,7 +215,7 @@ const formData = ref({
|
||||
validTimes: [],
|
||||
validStartTime: undefined,
|
||||
validEndTime: undefined,
|
||||
fixedStartTerm: 0,
|
||||
fixedStartTerm: undefined,
|
||||
fixedEndTerm: undefined,
|
||||
productScope: PromotionProductScopeEnum.ALL.scope,
|
||||
productScopeValues: [], // 商品范围:值为 品类编号列表 或 商品编号列表 ,用于提交
|
||||
@ -255,7 +255,6 @@ const open = async (type: string, id?: number) => {
|
||||
const data = await CouponTemplateApi.getCouponTemplate(id)
|
||||
formData.value = {
|
||||
...data,
|
||||
fixedEndTerm: data.fixedEndTerm - data.fixedStartTerm + 1, // 显示时总天数(实际需要+1)
|
||||
discountPrice: formatToFraction(data.discountPrice),
|
||||
discountPercent:
|
||||
data.discountPercent !== undefined ? data.discountPercent / 10.0 : undefined,
|
||||
@ -284,7 +283,6 @@ const submitForm = async () => {
|
||||
try {
|
||||
const data = {
|
||||
...formData.value,
|
||||
fixedEndTerm: (formData.value.fixedEndTerm || 0) + formData.value.fixedStartTerm - 1, // 得到结束的天数
|
||||
discountPrice: convertToInteger(formData.value.discountPrice),
|
||||
discountPercent:
|
||||
formData.value.discountPercent !== undefined
|
||||
@ -337,7 +335,7 @@ const resetForm = () => {
|
||||
validTimes: [],
|
||||
validStartTime: undefined,
|
||||
validEndTime: undefined,
|
||||
fixedStartTerm: 0,
|
||||
fixedStartTerm: undefined,
|
||||
fixedEndTerm: undefined,
|
||||
productScope: PromotionProductScopeEnum.ALL.scope,
|
||||
productScopeValues: [],
|
||||
@ -385,12 +383,6 @@ function setProductScopeValues(data: CouponTemplateApi.CouponTemplateVO) {
|
||||
break
|
||||
}
|
||||
}
|
||||
/** 暂时隐藏掉字典中的折扣 */
|
||||
function filteredDictOptions() {
|
||||
return getIntDictOptions(DICT_TYPE.PROMOTION_DISCOUNT_TYPE).filter(
|
||||
dict => dict.value !== 2 // 过滤掉 value 为 2 的选项
|
||||
);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
@ -2,19 +2,19 @@
|
||||
<DiyEditor v-if="formData && !formLoading" v-model="currentFormData!.property"
|
||||
:title="templateItems[selectedTemplateItem].name" :libs="libs" :show-page-config="selectedTemplateItem !== 0"
|
||||
:show-tab-bar="selectedTemplateItem === 0" :show-navigation-bar="selectedTemplateItem !== 0"
|
||||
:preview-url="previewUrl" @save="submitForm" @reset="handleEditorReset" :isShow="false">
|
||||
:preview-url="previewUrl" @save="submitForm" @reset="handleEditorReset">
|
||||
<template #toolBarLeft>
|
||||
<!-- <el-radio-group
|
||||
v-model="selectedTemplateItem"
|
||||
class="h-full!"
|
||||
@change="handleTemplateItemChange"
|
||||
>
|
||||
<el-tooltip v-for="(item, index) in templateItems" :key="index" :content="item.name">
|
||||
<el-radio-button :label="index">
|
||||
<Icon :icon="item.icon" :size="24" />
|
||||
</el-radio-button>
|
||||
</el-tooltip>
|
||||
</el-radio-group> -->
|
||||
v-model="selectedTemplateItem"
|
||||
class="h-full!"
|
||||
@change="handleTemplateItemChange"
|
||||
>
|
||||
<el-tooltip v-for="(item, index) in templateItems" :key="index" :content="item.name">
|
||||
<el-radio-button :label="index">
|
||||
<Icon :icon="item.icon" :size="24" />
|
||||
</el-radio-button>
|
||||
</el-tooltip>
|
||||
</el-radio-group> -->
|
||||
</template>
|
||||
</DiyEditor>
|
||||
</template>
|
||||
|