```js
bindScanCode: function() {
wx.scanCode({
onlyFromCamera: true,
success: (res) => {
/ / Scan Code To Get shopCode & SN Code
// api.serverAPI
const { path } = res
console.log('path ', res)
wx.navigateTo({
url: path
})
},
fail: (res) => {
console.log('test fail')
}
})
},
```
上述代码,我扫码成功后,先跳到了 `path`指定的页面,然后会自动跳回上一个页面。这是为什么呢?