diff --git a/App.vue.bak-commit2 b/App.vue.bak-commit2 new file mode 100644 index 00000000..9af7c548 --- /dev/null +++ b/App.vue.bak-commit2 @@ -0,0 +1,3445 @@ + + \ No newline at end of file diff --git a/common/css/page.css b/common/css/page.css index 7d072437..22d83719 100644 --- a/common/css/page.css +++ b/common/css/page.css @@ -365,7 +365,7 @@ button:before { * 价格 */ .sales-price { - color: #E22C08; + color: #f1a29e; font-weight: bold; font-size: 28rpx; } @@ -460,7 +460,7 @@ button:before { border: 2rpx solid #FFF !important; } .br-red { - border: 2rpx solid #E22C08 !important; + border: 2rpx solid #f1a29e !important; } .br-yellow { border: 2rpx solid #f6c133 !important; @@ -519,7 +519,7 @@ button:before { border-right: dashed 2rpx #EEEEEE !important; } .br-dashed-red { - border: dashed 2rpx #E22C08 !important; + border: dashed 2rpx #f1a29e !important; } .br-dashed-yellow { border: dashed 2rpx #f6c133 !important; @@ -536,7 +536,7 @@ button:before { * 文本价格色、基础色、白色、黑色、灰色、浅灰色、红色、黄色、绿色、蓝色 */ .cr-price { - color: #E22C08; + color: #f1a29e; } .cr-base { color: #666 !important; @@ -561,7 +561,7 @@ button:before { color: #e7e7e7 !important; } .cr-red { - color: #E22C08 !important; + color: #f1a29e !important; } .cr-yellow { color: #f6c133 !important; diff --git a/pages/diy/components/diy/goods-list.vue b/pages/diy/components/diy/goods-list.vue index a5573d94..6ce74aea 100644 --- a/pages/diy/components/diy/goods-list.vue +++ b/pages/diy/components/diy/goods-list.vue @@ -25,7 +25,7 @@ - + @@ -126,7 +126,7 @@ - + diff --git a/pages/diy/components/diy/modules/subscript.vue b/pages/diy/components/diy/modules/subscript.vue index 62ba332d..914350ad 100644 --- a/pages/diy/components/diy/modules/subscript.vue +++ b/pages/diy/components/diy/modules/subscript.vue @@ -10,7 +10,7 @@ @@ -32,6 +32,11 @@ type: String, default: 'outer', }, + // 商品类型(用于占位符 $good_type 映射):ticket / normal / ... + propItemType: { + type: String, + default: '', + }, }, data() { return { @@ -40,6 +45,15 @@ corner_img_marker: '', img_style: '', text_size: '', + // 占位符 token -> item_type -> 文案 + // 运营后续可在此扩展 + placeholder_map: { + '$good_type': { + ticket: '演出', + normal: '周边', + }, + }, + display_text: '', }; }, created() { @@ -47,6 +61,22 @@ }, methods: { isEmpty, + // 占位符替换:text 中所有已知 token -> 根据 propItemType 找文案。 + // item_type 缺失/未知 → 原样保留(fallback,方便运营发现异常) + replace_placeholder(text) { + if (isEmpty(text) || typeof text !== 'string') return text || ''; + const map = this.placeholder_map || {}; + let out = text; + Object.keys(map).forEach((token) => { + if (out.indexOf(token) === -1) return; + const item_map = map[token] || {}; + const replaced = item_map[this.propItemType]; + if (replaced !== undefined && replaced !== null) { + out = out.split(token).join(replaced); + } + }); + return out; + }, // 初始化数据 init() { if (!isEmpty(this.propValue)) { @@ -61,6 +91,7 @@ text_size: `font-size: ${ new_style.subscript_style.text_or_icon_size * 2 }rpx;color: ${ new_style.subscript_style.text_or_icon_color };`, corner_img_marker: common_img_computer(new_style.subscript_style), img_style: `height: ${new_style.subscript_style.img_height * 2}rpx; width: ${new_style.subscript_style.img_width * 2}rpx`, + display_text: this.replace_placeholder(new_content.subscript_text || ''), }); } } diff --git a/pages/diy/components/diy/seckill.vue b/pages/diy/components/diy/seckill.vue index ac533aa6..c0e193dc 100644 --- a/pages/diy/components/diy/seckill.vue +++ b/pages/diy/components/diy/seckill.vue @@ -51,7 +51,7 @@ - + @@ -119,7 +119,7 @@ - +