请求网络接口失败时,会给出一个失败提示,需要在每个接口下面都写一遍吗,还是有没有办法写在一个共用的文件里,不用每个请求接口下面都引用,只要监测到请求接口失败,就自动调用
天蓬老师2017-04-17 17:35:38
Because the failure handling action for each request is different, the person who wrote the library cannot judge whether you want to perform the same failure handling. For the sake of generality, it should be written like this.