This commit is contained in:
yanran200730
2022-04-28 16:48:20 +08:00
parent 2aebb8c284
commit 7ee68394f0
2 changed files with 3 additions and 33 deletions

View File

@@ -104,7 +104,7 @@
if (uni.getSystemInfoSync().platform === 'ios') {
this.right = 20
}
console.log(uni.getSystemInfoSync())
this.date = this.$dayjs(new Date()).format('YYYY-MM-DD')
this.getSlwPlaybackTime()
this.width = document.querySelector(`.slw`).offsetWidth + 'px'
@@ -143,7 +143,8 @@
}
this.isLoading = false
}
}).catch(() => {
}).catch(e => {
console.log(e)
this.isLoading = false
})
},

View File

@@ -57,24 +57,7 @@
methods: {
touchmove (e) {
console.log(e)
this.x = e.touches[0].clientY
// const canvasInfo = document.querySelector(`#${this.id}`).getBoundingClientRect()
// const seconds = 24 * 60 * 60
// if (e.clientY - canvasInfo.top < 29) {
// const x = e.clientX - canvasInfo.left
// const unit = seconds / this.canvasWidth * x
// this.left = x
// this.time = this.secTotime(unit)
// this.isHide = false
// if (!this.isChoose) return
// this.x = e.clientX - canvasInfo.left
// this.ratioW = this.x / this.canvasWidth
// } else {
// this.isHide = true
// }
},
touchstart (e) {
@@ -96,20 +79,6 @@
this.$emit('replay', time)
},
onDragDown () {
this.isChoose = true
},
onMouseUp () {
if (!this.isChoose) return
clearInterval(this.timer)
this.timer = null
this.isChoose = false
const time = this.secTotime((24 * 60 * 60) / this.canvasWidth * this.x)
this.$emit('replay', time)
},
secTotime (s) {
let second = parseInt(s)
let minute = 0