From e998b632a62be267091a5144f4720c5cd5a88ec7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com>
Date: Fri, 18 Oct 2024 15:15:51 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B5=E9=9D=A2=E6=98=BE?=
=?UTF-8?q?=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
App.vue | 8 +++---
components/diy/diy.vue | 4 +--
components/diy/footer.vue | 2 +-
components/diy/goods-list.vue | 32 +++++++++++++++++------
components/diy/seckill.vue | 48 ++++++++++++++++++++---------------
5 files changed, 59 insertions(+), 35 deletions(-)
diff --git a/App.vue b/App.vue
index 1abfddf0..9bb5cc13 100644
--- a/App.vue
+++ b/App.vue
@@ -7,12 +7,12 @@
data: {
// 基础配置
// 数据接口请求地址
- request_url: 'http://shopxo.com/',
- // request_url:'https://new.shopxo.vip/',
+ // request_url: 'http://shopxo.com/',
+ request_url:'https://new.shopxo.vip/',
// 静态资源地址(如系统根目录不在public目录下面请在静态地址后面加public目录、如:https://d1.shopxo.vip/public/)
- static_url: 'http://shopxo.com/',
- // static_url:'https://new.shopxo.vip/',
+ // static_url: 'http://shopxo.com/',
+ static_url:'https://new.shopxo.vip/',
// 系统类型(默认default、如额外独立小程序、可与程序分身插件实现不同主体小程序及支付独立)
system_type: 'default',
diff --git a/components/diy/diy.vue b/components/diy/diy.vue
index 6cab8cb6..994e3207 100644
--- a/components/diy/diy.vue
+++ b/components/diy/diy.vue
@@ -141,8 +141,8 @@
default: '',
},
propKey: {
- type: String,
- default: '',
+ type: Number,
+ default: 0,
},
},
components: {
diff --git a/components/diy/footer.vue b/components/diy/footer.vue
index 7074963b..8603e337 100644
--- a/components/diy/footer.vue
+++ b/components/diy/footer.vue
@@ -35,7 +35,7 @@
props: {
propKey: {
type: [Number, String],
- default: '‘',
+ default: '',
},
propValue: {
type: Object,
diff --git a/components/diy/goods-list.vue b/components/diy/goods-list.vue
index c3896a1d..b9869942 100644
--- a/components/diy/goods-list.vue
+++ b/components/diy/goods-list.vue
@@ -23,9 +23,12 @@
-
+
- {{ item.title }}
+
+ {{ item.title }}
+ {{ item.simple_desc }}
+
{{ icon_data.name }}
@@ -113,9 +116,12 @@
-
+
- {{ item.title }}
+
+ {{ item.title }}
+ {{ item.simple_desc }}
+
{{ icon_data.name }}
@@ -219,6 +225,7 @@
sold_number_style: '',
score_style: '',
button_style: '',
+ simple_desc: '',
};
},
computed: {
@@ -277,11 +284,12 @@
style_container: this.propIsCommonStyle ? common_styles_computer(new_style.common_style) : '', // 公共样式
style_img_container: this.propIsCommonStyle ? common_img_computer(new_style.common_style) : '', // 图片样式
// 内容样式设置
- title_style: this.trends_config(new_style, 'title'),
+ title_style: this.trends_config(new_style, 'title', 'title', new_form.theme),
price_style: this.trends_config(new_style, 'price'),
sold_number_style: this.trends_config(new_style, 'sold_number'),
score_style: this.trends_config(new_style, 'score'),
button_style: this.trends_config(new_style, 'button', 'gradient'),
+ simple_desc: this.trends_config(new_style, 'simple_desc', 'desc'),
shop_content_list: this.get_shop_content_list(new_list, new_form),
is_show_cart: new_form.shop_button_effect == '1',
});
@@ -382,14 +390,22 @@
return this.form.is_show.includes(index);
},
// 根据传递的参数,从对象中取值
- trends_config(new_style, key, type) {
- return this.style_config(new_style[`shop_${key}_typeface`], new_style[`shop_${key}_size`], new_style[`shop_${key}_color`], type);
+ trends_config(new_style, key, type, theme) {
+ return this.style_config(new_style[`shop_${key}_typeface`], new_style[`shop_${key}_size`], new_style[`shop_${key}_color`], type, theme);
},
// 根据传递的值,显示不同的内容
- style_config(typeface, size, color, type) {
+ style_config(typeface, size, color, type, theme) {
let style = `font-weight:${typeface}; font-size: ${size * 2}rpx;`;
if (type == 'gradient') {
style += this.button_gradient;
+ } else if (type == 'title') {
+ if (['1', '6'].includes(theme)) {
+ style += `line-height: ${size}px;height: ${size}px;color: ${color};`;
+ } else if (['0', '2', '3', '4', '5'].includes(theme)) {
+ style += `line-height: ${size > 0 ? size + 3 : 0}px;height: ${size > 0 ? (size + 3) * 2 : 0}px;color: ${color};`;
+ }
+ } else if (type == 'desc') {
+ style += `line-height: ${size}px;height: ${size}px;color: ${color};`;
} else {
style += `color: ${color};`;
}
diff --git a/components/diy/seckill.vue b/components/diy/seckill.vue
index 27bf64ef..ec036fa1 100644
--- a/components/diy/seckill.vue
+++ b/components/diy/seckill.vue
@@ -37,7 +37,7 @@
-
+
@@ -52,10 +52,13 @@
-
+
- {{ item.title }}
+
+ {{ item.title }}
+ {{ item.simple_desc }}
+
- {{ item.title }}
+
+ {{ item.title }}
+ {{ item.simple_desc }}
+