用空白的的代码测了一下也是一样
https://github.com/fakefish/uniapp-demo
产品分类: HbuilderX
PC开发环境操作系统: Mac
PC开发环境操作系统版本号: 13.2.1 (22D68)
HBuilderX版本号: 3.8.4
用空白的的代码测了一下也是一样
https://github.com/fakefish/uniapp-demo
"condition" : { //模式配置,仅开发期间生效
"current": 0, //当前激活的模式(list 的索引项)
"list": [
{
"name": "test", //模式名称
"path": "pages/test/test", //启动页面,必选
"query": "foo=123" //启动参数,在页面的onLoad函数里面得到
}
]
}
16:09:30.913 App Launch, {"path":"pages/test/test","query":{"foo":"123"},"scene":1001,"referrerInfo":{"extraData":{}},"channel":"","launcher":"default"} at App.vue:4
16:09:30.913 App Launch, {"path":"pages/test/test","query":{},"scene":1001,"referrerInfo":{"extraData":{}},"channel":"","launcher":"default"} at App.vue:4
配置了condition,其中query一直为空,尝试了各种类型的参数都不行
在appvue里和文件里的load事件打印都没有query的值
16:09:29.357 同步手机端程序文件完成
16:09:30.913 App Launch, {"path":"pages/test/test","query":{},"scene":1001,"referrerInfo":{"extraData":{}},"channel":"","launcher":"default"} at App.vue:4
16:09:30.938 App Show at App.vue:7
16:09:31.910 test onload, {} at pages/test/test.vue:15