Skip to content

路由

说明

路由是进入页面的路径

配置

使用的是第三方therouter框架

路由配置文件 app/src/main/assets/therouter文件下 app/src/main/assets/therouter/routeMap.json

[
  {
    "path": "http://com.ruoyi/work/fragment",
    "className": "com.ruoyi.app.fragment.WorkFragment",
    "action": "action://scheme.com",
    "description": "work",
    "params": {}
  },
  {
    "path": "http://com.ruoyi/mine/fragment",
    "className": "com.ruoyi.app.fragment.MineFragment",
    "action": "action://scheme.com",
    "description": "minie",
    "params": {}
  },
  {
    "path": "http://com.ruoyi/home/fragment",
    "className": "com.ruoyi.app.fragment.HomeFragment",
    "action": "action://scheme.com",
    "description": "home",
    "params": {}
  },
  {
    "path": "http://com.ruoyi/messages",
    "className": "com.ruoyi.app.activity.work.MessageActivity",
    "action": "",
    "description": "通知公告",
    "params": {}
  },
  {
    "path": "http://com.ruoyi/log",
    "className": "com.ruoyi.app.activity.work.LogsActivity",
    "action": "",
    "description": "日志",
    "params": {}
  },
  {
    "path": "http://com.ruoyi/home",
    "className": "com.ruoyi.app.activity.MainActivity",
    "action": "action://scheme.com",
    "description": "首页",
    "params": {}
  }
]

使用

app/src/main/java/com/ruoyi/app/adapter/WorkManageAdapter.kt

TheRouter.build(page).navigation()

也可以使用原生intent模式

如果以上内容对您有帮助,请老板用微信扫一下赞赏码。

支持渠道支持渠道

本文档内容版权属于 RuoYi-Go 作者,保留所有权利 .