feat(miniprogram): add reusable web-view shell for H5 business pages.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
wuzilongandCursor committed 2026-09-14 16:22:12 +08:00
1 parent 8fbe0679c9
commit 57a831a36f
4 files changed
+95 -4

No files matched your search

+6 -3
View File
@@ -24,7 +24,8 @@ export const AUTH_API = {
LOGOUT: '/web/auth/logout',
CURRENT_USER: '/web/auth/current-user',
REFRESH_TOKEN: '/web/auth/refresh-token',
MENU_CODES: '/web/auth/menu-codes'
MENU_CODES: '/web/auth/menu-codes',
MP_WEBVIEW_TICKET: '/web/auth/mp-webview-ticket'
}
/**
@@ -69,7 +70,8 @@ export const PAGE_PATHS = {
plTransportPlan: '/pages/pl/transport-plan/list',
plTransportPlanDetail: '/pages/pl/transport-plan/detail',
plDriverPlan: '/pages/pl/driver-plan/list',
plDriverPlanDetail: '/pages/pl/driver-plan/detail'
plDriverPlanDetail: '/pages/pl/driver-plan/detail',
mpWebview: '/pages/common/mp-webview'
}
/** 工作台菜单 code → 页面路径 */
@@ -89,7 +91,8 @@ export const WORKBENCH_ROUTE_MAP = {
'bx-wf-reimburse': PAGE_PATHS.bxWfReimburse,
'pl-fuel-register': PAGE_PATHS.plFuelRegister,
'pl-transport-plan': PAGE_PATHS.plTransportPlan,
'pl-driver-plan': PAGE_PATHS.plDriverPlan
'pl-driver-plan': PAGE_PATHS.plDriverPlan,
'pl-plan-webview': PAGE_PATHS.mpWebview + '?path=' + encodeURIComponent('/m/pl/plan')
}
export const TOKEN_KEY = 'sx_token'
+8 -1
View File
@@ -56,7 +56,7 @@ export const WORKBENCH_MODULES = [
{
key: 'pl',
title: '运输管理',
desc: '加油登记 · 运输计划单 · 司机运输计划单',
desc: '加油登记 · 运输计划单 · 运输计划 · 司机运输计划单',
iconText: '运输',
visible: true,
menus: [
@@ -74,6 +74,13 @@ export const WORKBENCH_MODULES = [
icon: '📋',
perms: 'mini:pl:transportPlan:list'
},
{
name: '运输计划',
enabled: true,
code: 'pl-plan-webview',
icon: '📝',
perms: 'mini:pl:plan:manage'
},
{
name: '司机运输计划单',
enabled: true,