|
|
ac7f0d5267
|
chore: commit pending local changes (2026-09-17 github sync)
|
2026-09-17 13:46:06 +08:00 |
|
|
|
e1963b30c5
|
fix(storefront): 折扣≥1不显示原价划线——仅让利(折扣<1)时展示原价(展示页+购买页三处同规则)
- core.py get_customer_price_display: abs(discount-1)>1e-9 → discount<1.0-1e-9,
加价(如存储1.5)/无折扣(产线1.0)时「原价」低于或等于现价还划线是误导
- purchase_confirm.dspy: 服务端初始算价文本 + 前端JS刷新脚本同款条件修正
- 验证脚本扩至44断言全过(含卡片级无原价/无line-through断言+dspy包装语法检查)
|
2026-09-08 18:50:43 +08:00 |
|
|
|
cd58974146
|
fix(storefront): getWidgetById start point must be bricks.app not app.root - popup DOM is body sibling outside app.root subtree; pay button previously read default values ignoring user input
|
2026-09-08 18:01:30 +08:00 |
|
|
|
b0b74a2b9f
|
feat(storefront): purchase popup shows live price - calc_price.dspy preview endpoint + changed-event refresh on storage_gb/valid_months/charge_mode (same cost basis as purchase_realtime)
|
2026-09-08 17:53:58 +08:00 |
|
|
|
1f399d6b00
|
feat(storefront): 显示价=定价×客户折扣率(三类统一)+产线订阅购买链路+修既有控件bug
1) get_customer_price_display 新增(core.py + __init__.py + env 注册)
统一三类产品对外报价口径:显示价 = 资源真实定价 × 客户折扣率
- 产线 pipeline_pricing_map / 存储 storres_pricing_map / 模型 llm_model.ppid
各自解析 ppid → get_pricing_display 取单位价 → × 折扣
- 折扣率解析走 discount 模块 get_min_product_discount(专属优先/'*'兜底/1.0)
>1 加价(存储1.5)、<1 让利(百炼0.9);折扣≠1 时返回 original_text 原价
- 未登录(user_org_id 空)传 '' 只命中 '*' 通用折扣 → 访客可见报价
2) purchase_realtime 加产线分支(product_type=='pipeline')
订阅制:无 usage 表,直接算价→余额预检→product_accounting_generic 实时记账→开订阅权益
charge_mode month/year,entitlement.duration_days 30/365
3) 展示页 index.ui:接 get_customer_price_display;产线卡显示月/年价+原价划线+订阅态文案;
按钮按订阅状态分流(已订阅→进入产线 / 未订阅→立即购买);product_code 兼容
opportunity_general/bidding_general/sdlc_general 与旧 PIPE-* 两套映射
4) 修两个既有 bug(购买页原本就坏):
- InputNumber 控件 bricks 未注册 → widgetBuild 返回 null 静默不渲染,改 UiInt
- 支付脚本 getWidgetById 缺第二参数(查找起点) → from_widget undefined 抛 TypeError
点击支付无反应,补 bricks.app.root;UiType 取值 .value → resultValue()
- UiType 系控件同时传 name(表单/getValue)+id(set_id 覆盖 DOM id 供 getWidgetById)
本地 mock 渲染测试 6 项全过:三类价格/订阅态分流/规划中占位/未登录访客可见价无购买按钮
|
2026-09-06 16:55:49 +08:00 |
|
|
|
275806c1cc
|
fix(product): 账号/存储产品展示缺失——建树KeyError+幽灵列+IN占位符三处修复
根因链(2026-09-06):
1. core.get_category_tree 单遍建树隐含「父节点排序在子前」假设:
子类别 sort_order=0 < 顶级 10/20,ORDER BY 后子先处理,
parent['children'].append 时父未初始化 → KeyError → storefront 500
2. storefront get_products.dspy SELECT p.icon——product 表无 icon 列 → 1054
3. 同文件 IN 占位符 f'${key}$' 生成 $cid_0$(缺花括号)sqlor 不识别
配套:init/data.json resource_module 字典补 account_resource/storage_resource
(类别编辑下拉可选),product_type 字典对应项由测试库同步补充。
数据:测试库已建账号资源/存储资源顶级类别并执行导入
(账号3产品:试用7天/月租/年租;存储1产品:工作空间标准存储)。
|
2026-09-06 14:03:44 +08:00 |
|
|
|
ff501c13b5
|
fix(purchase): user_org_id获取崩溃——DictObject的hasattr恒True导致await None()
- dspy侧显式取get_userorgid()传入(与purchase_confirm同款)
- core侧hasattr判断改callable检查,兜底_get_current_org_id
|
2026-08-28 17:09:33 +08:00 |
|
|
|
c32fa00c62
|
fix(storefront): purchase_confirm 支付fetch改绝对路径——.dspy非Jinja2渲染,{{entire_url()}}原样进浏览器导致支付按钮无响应
|
2026-08-28 17:00:16 +08:00 |
|
ymq
|
167d06cd93
|
feat(purchase): 实时购买(选A购买即记账)+续费延长+到期门禁+我的权益
核心链路:
- purchase_realtime:算价→余额预检→计费写用量→实时复式记账→开权益,失败回滚
- _grant_subscription 续费修复:未到期从 end_date 顺延不丢剩余天数,已到期重算
- check_subscription_valid 到期门禁:挂到 execute_product,到期/未购买阻断使用
- get_my_subscriptions 我的权益列表(到期状态)
- UI:purchase_confirm 确认页(余额+容量/月数输入)、purchase_realtime 支付、
my_subscriptions 权益列表+续费、usermenu.ui 挂菜单
|
2026-08-27 10:40:54 +08:00 |
|
Hermes Agent
|
6dae1676ef
|
feat: 新增商家产品商城页面(storefront)
- 左侧可收缩产品分类树
- 右侧产品列表(卡片式)和产品详情
- 未登录可浏览,登录后显示购买按钮
- 页面和API注册到load_path.py
|
2026-06-23 18:19:42 +08:00 |
|