in game/website/js/index.js [60:86]
function frame() {
var space = elem[0].getBoundingClientRect().left - gate.getBoundingClientRect().left
var hight = elem[0].getBoundingClientRect().top - gate.getBoundingClientRect().top
if (!that.isMeet && (space <60 && space > -20 && hight < 20 && hight > -20)) {
that.isMeet = true
score(JSON.stringify({name:that.info.name, score:1})).then(Response => {
that.info.score = Response.data.score
that.$message({
message:"进球成功, 总分数为:" + Response.data.score,
type:"success"
})
that.getRank()
}).catch( e => {
that.$message({
message: "分数统计失败" + e,
type:"danger"
})
})
}
if (tempHeight >= that.clientHeight) {
elem[0].style.bottom = 0 + ''
clearInterval(id)
} else{
tempHeight += 20
elem[0].style.bottom = tempHeight + ''
}
}