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

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

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

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

* app.json

{
  "pages": [
    "pages/ask/ask",
    "pages/index/index",
    "pages/user/index",
    "pages/login/login",
    "pages/logs/index",
    "pages/ask/index",
    "pages/scope/index",
    "pages/user/edit",
    "pages/user/help",
    "pages/ask/add"
  ],
  "window": {
    "navigationBarBackgroundColor": "#ffffff",
    "navigationBarTitleText": "",
    "navigationBarTextStyle": "black",
    "backgroundTextStyle": "dark"
  },
  "tabBar": {
    "color": "#6e6d6b",
    "selectedColor": "#ff9966",
    "borderStyle": "black",
    "backgroundColor": "#ffffff",
    "list": [
      {
        "pagePath": "pages/index/index",
        "text": "首页",
        "iconPath": "images/tabBar/home.png",
        "selectedIconPath": "images/tabBar/home_on.png"
      },
      {
        "pagePath": "pages/ask/index",
        "text": "问病理",
        "iconPath": "images/tabBar/ask.png",
        "selectedIconPath": "images/tabBar/ask_on.png"
      },
      {
        "pagePath": "pages/scope/index",
        "text": "实视",
        "iconPath": "images/tabBar/view.png",
        "selectedIconPath": "images/tabBar/view_on.png"
      },
      {
        "pagePath": "pages/user/index",
        "text": "我的",
        "iconPath": "images/tabBar/user.png",
        "selectedIconPath": "images/tabBar/user_on.png"
      }
    ],
    "position": "bottom"
  },
  "networkTimeout": {
    "request": 1000,
    "downloadFile": 10000
  },
  "debug": true,
  "sitemapLocation": "sitemap.json"
}

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

fareast_mzh

打赏个金币

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值