From ac7f0d526794c4b5cc41129d5fb2c828b71acf1d Mon Sep 17 00:00:00 2001 From: yumoqing Date: Thu, 17 Sep 2026 13:46:06 +0800 Subject: [PATCH] chore: commit pending local changes (2026-09-17 github sync) --- wwwroot/category_manage.ui | 2 +- wwwroot/index.ui | 12 +++++------ wwwroot/product_manage.ui | 2 +- .../storefront/api/get_product_detail.dspy | 6 +++--- wwwroot/storefront/api/get_products.dspy | 4 ++-- wwwroot/storefront/api/my_subscriptions.dspy | 8 ++++---- wwwroot/storefront/api/purchase_confirm.dspy | 20 +++++++++---------- wwwroot/storefront/index.ui | 8 ++++---- 8 files changed, 31 insertions(+), 31 deletions(-) diff --git a/wwwroot/category_manage.ui b/wwwroot/category_manage.ui index aea0f86..9a893da 100644 --- a/wwwroot/category_manage.ui +++ b/wwwroot/category_manage.ui @@ -4,7 +4,7 @@ "subwidgets": [ { "widgettype": "Text", - "options": {"text": "产品类别管理", "fontSize": "20px", "fontWeight": "bold", "marginBottom": "16px"} + "options": {"otext": "产品类别管理", "text": "产品类别管理", "i18n": true, "fontSize": "20px", "fontWeight": "bold", "marginBottom": "16px"} }, { "widgettype": "Html", diff --git a/wwwroot/index.ui b/wwwroot/index.ui index f6aa43c..bc4fbe5 100644 --- a/wwwroot/index.ui +++ b/wwwroot/index.ui @@ -18,7 +18,7 @@ { "widgettype": "Title2", "options": { - "text": "产品管理", + "otext": "产品管理", "text": "产品管理", "i18n": true, "fontWeight": "700" } }, @@ -28,7 +28,7 @@ { "widgettype": "Text", "options": { - "text": "产品类别与产品信息管理", + "otext": "产品类别与产品信息管理", "text": "产品类别与产品信息管理", "i18n": true, "fontSize": "14px" } } @@ -65,14 +65,14 @@ { "widgettype": "Title5", "options": { - "text": "产品类别管理", + "otext": "产品类别管理", "text": "产品类别管理", "i18n": true, "fontWeight": "600" } }, { "widgettype": "Text", "options": { - "text": "管理产品类别树结构,配置类别属性", + "otext": "管理产品类别树结构,配置类别属性", "text": "管理产品类别树结构,配置类别属性", "i18n": true, "fontSize": "12px" } } @@ -101,14 +101,14 @@ { "widgettype": "Title5", "options": { - "text": "产品管理", + "otext": "产品管理", "text": "产品管理", "i18n": true, "fontWeight": "600" } }, { "widgettype": "Text", "options": { - "text": "添加和管理产品,配置产品信息", + "otext": "添加和管理产品,配置产品信息", "text": "添加和管理产品,配置产品信息", "i18n": true, "fontSize": "12px" } } diff --git a/wwwroot/product_manage.ui b/wwwroot/product_manage.ui index 1396750..52d0da3 100644 --- a/wwwroot/product_manage.ui +++ b/wwwroot/product_manage.ui @@ -4,7 +4,7 @@ "subwidgets": [ { "widgettype": "Text", - "options": {"text": "产品管理", "fontSize": "20px", "fontWeight": "bold", "marginBottom": "16px"} + "options": {"otext": "产品管理", "text": "产品管理", "i18n": true, "fontSize": "20px", "fontWeight": "bold", "marginBottom": "16px"} }, { "widgettype": "Html", diff --git a/wwwroot/storefront/api/get_product_detail.dspy b/wwwroot/storefront/api/get_product_detail.dspy index 4cf6f09..4153fd3 100644 --- a/wwwroot/storefront/api/get_product_detail.dspy +++ b/wwwroot/storefront/api/get_product_detail.dspy @@ -3,7 +3,7 @@ userid = await get_user() dbname = get_module_dbname('product_management') if not product_id: - result = {'widgettype': 'Text', 'options': {'text': '请选择一个产品'}} + result = {'widgettype': 'Text', 'options': {'otext': '请选择一个产品', 'text': '请选择一个产品', 'i18n': True}} else: async with DBPools().sqlorContext(dbname) as sor: sql = """SELECT p.*, pc.name as category_name, pc.description as category_description @@ -13,7 +13,7 @@ else: recs = await sor.sqlExe(sql, {'id': product_id}) if not recs: - result = {'widgettype': 'Text', 'options': {'text': '产品不存在或已下架'}} + result = {'widgettype': 'Text', 'options': {'otext': '产品不存在或已下架', 'text': '产品不存在或已下架', 'i18n': True}} else: p = recs[0] price_text = f"¥{float(p.price or 0):.2f}" if p.price else '按量计费' @@ -94,7 +94,7 @@ else: buttons.append({ 'widgettype': 'Text', 'options': { - 'text': '登录后即可购买', + 'otext': '登录后即可购买', 'text': '登录后即可购买', 'i18n': True, 'fontSize': '13px', 'color': '#999' } diff --git a/wwwroot/storefront/api/get_products.dspy b/wwwroot/storefront/api/get_products.dspy index 22de397..5b4793d 100644 --- a/wwwroot/storefront/api/get_products.dspy +++ b/wwwroot/storefront/api/get_products.dspy @@ -3,7 +3,7 @@ org_id = (await get_userorgid()) or '0' dbname = get_module_dbname('product_management') if not category_id: - result = {'widgettype': 'Text', 'options': {'text': '请从左侧选择一个产品分类'}} + result = {'widgettype': 'Text', 'options': {'otext': '请从左侧选择一个产品分类', 'text': '请从左侧选择一个产品分类', 'i18n': True}} else: async with DBPools().sqlorContext(dbname) as sor: # Get all sub-category IDs recursively @@ -43,7 +43,7 @@ else: products = await sor.sqlExe(sql, params) if not products: - result = {'widgettype': 'Text', 'options': {'text': '该分类下暂无产品'}} + result = {'widgettype': 'Text', 'options': {'otext': '该分类下暂无产品', 'text': '该分类下暂无产品', 'i18n': True}} else: cards = [] for p in products: diff --git a/wwwroot/storefront/api/my_subscriptions.dspy b/wwwroot/storefront/api/my_subscriptions.dspy index d376d86..963145a 100644 --- a/wwwroot/storefront/api/my_subscriptions.dspy +++ b/wwwroot/storefront/api/my_subscriptions.dspy @@ -1,10 +1,10 @@ # 我的权益:订阅列表 + 到期状态 + 续费入口 from ahserver.serverenv import ServerEnv userid = await get_user() -result = {'widgettype': 'Text', 'options': {'text': '加载中...'}} +result = {'widgettype': 'Text', 'options': {'otext': '加载中...', 'text': '加载中...', 'i18n': True}} if not userid: - result = {'widgettype': 'Text', 'options': {'text': '请先登录', 'color': '#999'}} + result = {'widgettype': 'Text', 'options': {'otext': '请先登录', 'text': '请先登录', 'i18n': True, 'color': '#999'}} else: try: env = ServerEnv() @@ -16,7 +16,7 @@ else: 'options': {'width': '100%', 'padding': '24px', 'alignItems': 'center'}, 'subwidgets': [ {'widgettype': 'Text', 'options': { - 'text': '暂无已购权益,请先前往产品商城购买', + 'otext': '暂无已购权益,请先前往产品商城购买', 'text': '暂无已购权益,请先前往产品商城购买', 'i18n': True, 'fontSize': '14px', 'color': '#999'}} ] } @@ -107,7 +107,7 @@ else: 'options': {'width': '100%', 'padding': '16px', 'overflowY': 'auto'}, 'subwidgets': [ {'widgettype': 'Title4', 'options': { - 'text': '我的权益 (%d 项)' % len(subs), 'fontWeight': '700', + 'otext': "我的权益 (${p0} 项)", 'text': "我的权益 (${p0} 项)", 'i18n': True, 'i18n_params': {"p0": str('%d' % (len(subs),))}, 'fontWeight': '700', 'marginBottom': '16px'}}, {'widgettype': 'VBox', 'options': {'width': '100%'}, 'subwidgets': cards} ] diff --git a/wwwroot/storefront/api/purchase_confirm.dspy b/wwwroot/storefront/api/purchase_confirm.dspy index 4c35f60..e118a96 100644 --- a/wwwroot/storefront/api/purchase_confirm.dspy +++ b/wwwroot/storefront/api/purchase_confirm.dspy @@ -2,12 +2,12 @@ from ahserver.serverenv import ServerEnv product_id = params_kw.get('product_id', '') userid = await get_user() -result = {'widgettype': 'Text', 'options': {'text': '加载中...'}} +result = {'widgettype': 'Text', 'options': {'otext': '加载中...', 'text': '加载中...', 'i18n': True}} if not product_id: - result = {'widgettype': 'Text', 'options': {'text': '缺少产品ID', 'color': '#e74c3c'}} + result = {'widgettype': 'Text', 'options': {'otext': '缺少产品ID', 'text': '缺少产品ID', 'i18n': True, 'color': '#e74c3c'}} elif not userid: - result = {'widgettype': 'Text', 'options': {'text': '请先登录后购买', 'color': '#e74c3c'}} + result = {'widgettype': 'Text', 'options': {'otext': '请先登录后购买', 'text': '请先登录后购买', 'i18n': True, 'color': '#e74c3c'}} else: userorgid = await get_userorgid() dbname = get_module_dbname('product_management') @@ -138,7 +138,7 @@ else: 'options': {'padding': '8px 0', 'gap': '8px', 'alignItems': 'center'}, 'subwidgets': [ {'widgettype': 'Text', 'options': { - 'text': '购买容量(GB)', 'width': '90px', 'fontSize': '13px', 'color': '#666'}}, + 'otext': '购买容量(GB)', 'text': '购买容量(GB)', 'i18n': True, 'width': '90px', 'fontSize': '13px', 'color': '#666'}}, {'widgettype': 'UiInt', 'id': 'buy_storage_gb', 'options': {'name': 'buy_storage_gb', 'value': 100, 'width': '120px'}, 'binds': _price_bind} @@ -149,7 +149,7 @@ else: 'options': {'padding': '8px 0', 'gap': '8px', 'alignItems': 'center'}, 'subwidgets': [ {'widgettype': 'Text', 'options': { - 'text': '购买月数', 'width': '90px', 'fontSize': '13px', 'color': '#666'}}, + 'otext': '购买月数', 'text': '购买月数', 'i18n': True, 'width': '90px', 'fontSize': '13px', 'color': '#666'}}, {'widgettype': 'UiInt', 'id': 'buy_valid_months', 'options': {'name': 'buy_valid_months', 'value': 1, 'width': '120px'}, 'binds': _price_bind} @@ -163,11 +163,11 @@ else: 'options': {'padding': '8px 0', 'gap': '8px', 'alignItems': 'center'}, 'subwidgets': [ {'widgettype': 'Text', 'options': { - 'text': '订阅周期', 'width': '90px', 'fontSize': '13px', 'color': '#666'}}, + 'otext': '订阅周期', 'text': '订阅周期', 'i18n': True, 'width': '90px', 'fontSize': '13px', 'color': '#666'}}, {'widgettype': 'UiCode', 'id': 'buy_charge_mode', 'options': {'name': 'buy_charge_mode', 'value': 'month', 'width': '200px', - 'data': [{'value': 'month', 'text': '包月(30天)'}, - {'value': 'year', 'text': '包年(365天,付10个月)'}]}, + 'data': [{'value': 'month', 'otext': '包月(30天)', 'text': '包月(30天)', 'i18n': True}, + {'value': 'year', 'otext': '包年(365天,付10个月)', 'text': '包年(365天,付10个月)', 'i18n': True}]}, 'binds': _price_bind} ] }) @@ -264,14 +264,14 @@ else: 'widgettype': 'VBox', 'options': {'width': '100%', 'padding': '16px'}, 'subwidgets': [ - {'widgettype': 'Title4', 'options': {'text': '确认购买', 'fontWeight': '700', 'marginBottom': '12px'}}, + {'widgettype': 'Title4', 'options': {'otext': '确认购买', 'text': '确认购买', 'i18n': True, 'fontWeight': '700', 'marginBottom': '12px'}}, {'widgettype': 'VBox', 'options': {'gap': '0', 'marginBottom': '8px'}, 'subwidgets': rows}, {'widgettype': 'VBox', 'options': {'gap': '0', 'marginBottom': '8px'}, 'subwidgets': param_widgets}, price_text_widget, { 'widgettype': 'Text', 'options': { - 'text': '支付将从账户余额实时扣款并完成记账,购买成功后权益立即生效。', + 'otext': '支付将从账户余额实时扣款并完成记账,购买成功后权益立即生效。', 'text': '支付将从账户余额实时扣款并完成记账,购买成功后权益立即生效。', 'i18n': True, 'fontSize': '12px', 'color': '#999', 'marginTop': '8px'} }, {'widgettype': 'HBox', 'options': {'gap': '12px', 'marginTop': '8px'}, diff --git a/wwwroot/storefront/index.ui b/wwwroot/storefront/index.ui index fa4e05f..4dc14ed 100644 --- a/wwwroot/storefront/index.ui +++ b/wwwroot/storefront/index.ui @@ -154,7 +154,7 @@ { "widgettype": "Text", "options": { - "text": "规划中", + "otext": "规划中", "text": "规划中", "i18n": true, "fontSize": "14px", "color": "#94a3b8", "fontWeight": "600" @@ -212,7 +212,7 @@ { "widgettype": "Text", "options": { - "text": "敬请期待", + "otext": "敬请期待", "text": "敬请期待", "i18n": true, "fontSize": "13px", "color": "#94a3b8" } @@ -241,7 +241,7 @@ { "widgettype": "Text", "options": { - "text": "按量付费", + "otext": "按量付费", "text": "按量付费", "i18n": true, "fontSize": "13px", "color": "#e74c3c", "fontWeight": "600" @@ -282,7 +282,7 @@ { "widgettype": "Text", "options": { - "text": "登录后购买", + "otext": "登录后购买", "text": "登录后购买", "i18n": true, "fontSize": "13px", "color": "#94a3b8" }