private void openMiniProgram(Object arguments) {
JSONObject json = JSONObject.parseObject(arguments.toString());
String appID ="";// json.getString("appid");
String path = json.getString("path");
Log.d("YYY", "openMiniProgram json=" + json);
Log.d("YYY", "openMiniProgram appID=" + appID);
IUniMP uniCache = mUniMPCaches.get(appID);
if (uniCache != null && uniCache.isRuning()) {
IUniMP uniInstance = mUniMPCaches.get(appID);
if (uniInstance != null) {
uniInstance.closeUniMP();
}
}
ThreadManager.mainThreadExecutor(new Runnable() {
@Override
public void run() {
UniMPOpenConfiguration uniMPOpenConfiguration = new UniMPOpenConfiguration();
try {
if (arguments != null) {
uniMPOpenConfiguration.extraData = new org.json.JSONObject(arguments.toString());
}
uniMPOpenConfiguration.path =path;// "/pages/vue/ledger/device/index";
IUniMP uniMP = DCUniMPSDK.getInstance().openUniMP(mContext, appID, uniMPOpenConfiguration);
mUniMPCaches.put(uniMP.getAppid(), uniMP);
} catch (Exception e) {
Log.d("YYY", "openMiniProgram e=" + e);
throw new RuntimeException(e);
}
}
});
}

- 发布:2025-08-06 18:56
- 更新:2025-08-06 19:32
- 阅读:46
产品分类: uniapp/App
PC开发环境操作系统: Mac
PC开发环境操作系统版本号: mac 15.4
HBuilderX类型: 正式
HBuilderX版本号: 4.76
手机系统: Android
手机系统版本号: Android 11
手机厂商: 华为
手机机型: 荣耀畅享
页面类型: vue
vue版本: vue3
打包方式: 云端
项目创建方式: HBuilderX
操作步骤:
预期结果:
想知道小程序里面打开小程序文件层级是怎么限制的
想知道小程序里面打开小程序文件层级是怎么限制的
实际结果:
/pages/vue/ledger/device/index这么深的层级就打不开了
/pages/vue/ledger/device/index这么深的层级就打不开了
bug描述:
uniapp 小程序 uni.navigateTo方法对文件夹太深的页面打不开是怎么回事
/pages/vue/ledger/device/index这么深的层级就打不开了
/pages/device/index这么深的层级就打开了
1 个回复
DCloud_UNI_JBB
navigateTo是调用的小程序原生的api,是小程序有限制