yangchenggong1_wd

fix |> 19826 搜索结果,点击内容,提示内容不存在,页面会闪黑边,见比对视频

... ... @@ -11,6 +11,8 @@ import { persistentStorage, hasClicked } from '../../utils/persistentStorage';
import { InfomationCardClick } from '../../utils/infomationCardClick';
import { SearchShowRed, titleInitRes, textItem } from '../../utils/searchShowRed';
import router from '@ohos.router'
import { ToastUtils } from 'wdKit';
import MinePageDatasModel from '../../model/MinePageDatasModel';
const TAG: string = 'Card2Component'
/**
... ... @@ -140,7 +142,22 @@ export struct Card2Component {
this.clicked = true;
}
persistentStorage(this.contentDTO.objectId);
this.jumpDetail()
})
}
/**
* 是否需要判断某种类型才需要判断内容是否存在的场景,目前测试没发现问题
*/
jumpDetail(){
MinePageDatasModel.getAssertDetailData(this.contentDTO.relId,this.contentDTO.objectId,this.contentDTO.relType).then((value) => {
if(value == "1"){
ProcessUtils.processPage(this.contentDTO)
}else{
ToastUtils.shortToast("内容不存在")
}
}).catch((err: Error) => {
console.log(TAG, JSON.stringify(err))
})
}
}
... ...