This commit is contained in:
zdg 2024-12-19 17:33:19 +08:00
parent ba35677947
commit bc195e1f51
5 changed files with 12 additions and 6 deletions

View File

@ -33,7 +33,7 @@ export default () => {
const isWs = !!ChatWs.ws && ChatWs.ws.readyState === 1 // 是否有socket连接 const isWs = !!ChatWs.ws && ChatWs.ws.readyState === 1 // 是否有socket连接
if(!timgroupid) return reject('未获取到群组ID') if(!timgroupid) return reject('未获取到群组ID')
else if(!isWs) return reject('信异常,请重试!') else if(!isWs) return reject('信异常,请重试!')
const {current: paging, animation: cartoonTimes} = msg || {} const {current: paging, animationSteps: cartoonTimes} = msg || {}
const head = MsgEnum.HEADS.MSG_slideFlapping const head = MsgEnum.HEADS.MSG_slideFlapping
ChatWs.sendMsg(head, msg) // 发送消息 ChatWs.sendMsg(head, msg) // 发送消息
API_classcourse.setPaging({ id: courseId, paging, cartoonTimes}) API_classcourse.setPaging({ id: courseId, paging, cartoonTimes})

View File

@ -125,7 +125,7 @@ export class MsgEnum {
/** @desc: 课堂作业|活动 */ /** @desc: 课堂作业|活动 */
MSG_homework : 'HOMEWORK', MSG_homework : 'HOMEWORK',
/** @desc: 公屏 - 课堂作业|活动 */ /** @desc: 公屏 - 课堂作业|活动 */
MSG_pushSreen_work : 'pushSreen-work', MSG_pushSreen_work : 'pushSreen_work',
/** @desc: 点赞 */ /** @desc: 点赞 */
MSG_dz : 'dz', MSG_dz : 'dz',
/** @desc: 疑惑 */ /** @desc: 疑惑 */

View File

@ -98,10 +98,16 @@ export default () => {
break break
case MsgEnum.HEADS.MSG_slideFlapping: // 幻灯片翻页 case MsgEnum.HEADS.MSG_slideFlapping: // 幻灯片翻页
const slideIndex = content?.current || 0 const slideIndex = content?.current || 0
const type = content?.animation const type = content?.animation // 上下动作
const steps = content?.animationSteps // 动画步骤
if (type === 'Nextsteps') execNext(true) // 下一步-异步动画 if (type === 'Nextsteps') execNext(true) // 下一步-异步动画
else if (type === 'Previoustep') turnPrevSlide() // 上一步清空-动画 else if (type === 'Previoustep') turnPrevSlide() // 上一步清空-动画
else slidesStore.updateSlideIndex(slideIndex) // 更新幻灯片下标 else slidesStore.updateSlideIndex(slideIndex) // 更新幻灯片下标
// 更新本地缓存
sessionStore.set('curr.classcourse.paging', slideIndex)
sessionStore.set('curr.classcourse.cartoonTimes', steps)
classcourseStore.classcourse.paging = slideIndex
classcourseStore.classcourse.cartoonTimes = steps
break break
// case MsgEnum.HEADS.MSG_homework: // 作业|活动-布置 不处理 // case MsgEnum.HEADS.MSG_homework: // 作业|活动-布置 不处理
case MsgEnum.HEADS.MSG_pushSreen_work: // 打开-作业|活动 case MsgEnum.HEADS.MSG_pushSreen_work: // 打开-作业|活动

View File

@ -220,8 +220,8 @@ export default (isLoader?: boolean = true) => {
else if (type === 'next') execNext() else if (type === 'next') execNext()
if (classcourseStore.classcourse) { // 上课中 if (classcourseStore.classcourse) { // 上课中
const current = slideIndex.value const current = slideIndex.value
const animation = animationIndex.value const animationSteps = animationIndex.value
const animationSteps = type == 'next'?'Nextsteps':'Previoustep' const animation = type == 'next'?'Nextsteps':'Previoustep'
const msg = { current, animation, animationSteps} const msg = { current, animation, animationSteps}
chatApi.slideFlapping(msg) chatApi.slideFlapping(msg)
} }

View File

@ -99,7 +99,7 @@ export class MsgEnum {
/** @desc: 课堂作业|活动 */ /** @desc: 课堂作业|活动 */
MSG_homework : 'HOMEWORK', MSG_homework : 'HOMEWORK',
/** @desc: 公屏 - 课堂作业|活动 */ /** @desc: 公屏 - 课堂作业|活动 */
MSG_pushSreen_work : 'pushSreen-work', MSG_pushSreen_work : 'pushSreen_work',
/** @desc: 点赞 */ /** @desc: 点赞 */
MSG_dz : 'dz', MSG_dz : 'dz',
/** @desc: 疑惑 */ /** @desc: 疑惑 */