Uncaught (in promise)

in js with 0 comment views: 392 times

问题

QQ20180308-161441.png

解决

Uncaught (in promise) 错误是指调用promise时报错,是由于第一条错误引发的后续错误,但是客户端没有catch住

QMFetch({
      host: 'v_mc_api',
      url: "activity/menus",
    }).then((data) => {
      console.log('menu-->>', data)
    }).catch(e => {
      console.log(e)
    });
Responses