|
@@ -495,33 +495,38 @@ export default defineComponent({
|
|
|
}
|
|
|
},
|
|
|
//翻页5
|
|
|
- {
|
|
|
- prev: {
|
|
|
- transform: 'translateZ(-800px) rotate3d(0, -1, 0, 90deg)',
|
|
|
- opacity: 0
|
|
|
- },
|
|
|
- next: {
|
|
|
- transform: 'translateZ(-800px) rotate3d(0, 1, 0, 90deg)',
|
|
|
- opacity: 0
|
|
|
- },
|
|
|
- current: { transitionDelay: '700ms' }
|
|
|
- }
|
|
|
+ // {
|
|
|
+ // prev: {
|
|
|
+ // transform: 'translateZ(-800px) rotate3d(0, -1, 0, 90deg)',
|
|
|
+ // opacity: 0
|
|
|
+ // },
|
|
|
+ // next: {
|
|
|
+ // transform: 'translateZ(-800px) rotate3d(0, 1, 0, 90deg)',
|
|
|
+ // opacity: 0
|
|
|
+ // },
|
|
|
+ // current: { transitionDelay: '700ms' }
|
|
|
+ // }
|
|
|
]
|
|
|
|
|
|
const acitveTimer = ref()
|
|
|
// 轮播切换
|
|
|
const handleSwipeChange = (index: number) => {
|
|
|
if (popupData.activeIndex == index) return
|
|
|
+ const oldIndex = popupData.activeIndex
|
|
|
popupData.activeIndex = index
|
|
|
handleStop()
|
|
|
clearTimeout(acitveTimer.value)
|
|
|
|
|
|
const item = data.itemList[index]
|
|
|
+ const oldItem = data.itemList[oldIndex]
|
|
|
if (item) {
|
|
|
- const preItem = data.itemList[index - 1]
|
|
|
- const nextItem = data.itemList[index + 1]
|
|
|
- preItem && (preItem.isAnimation = item.knowledgePointId != preItem.knowledgePointId)
|
|
|
- nextItem && (nextItem.isAnimation = item.knowledgePointId != nextItem.knowledgePointId)
|
|
|
+ if (oldItem?.adviseStudyTimeSecond < 8){
|
|
|
+ const preItem = data.itemList[index - 1]
|
|
|
+ const nextItem = data.itemList[index + 1]
|
|
|
+ preItem && (preItem.isAnimation = item.knowledgePointId != preItem.knowledgePointId)
|
|
|
+ nextItem && (nextItem.isAnimation = item.knowledgePointId != nextItem.knowledgePointId)
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
acitveTimer.value = setTimeout(
|
|
|
() => {
|
|
@@ -542,6 +547,9 @@ export default defineComponent({
|
|
|
item.videoEle?.play()
|
|
|
})
|
|
|
}
|
|
|
+ nextTick(() => {
|
|
|
+ effectIndex.value = Math.round(Math.random() * (effects.length - 1))
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
item.isAnimation ? 800 : 0
|
|
@@ -589,7 +597,7 @@ export default defineComponent({
|
|
|
? effects[effectIndex.value].prev
|
|
|
: mIndex > popupData.activeIndex
|
|
|
? effects[effectIndex.value].next
|
|
|
- : effects[effectIndex.value].current),
|
|
|
+ : (effects[effectIndex.value] as any).current),
|
|
|
...(m.isAnimation ? {} : { 'transition-duration': '0s' })
|
|
|
}}
|
|
|
onClick={(e: Event) => {
|