Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool
Showing
24 changed files
with
218 additions
and
42 deletions
| @@ -112,6 +112,7 @@ export class ContentDTO implements BaseDTO { | @@ -112,6 +112,7 @@ export class ContentDTO implements BaseDTO { | ||
| 112 | sameContentList:ContentDTO[] = [] | 112 | sameContentList:ContentDTO[] = [] |
| 113 | sameContentListJson:string = "" | 113 | sameContentListJson:string = "" |
| 114 | sameContentListSize:number = 0 | 114 | sameContentListSize:number = 0 |
| 115 | + sameContentListId:string = "" | ||
| 115 | /* | 116 | /* |
| 116 | 本地辅助字段 | 117 | 本地辅助字段 |
| 117 | */ | 118 | */ |
| 1 | import { CompDTO, ContentDTO } from 'wdBean'; | 1 | import { CompDTO, ContentDTO } from 'wdBean'; |
| 2 | -import { CommonConstants, CompStyle } from 'wdConstant/Index'; | 2 | +import { BottomNavi, CommonConstants, CompStyle } from 'wdConstant/Index'; |
| 3 | import PageModel from '../viewmodel/PageModel'; | 3 | import PageModel from '../viewmodel/PageModel'; |
| 4 | import { CardParser } from './CardParser'; | 4 | import { CardParser } from './CardParser'; |
| 5 | import { Card2Component } from './cardview/Card2Component'; | 5 | import { Card2Component } from './cardview/Card2Component'; |
| @@ -42,6 +42,7 @@ export struct CompParser { | @@ -42,6 +42,7 @@ export struct CompParser { | ||
| 42 | @State private pageModel: PageModel = new PageModel(); | 42 | @State private pageModel: PageModel = new PageModel(); |
| 43 | @State audioItems: ContentDTO[] = []; | 43 | @State audioItems: ContentDTO[] = []; |
| 44 | @State noneAudioItems: ContentDTO[] = []; | 44 | @State noneAudioItems: ContentDTO[] = []; |
| 45 | + bottomNavi:BottomNavi = BottomNavi.PEOPLE | ||
| 45 | 46 | ||
| 46 | aboutToAppear(): void { | 47 | aboutToAppear(): void { |
| 47 | 48 | ||
| @@ -167,7 +168,7 @@ export struct CompParser { | @@ -167,7 +168,7 @@ export struct CompParser { | ||
| 167 | ZhGridLayout03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg }) | 168 | ZhGridLayout03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg }) |
| 168 | this.getBehindDivider() | 169 | this.getBehindDivider() |
| 169 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_04) { | 170 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_04) { |
| 170 | - ZhSingleRow04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg }) | 171 | + ZhSingleRow04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg ,bottomNavi:this.bottomNavi}) |
| 171 | this.getBehindDivider() | 172 | this.getBehindDivider() |
| 172 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_05) { | 173 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_05) { |
| 173 | // ZhSingleRow05({ compDTO }) | 174 | // ZhSingleRow05({ compDTO }) |
| @@ -681,6 +681,7 @@ struct commentHeaderView { | @@ -681,6 +681,7 @@ struct commentHeaderView { | ||
| 681 | @Consume inDialog: boolean | 681 | @Consume inDialog: boolean |
| 682 | private dialogBeforeJumpOtherPageAction: () => void = () => {} | 682 | private dialogBeforeJumpOtherPageAction: () => void = () => {} |
| 683 | private leftGap: number = 64 | 683 | private leftGap: number = 64 |
| 684 | + @State isCanClickHeader:boolean = true | ||
| 684 | 685 | ||
| 685 | build() { | 686 | build() { |
| 686 | Column() { | 687 | Column() { |
| @@ -800,12 +801,20 @@ struct commentHeaderView { | @@ -800,12 +801,20 @@ struct commentHeaderView { | ||
| 800 | .margin({ left: 8 + 4 }) | 801 | .margin({ left: 8 + 4 }) |
| 801 | .alignContent(Alignment.Center) | 802 | .alignContent(Alignment.Center) |
| 802 | .onClick(() => { | 803 | .onClick(() => { |
| 804 | + if (this.isCanClickHeader === true){ | ||
| 805 | + this.isCanClickHeader = false | ||
| 803 | 806 | ||
| 804 | commentViewModel.jumpToAccountPage(this.item, () => { | 807 | commentViewModel.jumpToAccountPage(this.item, () => { |
| 805 | if (this.inDialog) { | 808 | if (this.inDialog) { |
| 806 | if (this.dialogBeforeJumpOtherPageAction) { this.dialogBeforeJumpOtherPageAction() } | 809 | if (this.dialogBeforeJumpOtherPageAction) { this.dialogBeforeJumpOtherPageAction() } |
| 807 | } | 810 | } |
| 808 | }) | 811 | }) |
| 812 | + | ||
| 813 | + } | ||
| 814 | + let timer = setInterval(() => { | ||
| 815 | + this.isCanClickHeader = true | ||
| 816 | + clearInterval(timer); | ||
| 817 | + }, 1000); | ||
| 809 | }) | 818 | }) |
| 810 | } | 819 | } |
| 811 | 820 |
| 1 | import { CompDTO, ContentDTO } from 'wdBean'; | 1 | import { CompDTO, ContentDTO } from 'wdBean'; |
| 2 | -import { CommonConstants } from 'wdConstant'; | 2 | +import { BottomNavi, CommonConstants } from 'wdConstant'; |
| 3 | import { DateTimeUtils } from 'wdKit'; | 3 | import { DateTimeUtils } from 'wdKit'; |
| 4 | import { ProcessUtils } from 'wdRouter'; | 4 | import { ProcessUtils } from 'wdRouter'; |
| 5 | import { InfomationCardClick } from '../../utils/infomationCardClick'; | 5 | import { InfomationCardClick } from '../../utils/infomationCardClick'; |
| @@ -15,6 +15,7 @@ export struct ZhSingleRow04 { | @@ -15,6 +15,7 @@ export struct ZhSingleRow04 { | ||
| 15 | @State pageId: string = ''; | 15 | @State pageId: string = ''; |
| 16 | @State pageName: string = ''; | 16 | @State pageName: string = ''; |
| 17 | @State compDTO: CompDTO = {} as CompDTO | 17 | @State compDTO: CompDTO = {} as CompDTO |
| 18 | + bottomNavi:BottomNavi = BottomNavi.PEOPLE | ||
| 18 | 19 | ||
| 19 | build() { | 20 | build() { |
| 20 | Column() { | 21 | Column() { |
| @@ -32,6 +33,8 @@ export struct ZhSingleRow04 { | @@ -32,6 +33,8 @@ export struct ZhSingleRow04 { | ||
| 32 | .lineHeight(25) | 33 | .lineHeight(25) |
| 33 | } | 34 | } |
| 34 | 35 | ||
| 36 | + | ||
| 37 | + if(this.bottomNavi === BottomNavi.NEWS){ | ||
| 35 | Row() { | 38 | Row() { |
| 36 | Text("更多") | 39 | Text("更多") |
| 37 | .fontSize($r("app.float.font_size_14")) | 40 | .fontSize($r("app.float.font_size_14")) |
| @@ -57,6 +60,7 @@ export struct ZhSingleRow04 { | @@ -57,6 +60,7 @@ export struct ZhSingleRow04 { | ||
| 57 | } | 60 | } |
| 58 | }) | 61 | }) |
| 59 | } | 62 | } |
| 63 | + } | ||
| 60 | .justifyContent(FlexAlign.SpaceBetween) | 64 | .justifyContent(FlexAlign.SpaceBetween) |
| 61 | .margin({ bottom: 8 }) | 65 | .margin({ bottom: 8 }) |
| 62 | .width('100%') | 66 | .width('100%') |
| @@ -2,7 +2,7 @@ import { AppointmentListChildComponent } from './AppointmentListChildComponent'; | @@ -2,7 +2,7 @@ import { AppointmentListChildComponent } from './AppointmentListChildComponent'; | ||
| 2 | import { CustomTitleUI } from '../../reusable/CustomTitleUI' | 2 | import { CustomTitleUI } from '../../reusable/CustomTitleUI' |
| 3 | import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI'; | 3 | import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI'; |
| 4 | import { MineAppointmentItem } from '../../../viewmodel/MineAppointmentItem'; | 4 | import { MineAppointmentItem } from '../../../viewmodel/MineAppointmentItem'; |
| 5 | -import { LazyDataSource, NetworkUtil, StringUtils } from 'wdKit'; | 5 | +import { LazyDataSource, NetworkUtil, StringUtils, ToastUtils } from 'wdKit'; |
| 6 | import MinePageDatasModel from '../../../model/MinePageDatasModel'; | 6 | import MinePageDatasModel from '../../../model/MinePageDatasModel'; |
| 7 | import { EmptyComponent } from '../../view/EmptyComponent'; | 7 | import { EmptyComponent } from '../../view/EmptyComponent'; |
| 8 | import { Action, ContentDTO } from 'wdBean/Index'; | 8 | import { Action, ContentDTO } from 'wdBean/Index'; |
| @@ -102,6 +102,7 @@ export struct AppointmentListUI { | @@ -102,6 +102,7 @@ export struct AppointmentListUI { | ||
| 102 | LazyForEach(this.data, (item: MineAppointmentItem, index: number) => { | 102 | LazyForEach(this.data, (item: MineAppointmentItem, index: number) => { |
| 103 | ListItem() { | 103 | ListItem() { |
| 104 | AppointmentListChildComponent({ item: item,confirmCallback:((deleteItem) =>{ | 104 | AppointmentListChildComponent({ item: item,confirmCallback:((deleteItem) =>{ |
| 105 | + ToastUtils.shortToast('取消预约成功') | ||
| 105 | this.data.deleteItem(this.data.getIndexOf(deleteItem)) | 106 | this.data.deleteItem(this.data.getIndexOf(deleteItem)) |
| 106 | this.count = this.data.totalCount() | 107 | this.count = this.data.totalCount() |
| 107 | })}) | 108 | })}) |
| @@ -4,7 +4,8 @@ import PageModel from '../../viewmodel/PageModel'; | @@ -4,7 +4,8 @@ import PageModel from '../../viewmodel/PageModel'; | ||
| 4 | import { CommonConstants, ViewType } from 'wdConstant' | 4 | import { CommonConstants, ViewType } from 'wdConstant' |
| 5 | import { EmptyComponent,WDViewDefaultType } from '../view/EmptyComponent' | 5 | import { EmptyComponent,WDViewDefaultType } from '../view/EmptyComponent' |
| 6 | import { ErrorComponent } from '../view/ErrorComponent' | 6 | import { ErrorComponent } from '../view/ErrorComponent' |
| 7 | -import { CompDTO, ContentDTO, contentListParams,contentListItem, InteractDataDTO } from 'wdBean' | 7 | +import { CompDTO, ContentDTO, contentListParams,contentListItem, InteractDataDTO, |
| 8 | + postExecuteCollectRecordParams } from 'wdBean' | ||
| 8 | import NoMoreLayout from './NoMoreLayout' | 9 | import NoMoreLayout from './NoMoreLayout' |
| 9 | import { CustomSelectUI } from '../view/CustomSelectUI'; | 10 | import { CustomSelectUI } from '../view/CustomSelectUI'; |
| 10 | import { CustomBottomFuctionUI } from '../view/CustomBottomFuctionUI'; | 11 | import { CustomBottomFuctionUI } from '../view/CustomBottomFuctionUI'; |
| @@ -12,7 +13,7 @@ import { BigPicCardComponent } from '../view/BigPicCardComponent'; | @@ -12,7 +13,7 @@ import { BigPicCardComponent } from '../view/BigPicCardComponent'; | ||
| 12 | import { contentListItemParams, MyCollectionItem } from '../../model/MyCollectionModel'; | 13 | import { contentListItemParams, MyCollectionItem } from '../../model/MyCollectionModel'; |
| 13 | import { CustomPullToRefresh } from '../reusable/CustomPullToRefresh'; | 14 | import { CustomPullToRefresh } from '../reusable/CustomPullToRefresh'; |
| 14 | import { MyCustomDialog } from '../reusable/MyCustomDialog' | 15 | import { MyCustomDialog } from '../reusable/MyCustomDialog' |
| 15 | -import { DateTimeUtils, NetworkUtil } from 'wdKit/Index'; | 16 | +import { DateTimeUtils, NetworkUtil, SPHelper } from 'wdKit/Index'; |
| 16 | import TrackingPageBrowseUtils from '../../utils/TrackingPageBrowseUtils' | 17 | import TrackingPageBrowseUtils from '../../utils/TrackingPageBrowseUtils' |
| 17 | import { TrackConstants, TrackingButton, TrackingContent, TrackParamConvert } from 'wdTracking/Index'; | 18 | import { TrackConstants, TrackingButton, TrackingContent, TrackParamConvert } from 'wdTracking/Index'; |
| 18 | 19 | ||
| @@ -67,12 +68,31 @@ struct MyCollectionListPage { | @@ -67,12 +68,31 @@ struct MyCollectionListPage { | ||
| 67 | onPageShow(){ | 68 | onPageShow(){ |
| 68 | this.pageShow = Math.random() | 69 | this.pageShow = Math.random() |
| 69 | TrackingPageBrowseUtils.TrackingPageBrowseExposureStart() | 70 | TrackingPageBrowseUtils.TrackingPageBrowseExposureStart() |
| 71 | + | ||
| 72 | + this.refreshCollectList() | ||
| 70 | } | 73 | } |
| 71 | 74 | ||
| 72 | onPageHide(): void { | 75 | onPageHide(): void { |
| 73 | TrackingPageBrowseUtils.TrackingPageBrowseExposureEnd(TrackConstants.PageName.My_Collect,TrackConstants.PageName.My_Collect) | 76 | TrackingPageBrowseUtils.TrackingPageBrowseExposureEnd(TrackConstants.PageName.My_Collect,TrackConstants.PageName.My_Collect) |
| 74 | } | 77 | } |
| 75 | 78 | ||
| 79 | + refreshCollectList(){ | ||
| 80 | + let compStr = SPHelper.default.getSync('CompCollectStatus','') as string | ||
| 81 | + if (compStr.length > 0) { | ||
| 82 | + let collectRecordParams:postExecuteCollectRecordParams = JSON.parse(compStr) | ||
| 83 | + if (collectRecordParams.status === '0'){ | ||
| 84 | + let deleteIndex:number = 0 | ||
| 85 | + this.allDatas.forEach((item,index) => { | ||
| 86 | + if (item.objectId === collectRecordParams.contentList[0].contentId) { | ||
| 87 | + deleteIndex = index | ||
| 88 | + } | ||
| 89 | + }) | ||
| 90 | + this.allDatas.splice(deleteIndex,1) | ||
| 91 | + } | ||
| 92 | + SPHelper.default.delete('CompCollectStatus') | ||
| 93 | + } | ||
| 94 | + } | ||
| 95 | + | ||
| 76 | build() { | 96 | build() { |
| 77 | Column(){ | 97 | Column(){ |
| 78 | CustomTitleAndEditUI({titleName:'我的收藏',isDisplayButton:this.isDisplayButton,editCallback:()=>{ | 98 | CustomTitleAndEditUI({titleName:'我的收藏',isDisplayButton:this.isDisplayButton,editCallback:()=>{ |
| @@ -125,7 +125,8 @@ export struct PageComponent { | @@ -125,7 +125,8 @@ export struct PageComponent { | ||
| 125 | nextCompDTO: compIndex === this.pageModel.compList.getDataArray().length - 1 ? new CompDTO() : this.pageModel.compList.get(compIndex + 1) as CompDTO, | 125 | nextCompDTO: compIndex === this.pageModel.compList.getDataArray().length - 1 ? new CompDTO() : this.pageModel.compList.get(compIndex + 1) as CompDTO, |
| 126 | compDTO: compDTO, | 126 | compDTO: compDTO, |
| 127 | compIndex: compIndex, | 127 | compIndex: compIndex, |
| 128 | - pageId: this.pageId | 128 | + pageId: this.pageId, |
| 129 | + bottomNavi:this.bottomNavi | ||
| 129 | } | 130 | } |
| 130 | ) | 131 | ) |
| 131 | } | 132 | } |
| @@ -51,6 +51,7 @@ struct PeopleShipHomePage { | @@ -51,6 +51,7 @@ struct PeopleShipHomePage { | ||
| 51 | 51 | ||
| 52 | onPageShow(): void { | 52 | onPageShow(): void { |
| 53 | WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff'}) | 53 | WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff'}) |
| 54 | + this.loadFollowData() | ||
| 54 | } | 55 | } |
| 55 | 56 | ||
| 56 | onPageHide(): void { | 57 | onPageHide(): void { |
| @@ -218,6 +219,10 @@ struct PeopleShipHomePage { | @@ -218,6 +219,10 @@ struct PeopleShipHomePage { | ||
| 218 | this.isHasHomePage = false | 219 | this.isHasHomePage = false |
| 219 | } | 220 | } |
| 220 | 221 | ||
| 222 | + // this.loadFollowData() | ||
| 223 | + } | ||
| 224 | + | ||
| 225 | + async loadFollowData(){ | ||
| 221 | try { | 226 | try { |
| 222 | // 获取关注 | 227 | // 获取关注 |
| 223 | // 登录后获取,是否关注 | 228 | // 登录后获取,是否关注 |
| @@ -230,6 +235,7 @@ struct PeopleShipHomePage { | @@ -230,6 +235,7 @@ struct PeopleShipHomePage { | ||
| 230 | } catch (exception) { | 235 | } catch (exception) { |
| 231 | this.isLoading = false | 236 | this.isLoading = false |
| 232 | } | 237 | } |
| 238 | + | ||
| 233 | } | 239 | } |
| 234 | 240 | ||
| 235 | findFollowStata(followList: QueryListIsFollowedItem[]) { | 241 | findFollowStata(followList: QueryListIsFollowedItem[]) { |
| @@ -9,6 +9,7 @@ import LoadMoreLayout from '../LoadMoreLayout' | @@ -9,6 +9,7 @@ import LoadMoreLayout from '../LoadMoreLayout' | ||
| 9 | import TemplatePageHelp from './TemplatePageHelp' | 9 | import TemplatePageHelp from './TemplatePageHelp' |
| 10 | import TemplatePageModel from './TemplatePageModel' | 10 | import TemplatePageModel from './TemplatePageModel' |
| 11 | import { TemplatePageStateType } from './TemplatePageStateType' | 11 | import { TemplatePageStateType } from './TemplatePageStateType' |
| 12 | +import { BottomNavi} from 'wdConstant/Index'; | ||
| 12 | 13 | ||
| 13 | 14 | ||
| 14 | const TAG: string = 'TemplatePageComponent'; | 15 | const TAG: string = 'TemplatePageComponent'; |
| @@ -126,7 +127,8 @@ export default struct TemplatePageComponent { | @@ -126,7 +127,8 @@ export default struct TemplatePageComponent { | ||
| 126 | nextCompDTO: index === this.templatePage.compList.getDataArray().length - 1 ? new CompDTO() : this.templatePage.compList.get(index + 1) as CompDTO, | 127 | nextCompDTO: index === this.templatePage.compList.getDataArray().length - 1 ? new CompDTO() : this.templatePage.compList.get(index + 1) as CompDTO, |
| 127 | compIndex: index, | 128 | compIndex: index, |
| 128 | pageId: this.pageId, | 129 | pageId: this.pageId, |
| 129 | - pageName: this.pageName | 130 | + pageName: this.pageName, |
| 131 | + bottomNavi:BottomNavi.TEMPLATE | ||
| 130 | }); | 132 | }); |
| 131 | } | 133 | } |
| 132 | } | 134 | } |
| @@ -62,7 +62,6 @@ export struct SearchResultContentComponent { | @@ -62,7 +62,6 @@ export struct SearchResultContentComponent { | ||
| 62 | 62 | ||
| 63 | this.curPageNum = 1 | 63 | this.curPageNum = 1 |
| 64 | this.hasMore = true | 64 | this.hasMore = true |
| 65 | - this.isLoading = false | ||
| 66 | this.getNewSearchResultData() | 65 | this.getNewSearchResultData() |
| 67 | } | 66 | } |
| 68 | 67 | ||
| @@ -86,6 +85,10 @@ export struct SearchResultContentComponent { | @@ -86,6 +85,10 @@ export struct SearchResultContentComponent { | ||
| 86 | } | 85 | } |
| 87 | 86 | ||
| 88 | getNewSearchResultData() { | 87 | getNewSearchResultData() { |
| 88 | + if (this.isLoading){ | ||
| 89 | + return | ||
| 90 | + } | ||
| 91 | + | ||
| 89 | this.isLoading = true | 92 | this.isLoading = true |
| 90 | if (this.hasMore) { | 93 | if (this.hasMore) { |
| 91 | SearcherAboutDataModel.getSearchResultListData("20", `${this.curPageNum}`, this.searchType, this.keywords, | 94 | SearcherAboutDataModel.getSearchResultListData("20", `${this.curPageNum}`, this.searchType, this.keywords, |
| @@ -178,6 +181,8 @@ export struct SearchResultContentComponent { | @@ -178,6 +181,8 @@ export struct SearchResultContentComponent { | ||
| 178 | this.isLoading = false | 181 | this.isLoading = false |
| 179 | this.count = this.count === -1 ? 0 : this.count | 182 | this.count = this.count === -1 ? 0 : this.count |
| 180 | }) | 183 | }) |
| 184 | + }else{ | ||
| 185 | + this.isLoading = false | ||
| 181 | } | 186 | } |
| 182 | } | 187 | } |
| 183 | 188 | ||
| @@ -236,14 +241,25 @@ export struct SearchResultContentComponent { | @@ -236,14 +241,25 @@ export struct SearchResultContentComponent { | ||
| 236 | // } | 241 | // } |
| 237 | let contentDTO = this.dataTransform(rem, value, photos); | 242 | let contentDTO = this.dataTransform(rem, value, photos); |
| 238 | if (value.data.type != "13") { | 243 | if (value.data.type != "13") { |
| 244 | + //避免 重复(偶现bug 暂时处理) | ||
| 245 | + let index = this.data.getDataArray().findIndex(obj => obj.objectId == contentDTO.objectId); | ||
| 246 | + if (index === -1) { | ||
| 239 | this.data.push(contentDTO) | 247 | this.data.push(contentDTO) |
| 248 | + | ||
| 240 | if (value.data.sameContentList != null && value.data.sameContentList.length > 0) { | 249 | if (value.data.sameContentList != null && value.data.sameContentList.length > 0) { |
| 241 | let contentDTO2 = new ContentDTO(); | 250 | let contentDTO2 = new ContentDTO(); |
| 251 | + contentDTO2.sameContentListId = contentDTO.objectId + value.data.sameContentList[0].id | ||
| 242 | contentDTO2.sameContentListJson = JSON.stringify(value.data.sameContentList) | 252 | contentDTO2.sameContentListJson = JSON.stringify(value.data.sameContentList) |
| 243 | contentDTO2.sameContentListSize = value.data.sameContentList.length | 253 | contentDTO2.sameContentListSize = value.data.sameContentList.length |
| 254 | + | ||
| 255 | + let index = this.data.getDataArray().findIndex(obj => obj.sameContentListId == contentDTO2.sameContentListId) | ||
| 256 | + if (index === -1){ | ||
| 244 | this.data.push(contentDTO2) | 257 | this.data.push(contentDTO2) |
| 245 | } | 258 | } |
| 246 | } | 259 | } |
| 260 | + | ||
| 261 | + } | ||
| 262 | + } | ||
| 247 | }) | 263 | }) |
| 248 | 264 | ||
| 249 | this.tempList = [] | 265 | this.tempList = [] |
| @@ -256,6 +272,7 @@ export struct SearchResultContentComponent { | @@ -256,6 +272,7 @@ export struct SearchResultContentComponent { | ||
| 256 | } | 272 | } |
| 257 | this.isLoading = false | 273 | this.isLoading = false |
| 258 | }).catch((err: Error) => { | 274 | }).catch((err: Error) => { |
| 275 | + this.isLoading = false | ||
| 259 | console.log(TAG, JSON.stringify(err)) | 276 | console.log(TAG, JSON.stringify(err)) |
| 260 | }) | 277 | }) |
| 261 | }).catch((err: Error) => { | 278 | }).catch((err: Error) => { |
| @@ -265,6 +282,7 @@ export struct SearchResultContentComponent { | @@ -265,6 +282,7 @@ export struct SearchResultContentComponent { | ||
| 265 | }) | 282 | }) |
| 266 | } else { | 283 | } else { |
| 267 | this.hasMore = false | 284 | this.hasMore = false |
| 285 | + this.isLoading = false | ||
| 268 | } | 286 | } |
| 269 | } | 287 | } |
| 270 | 288 |
| @@ -432,6 +432,7 @@ export struct LiveOperRowListView { | @@ -432,6 +432,7 @@ export struct LiveOperRowListView { | ||
| 432 | } | 432 | } |
| 433 | console.log(TAG, '收藏点击', JSON.stringify(params)) | 433 | console.log(TAG, '收藏点击', JSON.stringify(params)) |
| 434 | PageRepository.postExecuteCollectRecord(params).then(res => { | 434 | PageRepository.postExecuteCollectRecord(params).then(res => { |
| 435 | + SPHelper.default.saveSync('CompCollectStatus',JSON.stringify(params)) | ||
| 435 | if (this.newsStatusOfUser && res.code == 0) { | 436 | if (this.newsStatusOfUser && res.code == 0) { |
| 436 | this.newsStatusOfUser.collectStatus = this.newsStatusOfUser?.collectStatus === 1 ? 0 : 1 | 437 | this.newsStatusOfUser.collectStatus = this.newsStatusOfUser?.collectStatus === 1 ? 0 : 1 |
| 437 | if (this.newsStatusOfUser.collectStatus === 1) { | 438 | if (this.newsStatusOfUser.collectStatus === 1) { |
| @@ -551,6 +551,7 @@ export struct OperRowListView { | @@ -551,6 +551,7 @@ export struct OperRowListView { | ||
| 551 | 551 | ||
| 552 | // console.log(TAG, '收藏点击', JSON.stringify(params)) | 552 | // console.log(TAG, '收藏点击', JSON.stringify(params)) |
| 553 | PageRepository.postExecuteCollectRecord(params).then(res => { | 553 | PageRepository.postExecuteCollectRecord(params).then(res => { |
| 554 | + SPHelper.default.saveSync('CompCollectStatus',JSON.stringify(params)) | ||
| 554 | if (this.newsStatusOfUser && res.code == 0) { | 555 | if (this.newsStatusOfUser && res.code == 0) { |
| 555 | this.newsStatusOfUser.collectStatus = this.newsStatusOfUser?.collectStatus === 1 ? 0 : 1 | 556 | this.newsStatusOfUser.collectStatus = this.newsStatusOfUser?.collectStatus === 1 ? 0 : 1 |
| 556 | if (this.newsStatusOfUser.collectStatus === 1) { | 557 | if (this.newsStatusOfUser.collectStatus === 1) { |
| @@ -45,7 +45,7 @@ export struct ENewspaperListDialog { | @@ -45,7 +45,7 @@ export struct ENewspaperListDialog { | ||
| 45 | public closeDialog?: () => void | 45 | public closeDialog?: () => void |
| 46 | // 手势滑动相关 | 46 | // 手势滑动相关 |
| 47 | private panOption: PanGestureOptions = new PanGestureOptions({ direction: PanDirection.Up | PanDirection.Down }) | 47 | private panOption: PanGestureOptions = new PanGestureOptions({ direction: PanDirection.Up | PanDirection.Down }) |
| 48 | - private topFixedHeight = 124 | 48 | + private topFixedHeight = 204 |
| 49 | @State topHeight: number = 204 | 49 | @State topHeight: number = 204 |
| 50 | private deviceHeight: number = 0 | 50 | private deviceHeight: number = 0 |
| 51 | 51 |
| @@ -49,28 +49,8 @@ export struct DetailPlayLivePage { | @@ -49,28 +49,8 @@ export struct DetailPlayLivePage { | ||
| 49 | @Provide banComment: boolean = true | 49 | @Provide banComment: boolean = true |
| 50 | @State isEnd: boolean = false | 50 | @State isEnd: boolean = false |
| 51 | @Consume liveDetailPageLogic: LiveDetailPageLogic | 51 | @Consume liveDetailPageLogic: LiveDetailPageLogic |
| 52 | - @State toastText: ResourceStr = "这是一个非Wi-Fi环境。请注意流量消耗" | ||
| 53 | @State topPlayHeight:number = this.getTopPlayHeight() | 52 | @State topPlayHeight:number = this.getTopPlayHeight() |
| 54 | @StorageProp('currentBreakpoint') @Watch("currentChanged")currentBreakpoint: string = 'sm'; | 53 | @StorageProp('currentBreakpoint') @Watch("currentChanged")currentBreakpoint: string = 'sm'; |
| 55 | - dialogToast: CustomDialogController = new CustomDialogController({ | ||
| 56 | - builder: CustomToast({ | ||
| 57 | - bgColor: 0xB3000000, | ||
| 58 | - opacityValue: 1, | ||
| 59 | - fontSizeValue: "25lpx", | ||
| 60 | - lineHeightValue: "36lpx", | ||
| 61 | - msg: this.toastText, | ||
| 62 | - marginTop:211/2+px2vp(this.topSafeHeight)-px2vp(84/2) | ||
| 63 | - }), | ||
| 64 | - autoCancel: false, | ||
| 65 | - alignment: DialogAlignment.Top, | ||
| 66 | - customStyle: true, | ||
| 67 | - maskColor: "#00000000" | ||
| 68 | - }) | ||
| 69 | - | ||
| 70 | - showToastTip(msg: ResourceStr) { | ||
| 71 | - this.toastText = msg | ||
| 72 | - this.dialogToast.open() | ||
| 73 | - } | ||
| 74 | 54 | ||
| 75 | async aboutToAppear(): Promise<void> { | 55 | async aboutToAppear(): Promise<void> { |
| 76 | Logger.info(TAG, `wyj-aboutToAppear`) | 56 | Logger.info(TAG, `wyj-aboutToAppear`) |
| @@ -86,13 +66,6 @@ export struct DetailPlayLivePage { | @@ -86,13 +66,6 @@ export struct DetailPlayLivePage { | ||
| 86 | }) | 66 | }) |
| 87 | this.getLiveDetails() | 67 | this.getLiveDetails() |
| 88 | this.getLiveRoomData() | 68 | this.getLiveRoomData() |
| 89 | - | ||
| 90 | - if (this.liveDetailPageLogic.dealOrShowToast()) { | ||
| 91 | - if(!await onlyWifiLoadVideo()){ | ||
| 92 | - this.showToastTip(this.toastText) | ||
| 93 | - } | ||
| 94 | - } | ||
| 95 | - | ||
| 96 | this.configChatRoom() | 69 | this.configChatRoom() |
| 97 | } | 70 | } |
| 98 | 71 | ||
| @@ -100,6 +73,7 @@ export struct DetailPlayLivePage { | @@ -100,6 +73,7 @@ export struct DetailPlayLivePage { | ||
| 100 | Logger.info(TAG, `wyj-aboutToDisappear`) | 73 | Logger.info(TAG, `wyj-aboutToDisappear`) |
| 101 | await this.playerController?.stop() | 74 | await this.playerController?.stop() |
| 102 | await this.playerController?.release() | 75 | await this.playerController?.release() |
| 76 | + this.chatRoomController.disconnectLiveRoom() | ||
| 103 | } | 77 | } |
| 104 | 78 | ||
| 105 | configChatRoom() { | 79 | configChatRoom() { |
| @@ -84,6 +84,7 @@ export struct DetailPlayVLivePage { | @@ -84,6 +84,7 @@ export struct DetailPlayVLivePage { | ||
| 84 | 84 | ||
| 85 | aboutToDisappear(): void { | 85 | aboutToDisappear(): void { |
| 86 | this.closeFullScreen() | 86 | this.closeFullScreen() |
| 87 | + this.chatRoomController.disconnectLiveRoom() | ||
| 87 | } | 88 | } |
| 88 | 89 | ||
| 89 | openFullScreen() { | 90 | openFullScreen() { |
| @@ -94,7 +94,16 @@ export class LiveDetailPageLogic { | @@ -94,7 +94,16 @@ export class LiveDetailPageLogic { | ||
| 94 | return '' | 94 | return '' |
| 95 | } | 95 | } |
| 96 | 96 | ||
| 97 | - dealOrShowToast(): boolean { | 97 | + livingNeedShowNoWifiTip(): boolean { |
| 98 | + if (this.liveState == 'running') { | ||
| 99 | + if (this.contentDetailData.liveInfo.liveWay == 0) { ///直播视频 | ||
| 100 | + return true | ||
| 101 | + } | ||
| 102 | + } | ||
| 103 | + return false | ||
| 104 | + } | ||
| 105 | + | ||
| 106 | + noLivingNeedShowNoWifiTip(): boolean { | ||
| 98 | if (this.liveState == 'wait') { | 107 | if (this.liveState == 'wait') { |
| 99 | if (this.contentDetailData.liveInfo | 108 | if (this.contentDetailData.liveInfo |
| 100 | && this.contentDetailData.liveInfo.previewUrl.length > 0 | 109 | && this.contentDetailData.liveInfo.previewUrl.length > 0 |
| @@ -102,7 +111,7 @@ export class LiveDetailPageLogic { | @@ -102,7 +111,7 @@ export class LiveDetailPageLogic { | ||
| 102 | return true | 111 | return true |
| 103 | } | 112 | } |
| 104 | } | 113 | } |
| 105 | - if (this.liveState == 'running') { | 114 | + if (this.liveState == 'end') { |
| 106 | if (this.contentDetailData.liveInfo.liveWay == 0) { ///直播视频 | 115 | if (this.contentDetailData.liveInfo.liveWay == 0) { ///直播视频 |
| 107 | return true | 116 | return true |
| 108 | } | 117 | } |
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/common/NoWifiTipComponent.ets
0 → 100644
| 1 | + | ||
| 2 | +@Component | ||
| 3 | +export struct NoWifiTipComponent { | ||
| 4 | + @State toastText: ResourceStr = "正在使用非Wi-Fi网络,播放将产生流量费用" | ||
| 5 | + | ||
| 6 | + onContinue?: () => void | ||
| 7 | + | ||
| 8 | + aboutToAppear(): void { | ||
| 9 | + | ||
| 10 | + } | ||
| 11 | + aboutToDisappear(): void { | ||
| 12 | + | ||
| 13 | + } | ||
| 14 | + | ||
| 15 | + build() { | ||
| 16 | + Row() { | ||
| 17 | + Column() { | ||
| 18 | + Column() { | ||
| 19 | + Text(this.toastText) | ||
| 20 | + .fontFamily('PingFang SC-Regular') | ||
| 21 | + .fontWeight(FontWeight.Regular) | ||
| 22 | + .fontColor('#FFFFFF') | ||
| 23 | + .fontSize(16) | ||
| 24 | + .lineHeight(24) | ||
| 25 | + .textAlign(TextAlign.Center) | ||
| 26 | + } | ||
| 27 | + | ||
| 28 | + Column() { | ||
| 29 | + Text("使用流量播放") | ||
| 30 | + .fontFamily('PingFang SC-Regular') | ||
| 31 | + .fontWeight(FontWeight.Regular) | ||
| 32 | + .fontColor(Color.White) | ||
| 33 | + .fontSize(14) | ||
| 34 | + .lineHeight(20) | ||
| 35 | + .textAlign(TextAlign.Center) | ||
| 36 | + .margin({ | ||
| 37 | + top: 5, | ||
| 38 | + bottom: 5, | ||
| 39 | + left: 8, | ||
| 40 | + right: 8 | ||
| 41 | + }) | ||
| 42 | + } | ||
| 43 | + .border({ width: 1, color: '#4DFFFFFF', radius: 4 }) | ||
| 44 | + .height(30) | ||
| 45 | + .alignItems(HorizontalAlign.Center) | ||
| 46 | + .justifyContent(FlexAlign.Center) | ||
| 47 | + .margin({ | ||
| 48 | + top: 16 | ||
| 49 | + }) | ||
| 50 | + .onClick(() => { | ||
| 51 | + if (this.onContinue) { | ||
| 52 | + this.onContinue() | ||
| 53 | + } | ||
| 54 | + }) | ||
| 55 | + } | ||
| 56 | + .width('100%') | ||
| 57 | + .height(64) | ||
| 58 | + } | ||
| 59 | + .width('100%') | ||
| 60 | + .height('100%') | ||
| 61 | + .alignItems(VerticalAlign.Center) | ||
| 62 | + .justifyContent(FlexAlign.Center) | ||
| 63 | + .backgroundColor('#222222') | ||
| 64 | + .opacity(0.7) | ||
| 65 | + } | ||
| 66 | +} |
| @@ -146,7 +146,7 @@ export struct TabChatComponent { | @@ -146,7 +146,7 @@ export struct TabChatComponent { | ||
| 146 | (data) => { | 146 | (data) => { |
| 147 | this.pageModel.isLoading = false | 147 | this.pageModel.isLoading = false |
| 148 | if (resolve) { | 148 | if (resolve) { |
| 149 | - if (this.pageModel.currentPage == 1) { | 149 | + if (this.pageModel.currentPage != 1) { |
| 150 | resolve('已更新至最新') | 150 | resolve('已更新至最新') |
| 151 | } else { | 151 | } else { |
| 152 | resolve('') | 152 | resolve('') |
| @@ -158,7 +158,11 @@ export struct TabChatComponent { | @@ -158,7 +158,11 @@ export struct TabChatComponent { | ||
| 158 | Logger.debug(TAG, `${JSON.stringify(data)}`) | 158 | Logger.debug(TAG, `${JSON.stringify(data)}`) |
| 159 | if (data.barrageResponses && data.barrageResponses.length > 0) { | 159 | if (data.barrageResponses && data.barrageResponses.length > 0) { |
| 160 | this.pageModel.viewType = ViewType.LOADED; | 160 | this.pageModel.viewType = ViewType.LOADED; |
| 161 | + if (this.pageModel.currentPage === 1) { | ||
| 161 | this.liveChatList.push(...data.barrageResponses) | 162 | this.liveChatList.push(...data.barrageResponses) |
| 163 | + }else { | ||
| 164 | + this.liveChatList.addItems(data.barrageResponses, 0) | ||
| 165 | + } | ||
| 162 | 166 | ||
| 163 | if (this.pageModel.currentPage === 1) { | 167 | if (this.pageModel.currentPage === 1) { |
| 164 | setTimeout(() => { | 168 | setTimeout(() => { |
| 1 | import { ContentDetailDTO, LiveRoomItemBean } from 'wdBean/Index'; | 1 | import { ContentDetailDTO, LiveRoomItemBean } from 'wdBean/Index'; |
| 2 | -import { Logger, StringUtils, WindowModel } from 'wdKit/Index'; | 2 | +import { CustomToast, Logger, StringUtils, WindowModel } from 'wdKit/Index'; |
| 3 | import { PlayerConstants, WDAliPlayerController, WDPlayerRenderLiveView } from 'wdPlayer/Index'; | 3 | import { PlayerConstants, WDAliPlayerController, WDPlayerRenderLiveView } from 'wdPlayer/Index'; |
| 4 | import { PlayUIComponent } from './PlayUIComponent'; | 4 | import { PlayUIComponent } from './PlayUIComponent'; |
| 5 | import { PictureLoading } from '../../vertical/PictureLoading'; | 5 | import { PictureLoading } from '../../vertical/PictureLoading'; |
| @@ -8,6 +8,8 @@ import { LiveDetailPageLogic } from '../../../viewModel/LiveDetailPageLogic'; | @@ -8,6 +8,8 @@ import { LiveDetailPageLogic } from '../../../viewModel/LiveDetailPageLogic'; | ||
| 8 | import { LiveEmptyComponent, WDLiveViewDefaultType } from 'wdComponent/Index'; | 8 | import { LiveEmptyComponent, WDLiveViewDefaultType } from 'wdComponent/Index'; |
| 9 | import { LiveMessageOptType } from 'wdBean/src/main/ets/bean/live/LiveRoomBean'; | 9 | import { LiveMessageOptType } from 'wdBean/src/main/ets/bean/live/LiveRoomBean'; |
| 10 | import { window } from '@kit.ArkUI'; | 10 | import { window } from '@kit.ArkUI'; |
| 11 | +import { onlyWifiLoadVideo } from 'wdComponent/src/main/ets/utils/lazyloadImg'; | ||
| 12 | +import { NoWifiTipComponent } from '../../common/NoWifiTipComponent'; | ||
| 11 | 13 | ||
| 12 | const TAG: string = 'TopPlayComponent' | 14 | const TAG: string = 'TopPlayComponent' |
| 13 | 15 | ||
| @@ -39,6 +41,7 @@ export struct TopPlayComponent { | @@ -39,6 +41,7 @@ export struct TopPlayComponent { | ||
| 39 | @Consume liveDetailPageLogic: LiveDetailPageLogic | 41 | @Consume liveDetailPageLogic: LiveDetailPageLogic |
| 40 | @Consume @Watch('pageShowChange') pageShow: number | 42 | @Consume @Watch('pageShowChange') pageShow: number |
| 41 | @Consume @Watch('pageHideChange') pageHide: number | 43 | @Consume @Watch('pageHideChange') pageHide: number |
| 44 | + @Consume topSafeHeight: number | ||
| 42 | init: boolean = false | 45 | init: boolean = false |
| 43 | @Prop @Watch("liveIMControlMessageChange") lastLiveControl: LiveRoomItemBean = {} as LiveRoomItemBean // IM 控制消息 | 46 | @Prop @Watch("liveIMControlMessageChange") lastLiveControl: LiveRoomItemBean = {} as LiveRoomItemBean // IM 控制消息 |
| 44 | ///是否是手动点击暂停,手动暂停的,页面重新出现时,不自动恢复播放 | 47 | ///是否是手动点击暂停,手动暂停的,页面重新出现时,不自动恢复播放 |
| @@ -48,6 +51,9 @@ export struct TopPlayComponent { | @@ -48,6 +51,9 @@ export struct TopPlayComponent { | ||
| 48 | @State isZDP: boolean = false // 是否折叠屏 默认false | 51 | @State isZDP: boolean = false // 是否折叠屏 默认false |
| 49 | @State windowWidth: number = AppStorage.get<number>('windowWidth') || 0 | 52 | @State windowWidth: number = AppStorage.get<number>('windowWidth') || 0 |
| 50 | 53 | ||
| 54 | + @State showNoWifiTip: boolean = false // 直播预告和直播回放 | ||
| 55 | + livingDialogToast?: CustomDialogController // 直播中 | ||
| 56 | + | ||
| 51 | pageShowChange() { | 57 | pageShowChange() { |
| 52 | if (this.manualClickPauseOrPlay) { | 58 | if (this.manualClickPauseOrPlay) { |
| 53 | return | 59 | return |
| @@ -60,7 +66,7 @@ export struct TopPlayComponent { | @@ -60,7 +66,7 @@ export struct TopPlayComponent { | ||
| 60 | this.playerController?.pause() | 66 | this.playerController?.pause() |
| 61 | } | 67 | } |
| 62 | 68 | ||
| 63 | - aboutToAppear(): void { | 69 | + aboutToAppear() { |
| 64 | if (this.playerController) { | 70 | if (this.playerController) { |
| 65 | 71 | ||
| 66 | this.playerController.onCanplay = () => { | 72 | this.playerController.onCanplay = () => { |
| @@ -85,6 +91,12 @@ export struct TopPlayComponent { | @@ -85,6 +91,12 @@ export struct TopPlayComponent { | ||
| 85 | } | 91 | } |
| 86 | 92 | ||
| 87 | } | 93 | } |
| 94 | + | ||
| 95 | + this.playerController.onFirstFrameDisplay = () => { | ||
| 96 | + if (this.showNoWifiTip) { | ||
| 97 | + this.playerController?.pause() | ||
| 98 | + } | ||
| 99 | + } | ||
| 88 | } | 100 | } |
| 89 | this.updateData() | 101 | this.updateData() |
| 90 | 102 | ||
| @@ -94,6 +106,33 @@ export struct TopPlayComponent { | @@ -94,6 +106,33 @@ export struct TopPlayComponent { | ||
| 94 | // 2000折叠屏 TODO DeviceUtil 方法完善了换判断条件 | 106 | // 2000折叠屏 TODO DeviceUtil 方法完善了换判断条件 |
| 95 | this.isZDP = this.screenWidth > 2000 ? true : false | 107 | this.isZDP = this.screenWidth > 2000 ? true : false |
| 96 | this.resizeWindow() | 108 | this.resizeWindow() |
| 109 | + | ||
| 110 | + if (this.liveDetailPageLogic.livingNeedShowNoWifiTip()) { | ||
| 111 | + this.livingDialogToast = new CustomDialogController({ | ||
| 112 | + builder: CustomToast({ | ||
| 113 | + bgColor: 0xB3000000, | ||
| 114 | + opacityValue: 1, | ||
| 115 | + fontSizeValue: "25lpx", | ||
| 116 | + lineHeightValue: "36lpx", | ||
| 117 | + msg: "正在使用非Wi-Fi网络,播放将产生流量费用", | ||
| 118 | + marginTop:211/2+px2vp(this.topSafeHeight)-px2vp(84/2) | ||
| 119 | + }), | ||
| 120 | + autoCancel: false, | ||
| 121 | + alignment: DialogAlignment.Top, | ||
| 122 | + customStyle: true, | ||
| 123 | + maskColor: "#00000000" | ||
| 124 | + }) | ||
| 125 | + this.livingDialogToast.open() | ||
| 126 | + } else if (this.liveDetailPageLogic.noLivingNeedShowNoWifiTip()) { | ||
| 127 | + onlyWifiLoadVideo().then((onlyWifiLoadVideo) => { | ||
| 128 | + if (!onlyWifiLoadVideo) { | ||
| 129 | + this.showNoWifiTip = true | ||
| 130 | + if (this.playerController?.getStatus() == PlayerConstants.STATUS_START) { | ||
| 131 | + this.playerController?.pause() | ||
| 132 | + } | ||
| 133 | + } | ||
| 134 | + }) | ||
| 135 | + } | ||
| 97 | } | 136 | } |
| 98 | 137 | ||
| 99 | resizeWindow() { | 138 | resizeWindow() { |
| @@ -344,6 +383,16 @@ export struct TopPlayComponent { | @@ -344,6 +383,16 @@ export struct TopPlayComponent { | ||
| 344 | Visibility.None) | 383 | Visibility.None) |
| 345 | .margin({top:40}) | 384 | .margin({top:40}) |
| 346 | 385 | ||
| 386 | + if (this.showNoWifiTip) { | ||
| 387 | + NoWifiTipComponent({ | ||
| 388 | + onContinue: () => { | ||
| 389 | + this.showNoWifiTip = false | ||
| 390 | + if (this.playerController?.getStatus() == PlayerConstants.STATUS_PAUSE) { | ||
| 391 | + this.playerController?.play() | ||
| 392 | + } | ||
| 393 | + } | ||
| 394 | + }) | ||
| 395 | + } | ||
| 347 | } | 396 | } |
| 348 | .width('100%') | 397 | .width('100%') |
| 349 | .alignSelf(ItemAlign.Center) | 398 | .alignSelf(ItemAlign.Center) |
| @@ -117,6 +117,7 @@ export struct OperationListView { | @@ -117,6 +117,7 @@ export struct OperationListView { | ||
| 117 | 117 | ||
| 118 | } | 118 | } |
| 119 | ContentDetailRequest.postExecuteCollectRecord(params).then(res => { | 119 | ContentDetailRequest.postExecuteCollectRecord(params).then(res => { |
| 120 | + SPHelper.default.saveSync('CompCollectStatus',JSON.stringify(params)) | ||
| 120 | if (this.newsStatusOfUser && res.code == 0) { | 121 | if (this.newsStatusOfUser && res.code == 0) { |
| 121 | this.newsStatusOfUser.collectStatus = this.newsStatusOfUser?.collectStatus === 1 ? 0 : 1 | 122 | this.newsStatusOfUser.collectStatus = this.newsStatusOfUser?.collectStatus === 1 ? 0 : 1 |
| 122 | // this.queryContentInteractCount() | 123 | // this.queryContentInteractCount() |
| @@ -141,6 +141,7 @@ export struct PlayerRightView { | @@ -141,6 +141,7 @@ export struct PlayerRightView { | ||
| 141 | 141 | ||
| 142 | } | 142 | } |
| 143 | ContentDetailRequest.postExecuteCollectRecord(params).then(res => { | 143 | ContentDetailRequest.postExecuteCollectRecord(params).then(res => { |
| 144 | + SPHelper.default.saveSync('CompCollectStatus',JSON.stringify(params)) | ||
| 144 | if (this.newsStatusOfUser && res.code == 0) { | 145 | if (this.newsStatusOfUser && res.code == 0) { |
| 145 | this.newsStatusOfUser.collectStatus = this.newsStatusOfUser?.collectStatus === 1 ? 0 : 1 | 146 | this.newsStatusOfUser.collectStatus = this.newsStatusOfUser?.collectStatus === 1 ? 0 : 1 |
| 146 | // this.queryContentInteractCount() | 147 | // this.queryContentInteractCount() |
| @@ -257,6 +258,7 @@ export struct PlayerRightView { | @@ -257,6 +258,7 @@ export struct PlayerRightView { | ||
| 257 | Image(this.getHeadUrl()) | 258 | Image(this.getHeadUrl()) |
| 258 | .width('100%') | 259 | .width('100%') |
| 259 | .borderRadius(24) | 260 | .borderRadius(24) |
| 261 | + .backgroundColor(Color.White) | ||
| 260 | .aspectRatio(1) | 262 | .aspectRatio(1) |
| 261 | .border({ width: 1, color: Color.White, style: BorderStyle.Solid }) | 263 | .border({ width: 1, color: Color.White, style: BorderStyle.Solid }) |
| 262 | .onClick(() => { | 264 | .onClick(() => { |
| @@ -32,6 +32,7 @@ export function setupPlayerConfig(player: AliPlayer) { | @@ -32,6 +32,7 @@ export function setupPlayerConfig(player: AliPlayer) { | ||
| 32 | config.mMaxBufferDuration = 50000 | 32 | config.mMaxBufferDuration = 50000 |
| 33 | config.mHighBufferDuration = 3000 | 33 | config.mHighBufferDuration = 3000 |
| 34 | config.mStartBufferDuration = 50 | 34 | config.mStartBufferDuration = 50 |
| 35 | + config.mEnableLowLatencyMode = true | ||
| 35 | player.setConfig(config) | 36 | player.setConfig(config) |
| 36 | } | 37 | } |
| 37 | } | 38 | } |
-
Please register or login to post a comment