ai视频一期功能提交

This commit is contained in:
sunli_tydic
2025-12-09 15:36:41 +08:00
parent 9379aad28f
commit 311ec096eb
5 changed files with 31 additions and 3 deletions

View File

@@ -41,6 +41,17 @@
<script>
import { mapGetters, mapMutations } from 'vuex'
export default {
props: {
// 视频链接对应的content Id
blobId: {
type: String,
default: ''
},
isDrag:{
type: Boolean,
default: true,
},
},
name: 'ai-script',
data() {
return {
@@ -55,7 +66,8 @@ export default {
computed: {
...mapGetters([
'currentTime',
'selectableLang'
'selectableLang',
'duration'
]),
},
mounted: function() {
@@ -162,6 +174,14 @@ export default {
},
// 跳转到指定时间点
scrollToTime(time) {
// console.log('scrollToTime', time , this.blobId, localStorage.getItem('videoProgressData'), this.duration)
if(!this.isDrag && this.duration){
var t = localStorage.getItem('videoProgressData')
var arr = t&&JSON.parse(t) || {}
if(arr[this.blobId] < time/this.duration || !arr[this.blobId]){
return
}
}
console.log('跳转到时间点:', time);
this.$emit('changeCurrentTime', time);
// 设置用户滚动状态,避免自动滚动干扰