This specification defines the native WeChat Mini Program app shell for 普瑞互联网医院智慧医院小程序 V2.0, including base project structure, routing, custom tabBar, global UI tokens, unified request wrapping, login/hospital initialization skeletons, and legacy resource reuse helpers.
The source directory SHALL contain a native WeChat Mini Program structure with app.js, app.json, app.wxss, project.config.json, sitemap.json, pages, components, custom-tab-bar, utils, and assets entry points.
04-新项目源码_source/pri-smart-hospital-miniprogram in WeChat DevToolssubPackages item is registered in app.json.The app shell SHALL register the five first-level tab pages, the hospital switch placeholder page, and the common error page.
The app shell SHALL provide a custom tabBar component with selected state, unselected state, badge placeholders, and configurable guidance tab visibility.
tabBarSettings.guideHospConfig is YtabBarSettings.guideHospConfig is not YThe app shell SHALL provide project-level UI tokens and common classes for page background, hero area, cards, buttons, text, loading, empty, error, disabled, and image fallback states.
The app shell SHALL provide a request wrapper for the legacy unified gateway that supports business code, data/params, namespace, session: [userData], HISFlag, and UPPFlag.
request({ code: "01050001", data: {} }) is calledcode, HISFlag: "N", UPPFlag: "N", session: [userData], and params.namespace is YHISFlag is Ynamespace is UPPUPPFlag is Y.The app shell SHALL provide skeletons for WeChat automatic login and hospital configuration initialization without blocking base page browsing on failure.
userDatawx.login -> 01050001 login path02010009 initialization pathuserData, allHospitalData, and global stateThe app shell SHALL provide configuration and helper functions for legacy image host, upload URL, download URL, image URL joining, and image failure fallback.