wx.navigateTo的参数url如何拼接路径?

小程序 文章 2022-02-16 18:00 632 0 全屏看文

AI助手支持GPT4.0

wx.navigateTo的参数url如何拼接路径?How does the parameter url of wx.navigateTo concatenate the path?

wx.navigateTo的参数url如何拼接路径?

项目为kbone vue 官方demo,目录结构如下

在srcviewsexpertsPatrolIndex.vue中方法如下

goToPageB(){  wx.navigateTo({    url:'../detail/expertsDetails.vue'//按照此写法仍报错找不到此文件  })},

The project is the official demo of kbone Vue. The directory structure is as follows: SRC views expertspacrol index The method in Vue is as follows: gotopageb() {Wx. Navigateto ({URL: '.. / detail / expertsdetails. Vue' / / an error is still reported according to this writing method, and the file} cannot be found)},

回答:

brave:

kbone 应该也还是 window.open 打开的链接吧

微喵网络:

请移步uni-app官方社区

|G.XIAO|:

换成绝对路径,在app.json 声明的

-EOF-

AI助手支持GPT4.0