Showing
1 changed file
with
6 additions
and
0 deletions
| @@ -64,6 +64,8 @@ export struct DetailPlayLiveCommon { | @@ -64,6 +64,8 @@ export struct DetailPlayLiveCommon { | ||
| 64 | 64 | ||
| 65 | private AudioSuspension = new AudioSuspensionModel() | 65 | private AudioSuspension = new AudioSuspensionModel() |
| 66 | @State isShowAudioCom: boolean = false | 66 | @State isShowAudioCom: boolean = false |
| 67 | + ///是否已经执行过pageShow | ||
| 68 | + hasPageShow: boolean = false | ||
| 67 | 69 | ||
| 68 | build() { | 70 | build() { |
| 69 | Column() { | 71 | Column() { |
| @@ -89,6 +91,10 @@ export struct DetailPlayLiveCommon { | @@ -89,6 +91,10 @@ export struct DetailPlayLiveCommon { | ||
| 89 | */ | 91 | */ |
| 90 | getContentDetail(): Promise<void> { | 92 | getContentDetail(): Promise<void> { |
| 91 | return new Promise<void>((resolve, reject) => { | 93 | return new Promise<void>((resolve, reject) => { |
| 94 | + if (this.hasPageShow) { | ||
| 95 | + return | ||
| 96 | + } | ||
| 97 | + this.hasPageShow = true | ||
| 92 | this.liveViewModel.getContentDetail(this.contentId, this.relId, this.relType) | 98 | this.liveViewModel.getContentDetail(this.contentId, this.relId, this.relType) |
| 93 | .then(async (data: Array<ContentDetailDTO>) => { | 99 | .then(async (data: Array<ContentDetailDTO>) => { |
| 94 | // console.log(TAG, '查询视频详情用于评论展示 getContentDetail:', JSON.stringify(data)); | 100 | // console.log(TAG, '查询视频详情用于评论展示 getContentDetail:', JSON.stringify(data)); |
-
Please register or login to post a comment