Skip to content

Commit

Permalink
修改路由path
Browse files Browse the repository at this point in the history
  • Loading branch information
kymjs committed Mar 20, 2024
1 parent fcfcd2f commit 176e4c4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/src/main/assets/therouter/routeMap.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
"params": {}
},
{
"path": "http://kymjs.com/therouter/test_fragment2",
"path": "/therouter/test_fragment2",
"className": "com.therouter.app.navigator.NavigatorFragment2",
"action": "",
"description": "Fragment测试页",
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/therouter/app/KotlinPathIndex.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ object KotlinPathIndex {
const val HOME2 = "http://kymjs.com/therouter/home2"
const val FRAGMENT_HOST = "http://kymjs.com/therouter/fragment_host_activity"
const val FRAGMENT_TEST = "http://kymjs.com/therouter/test_fragment"
const val FRAGMENT_TEST2 = "http://kymjs.com/therouter/test_fragment2"
const val FRAGMENT_TEST2 = "/therouter/test_fragment2"
const val VIEW_BINDING_FRAGMENT_TEST = "http://kymjs.com/therouter/viewbinding_fragment"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import android.view.View
import android.widget.TextView
import com.therouter.app.KotlinPathIndex.Test.FRAGMENT_TEST2
import com.therouter.app.R
import com.therouter.require
import com.therouter.router.Autowired
import com.therouter.router.Route

Expand All @@ -18,5 +19,10 @@ class NavigatorFragment2 : NavigatorFragment() {
super.onViewCreated(view, savedInstanceState)
val textView: TextView = view.findViewById<TextView>(R.id.textview12)
textView.text = "子类 @Autowired 数据:$stringChildClassField"
require(
"数据在子类解析" == stringChildClassField,
"NavigatorFragment2",
"stringChildClassField数值不对"
)
}
}

0 comments on commit 176e4c4

Please sign in to comment.