|
|
@ -221,12 +221,13 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 触摸过程 |
|
|
|
// 触摸过程 |
|
|
|
drawMove(id, e) { |
|
|
|
drawMove(id, e) { |
|
|
|
console.log('过程',e.changedTouches[0]); |
|
|
|
console.log('过程',e.changedTouches); |
|
|
|
var endX = e.changedTouches[0].clientX; |
|
|
|
var endX = e.changedTouches[0].clientX; |
|
|
|
let diff = endX - this.clientX; |
|
|
|
let diff = endX - this.clientX; |
|
|
|
console.log(diff); |
|
|
|
console.log(diff); |
|
|
|
|
|
|
|
|
|
|
|
if (Math.abs(diff) <= 60 && diff < 0) { |
|
|
|
if (Math.abs(diff) <= 60 && diff < 0) { |
|
|
|
|
|
|
|
console.log(this.$refs.box_center); |
|
|
|
let box_center = this.$refs.box_center[id] |
|
|
|
let box_center = this.$refs.box_center[id] |
|
|
|
// console.log(diff); |
|
|
|
// console.log(diff); |
|
|
|
box_center.$el.style.left = diff + 'px' |
|
|
|
box_center.$el.style.left = diff + 'px' |
|
|
@ -235,10 +236,9 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 结束触摸 |
|
|
|
// 结束触摸 |
|
|
|
drawEnd(id, e) { |
|
|
|
drawEnd(id, e) { |
|
|
|
// console.log('结束',e.changedTouches[0]); |
|
|
|
console.log('结束',e.changedTouches[0]); |
|
|
|
var endX = e.changedTouches[0].clientX; |
|
|
|
var endX = e.changedTouches[0].clientX; |
|
|
|
let diff = endX - this.clientX; |
|
|
|
let diff = endX - this.clientX; |
|
|
|
let box_center = this.$refs.box_center[id] |
|
|
|
|
|
|
|
if (Math.abs(diff) > 20) { |
|
|
|
if (Math.abs(diff) > 20) { |
|
|
|
// console.log('移动',diff,id,e); |
|
|
|
// console.log('移动',diff,id,e); |
|
|
|
if (diff < 0) { |
|
|
|
if (diff < 0) { |
|
|
@ -255,6 +255,7 @@ export default { |
|
|
|
this.$set(this, "gradeList", []); |
|
|
|
this.$set(this, "gradeList", []); |
|
|
|
this.page = 1; |
|
|
|
this.page = 1; |
|
|
|
this.loadend = false; |
|
|
|
this.loadend = false; |
|
|
|
|
|
|
|
this.activeHeaderMask = -1; |
|
|
|
this.getGradeList(); |
|
|
|
this.getGradeList(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} else if (this.active === 2) { |
|
|
|
} else if (this.active === 2) { |
|
|
@ -266,6 +267,7 @@ export default { |
|
|
|
this.$set(this, "gradeList", []); |
|
|
|
this.$set(this, "gradeList", []); |
|
|
|
this.page = 1; |
|
|
|
this.page = 1; |
|
|
|
this.loadend = false; |
|
|
|
this.loadend = false; |
|
|
|
|
|
|
|
this.activeHeaderMask = -1; |
|
|
|
this.getGradeList(); |
|
|
|
this.getGradeList(); |
|
|
|
}) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -275,6 +277,7 @@ export default { |
|
|
|
this.$set(this, "gradeList", []); |
|
|
|
this.$set(this, "gradeList", []); |
|
|
|
this.page = 1; |
|
|
|
this.page = 1; |
|
|
|
this.loadend = false; |
|
|
|
this.loadend = false; |
|
|
|
|
|
|
|
this.activeHeaderMask = -1; |
|
|
|
this.getGradeList(); |
|
|
|
this.getGradeList(); |
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
.catch((err) => { |
|
|
|