Compare commits
No commits in common. "d9bdd5424faaedb5925f4fe50dd895d6035cadc2" and "dad772713fac6919241bdba9ae5211e57fe25f34" have entirely different histories.
d9bdd5424f
...
dad772713f
|
@ -1,26 +1,17 @@
|
|||
import { defineStore } from 'pinia'
|
||||
|
||||
export interface ScreenState {
|
||||
screening: boolean,
|
||||
like: number,
|
||||
doubt: number,
|
||||
screening: boolean
|
||||
}
|
||||
|
||||
export const useScreenStore = defineStore('screen', {
|
||||
state: (): ScreenState => ({
|
||||
screening: false, // 是否进入放映状态
|
||||
like:0, // 点赞数量
|
||||
doubt:0, // 疑问数量
|
||||
}),
|
||||
|
||||
actions: {
|
||||
setScreening(screening: boolean) {
|
||||
this.screening = screening
|
||||
},
|
||||
// 打开点赞或疑问
|
||||
openUpvote(type: 'like' | 'doubt'){
|
||||
if (type === 'like') this.like++
|
||||
else this.doubt++
|
||||
}
|
||||
},
|
||||
})
|
|
@ -58,9 +58,9 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref , watchEffect} from 'vue'
|
||||
import { ref } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useSlidesStore ,useScreenStore} from '../../store'
|
||||
import { useSlidesStore } from '../../store'
|
||||
import type { ContextmenuItem } from '../../components/Contextmenu/types'
|
||||
import { enterFullscreen } from '../../utils/fullscreen'
|
||||
import useScreening from '../../hooks/useScreening'
|
||||
|
@ -108,8 +108,7 @@ const writingBoardToolVisible = ref(false)
|
|||
const timerlVisible = ref(false)
|
||||
const slideThumbnailModelVisible = ref(false)
|
||||
const laserPen = ref(false)
|
||||
const upvoteRef = ref(null)
|
||||
const screenStore =useScreenStore()
|
||||
|
||||
const contextmenus = (): ContextmenuItem[] => {
|
||||
return [
|
||||
{
|
||||
|
@ -191,14 +190,6 @@ const contextmenus = (): ContextmenuItem[] => {
|
|||
},
|
||||
]
|
||||
}
|
||||
|
||||
watchEffect(() => {
|
||||
const likeCont = screenStore.like // 点赞
|
||||
const doubtCount = screenStore.doubt // 疑问
|
||||
if (likeCont > 0) upvoteRef.value?.trigger?.(1)
|
||||
if (doubtCount > 0) upvoteRef.value?.trigger?.(2)
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -603,6 +603,8 @@ export default {
|
|||
// 设置进度条
|
||||
this.pgDialog.pg.percentage = Math.floor(completed / total * 100)
|
||||
}
|
||||
console.log('结束', slides)
|
||||
return
|
||||
this.pgDialog.pg.percentage = 0
|
||||
this.pgDialog.visible = false
|
||||
listEntpcourse({
|
||||
|
@ -639,6 +641,8 @@ export default {
|
|||
}).then(async (res) => {
|
||||
|
||||
const resSlides = slides.map(({id, ...slide}) => JSON.stringify(slide))
|
||||
console.log(resSlides)
|
||||
return
|
||||
let params = {
|
||||
parentid: slideid,
|
||||
entpid: resCourse.entpid,
|
||||
|
|
Loading…
Reference in New Issue