为什么只执行一次就结束了
function floodFills(px, py) {
var firstClick=new Array()
wx.canvasGetImageData({
canvasId: ‘borad’,
x: px,
y: py,
width: 1,
height: 1,
success(res) {
firstClick = Array.from(res.data)
if(firstClick[0] == 18 && firstClick[1] == 52 && firstClick[2]==86){
dye(px, py)
console.log(1)
floodFills(px + 1, py)
floodFills(px - 1, py)
floodFills(px, py + 1)
floodFills(px, py - 1)
}
}
})
}