Showing
1 changed file
with
34 additions
and
29 deletions
| @@ -91,14 +91,14 @@ export struct MorningEveningPaperComponent { | @@ -91,14 +91,14 @@ export struct MorningEveningPaperComponent { | ||
| 91 | private AudioSuspension = new AudioSuspensionModel() | 91 | private AudioSuspension = new AudioSuspensionModel() |
| 92 | 92 | ||
| 93 | onCancel() { | 93 | onCancel() { |
| 94 | - Logger.info(TAG, "cj2024 onCancel = ") | 94 | + console.log(TAG, "cj2024 onCancel = ") |
| 95 | } | 95 | } |
| 96 | 96 | ||
| 97 | /** | 97 | /** |
| 98 | * 回调无用 | 98 | * 回调无用 |
| 99 | **/ | 99 | **/ |
| 100 | onConfirm() { | 100 | onConfirm() { |
| 101 | - Logger.info(TAG, "cj2024 onConfirm = ") | 101 | + console.log(TAG, "cj2024 onConfirm = ") |
| 102 | // if (this.playerController != undefined) { | 102 | // if (this.playerController != undefined) { |
| 103 | // | 103 | // |
| 104 | // } | 104 | // } |
| @@ -108,10 +108,10 @@ export struct MorningEveningPaperComponent { | @@ -108,10 +108,10 @@ export struct MorningEveningPaperComponent { | ||
| 108 | 108 | ||
| 109 | // 续播判断 | 109 | // 续播判断 |
| 110 | changeContinue() { | 110 | changeContinue() { |
| 111 | - Logger.info(TAG, "cj2024 changeContinue = 1") | 111 | + console.log(TAG, "cj2024 changeContinue = 1") |
| 112 | // if (this.nextContId) { | 112 | // if (this.nextContId) { |
| 113 | this.playerController.continue = () => { | 113 | this.playerController.continue = () => { |
| 114 | - Logger.info(TAG, "cj2024 changeContinue = 2") | 114 | + console.log(TAG, "cj2024 changeContinue = 2") |
| 115 | this.playerController?.stop(); | 115 | this.playerController?.stop(); |
| 116 | // this.playVM.playWithContentId(this.nextContId ?? ''); | 116 | // this.playVM.playWithContentId(this.nextContId ?? ''); |
| 117 | } | 117 | } |
| @@ -130,8 +130,8 @@ export struct MorningEveningPaperComponent { | @@ -130,8 +130,8 @@ export struct MorningEveningPaperComponent { | ||
| 130 | const dailyPaperTopicPageId = await SPHelper.default.getSync('dailyPaperTopicPageId', "") as String | 130 | const dailyPaperTopicPageId = await SPHelper.default.getSync('dailyPaperTopicPageId', "") as String |
| 131 | console.info(TAG, `aboutToAppear = ` + dailyPaperTopicPageId) | 131 | console.info(TAG, `aboutToAppear = ` + dailyPaperTopicPageId) |
| 132 | const currentTime = new Date().getTime() | 132 | const currentTime = new Date().getTime() |
| 133 | - Logger.info(TAG, "currentTime = " + currentTime) | ||
| 134 | - Logger.info(TAG, `currentTime = ${currentTime}`) | 133 | + console.log(TAG, "currentTime = " + currentTime) |
| 134 | + console.log(TAG, `currentTime = ${currentTime}`) | ||
| 135 | try { | 135 | try { |
| 136 | 136 | ||
| 137 | // let pageInfoBean = await MorningEveningViewModel.getMorningEveningPageInfo("" + this.dailyPaperTopicPageId) | 137 | // let pageInfoBean = await MorningEveningViewModel.getMorningEveningPageInfo("" + this.dailyPaperTopicPageId) |
| @@ -145,13 +145,13 @@ export struct MorningEveningPaperComponent { | @@ -145,13 +145,13 @@ export struct MorningEveningPaperComponent { | ||
| 145 | let dateTime = DateTimeUtils.parseDate(this.pageInfoBean?.topicInfo?.topicDate ?? '', DateTimeUtils.PATTERN_DATE_HYPHEN) | 145 | let dateTime = DateTimeUtils.parseDate(this.pageInfoBean?.topicInfo?.topicDate ?? '', DateTimeUtils.PATTERN_DATE_HYPHEN) |
| 146 | const dateShow = new Date(dateTime) | 146 | const dateShow = new Date(dateTime) |
| 147 | this.subTitle = `${dateShow.getFullYear()}年\n${(dateShow.getMonth() + 1)}月${dateShow.getDate()}日` | 147 | this.subTitle = `${dateShow.getFullYear()}年\n${(dateShow.getMonth() + 1)}月${dateShow.getDate()}日` |
| 148 | - Logger.info(TAG, "pageInfoBean topicDate = " + this.pageInfoBean?.topicInfo?.topicDate) | ||
| 149 | - Logger.info(TAG, "pageInfoBean title = " + this.pageInfoBean?.topicInfo?.title) | 148 | + console.log(TAG, "pageInfoBean topicDate = " + this.pageInfoBean?.topicInfo?.topicDate) |
| 149 | + console.log(TAG, "pageInfoBean title = " + this.pageInfoBean?.topicInfo?.title) | ||
| 150 | 150 | ||
| 151 | - Logger.info(TAG, "pageInfoBean dateTime = " + dateTime) | ||
| 152 | - Logger.info(TAG, "pageInfoBean subTitle = " + this.subTitle) | 151 | + console.log(TAG, "pageInfoBean dateTime = " + dateTime) |
| 152 | + console.log(TAG, "pageInfoBean subTitle = " + this.subTitle) | ||
| 153 | 153 | ||
| 154 | - Logger.info(TAG, "this.pageInfoBean = " + JSON.stringify(this.pageInfoBean)) | 154 | + console.log(TAG, "this.pageInfoBean = " + JSON.stringify(this.pageInfoBean)) |
| 155 | 155 | ||
| 156 | this.isHasTopView = this.pageInfoBean?.topicInfo?.frontLinkObject?true:false | 156 | this.isHasTopView = this.pageInfoBean?.topicInfo?.frontLinkObject?true:false |
| 157 | let coverUrl = this.isHasTopView?this.pageInfoBean?.topicInfo?.frontLinkObject?.coverUrl as string :'' | 157 | let coverUrl = this.isHasTopView?this.pageInfoBean?.topicInfo?.frontLinkObject?.coverUrl as string :'' |
| @@ -159,21 +159,22 @@ export struct MorningEveningPaperComponent { | @@ -159,21 +159,22 @@ export struct MorningEveningPaperComponent { | ||
| 159 | 159 | ||
| 160 | let compInfoBean = await MorningEveningViewModel.getMorningEveningCompInfo(pageInfoBean?.id, pageInfoBean?.groups[0]?.id, currentTime + "", pageInfoBean?.topicInfo?.topicId) | 160 | let compInfoBean = await MorningEveningViewModel.getMorningEveningCompInfo(pageInfoBean?.id, pageInfoBean?.groups[0]?.id, currentTime + "", pageInfoBean?.topicInfo?.topicId) |
| 161 | // this.compInfoBean = compInfoBean | 161 | // this.compInfoBean = compInfoBean |
| 162 | - Logger.info(TAG, "compInfoBean = " + JSON.stringify(compInfoBean)) | 162 | + console.log(TAG, "compInfoBean = " + JSON.stringify(compInfoBean)) |
| 163 | if (compInfoBean?.compList[0]) { | 163 | if (compInfoBean?.compList[0]) { |
| 164 | this.compListItem = compInfoBean?.compList[0] | 164 | this.compListItem = compInfoBean?.compList[0] |
| 165 | - Logger.debug(TAG, '获取评论数据' + `${this.compListItem.operDataList.length}`) | 165 | + console.log(TAG, '获取评论数据' + `${this.compListItem.operDataList.length}`) |
| 166 | if (this.compListItem.operDataList && this.compListItem.operDataList.length > 0) { | 166 | if (this.compListItem.operDataList && this.compListItem.operDataList.length > 0) { |
| 167 | this.getAllContentInteractData(this.compListItem.operDataList) | 167 | this.getAllContentInteractData(this.compListItem.operDataList) |
| 168 | } | 168 | } |
| 169 | - Logger.debug(TAG, 'compInfoBean?.compList[0].audioDataList', JSON.stringify(compInfoBean?.compList[0].audioDataList)) | 169 | + console.log(TAG, 'compInfoBean?.compList[0].audioDataList', JSON.stringify(compInfoBean?.compList[0].audioDataList)) |
| 170 | if (compInfoBean?.compList[0].audioDataList) { | 170 | if (compInfoBean?.compList[0].audioDataList) { |
| 171 | this.audioPlayUrl = compInfoBean?.compList[0].audioDataList[0].audioUrl | 171 | this.audioPlayUrl = compInfoBean?.compList[0].audioDataList[0].audioUrl |
| 172 | this.audioTitle = compInfoBean?.compList[0].audioDataList[0].title | 172 | this.audioTitle = compInfoBean?.compList[0].audioDataList[0].title |
| 173 | + console.log(TAG, 'this.audioPlayUrl', this.audioPlayUrl) | ||
| 173 | } | 174 | } |
| 174 | } | 175 | } |
| 175 | 176 | ||
| 176 | - Logger.info(TAG, "compInfoBean compStyle = " + compInfoBean.compList[0].compStyle) | 177 | + console.log(TAG, "compInfoBean compStyle = " + compInfoBean.compList[0].compStyle) |
| 177 | this.playerController.onTimeUpdate = (position, duration) => { | 178 | this.playerController.onTimeUpdate = (position, duration) => { |
| 178 | this.currentTime = DateFormatUtil.secondToTime(position); | 179 | this.currentTime = DateFormatUtil.secondToTime(position); |
| 179 | this.totalTime = DateFormatUtil.secondToTime(duration); | 180 | this.totalTime = DateFormatUtil.secondToTime(duration); |
| @@ -203,10 +204,10 @@ export struct MorningEveningPaperComponent { | @@ -203,10 +204,10 @@ export struct MorningEveningPaperComponent { | ||
| 203 | contentType: Number(item.objectType ?? '1') | 204 | contentType: Number(item.objectType ?? '1') |
| 204 | }) | 205 | }) |
| 205 | }) | 206 | }) |
| 206 | - Logger.debug(TAG, '获取评论数据' + `${JSON.stringify(params)}`) | 207 | + console.log(TAG, '获取评论数据' + `${JSON.stringify(params)}`) |
| 207 | 208 | ||
| 208 | this.commentList = await PeopleShipMainViewModel.getContentInteractInfo(params) | 209 | this.commentList = await PeopleShipMainViewModel.getContentInteractInfo(params) |
| 209 | - Logger.debug(TAG, '获取评论数据' + `${JSON.stringify(this.commentList)}`) | 210 | + console.log(TAG, '获取评论数据' + `${JSON.stringify(this.commentList)}`) |
| 210 | 211 | ||
| 211 | } catch (exception) { | 212 | } catch (exception) { |
| 212 | 213 | ||
| @@ -216,7 +217,7 @@ export struct MorningEveningPaperComponent { | @@ -216,7 +217,7 @@ export struct MorningEveningPaperComponent { | ||
| 216 | async setComponentBgColor(imageUrl: string) { | 217 | async setComponentBgColor(imageUrl: string) { |
| 217 | // 图片转换为PixelMap对象 | 218 | // 图片转换为PixelMap对象 |
| 218 | // const pixelMap: image.PixelMap = await image2PixelMap(item.icon); | 219 | // const pixelMap: image.PixelMap = await image2PixelMap(item.icon); |
| 219 | - Logger.debug(TAG, "compInfoBean compStyle = " + imageUrl) | 220 | + console.log(TAG, "compInfoBean compStyle = " + imageUrl) |
| 220 | 221 | ||
| 221 | if (imageUrl.length > 0 && this.pageInfoBean.topicInfo.frontFlag === 1) { | 222 | if (imageUrl.length > 0 && this.pageInfoBean.topicInfo.frontFlag === 1) { |
| 222 | const imageSource: image.ImageSource | undefined = await getPicture(imageUrl) | 223 | const imageSource: image.ImageSource | undefined = await getPicture(imageUrl) |
| @@ -237,11 +238,11 @@ export struct MorningEveningPaperComponent { | @@ -237,11 +238,11 @@ export struct MorningEveningPaperComponent { | ||
| 237 | const pixelMap: image.PixelMap = await imageNet2PixelMap(imageSource); | 238 | const pixelMap: image.PixelMap = await imageNet2PixelMap(imageSource); |
| 238 | effectKit.createColorPicker(pixelMap, (err, colorPicker) => { | 239 | effectKit.createColorPicker(pixelMap, (err, colorPicker) => { |
| 239 | let color = colorPicker.getLargestProportionColor(); | 240 | let color = colorPicker.getLargestProportionColor(); |
| 240 | - Logger.debug(TAG, "compInfoBean compStyle = " + color) | 241 | + console.log(TAG, "compInfoBean compStyle = " + color) |
| 241 | // color = ColorUtils.getMorningEveningPaperRgb({red:color.red,green:color.green,blue:color.blue,alpha:color.alpha}) | 242 | // color = ColorUtils.getMorningEveningPaperRgb({red:color.red,green:color.green,blue:color.blue,alpha:color.alpha}) |
| 242 | // 将取色器选取的color示例转换为十六进制颜色代码 | 243 | // 将取色器选取的color示例转换为十六进制颜色代码 |
| 243 | this.mixedBgColor = "#" + color.alpha.toString(16) + color.red.toString(16) + color.green.toString(16) + color.blue.toString(16); | 244 | this.mixedBgColor = "#" + color.alpha.toString(16) + color.red.toString(16) + color.green.toString(16) + color.blue.toString(16); |
| 244 | - Logger.debug(TAG, "compInfoBean compStyle = " + this.mixedBgColor) | 245 | + console.log(TAG, "compInfoBean compStyle = " + this.mixedBgColor) |
| 245 | }); | 246 | }); |
| 246 | 247 | ||
| 247 | } | 248 | } |
| @@ -267,10 +268,11 @@ export struct MorningEveningPaperComponent { | @@ -267,10 +268,11 @@ export struct MorningEveningPaperComponent { | ||
| 267 | topicInfoView({ frontLinkObject: this.pageInfoBean?.topicInfo?.frontLinkObject }) | 268 | topicInfoView({ frontLinkObject: this.pageInfoBean?.topicInfo?.frontLinkObject }) |
| 268 | } | 269 | } |
| 269 | 270 | ||
| 270 | - if (this.audioPlayUrl !== ""){ | ||
| 271 | - ListItem() { | ||
| 272 | - this.AudioBarView() | ||
| 273 | - } | 271 | + } |
| 272 | + | ||
| 273 | + if (this.audioPlayUrl !== ""){ | ||
| 274 | + ListItem() { | ||
| 275 | + this.AudioBarView() | ||
| 274 | } | 276 | } |
| 275 | } | 277 | } |
| 276 | 278 | ||
| @@ -310,8 +312,11 @@ export struct MorningEveningPaperComponent { | @@ -310,8 +312,11 @@ export struct MorningEveningPaperComponent { | ||
| 310 | @Builder | 312 | @Builder |
| 311 | topPaperTitle(){ | 313 | topPaperTitle(){ |
| 312 | Column(){ | 314 | Column(){ |
| 313 | - PaperTitleComponent({topicInfo:this.pageInfoBean?.topicInfo}).margin({top:this.topSafeHeight}) | ||
| 314 | - }.height(44+this.topSafeHeight).backgroundColor(this.isHasTopView?(this.scrollOffset > 100?this.mixedBgColor:''):this.mixedBgColor) | 315 | + PaperTitleComponent({topicInfo:this.pageInfoBean?.topicInfo}) |
| 316 | + .margin({top:this.topSafeHeight}) | ||
| 317 | + } | ||
| 318 | + .height(44+this.topSafeHeight) | ||
| 319 | + .backgroundColor(this.isHasTopView?(this.scrollOffset > 100?this.mixedBgColor:''):this.mixedBgColor) | ||
| 315 | } | 320 | } |
| 316 | 321 | ||
| 317 | @Builder | 322 | @Builder |
| @@ -350,12 +355,12 @@ export struct MorningEveningPaperComponent { | @@ -350,12 +355,12 @@ export struct MorningEveningPaperComponent { | ||
| 350 | .margin({ left: 10 })// .alignSelf(ItemAlign.Center) | 355 | .margin({ left: 10 })// .alignSelf(ItemAlign.Center) |
| 351 | .objectFit(ImageFit.Contain) | 356 | .objectFit(ImageFit.Contain) |
| 352 | .onClick(() => { | 357 | .onClick(() => { |
| 353 | - Logger.info("TAG", "cj compInfoBean onClick1 = " + this.isAudioPlaying) | 358 | + console.log("TAG", "cj compInfoBean onClick1 = " + this.isAudioPlaying) |
| 354 | // dialog.open() | 359 | // dialog.open() |
| 355 | // this.playerController.firstPlay(this.audioPlayUrl, this.audioTitle) | 360 | // this.playerController.firstPlay(this.audioPlayUrl, this.audioTitle) |
| 356 | this.AudioSuspension.setPlayerUrl(this.audioPlayUrl, this.audioTitle) | 361 | this.AudioSuspension.setPlayerUrl(this.audioPlayUrl, this.audioTitle) |
| 357 | - Logger.info(TAG, "this.audioPlayUrl = " + this.audioPlayUrl) | ||
| 358 | - Logger.info("TAG", "cj compInfoBean onClick2 = " + this.isAudioPlaying) | 362 | + console.log(TAG, "this.audioPlayUrl = " + this.audioPlayUrl) |
| 363 | + console.log("TAG", "cj compInfoBean onClick2 = " + this.isAudioPlaying) | ||
| 359 | }) | 364 | }) |
| 360 | } | 365 | } |
| 361 | // .aspectRatio(7 / 4) | 366 | // .aspectRatio(7 / 4) |
-
Please register or login to post a comment