当前位置:   article > 正文

微信小程序开发者工具使用 设置默认打开页面_小程序默认打开指定页面

小程序默认打开指定页面

写普通页面,清除浏览器缓存,按F5刷新。但是微信小程序不能输入地址栏,每次刷新都回到首页。

每次修改代码,会自动编译,刷新。进入首页需要重新点击,从首页进入到编辑的页面。

pages/ask/ask 这个是我正在写的页面,只需要把"pages/ask/ask"添加到 pages数组的首个元素即可。

* app.json

  1. {
  2. "pages": [
  3. "pages/ask/ask",
  4. "pages/index/index",
  5. "pages/user/index",
  6. "pages/login/login",
  7. "pages/logs/index",
  8. "pages/ask/index",
  9. "pages/scope/index",
  10. "pages/user/edit",
  11. "pages/user/help",
  12. "pages/ask/add"
  13. ],
  14. "window": {
  15. "navigationBarBackgroundColor": "#ffffff",
  16. "navigationBarTitleText": "",
  17. "navigationBarTextStyle": "black",
  18. "backgroundTextStyle": "dark"
  19. },
  20. "tabBar": {
  21. "color": "#6e6d6b",
  22. "selectedColor": "#ff9966",
  23. "borderStyle": "black",
  24. "backgroundColor": "#ffffff",
  25. "list": [
  26. {
  27. "pagePath": "pages/index/index",
  28. "text": "首页",
  29. "iconPath": "images/tabBar/home.png",
  30. "selectedIconPath": "images/tabBar/home_on.png"
  31. },
  32. {
  33. "pagePath": "pages/ask/index",
  34. "text": "问病理",
  35. "iconPath": "images/tabBar/ask.png",
  36. "selectedIconPath": "images/tabBar/ask_on.png"
  37. },
  38. {
  39. "pagePath": "pages/scope/index",
  40. "text": "实视",
  41. "iconPath": "images/tabBar/view.png",
  42. "selectedIconPath": "images/tabBar/view_on.png"
  43. },
  44. {
  45. "pagePath": "pages/user/index",
  46. "text": "我的",
  47. "iconPath": "images/tabBar/user.png",
  48. "selectedIconPath": "images/tabBar/user_on.png"
  49. }
  50. ],
  51. "position": "bottom"
  52. },
  53. "networkTimeout": {
  54. "request": 1000,
  55. "downloadFile": 10000
  56. },
  57. "debug": true,
  58. "sitemapLocation": "sitemap.json"
  59. }

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/盐析白兔/article/detail/321199
推荐阅读
相关标签
  

闽ICP备14008679号