From f2e828c7b6d8392dd0d76364043aa52bcbba9af6 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 31 Aug 2026 08:38:32 +0800 Subject: [PATCH] =?UTF-8?q?feat(storefront):=20=E4=BA=A7=E7=BA=BF=E4=BA=A7?= =?UTF-8?q?=E5=93=81=E5=B1=95=E7=A4=BA=E5=9E=8B=E5=8D=A1=E7=89=87=E2=80=94?= =?UTF-8?q?=E2=80=94=E8=BF=9B=E4=BA=A7=E7=BA=BF=E5=85=A5=E5=8F=A3/?= =?UTF-8?q?=E8=A7=84=E5=88=92=E4=B8=AD=E5=8D=A0=E4=BD=8D=EF=BC=8C=E4=B8=8D?= =?UTF-8?q?=E8=B5=B0=E8=B4=AD=E4=B9=B0=E6=89=A3=E6=AC=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wwwroot/storefront/index.ui | 87 ++++++++++++++++++++++++++++++++++++- 1 file changed, 86 insertions(+), 1 deletion(-) diff --git a/wwwroot/storefront/index.ui b/wwwroot/storefront/index.ui index d62ce2c..b5daf08 100644 --- a/wwwroot/storefront/index.ui +++ b/wwwroot/storefront/index.ui @@ -52,6 +52,20 @@ {% if p.get('is_active', true) %} {% set disp = get_product_display_info(p.get('id')) %} {% set pricing_text = (disp or {}).get('pricing_text', '定价暂不可用') if (disp or {}).get('success') else '定价暂不可用' %} +{% set is_pipeline = (p.get('product_type') == 'pipeline') %} +{% set extra = {} %} +{% if is_pipeline %} +{% set extra = {'tab_name': 'pipeline_card_' + str(p.get('product_code','')), 'tab_label': p.get('product_name') or '', 'url': '', 'planned': False, 'message': ''} %} +{% if (p.get('product_code') or '') == 'PIPE-OPP' %} +{% set _ = extra.update({'url': '/pipeline-opportunity/agent'}) %} +{% elif (p.get('product_code') or '') == 'PIPE-BID' %} +{% set _ = extra.update({'url': '/pipeline-bidding/agent'}) %} +{% elif (p.get('product_code') or '') == 'PIPE-DEV' %} +{% set _ = extra.update({'url': '/pipeline_core/agent'}) %} +{% else %} +{% set _ = extra.update({'planned': True, 'message': (p.get('product_name') or '') + '规划中,尚未开发'}) %} +{% endif %} +{% endif %} {% if not ns.first %},{% endif %} {% set ns.first = false %} { @@ -65,6 +79,27 @@ "cursor": "pointer", "gap": "8px" }, +{% if is_pipeline %} + "binds": [ +{% if extra.planned %} + { + "wid": "self", + "event": "click", + "actiontype": "script", + "target": "self", + "script": {{json.dumps("bricks.show_message({title:" + json.dumps(extra.tab_label, ensure_ascii=False) + ",message:" + json.dumps(extra.message, ensure_ascii=False) + "});", ensure_ascii=False)}} + } +{% else %} + { + "wid": "self", + "event": "click", + "actiontype": "script", + "target": "self", + "script": {{json.dumps("var _tp=bricks.getWidgetById('main_content',bricks.app);if(_tp&&_tp.open_tab){_tp.open_tab({name:" + json.dumps(extra.tab_name, ensure_ascii=False) + ",label:" + json.dumps(extra.tab_label, ensure_ascii=False) + ",url:" + json.dumps(extra.url, ensure_ascii=False) + ",removable:true});}", ensure_ascii=False)}} + } +{% endif %} + ], +{% else %} "binds": [ { "wid": "self", @@ -85,6 +120,7 @@ } } ], +{% endif %} "subwidgets": [ { "widgettype": "Title4", @@ -111,6 +147,23 @@ } ] }, +{% if is_pipeline %} + { + "widgettype": "Text", + "options": { +{% if extra.planned %} + "text": "规划中", + "fontSize": "14px", + "color": "#94a3b8", + "fontWeight": "600" +{% else %} + "text": "订阅制", + "fontSize": "14px", + "color": "#e74c3c" +{% endif %} + } + }, +{% else %} { "widgettype": "Text", "options": { @@ -119,6 +172,7 @@ "color": "#e74c3c" } }, +{% endif %} { "widgettype": "HBox", "options": { @@ -126,7 +180,38 @@ "justifyContent": "flex-end" }, "subwidgets": [ -{% if userid %} +{% if is_pipeline %} +{% if extra.planned %} + { + "widgettype": "Text", + "options": { + "text": "敬请期待", + "fontSize": "13px", + "color": "#94a3b8" + } + } +{% else %} + { + "widgettype": "Button", + "options": { + "label": "进入产线", + "bgcolor": "#2563eb", + "color": "#fff", + "padding": "8px 24px", + "borderRadius": "6px" + }, + "binds": [ + { + "wid": "self", + "event": "click", + "actiontype": "script", + "target": "self", + "script": {{json.dumps("var _tp=bricks.getWidgetById('main_content',bricks.app);if(_tp&&_tp.open_tab){_tp.open_tab({name:" + json.dumps(extra.tab_name, ensure_ascii=False) + ",label:" + json.dumps(extra.tab_label, ensure_ascii=False) + ",url:" + json.dumps(extra.url, ensure_ascii=False) + ",removable:true});}", ensure_ascii=False)}} + } + ] + } +{% endif %} +{% elif userid %} { "widgettype": "Button", "options": {