diff --git a/App.vue b/App.vue index 96a0a19e..79b838d1 100644 --- a/App.vue +++ b/App.vue @@ -1103,18 +1103,20 @@ * status [string] 状态 默认error [正确success, 错误error] */ showToast(msg, status) { - if ((status || 'error') == 'success') { - uni.showToast({ - icon: 'success', - title: msg, - duration: 3000, - }); - } else { - uni.showToast({ - icon: 'none', - title: msg, - duration: 3000, - }); + if ((msg || null) != null) { + if ((status || 'error') == 'success') { + uni.showToast({ + icon: 'success', + title: msg, + duration: 3000, + }); + } else { + uni.showToast({ + icon: 'none', + title: msg, + duration: 3000, + }); + } } }, diff --git a/components/diy/article-list.vue b/components/diy/article-list.vue index ca3ca96b..46d4e4a6 100644 --- a/components/diy/article-list.vue +++ b/components/diy/article-list.vue @@ -21,7 +21,7 @@
{{ item.new_title ? item.new_title : item.data.title }}
-
{{ item.data.describe || '' }}
+
{{ item.data.describe || '' }}
{{ field_show.includes('0') ? item.data.add_time : '' }} @@ -58,7 +58,7 @@
{{ item.new_title ? item.new_title : item.data.title }}
-
{{ item.data.describe || '' }}
+
{{ item.data.describe || '' }}
{{ field_show.includes('0') ? item.data.add_time : '' }} @@ -168,6 +168,7 @@ // 一行显示的数量 slides_per_group: 1, next_margin: '0rpx', + field_desc_row: '1', }; }, watch: { @@ -184,7 +185,14 @@ init() { const new_content = this.propValue.content || {}; const new_style = this.propValue.style || {}; + // 描述样式 + const desc_size = new_style.desc_size; + let desc_style = 'font-size:' + desc_size + 'px;line-height:' + desc_size + 'px;height:' + desc_size + 'px;color:' + new_style.desc_color + ';'; + if (new_content.field_desc_row == '2') { + desc_style = 'font-size:' + desc_size + 'px;line-height:' + (desc_size > 0 ? desc_size + 3 : 0 ) + 'px;height:'+ (desc_size > 0 ? (desc_size + 3) * 2 : 0) + 'px;color:' + new_style.desc_color + ';'; + } this.setData({ + field_desc_row: new_content.field_desc_row, name_float: !isEmpty(new_content.name_float) ? new_content.name_float : '0', // 判断是自动还是手动 data_list: @@ -203,7 +211,7 @@ field_show: new_content.field_show, // 样式 article_name: 'font-size:' + new_style.name_size + 'px;' + 'font-weight:' + new_style.name_weight + ';' + 'color:' + new_style.name_color + ';', - article_desc: 'font-size:' + new_style.desc_size + 'px;line-height:' + new_style.desc_size + 'px;height:' + new_style.desc_size + 'px;color:' + new_style.desc_color + ';', + article_desc: desc_style, article_date: 'font-size:' + new_style.time_size + 'px;' + 'font-weight:' + new_style.time_weight + ';' + 'color:' + new_style.time_color + ';', article_page_view: 'font-size:' + new_style.page_view_size + 'px;' + 'font-weight:' + new_style.page_view_weight + ';' + 'color:' + new_style.page_view_color + ';', content_radius: radius_computer(new_style.content_radius), diff --git a/components/diy/goods-list.vue b/components/diy/goods-list.vue index bc217bfb..9b0adc35 100644 --- a/components/diy/goods-list.vue +++ b/components/diy/goods-list.vue @@ -32,7 +32,7 @@ {{ item.title }} - {{ item.simple_desc }} + {{ item.simple_desc }} {{ icon_data.name }} @@ -132,7 +132,7 @@ {{ item.title }} - {{ item.simple_desc }} + {{ item.simple_desc }} {{ icon_data.name }} @@ -353,12 +353,12 @@ style_img_container: this.propIsCommonStyle ? common_img_computer(new_style.common_style, this.propIndex) : '', // 图片样式 // 内容样式设置 button_gradient: button_gradient, - title_style: this.trends_config(new_style, 'title', 'title', new_form.theme), + title_style: this.trends_config(new_style, 'title', 'title', new_form), 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', 'buy_button') + button_gradient, - simple_desc: this.trends_config(new_style, 'simple_desc', 'desc'), + simple_desc: this.trends_config(new_style, 'simple_desc', 'desc', new_form), price_symbol: !isEmpty(new_style.shop_price_symbol_color) ? this.trends_config(new_style, 'price_symbol') : 'font-size: 18rpx;color: #EA3323;' , price_unit: !isEmpty(new_style.shop_price_unit_color) ? this.trends_config(new_style, 'price_unit') : 'font-size: 18rpx;color: #EA3323;', original_price: this.trends_config(new_style, 'original_price'), @@ -464,20 +464,24 @@ return this.form.is_show.includes(index); }, // 根据传递的参数,从对象中取值 - 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); + trends_config(new_style, key, type, new_form) { + return this.style_config(new_style[`shop_${key}_typeface`], new_style[`shop_${key}_size`], new_style[`shop_${key}_color`], type, new_form); }, // 根据传递的值,显示不同的内容 - style_config(typeface, size, color, type, theme) { + style_config(typeface, size, color, type, new_form) { let style = `font-weight:${typeface}; font-size: ${size * 2}rpx;`; if (type == 'title') { - if (['1', '6'].includes(theme)) { + if (['1', '6'].includes(new_form.theme)) { style += `line-height: ${size * 2}rpx;height: ${size * 2}rpx;color: ${color};`; - } else if (['0', '2', '3', '4', '5'].includes(theme)) { + } else if (['0', '2', '3', '4', '5'].includes(new_form.theme)) { style += `line-height: ${size > 0 ? (size + 3) * 2 : 0}rpx;height: ${size > 0 ? (size + 3) * 4 : 0}rpx;color: ${color};`; } } else if (type == 'desc') { - style += `line-height: ${size * 2}rpx;height: ${size * 2}rpx;color: ${color};`; + if (new_form.simple_desc_row == '2') { + style += `line-height: ${size > 0 ? (size + 3) * 2 : 0}rpx;height: ${size > 0 ? (size + 3) * 4 : 0}rpx;color: ${color};`; + } else { + style += `line-height: ${size * 2}rpx;height: ${size * 2}rpx;color: ${color};`; + } } else { if (type != 'buy_button') { style += `color: ${color};`; diff --git a/pages/goods-search-start/goods-search-start.vue b/pages/goods-search-start/goods-search-start.vue index 87a99b7d..80fe0d0a 100644 --- a/pages/goods-search-start/goods-search-start.vue +++ b/pages/goods-search-start/goods-search-start.vue @@ -69,7 +69,7 @@ - +