API 兼容性:
QRN:v4.8.4
iOS:80011239
Android:60001386
QRCTNativeNavigator
可以用来获取 已经打开的页面堆栈信息。非RN页面,仅返回该页面的Activity信息或者VC信息;RN页面会返回Activity/VC + hybridID + moduleName。
import { NativeNavigator } from 'qunar-react-native';
NativeNavigator.getPageStacks (callback)
getInfo
接口获取import { QRCTNativeNavigator } from 'qunar-react-native';
NativeNavigator.getPageStacks((vcStacks)=>{
var resultStr = '';
for(let i = 0, len = vcStacks.length; i < len; i++) {
var eachInfo = vcStacks[i];
var eachInfoStr = 'nativeNreact-4.5.20-release (1).aarame: ' + eachInfo['nativeName']
if (eachInfo['hybridId']) {
eachInfoStr = eachInfoStr + 'hybridId: ' + eachInfo['hybridId']
}
if (eachInfo['moduleName']) {
eachInfoStr = eachInfoStr + ' moduleName: ' + eachInfo['moduleName']
}
resultStr = resultStr + ' \r\r ' + eachInfoStr
}
console.log("resultStr = "+resultStr)
})