统一 H5 宿主壳能力协议
新增 HostBridge 通用宿主能力服务与测试 迁移登录支付分享订阅入口到通用 HostBridge API 保留微信小程序旧接口兼容包装 补充宿主壳协议文档与项目记忆
This commit is contained in:
@@ -10,7 +10,7 @@ import {lockMobileViewportZoom} from './mobileViewportZoomLock';
|
||||
import {resolveAppRoute} from './routing/appRoutes';
|
||||
import {RouteImageReadyGate} from './routing/RouteImageReadyGate';
|
||||
import {RouteLoadingScreen} from './routing/RouteLoadingScreen';
|
||||
import {isWechatMiniProgramWebViewRuntime} from './services/authService';
|
||||
import {getHostRuntime} from './services/host-bridge/hostBridge';
|
||||
|
||||
type AppRoot = ReturnType<typeof createRoot>;
|
||||
|
||||
@@ -28,7 +28,7 @@ if (!rootElement) {
|
||||
}
|
||||
|
||||
function markWechatMiniProgramRuntime() {
|
||||
if (isWechatMiniProgramWebViewRuntime()) {
|
||||
if (getHostRuntime().kind === 'wechat_mini_program') {
|
||||
document.documentElement.dataset.wechatMiniProgramRuntime = 'true';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user