Skip to content

Commit 176e4c4

Browse files
committed
修改路由path
1 parent fcfcd2f commit 176e4c4

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

app/src/main/assets/therouter/routeMap.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
"params": {}
117117
},
118118
{
119-
"path": "http://kymjs.com/therouter/test_fragment2",
119+
"path": "/therouter/test_fragment2",
120120
"className": "com.therouter.app.navigator.NavigatorFragment2",
121121
"action": "",
122122
"description": "Fragment测试页",

app/src/main/java/com/therouter/app/KotlinPathIndex.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ object KotlinPathIndex {
55
const val HOME2 = "http://kymjs.com/therouter/home2"
66
const val FRAGMENT_HOST = "http://kymjs.com/therouter/fragment_host_activity"
77
const val FRAGMENT_TEST = "http://kymjs.com/therouter/test_fragment"
8-
const val FRAGMENT_TEST2 = "http://kymjs.com/therouter/test_fragment2"
8+
const val FRAGMENT_TEST2 = "/therouter/test_fragment2"
99
const val VIEW_BINDING_FRAGMENT_TEST = "http://kymjs.com/therouter/viewbinding_fragment"
1010
}
1111
}

app/src/main/java/com/therouter/app/navigator/NavigatorFragment2.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import android.view.View
55
import android.widget.TextView
66
import com.therouter.app.KotlinPathIndex.Test.FRAGMENT_TEST2
77
import com.therouter.app.R
8+
import com.therouter.require
89
import com.therouter.router.Autowired
910
import com.therouter.router.Route
1011

@@ -18,5 +19,10 @@ class NavigatorFragment2 : NavigatorFragment() {
1819
super.onViewCreated(view, savedInstanceState)
1920
val textView: TextView = view.findViewById<TextView>(R.id.textview12)
2021
textView.text = "子类 @Autowired 数据:$stringChildClassField"
22+
require(
23+
"数据在子类解析" == stringChildClassField,
24+
"NavigatorFragment2",
25+
"stringChildClassField数值不对"
26+
)
2127
}
2228
}

0 commit comments

Comments
 (0)