优化
This commit is contained in:
@@ -104,7 +104,7 @@
|
|||||||
if (uni.getSystemInfoSync().platform === 'ios') {
|
if (uni.getSystemInfoSync().platform === 'ios') {
|
||||||
this.right = 20
|
this.right = 20
|
||||||
}
|
}
|
||||||
console.log(uni.getSystemInfoSync())
|
|
||||||
this.date = this.$dayjs(new Date()).format('YYYY-MM-DD')
|
this.date = this.$dayjs(new Date()).format('YYYY-MM-DD')
|
||||||
this.getSlwPlaybackTime()
|
this.getSlwPlaybackTime()
|
||||||
this.width = document.querySelector(`.slw`).offsetWidth + 'px'
|
this.width = document.querySelector(`.slw`).offsetWidth + 'px'
|
||||||
@@ -143,7 +143,8 @@
|
|||||||
}
|
}
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(e => {
|
||||||
|
console.log(e)
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -57,24 +57,7 @@
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
touchmove (e) {
|
touchmove (e) {
|
||||||
console.log(e)
|
|
||||||
this.x = e.touches[0].clientY
|
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) {
|
touchstart (e) {
|
||||||
@@ -96,20 +79,6 @@
|
|||||||
this.$emit('replay', time)
|
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) {
|
secTotime (s) {
|
||||||
let second = parseInt(s)
|
let second = parseInt(s)
|
||||||
let minute = 0
|
let minute = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user