diff --git a/pages/API/interceptor/interceptor.uvue b/pages/API/interceptor/interceptor.uvue index 820fc196b8de0c9715e5b8605c01af325a782a59..6e20f96c5ae6fcd89679646c263755102727b996 100644 --- a/pages/API/interceptor/interceptor.uvue +++ b/pages/API/interceptor/interceptor.uvue @@ -1,7 +1,8 @@ @@ -26,21 +27,23 @@ export default { data() { return { - + msg:"会跳转到测试页面1" } }, methods: { addInterceptor() { uni.addInterceptor('navigateTo', interceptor) uni.showToast({ - title: '拦截器已添加' - }) + title: '页面跳转已拦截' + }) + this.msg = ",路由被劫持到测试页面2" }, removeInterceptor() { uni.removeInterceptor('navigateTo', interceptor) uni.showToast({ title: '拦截器已移除' - }) + }) + this.msg = "会跳转到测试页面1" }, navigateTo() { uni.navigateTo({ @@ -59,4 +62,4 @@ \ No newline at end of file +