chenquansheng

fix |> 在直播预约详情页面点击直播预约后返回直播频道列表预约状态没有更新

... ... @@ -4,9 +4,8 @@ import { postInteractAccentionOperateParams } from 'wdBean';
import { PageRepository } from '../../repository/PageRepository';
import { ProcessUtils } from 'wdRouter';
import { HttpUtils } from 'wdNetwork/Index';
import { DateTimeUtils, SPHelper } from 'wdKit';
import { DateTimeUtils, SPHelper,Logger, ToastUtils,EmitterUtils,EmitterEventId } from 'wdKit';
import { LiveModel } from '../../viewmodel/LiveModel'
import { Logger, ToastUtils } from 'wdKit';
import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
import { SpConstants } from 'wdConstant/Index'
import { InfomationCardClick } from '../../utils/infomationCardClick';
... ... @@ -94,6 +93,31 @@ export struct ZhSingleRow03 {
this.getReserveState();
}
this.loadImg = await onlyWifiLoadImg();
// 获取预约
EmitterUtils.receiveEvent(EmitterEventId.LIVE_ROOM_SUBSCRIBE, (str?: string) => {
Logger.debug(TAG, 'receiveEvent LIVE_ROOM_SUBSCRIBE: ' + str)
if (str) {
// 跳转指定频道场景,传参底导id、频道id
const model: ReserveItemBean = JSON.parse(str)
for (let contentItem of this.compDTO.operDataList) {
let liveStr = new String(model.liveId)
if (contentItem.objectId == liveStr) {
if (model.subscribe){
this.reservedIds.push(contentItem.objectId.toString())
}else {
let index = this.reservedIds.findIndex(item => item == contentItem.objectId);
if (index > -1) {
this.reservedIds.splice(index, 1);
}
}
let time = DateTimeUtils.getTimeStamp().toString()
this.compDTO.timestamp = time
return
}
}
}
})
}
... ...