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 09271ed4..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};`;
}
@@ -408,9 +424,10 @@
url_event(e) {
let index = e.currentTarget.dataset.index || 0;
let goods = this.list[index];
+ let split_index = 0;
if (this.theme == '5') {
- split_index = e.currentTarget.dataset.split_index || 0;
- goods = this.shop_content_list[index][split_index];
+ split_index = e.currentTarget.dataset.splitIndex || 0;
+ goods = this.shop_content_list[index].split_list[split_index];
}
app.globalData.goods_data_cache_handle(goods.id, goods);
@@ -425,8 +442,8 @@
let split_index = 0;
let goods = this.list[index];
if (this.theme == '5') {
- split_index = e.currentTarget.dataset.split_index || 0;
- goods = this.shop_content_list[index][split_index];
+ split_index = e.currentTarget.dataset.splitIndex || 0;
+ goods = this.shop_content_list[index].split_list[split_index];
}
if (this.form.shop_button_effect == '0') {
app.globalData.goods_data_cache_handle(goods.id, goods);
diff --git a/components/diy/modules/image-empty.vue b/components/diy/modules/image-empty.vue
index af0bf056..242e771e 100644
--- a/components/diy/modules/image-empty.vue
+++ b/components/diy/modules/image-empty.vue
@@ -58,6 +58,11 @@
empty_style: `${this.propErrorStyle}`,
});
img_url = this.default_image;
+ } else {
+ this.setData({
+ empty_outer_style: '',
+ empty_style: 'width: 100%; height: 100%;', // 有图片的时候显示为100%
+ });
}
this.setData({
img_url: img_url,
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 }}
+