From b5e9bd4cac294d08cd27a1241559ab04734af439 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com>
Date: Tue, 25 Mar 2025 10:22:23 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BC=98=E6=83=A0=E5=8A=B5?=
=?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=80=BB=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/common/data-filter/index.vue | 49 +++++++-
src/components/model-coupon/index.vue | 12 +-
.../model-coupon/model-coupon-content.vue | 108 ++++++------------
src/views/layout/index.vue | 13 ++-
4 files changed, 101 insertions(+), 81 deletions(-)
diff --git a/src/components/common/data-filter/index.vue b/src/components/common/data-filter/index.vue
index f3dc2781..36af7e0d 100644
--- a/src/components/common/data-filter/index.vue
+++ b/src/components/common/data-filter/index.vue
@@ -191,6 +191,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -233,7 +274,7 @@
default: () => {},
},
type: {
- type: String as PropType<'goods' | 'blog' | 'article' | 'binding' | 'realstore' | 'merchant' | 'ask' | 'activity'>,
+ type: String as PropType<'goods' | 'blog' | 'article' | 'binding' | 'realstore' | 'merchant' | 'ask' | 'activity' | 'coupon'>,
default: 'goods',
}
});
@@ -288,6 +329,12 @@
imgParam: 'cover',
titleParam: 'title',
},
+ coupon: {
+ optionListKey: 'data_type_list',
+ imgParam: '',
+ titleParam: 'name',
+ typeParam: 'custom',
+ },
default: {
optionListKey: 'brand_data_type_list',
imgParam: 'logo',
diff --git a/src/components/model-coupon/index.vue b/src/components/model-coupon/index.vue
index 1bf75392..489cb58f 100644
--- a/src/components/model-coupon/index.vue
+++ b/src/components/model-coupon/index.vue
@@ -195,7 +195,11 @@ const theme_bg_img = ref({
// 初始化数据
onMounted(() => {
if (!isEmpty(form.value.data_list) && form.value.data_type == '0') {
- data_list.value = form.value.data_list;
+ data_list.value = form.value.data_list.map((item: any) => ({
+ ...item.data,
+ name: !isEmpty(item.new_title) ? item.new_title : item.data.name,
+ new_cover: item.new_cover,
+ }));
} else if (form.value.data_type == '1') {
if (!isEmpty(form.value.data_auto_list)) {
data_list.value = form.value.data_auto_list;
@@ -247,7 +251,11 @@ watch(
get_coupon();
} else {
if (!isEmpty(form.value.data_list)) {
- data_list.value = cloneDeep(form.value.data_list);
+ data_list.value = form.value.data_list.map((item: any) => ({
+ ...item.data,
+ name: !isEmpty(item.new_title) ? item.new_title : item.data.name,
+ new_cover: item.new_cover,
+ }));
} else {
data_list.value = Array(4).fill(default_list);
}
diff --git a/src/components/model-coupon/model-coupon-content.vue b/src/components/model-coupon/model-coupon-content.vue
index 104a2f73..8b3c31d4 100644
--- a/src/components/model-coupon/model-coupon-content.vue
+++ b/src/components/model-coupon/model-coupon-content.vue
@@ -12,74 +12,15 @@
优惠券数据
-
-
- {{ item.name }}
-
-
-
-
-
-
-
- {{ row.name }}
-
-
-
+添加
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.name }}
-
-
-
-
- {{ item.name }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+