提交 e3d63090 编写于 作者: Q qiang

fix: 优化拦截器日志打印文案

上级 20ed73d3
......@@ -10,7 +10,7 @@
<script>
const interceptor = {
invoke: function (options : NavigateToOptions) {
console.log('interceptor.invoke:', options)
console.log('拦截 navigateTo 接口传入参数为:', options)
const url = './page2'
uni.showToast({
title: `重定向到页面:${url}`
......@@ -18,10 +18,13 @@
options.url = url
},
success: function (res : NavigateBackSuccess) {
console.log('interceptor.success:', res)
console.log('拦截 navigateTo 接口 success 返回参数为:', res)
},
fail: function (err : NavigateToFail) {
console.log('interceptor.fail:', err)
console.log('拦截 navigateTo 接口 fail 返回参数为:', err)
},
complete: function (res : NavigateToComplete) {
console.log('拦截 navigateTo 接口 complete 返回参数为:', res)
}
} as Interceptor
export default {
......@@ -57,6 +60,9 @@
},
fail(err) {
console.error('err:', err)
},
complete(res) {
console.log('res:', res)
}
})
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册