使用开发工具调用wx.scanCode后报错
发布于 6 年前 作者 juan29 6598 次浏览 来自 问答
  • 当前 Bug 的表现(可附上截图)

VM2965:1 appServiceSDKScriptError

Cannot read property ‘mode’ of undefined;at api onAppEnterBackground callback function

TypeError: Cannot read property ‘mode’ of undefined

    at Nt.<anonymous> (http://127.0.0.1:44623/appservice/__dev__/WAService.js:1:516751)

    at Nt.emit (http://127.0.0.1:44623/appservice/__dev__/WAService.js:1:298602)

    at Object.emit (http://127.0.0.1:44623/appservice/__dev__/WAService.js:1:316114)

    at Nt.<anonymous> (http://127.0.0.1:44623/appservice/__dev__/WAService.js:1:322162)

    at Nt.emit (http://127.0.0.1:44623/appservice/__dev__/WAService.js:1:298289)

    at Object.emit (http://127.0.0.1:44623/appservice/__dev__/WAService.js:1:316114)

    at http://127.0.0.1:44623/appservice/__dev__/WAService.js:1:317292

    at http://127.0.0.1:44623/appservice/__dev__/WAService.js:1:255644

    at e (http://127.0.0.1:44623/appservice/appservice?t=1547305122720:6895:2640)

    at n.registerCallback.t (http://127.0.0.1:44623/appservice/appservice?t=1547305122720:6895:2903)

  • 预期表现

我的小程序有一个扫码功能,在开发者工具上调试.点击调用wx.scanCode之后,就会出现上述报错,

回到顶部