NativeNavigator 页面堆栈信息

API 兼容性:
QRN:v4.8.4
iOS:80011239
Android:60001386

QRCTNativeNavigator 可以用来获取 已经打开的页面堆栈信息。非RN页面,仅返回该页面的Activity信息或者VC信息;RN页面会返回Activity/VC + hybridID + moduleName。

引入

import { NativeNavigator } from 'qunar-react-native';

API

NativeNavigator.getPageStacks (callback)

数据结构

button

使用说明

通过 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)
})