feat(menu): 移除产线管理菜单项; 客户角色首菜单改为产品展示+我的账户

- 产线管理三功能已从后端移除(死库存), 菜单同步删除
- customer.customer 角色: 首菜单=产品展示(商城卡片页), 我的账户子菜单
  (充值/我的账户/我的权益); 管理员/其他角色走原菜单
- is_admin 判断补充 *.superuser/*.admin 通配形式
This commit is contained in:
yumoqing 2026-08-28 16:34:16 +08:00
parent 33fb5fb919
commit bdad3aded3

View File

@ -1,5 +1,7 @@
{% set roles = get_user_roles(get_user()) %}
{% set is_fin = ('owner.superuser' in roles) or ('owner.admin' in roles) or ('owner.account' in roles) or ('reseller.admin' in roles) or ('reseller.accountant' in roles) or ('reseller.operator' in roles) %}
{% set is_customer = ('customer.customer' in roles) or ('*.customer' in roles) %}
{% set is_admin = ('owner.superuser' in roles) or ('owner.admin' in roles) or ('*.superuser' in roles) or ('*.admin' in roles) %}
{
"id": "app",
"widgettype": "VBox",
@ -107,12 +109,36 @@
"height": "100%",
"target": "app.main_content",
"items": [
{% if is_customer and not is_admin %}
{
"name": "pipeline_core",
"label": "产线管理",
"icon": "{{entire_url('/imgs/cubes.svg')}}",
"script": "this.open_tab({name:'pipeline_core',label:'产线管理',url:'/pipeline_core',removable:true})"
"name": "product_showcase",
"label": "产品展示",
"icon": "",
"script": "this.open_tab({name:'product_showcase',label:'产品展示',url:'/product_management/storefront/index.ui',removable:true})"
},
{
"name": "cust_account",
"label": "我的账户",
"icon": "",
"items": [
{
"name": "cust_recharge",
"label": "充值",
"script": "this.open_tab({name:'cust_recharge',label:'充值',url:'/unipay/recharge.ui',removable:true})"
},
{
"name": "cust_myaccounts",
"label": "我的账户",
"script": "this.open_tab({name:'cust_myaccounts',label:'我的账户',url:'/accounting/myaccounts.ui',removable:true})"
},
{
"name": "cust_subscriptions",
"label": "我的权益",
"script": "this.open_tab({name:'cust_subscriptions',label:'我的权益',url:'/product_management/storefront/api/my_subscriptions.dspy',removable:true})"
}
]
}
{% else %}
{
"name": "llm_manage",
"label": "模型管理",
@ -486,6 +512,7 @@
}
]
}
{% endif %}
]
}
}