小程序
小游戏
企业微信
微信支付
扫描小程序码分享
开发工具中navigateto 错乱 应该是navigateto “pages/subject/index”,但是调用的是“pages/subject/buysubject”的onload。
请大神看看什么问题?开发工具我也删除重新安装过了。
5 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
麻烦提供能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)
看不见代码。
不敢帮
我是在app.json中添加page“pages/subject/offlinecourse”后,pages/index/index页面不调用onload了,删除这个page后就正常了。我更新了最新版工具。更新工具后,pages/index/index可以正常访问onload了,但是navigateto pages/subject/index后调用的 pages/subject/buysubject中的onload。
有啥代码片段什么的吗?
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。
麻烦提供能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)
看不见代码。
不敢帮
我是在app.json中添加page“pages/subject/offlinecourse”后,pages/index/index页面不调用onload了,删除这个page后就正常了。我更新了最新版工具。更新工具后,pages/index/index可以正常访问onload了,但是navigateto pages/subject/index后调用的 pages/subject/buysubject中的onload。
"pages": [
"pages/index/index",
"pages/index/subjects",
"pages/index/subjectlist",
"pages/index/subjectdetail",
"pages/index/login",
"pages/subject/index",
"pages/subject/subjectlist",
"pages/subject/subjectdetail",
"pages/subject/subjecttimetable",
"pages/subject/lessondetail",
"pages/subject/offlinecourse",
"pages/user/mine",
"pages/user/spread",
"pages/subject/topicdetail",
"pages/user/moneydetail",
"pages/user/info",
"pages/subject/buysubject",
"pages/subject/subjecttiku",
"pages/user/moneywithdraw",
"pages/user/moneyrecharge",
"pages/user/experlist",
"pages/user/asknumlist",
"pages/user/asknumrecharge",
"pages/user/message",
"pages/user/address",
"pages/user/addressedit",
"pages/user/userset",
"pages/user/usersetmobile",
"pages/user/userrealnameauth",
"pages/subject/ketanglianxi",
"pages/subject/zhangjielianxi",
"pages/subject/quanzhenmoni",
"pages/subject/ketanglianxidetail",
"pages/subject/questionlist"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "xxx",
"navigationBarTextStyle": "black"
},
"tabBar": {
"color": "#a9b7b7",
"selectedColor": "#11cd6e",
"borderStyle": "black",
"list": [
{
"selectedIconPath": "pages/images/home_icon_nav1.png",
"iconPath": "pages/images/home_icon_nav4.png",
"pagePath": "pages/index/index",
"text": "xxx"
},
{
"selectedIconPath": "pages/images/home_icon_nav2.png",
"iconPath": "pages/images/home_icon_nav2.png",
"pagePath": "pages/user/spread"
},
{
"selectedIconPath": "pages/images/home_icon_nav5.png",
"iconPath": "pages/images/home_icon_nav3.png",
"pagePath": "pages/user/mine",
"text": "xxx"
}
]
},
"sitemapLocation": "sitemap.json"
}
有啥代码片段什么的吗?
if(log){
wx.navigateTo({
url: '/pages/subject/index',
})
}