navigateToMiniProgram
配置示例
以下是一个包含了部分常用配置选项的 app.json
:
{ "pages": [ "pages/index/index", "pages/logs/index"
], "window": { "navigationBarTitleText": "Demo"
}, "tabBar": { "list": [{ "pagePath": "pages/index/index", "text": "首页"
}, { "pagePath": "pages/logs/logs", "text": "日志"
}]
}, "networkTimeout": { "request": 10000, "downloadFile": 10000
}, "debug": true}
配在哪里
navigateToMiniProgram已停用,需要在wxml做设置,
程序代码如下:
<navigator target="miniProgram" open-type="navigate" app-id="{{appid}}" path="{{小程序首页}}" extra-data="{{带入的参数变量,可以是对象或数组}}" version="release">
<view class="banben-yhb-wz"><image class="banben-zsb" src="../../images/syan-hz.jpg" mode="widthFix"/></view>
另外:version="release" 是版本,有正式版,体验版和开发版三个选项
再不清楚看下小程序开发文档