MCPcopy Create free account
hub / github.com/Tencent/kbone / getMatchRoute

Method getMatchRoute

packages/miniprogram-render/src/bom/miniprogram.js:78–87  ·  view source on GitHub ↗

* 需要匹配对应路由的 route

(pathname)

Source from the content-addressed store, hash-verified

76 * 需要匹配对应路由的 route
77 */
78 getMatchRoute(pathname) {
79 const keys = Object.keys(pageUrlRouteMap)
80 for (const key of keys) {
81 const matchRes = pageUrlRouteMap[key](pathname)
82
83 if (matchRes) return matchRes // 匹配成功
84 }
85
86 return null
87 }
88
89 /**
90 * 判断是否 tabBar 页面

Callers 5

onShareAppMessageFunction · 0.80
$_checkUrlMethod · 0.80
$$openMethod · 0.80
onShareAppMessageFunction · 0.80
onShareAppMessageFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected