Showing
19 changed files
with
61 additions
and
48 deletions
| @@ -9,6 +9,7 @@ import { uniformTypeDescriptor as utd } from '@kit.ArkData'; | @@ -9,6 +9,7 @@ import { uniformTypeDescriptor as utd } from '@kit.ArkData'; | ||
| 9 | import { JSON } from '@kit.ArkTS'; | 9 | import { JSON } from '@kit.ArkTS'; |
| 10 | import { image } from '@kit.ImageKit'; | 10 | import { image } from '@kit.ImageKit'; |
| 11 | import { WDShareBase } from '../WDShareBase'; | 11 | import { WDShareBase } from '../WDShareBase'; |
| 12 | +import { Logger } from 'wdKit'; | ||
| 12 | 13 | ||
| 13 | const TAG = "WDSystemShare" | 14 | const TAG = "WDSystemShare" |
| 14 | 15 | ||
| @@ -32,9 +33,9 @@ export class WDSystemShare implements WDShareInterface { | @@ -32,9 +33,9 @@ export class WDSystemShare implements WDShareInterface { | ||
| 32 | selectionMode: systemShare.SelectionMode.SINGLE | 33 | selectionMode: systemShare.SelectionMode.SINGLE |
| 33 | }); | 34 | }); |
| 34 | 35 | ||
| 35 | - console.log(TAG, "分享控制器调用完成") | 36 | + Logger.debug(TAG, "分享控制器调用完成") |
| 36 | } catch (e) { | 37 | } catch (e) { |
| 37 | - console.log(TAG, "异常1" + JSON.stringify(e)) | 38 | + Logger.error(TAG, "异常1" + JSON.stringify(e)) |
| 38 | fail(e) | 39 | fail(e) |
| 39 | } | 40 | } |
| 40 | }) | 41 | }) |
| @@ -45,7 +46,7 @@ export class WDSystemShare implements WDShareInterface { | @@ -45,7 +46,7 @@ export class WDSystemShare implements WDShareInterface { | ||
| 45 | 46 | ||
| 46 | if (contentType === ShareContentType.PrueText) { | 47 | if (contentType === ShareContentType.PrueText) { |
| 47 | let prueText = content as ShareContentText | 48 | let prueText = content as ShareContentText |
| 48 | - console.log(TAG, "分享纯文本") | 49 | + Logger.debug(TAG, "分享纯文本") |
| 49 | resolve(new systemShare.SharedData({ | 50 | resolve(new systemShare.SharedData({ |
| 50 | utd: utd.UniformDataType.PLAIN_TEXT, | 51 | utd: utd.UniformDataType.PLAIN_TEXT, |
| 51 | content: prueText.text | 52 | content: prueText.text |
| @@ -55,7 +56,7 @@ export class WDSystemShare implements WDShareInterface { | @@ -55,7 +56,7 @@ export class WDSystemShare implements WDShareInterface { | ||
| 55 | 56 | ||
| 56 | if (contentType === ShareContentType.ImageAndText) { | 57 | if (contentType === ShareContentType.ImageAndText) { |
| 57 | let imageAndText = content as ShareContentImageAndText | 58 | let imageAndText = content as ShareContentImageAndText |
| 58 | - console.log(TAG, "分享图片和文本") | 59 | + Logger.debug(TAG, "分享图片和文本") |
| 59 | let data: systemShare.SharedData = new systemShare.SharedData({ | 60 | let data: systemShare.SharedData = new systemShare.SharedData({ |
| 60 | utd: utd.UniformDataType.PLAIN_TEXT, | 61 | utd: utd.UniformDataType.PLAIN_TEXT, |
| 61 | content: imageAndText.title | 62 | content: imageAndText.title |
| @@ -68,11 +69,11 @@ export class WDSystemShare implements WDShareInterface { | @@ -68,11 +69,11 @@ export class WDSystemShare implements WDShareInterface { | ||
| 68 | return | 69 | return |
| 69 | } | 70 | } |
| 70 | 71 | ||
| 71 | - console.log(TAG, "分享链接和文本") | 72 | + Logger.debug(TAG, "分享链接和文本") |
| 72 | let link = content as ShareContentLink | 73 | let link = content as ShareContentLink |
| 73 | let posterImg: Uint8Array | undefined = undefined | 74 | let posterImg: Uint8Array | undefined = undefined |
| 74 | let shareLink = this.generateShareLink(link) | 75 | let shareLink = this.generateShareLink(link) |
| 75 | - console.log("TAG, 分享 shareLink ==> " + shareLink) | 76 | + Logger.debug("TAG, 分享 shareLink ==> " + shareLink) |
| 76 | 77 | ||
| 77 | if (!context || !link.posterImg) { | 78 | if (!context || !link.posterImg) { |
| 78 | let data: systemShare.SharedData = new systemShare.SharedData({ | 79 | let data: systemShare.SharedData = new systemShare.SharedData({ |
| @@ -100,7 +101,7 @@ export class WDSystemShare implements WDShareInterface { | @@ -100,7 +101,7 @@ export class WDSystemShare implements WDShareInterface { | ||
| 100 | resolve(data) | 101 | resolve(data) |
| 101 | }) | 102 | }) |
| 102 | .catch((e: Error) => { | 103 | .catch((e: Error) => { |
| 103 | - console.log(TAG, "异常" + JSON.stringify(e)) | 104 | + Logger.error(TAG, "异常" + JSON.stringify(e)) |
| 104 | fail(e) | 105 | fail(e) |
| 105 | }) | 106 | }) |
| 106 | }) | 107 | }) |
| @@ -663,7 +663,7 @@ export struct DynamicDetailComponent { | @@ -663,7 +663,7 @@ export struct DynamicDetailComponent { | ||
| 663 | styleType: 1, | 663 | styleType: 1, |
| 664 | onCommentIconClick:()=>{ | 664 | onCommentIconClick:()=>{ |
| 665 | const info = componentUtils.getRectangleById('comment'); | 665 | const info = componentUtils.getRectangleById('comment'); |
| 666 | - console.log(JSON.stringify(info)) | 666 | + Logger.debug(TAG, JSON.stringify(info)) |
| 667 | 667 | ||
| 668 | if (!this.offsetY) { | 668 | if (!this.offsetY) { |
| 669 | this.offsetY = componentUtils.getRectangleById('comment').windowOffset.y | 669 | this.offsetY = componentUtils.getRectangleById('comment').windowOffset.y |
| @@ -861,7 +861,7 @@ export struct DynamicDetailComponent { | @@ -861,7 +861,7 @@ export struct DynamicDetailComponent { | ||
| 861 | this.newsStatusOfUser = data[0]; | 861 | this.newsStatusOfUser = data[0]; |
| 862 | // Logger.info(TAG, `newsStatusOfUser:${JSON.stringify(this.newsStatusOfUser)}`) | 862 | // Logger.info(TAG, `newsStatusOfUser:${JSON.stringify(this.newsStatusOfUser)}`) |
| 863 | } catch (exception) { | 863 | } catch (exception) { |
| 864 | - console.error(TAG, JSON.stringify(exception)) | 864 | + Logger.error(TAG, JSON.stringify(exception)) |
| 865 | } | 865 | } |
| 866 | } | 866 | } |
| 867 | 867 |
| @@ -360,7 +360,7 @@ export struct ImageAndTextPageComponent { | @@ -360,7 +360,7 @@ export struct ImageAndTextPageComponent { | ||
| 360 | this.getRecommend() | 360 | this.getRecommend() |
| 361 | } | 361 | } |
| 362 | if (this.contentDetailData?.openLikes === 1) { | 362 | if (this.contentDetailData?.openLikes === 1) { |
| 363 | - console.log(TAG, '点赞this.getInteractDataStatus()') | 363 | + Logger.debug(TAG, '点赞this.getInteractDataStatus()') |
| 364 | this.getInteractDataStatus() | 364 | this.getInteractDataStatus() |
| 365 | this.queryContentInteractCount() | 365 | this.queryContentInteractCount() |
| 366 | } | 366 | } |
| @@ -425,11 +425,11 @@ export struct ImageAndTextPageComponent { | @@ -425,11 +425,11 @@ export struct ImageAndTextPageComponent { | ||
| 425 | } | 425 | } |
| 426 | // console.log(TAG,'contentDetailData', JSON.stringify(params.contentList)) | 426 | // console.log(TAG,'contentDetailData', JSON.stringify(params.contentList)) |
| 427 | let data = await MultiPictureDetailViewModel.getInteractDataStatus(params) | 427 | let data = await MultiPictureDetailViewModel.getInteractDataStatus(params) |
| 428 | - console.log(TAG, '查询用户对作品点赞、收藏状态', JSON.stringify(data)) | 428 | + Logger.debug(TAG, '查询用户对作品点赞、收藏状态', JSON.stringify(data)) |
| 429 | this.newsStatusOfUser = data[0]; | 429 | this.newsStatusOfUser = data[0]; |
| 430 | // console.log(TAG, `newsStatusOfUser:${JSON.stringify(this.newsStatusOfUser)}`) | 430 | // console.log(TAG, `newsStatusOfUser:${JSON.stringify(this.newsStatusOfUser)}`) |
| 431 | } catch (exception) { | 431 | } catch (exception) { |
| 432 | - console.error(TAG,'exception', JSON.stringify(exception)) | 432 | + Logger.debug(TAG,'exception', JSON.stringify(exception)) |
| 433 | } | 433 | } |
| 434 | } | 434 | } |
| 435 | 435 |
| @@ -18,6 +18,8 @@ import { InfomationCardClick } from '../../utils/infomationCardClick' | @@ -18,6 +18,8 @@ import { InfomationCardClick } from '../../utils/infomationCardClick' | ||
| 18 | import measure from '@ohos.measure' | 18 | import measure from '@ohos.measure' |
| 19 | import { PeopleShipHomePageDataModel } from '../../viewmodel/PeopleShipHomePageDataModel' | 19 | import { PeopleShipHomePageDataModel } from '../../viewmodel/PeopleShipHomePageDataModel' |
| 20 | 20 | ||
| 21 | +const TAG = "RmhTitle" | ||
| 22 | + | ||
| 21 | @Component | 23 | @Component |
| 22 | export struct RmhTitle { | 24 | export struct RmhTitle { |
| 23 | @State compDTO: CompDTO = new CompDTO() | 25 | @State compDTO: CompDTO = new CompDTO() |
| @@ -57,7 +59,7 @@ export struct RmhTitle { | @@ -57,7 +59,7 @@ export struct RmhTitle { | ||
| 57 | status: this.followStatus == '0' ? 1 : 0, | 59 | status: this.followStatus == '0' ? 1 : 0, |
| 58 | } | 60 | } |
| 59 | ContentDetailRequest.postInteractAccentionOperate(params2).then(res => { | 61 | ContentDetailRequest.postInteractAccentionOperate(params2).then(res => { |
| 60 | - console.log('rmhTitle-data', JSON.stringify(res.data)) | 62 | + Logger.debug(TAG, 'rmhTitle-data' + JSON.stringify(res.data)) |
| 61 | 63 | ||
| 62 | InfomationCardClick.track( | 64 | InfomationCardClick.track( |
| 63 | this.compDTO, | 65 | this.compDTO, |
| @@ -74,7 +76,7 @@ export struct RmhTitle { | @@ -74,7 +76,7 @@ export struct RmhTitle { | ||
| 74 | this.followStatus = '1' | 76 | this.followStatus = '1' |
| 75 | // 弹窗样式与何时调用待确认 | 77 | // 弹窗样式与何时调用待确认 |
| 76 | ContentDetailRequest.postPointLevelOperate({ operateType: 6 }).then((res) => { | 78 | ContentDetailRequest.postPointLevelOperate({ operateType: 6 }).then((res) => { |
| 77 | - console.log('关注号主获取积分==', JSON.stringify(res.data)) | 79 | + Logger.debug(TAG, '关注号主获取积分==', JSON.stringify(res.data)) |
| 78 | if (res.data?.showToast) { | 80 | if (res.data?.showToast) { |
| 79 | // ToastUtils.showToast(res.data.ruleName + '+' + res.data.rulePoint + '积分', 1000); | 81 | // ToastUtils.showToast(res.data.ruleName + '+' + res.data.rulePoint + '积分', 1000); |
| 80 | } | 82 | } |
| 1 | import { DateTimeUtils, EmitterEventId, EmitterUtils, LazyDataSource, | 1 | import { DateTimeUtils, EmitterEventId, EmitterUtils, LazyDataSource, |
| 2 | + Logger, | ||
| 2 | PublicDialogManager, | 3 | PublicDialogManager, |
| 3 | StringUtils } from 'wdKit/Index'; | 4 | StringUtils } from 'wdKit/Index'; |
| 4 | import { CommentItemCustomType, commentItemModel, WDPublicUserType } from '../model/CommentModel'; | 5 | import { CommentItemCustomType, commentItemModel, WDPublicUserType } from '../model/CommentModel'; |
| @@ -325,8 +326,9 @@ export struct CommentComponent { | @@ -325,8 +326,9 @@ export struct CommentComponent { | ||
| 325 | ,this.publishCommentModel.targetType | 326 | ,this.publishCommentModel.targetType |
| 326 | ,this.firstPageHotIds) | 327 | ,this.firstPageHotIds) |
| 327 | .then(commentListModel => { | 328 | .then(commentListModel => { |
| 328 | - console.log('评论:', JSON.stringify(commentListModel.list)) | ||
| 329 | - | 329 | + Logger.debugOptimize('Comment', () => { |
| 330 | + return '评论:' + JSON.stringify(commentListModel.list) | ||
| 331 | + }) | ||
| 330 | if (pageIndex == 1) { | 332 | if (pageIndex == 1) { |
| 331 | // 保存第一页热门评论ids | 333 | // 保存第一页热门评论ids |
| 332 | if (commentListModel.hotIds.length > 0) { | 334 | if (commentListModel.hotIds.length > 0) { |
| @@ -160,7 +160,7 @@ export struct CommentCustomDialog { | @@ -160,7 +160,7 @@ export struct CommentCustomDialog { | ||
| 160 | // this.textInputController.stopEditing() | 160 | // this.textInputController.stopEditing() |
| 161 | inputMethod.getController().hideTextInput((err: BusinessError) => { | 161 | inputMethod.getController().hideTextInput((err: BusinessError) => { |
| 162 | if (err) { | 162 | if (err) { |
| 163 | - console.error(`Failed to hideTextInput: ${JSON.stringify(err)}`); | 163 | + Logger.error(TAG, (`Failed to hideTextInput: ${JSON.stringify(err)}`); |
| 164 | return; | 164 | return; |
| 165 | } | 165 | } |
| 166 | // console.log('Succeeded in hiding text input.'); | 166 | // console.log('Succeeded in hiding text input.'); |
| @@ -188,7 +188,7 @@ export struct CommentCustomDialog { | @@ -188,7 +188,7 @@ export struct CommentCustomDialog { | ||
| 188 | // this.textInputController.stopEditing() | 188 | // this.textInputController.stopEditing() |
| 189 | inputMethod.getController().hideTextInput((err: BusinessError) => { | 189 | inputMethod.getController().hideTextInput((err: BusinessError) => { |
| 190 | if (err) { | 190 | if (err) { |
| 191 | - console.error(`Failed to hideTextInput: ${JSON.stringify(err)}`); | 191 | + Logger.debug(TAG, `Failed to hideTextInput: ${JSON.stringify(err)}`); |
| 192 | return; | 192 | return; |
| 193 | } | 193 | } |
| 194 | // console.log('Succeeded in hiding text input.'); | 194 | // console.log('Succeeded in hiding text input.'); |
| 1 | import router from '@ohos.router' | 1 | import router from '@ohos.router' |
| 2 | import { Params } from 'wdBean'; | 2 | import { Params } from 'wdBean'; |
| 3 | -import { DateTimeUtils, NetworkUtil, NumberFormatterUtils, StringUtils } from 'wdKit'; | 3 | +import { DateTimeUtils, Logger, NetworkUtil, NumberFormatterUtils, StringUtils } from 'wdKit'; |
| 4 | import { WDRouterPage, WDRouterRule } from 'wdRouter'; | 4 | import { WDRouterPage, WDRouterRule } from 'wdRouter'; |
| 5 | import { TrackingPageBrowse, TrackConstants, ParamType, Tracking } from 'wdTracking/Index'; | 5 | import { TrackingPageBrowse, TrackConstants, ParamType, Tracking } from 'wdTracking/Index'; |
| 6 | import { OtherHomePageBottomCommentComponent } from '../components/mine/home/OtherHomePageBottomCommentComponent'; | 6 | import { OtherHomePageBottomCommentComponent } from '../components/mine/home/OtherHomePageBottomCommentComponent'; |
| @@ -422,7 +422,7 @@ struct OtherNormalUserHomePage { | @@ -422,7 +422,7 @@ struct OtherNormalUserHomePage { | ||
| 422 | } | 422 | } |
| 423 | this.getUserLevel() | 423 | this.getUserLevel() |
| 424 | }).catch((err:Error)=>{ | 424 | }).catch((err:Error)=>{ |
| 425 | - console.log(TAG,JSON.stringify(err)) | 425 | + Logger.error(TAG, JSON.stringify(err)) |
| 426 | }) | 426 | }) |
| 427 | } | 427 | } |
| 428 | getUserLevel(){ | 428 | getUserLevel(){ |
| @@ -440,7 +440,7 @@ struct OtherNormalUserHomePage { | @@ -440,7 +440,7 @@ struct OtherNormalUserHomePage { | ||
| 440 | this.levelId = value[0].level | 440 | this.levelId = value[0].level |
| 441 | } | 441 | } |
| 442 | }).catch((err:Error)=>{ | 442 | }).catch((err:Error)=>{ |
| 443 | - console.log(TAG,JSON.stringify(err)) | 443 | + Logger.error(TAG,JSON.stringify(err)) |
| 444 | }) | 444 | }) |
| 445 | } | 445 | } |
| 446 | 446 |
| @@ -2,7 +2,7 @@ import { Params } from 'wdBean/Index'; | @@ -2,7 +2,7 @@ import { Params } from 'wdBean/Index'; | ||
| 2 | import { CustomTitleUI } from '../components/reusable/CustomTitleUI'; | 2 | import { CustomTitleUI } from '../components/reusable/CustomTitleUI'; |
| 3 | import { router } from '@kit.ArkUI'; | 3 | import { router } from '@kit.ArkUI'; |
| 4 | import { FollowListDetailItem } from '../viewmodel/FollowListDetailItem'; | 4 | import { FollowListDetailItem } from '../viewmodel/FollowListDetailItem'; |
| 5 | -import { LazyDataSource, SPHelper, StringUtils } from 'wdKit/Index'; | 5 | +import { LazyDataSource, Logger, SPHelper, StringUtils } from 'wdKit/Index'; |
| 6 | import SearcherAboutDataModel from '../model/SearcherAboutDataModel'; | 6 | import SearcherAboutDataModel from '../model/SearcherAboutDataModel'; |
| 7 | import { CreatorDetailRequestItem } from '../viewmodel/CreatorDetailRequestItem'; | 7 | import { CreatorDetailRequestItem } from '../viewmodel/CreatorDetailRequestItem'; |
| 8 | import { FollowListStatusRequestItem } from '../viewmodel/FollowListStatusRequestItem'; | 8 | import { FollowListStatusRequestItem } from '../viewmodel/FollowListStatusRequestItem'; |
| @@ -133,7 +133,7 @@ struct SearchCreatorPage { | @@ -133,7 +133,7 @@ struct SearchCreatorPage { | ||
| 133 | 133 | ||
| 134 | this.isLoading = false | 134 | this.isLoading = false |
| 135 | }).catch((err:Error)=>{ | 135 | }).catch((err:Error)=>{ |
| 136 | - console.log(TAG,"请求失败") | 136 | + Logger.error(TAG,"请求失败" + JSON.stringify(err)) |
| 137 | this.isLoading = false | 137 | this.isLoading = false |
| 138 | this.count = this.count===-1?0:this.count | 138 | this.count = this.count===-1?0:this.count |
| 139 | }) | 139 | }) |
| @@ -190,7 +190,7 @@ struct SearchCreatorPage { | @@ -190,7 +190,7 @@ struct SearchCreatorPage { | ||
| 190 | .layoutWeight(1) | 190 | .layoutWeight(1) |
| 191 | .scrollBar(BarState.Off) | 191 | .scrollBar(BarState.Off) |
| 192 | .onReachEnd(()=>{ | 192 | .onReachEnd(()=>{ |
| 193 | - console.log(TAG,"触底了"); | 193 | + Logger.debug(TAG,"触底了"); |
| 194 | if(!this.isLoading){ | 194 | if(!this.isLoading){ |
| 195 | this.isLoading = true | 195 | this.isLoading = true |
| 196 | //加载分页数据 | 196 | //加载分页数据 |
| 1 | import { TAG } from '@ohos/hypium/src/main/Constant'; | 1 | import { TAG } from '@ohos/hypium/src/main/Constant'; |
| 2 | import { ContentDTO } from 'wdBean/Index'; | 2 | import { ContentDTO } from 'wdBean/Index'; |
| 3 | import { SpConstants } from 'wdConstant/Index' | 3 | import { SpConstants } from 'wdConstant/Index' |
| 4 | -import { DateTimeUtils, LazyDataSource, NetworkUtil, SPHelper, StringUtils} from 'wdKit/Index' | 4 | +import { DateTimeUtils, LazyDataSource, Logger, NetworkUtil, SPHelper, StringUtils} from 'wdKit/Index' |
| 5 | import { ProcessUtils } from 'wdRouter/Index'; | 5 | import { ProcessUtils } from 'wdRouter/Index'; |
| 6 | import { VisitorCommentComponent } from '../components/mine/home/VisitorCommentComponent'; | 6 | import { VisitorCommentComponent } from '../components/mine/home/VisitorCommentComponent'; |
| 7 | import { CustomPullToRefresh } from '../components/reusable/CustomPullToRefresh'; | 7 | import { CustomPullToRefresh } from '../components/reusable/CustomPullToRefresh'; |
| @@ -176,7 +176,7 @@ struct VisitorCommentPage { | @@ -176,7 +176,7 @@ struct VisitorCommentPage { | ||
| 176 | this.isGetRequest = true | 176 | this.isGetRequest = true |
| 177 | this.isLoading = false | 177 | this.isLoading = false |
| 178 | }).catch((err: Error) => { | 178 | }).catch((err: Error) => { |
| 179 | - console.log(TAG, JSON.stringify(err)) | 179 | + Logger.error(TAG, "get " + JSON.stringify(err)) |
| 180 | this.isGetRequest = true | 180 | this.isGetRequest = true |
| 181 | this.isLoading = false | 181 | this.isLoading = false |
| 182 | }) | 182 | }) |
| 1 | import { TrackingContent, TrackConstants, ParamType } from 'wdTracking'; | 1 | import { TrackingContent, TrackConstants, ParamType } from 'wdTracking'; |
| 2 | import { CompDTO, ContentDTO } from 'wdBean'; | 2 | import { CompDTO, ContentDTO } from 'wdBean'; |
| 3 | +import { Logger } from 'wdKit'; | ||
| 3 | 4 | ||
| 4 | export class InfomationCardClick { | 5 | export class InfomationCardClick { |
| 5 | 6 | ||
| @@ -95,7 +96,7 @@ export class InfomationCardClick { | @@ -95,7 +96,7 @@ export class InfomationCardClick { | ||
| 95 | } else if (contentDTO.source) { | 96 | } else if (contentDTO.source) { |
| 96 | extParams['saAuthorName'] = contentDTO.source; | 97 | extParams['saAuthorName'] = contentDTO.source; |
| 97 | } | 98 | } |
| 98 | - console.log('InfomationCardClick-params:', JSON.stringify(extParams)) | 99 | + Logger.debug('InfomationCardClick-params:', JSON.stringify(extParams)) |
| 99 | if (action === 'detailPageShow') { | 100 | if (action === 'detailPageShow') { |
| 100 | TrackingContent.common(TrackConstants.EventType.Click, pageId, pageName, extParams); | 101 | TrackingContent.common(TrackConstants.EventType.Click, pageId, pageName, extParams); |
| 101 | } else if (action === 'like') { | 102 | } else if (action === 'like') { |
| @@ -106,7 +107,7 @@ export class InfomationCardClick { | @@ -106,7 +107,7 @@ export class InfomationCardClick { | ||
| 106 | TrackingContent.follow(bl, followUserId, followUserName, pageId, pageName, extParams) | 107 | TrackingContent.follow(bl, followUserId, followUserName, pageId, pageName, extParams) |
| 107 | } | 108 | } |
| 108 | } catch (err) { | 109 | } catch (err) { |
| 109 | - console.log('InfomationCardClick-err', JSON.stringify(err)) | 110 | + Logger.error('InfomationCardClick-err', JSON.stringify(err)) |
| 110 | } | 111 | } |
| 111 | } | 112 | } |
| 112 | } | 113 | } |
| 1 | +import { Logger } from "wdKit"; | ||
| 2 | + | ||
| 1 | export interface textItem { | 3 | export interface textItem { |
| 2 | content: string, | 4 | content: string, |
| 3 | isRed: boolean | 5 | isRed: boolean |
| @@ -8,6 +10,8 @@ export interface titleInitRes { | @@ -8,6 +10,8 @@ export interface titleInitRes { | ||
| 8 | textArr: textItem[] | 10 | textArr: textItem[] |
| 9 | } | 11 | } |
| 10 | 12 | ||
| 13 | +const TAG = "SearchShowRed" | ||
| 14 | + | ||
| 11 | export class SearchShowRed { | 15 | export class SearchShowRed { |
| 12 | // title: this.contentDTO.title | 16 | // title: this.contentDTO.title |
| 13 | static titleInit(title: string) { | 17 | static titleInit(title: string) { |
| @@ -27,7 +31,9 @@ export class SearchShowRed { | @@ -27,7 +31,9 @@ export class SearchShowRed { | ||
| 27 | res.push(content); | 31 | res.push(content); |
| 28 | } | 32 | } |
| 29 | 33 | ||
| 30 | - console.log('SearchShowRed-res', JSON.stringify(res)) | 34 | + Logger.debugOptimize(TAG, () => { |
| 35 | + return 'SearchShowRed-res' + JSON.stringify(res) | ||
| 36 | + }) | ||
| 31 | 37 | ||
| 32 | SearchShowRed.formatTitle( | 38 | SearchShowRed.formatTitle( |
| 33 | html.replaceAll('<em>', '').replaceAll('</em>', ''), | 39 | html.replaceAll('<em>', '').replaceAll('</em>', ''), |
| @@ -41,7 +47,9 @@ export class SearchShowRed { | @@ -41,7 +47,9 @@ export class SearchShowRed { | ||
| 41 | titleMarked, | 47 | titleMarked, |
| 42 | textArr | 48 | textArr |
| 43 | } | 49 | } |
| 44 | - console.log('SearchShowRed-titleInitRes', JSON.stringify(titleInitRes)) | 50 | + Logger.debugOptimize(TAG, () => { |
| 51 | + return 'SearchShowRed-titleInitRes ' + JSON.stringify(titleInitRes) | ||
| 52 | + }) | ||
| 45 | return titleInitRes | 53 | return titleInitRes |
| 46 | } | 54 | } |
| 47 | 55 |
| 1 | +import { Logger } from 'wdKit'; | ||
| 1 | import { HttpUtils } from 'wdNetwork/Index'; | 2 | import { HttpUtils } from 'wdNetwork/Index'; |
| 2 | 3 | ||
| 3 | export interface mournsInfoModel{ | 4 | export interface mournsInfoModel{ |
| @@ -80,7 +81,7 @@ export class GrayManageModel { | @@ -80,7 +81,7 @@ export class GrayManageModel { | ||
| 80 | this.videoList = mourns.videoList | 81 | this.videoList = mourns.videoList |
| 81 | this.serverList = mourns.serverList | 82 | this.serverList = mourns.serverList |
| 82 | this.grayUserList = mourns.greyUserList | 83 | this.grayUserList = mourns.greyUserList |
| 83 | - console.log(TAG, 'LaunchDataModel.mourns', JSON.stringify(mourns)) | 84 | + Logger.debug(TAG, 'LaunchDataModel.mourns', JSON.stringify(mourns)) |
| 84 | } | 85 | } |
| 85 | 86 | ||
| 86 | // 国殇模式开启 | 87 | // 国殇模式开启 |
| @@ -118,7 +118,7 @@ export class LiveModel { | @@ -118,7 +118,7 @@ export class LiveModel { | ||
| 118 | fail(data.message) | 118 | fail(data.message) |
| 119 | return | 119 | return |
| 120 | } | 120 | } |
| 121 | - console.log('LiveLikeComponent data.data', data.data) | 121 | + Logger.debug(TAG, 'LiveLikeComponent data.data ' + data.data) |
| 122 | success(data.data) | 122 | success(data.data) |
| 123 | }, (error: Error) => { | 123 | }, (error: Error) => { |
| 124 | fail(error.message) | 124 | fail(error.message) |
| @@ -157,7 +157,7 @@ export class WDAliPlayerController { | @@ -157,7 +157,7 @@ export class WDAliPlayerController { | ||
| 157 | 157 | ||
| 158 | 158 | ||
| 159 | if (this.pageParam) { | 159 | if (this.pageParam) { |
| 160 | - console.log('播放视频pageParam', JSON.stringify(this.pageParam)) | 160 | + Logger.debug(TAG, '播放视频pageParam', JSON.stringify(this.pageParam)) |
| 161 | // 播放埋点 | 161 | // 播放埋点 |
| 162 | TrackingPlay.videoPositivePlay(Math.floor((DateTimeUtils.getTimeStamp() - this.creatStartTime) / 1000), | 162 | TrackingPlay.videoPositivePlay(Math.floor((DateTimeUtils.getTimeStamp() - this.creatStartTime) / 1000), |
| 163 | this.pageName, this.pageName, this.pageParam) | 163 | this.pageName, this.pageName, this.pageParam) |
| @@ -172,7 +172,7 @@ export class WDAliPlayerController { | @@ -172,7 +172,7 @@ export class WDAliPlayerController { | ||
| 172 | if (this.pageParam) { | 172 | if (this.pageParam) { |
| 173 | let initDuration = Math.floor(Number(this.duration) / 1000) | 173 | let initDuration = Math.floor(Number(this.duration) / 1000) |
| 174 | let currentPlayTime: number = Math.floor((DateTimeUtils.getTimeStamp() - this.creatStartTime) / 1000) //当前播放时间 | 174 | let currentPlayTime: number = Math.floor((DateTimeUtils.getTimeStamp() - this.creatStartTime) / 1000) //当前播放时间 |
| 175 | - console.log('播放结束') | 175 | + Logger.debug(TAG, '播放结束') |
| 176 | // 播放结束埋点 | 176 | // 播放结束埋点 |
| 177 | TrackingPlay.videoPlayEnd(currentPlayTime, initDuration, currentPlayTime, this.pageName, this.pageName, | 177 | TrackingPlay.videoPlayEnd(currentPlayTime, initDuration, currentPlayTime, this.pageName, this.pageName, |
| 178 | this.pageParam) | 178 | this.pageParam) |
| @@ -279,7 +279,7 @@ export class WDAliPlayerController { | @@ -279,7 +279,7 @@ export class WDAliPlayerController { | ||
| 279 | this.status = PlayerConstants.STATUS_ERROR; | 279 | this.status = PlayerConstants.STATUS_ERROR; |
| 280 | this.watchStatus(); | 280 | this.watchStatus(); |
| 281 | 281 | ||
| 282 | - console.log('播放错误',JSON.stringify(error)) | 282 | + Logger.error(TAG, '播放错误',JSON.stringify(error)) |
| 283 | TrackingPlay.videoPlayError(errorInfo.getMsg(), this.pageName, this.pageName, this.pageParam) | 283 | TrackingPlay.videoPlayError(errorInfo.getMsg(), this.pageName, this.pageName, this.pageParam) |
| 284 | } | 284 | } |
| 285 | }); | 285 | }); |
| 1 | import componentUtils from '@ohos.arkui.componentUtils'; | 1 | import componentUtils from '@ohos.arkui.componentUtils'; |
| 2 | import { WDPlayerController } from '../controller/WDPlayerController' | 2 | import { WDPlayerController } from '../controller/WDPlayerController' |
| 3 | -import { WindowModel } from 'wdKit'; | ||
| 4 | -import { Logger } from '../utils/Logger'; | 3 | +import { WindowModel, Logger } from 'wdKit'; |
| 5 | import { enableAliPlayer } from '../utils/GlobalSetting'; | 4 | import { enableAliPlayer } from '../utils/GlobalSetting'; |
| 6 | import { WDAliPlayerController } from '../controller/WDAliPlayerController'; | 5 | import { WDAliPlayerController } from '../controller/WDAliPlayerController'; |
| 7 | 6 | ||
| @@ -24,11 +23,11 @@ class MGPlayRenderViewIns { | @@ -24,11 +23,11 @@ class MGPlayRenderViewIns { | ||
| 24 | static add() { | 23 | static add() { |
| 25 | MGPlayRenderViewIns.intCount++; | 24 | MGPlayRenderViewIns.intCount++; |
| 26 | WindowModel.shared.setWindowKeepScreenOn(true); | 25 | WindowModel.shared.setWindowKeepScreenOn(true); |
| 27 | - console.log("add-- +1") | 26 | + Logger.debug(TAG, "add-- +1") |
| 28 | } | 27 | } |
| 29 | 28 | ||
| 30 | static del() { | 29 | static del() { |
| 31 | - console.log("del-- -1") | 30 | + Logger.debug(TAG, "del-- -1") |
| 32 | MGPlayRenderViewIns.intCount--; | 31 | MGPlayRenderViewIns.intCount--; |
| 33 | if (MGPlayRenderViewIns.intCount <= 0) { | 32 | if (MGPlayRenderViewIns.intCount <= 0) { |
| 34 | WindowModel.shared.setWindowKeepScreenOn(false); | 33 | WindowModel.shared.setWindowKeepScreenOn(false); |
| 1 | import componentUtils from '@ohos.arkui.componentUtils'; | 1 | import componentUtils from '@ohos.arkui.componentUtils'; |
| 2 | -import { WindowModel } from 'wdKit'; | ||
| 3 | -import { Logger } from '../utils/Logger'; | 2 | +import { WindowModel, Logger } from 'wdKit'; |
| 4 | import { enableAliPlayer } from '../utils/GlobalSetting'; | 3 | import { enableAliPlayer } from '../utils/GlobalSetting'; |
| 5 | import { WDAliPlayerController } from '../controller/WDAliPlayerController'; | 4 | import { WDAliPlayerController } from '../controller/WDAliPlayerController'; |
| 6 | 5 | ||
| @@ -23,11 +22,11 @@ class MGPlayRenderViewIns { | @@ -23,11 +22,11 @@ class MGPlayRenderViewIns { | ||
| 23 | static add() { | 22 | static add() { |
| 24 | MGPlayRenderViewIns.intCount++; | 23 | MGPlayRenderViewIns.intCount++; |
| 25 | WindowModel.shared.setWindowKeepScreenOn(true); | 24 | WindowModel.shared.setWindowKeepScreenOn(true); |
| 26 | - console.log("add-- +1") | 25 | + Logger.debug(TAG, "add-- +1") |
| 27 | } | 26 | } |
| 28 | 27 | ||
| 29 | static del() { | 28 | static del() { |
| 30 | - console.log("del-- -1") | 29 | + Logger.debug(TAG, "del-- -1") |
| 31 | MGPlayRenderViewIns.intCount--; | 30 | MGPlayRenderViewIns.intCount--; |
| 32 | if (MGPlayRenderViewIns.intCount <= 0) { | 31 | if (MGPlayRenderViewIns.intCount <= 0) { |
| 33 | WindowModel.shared.setWindowKeepScreenOn(false); | 32 | WindowModel.shared.setWindowKeepScreenOn(false); |
| @@ -24,11 +24,11 @@ class MGPlayRenderViewIns { | @@ -24,11 +24,11 @@ class MGPlayRenderViewIns { | ||
| 24 | static add() { | 24 | static add() { |
| 25 | MGPlayRenderViewIns.intCount++; | 25 | MGPlayRenderViewIns.intCount++; |
| 26 | WindowModel.shared.setWindowKeepScreenOn(true); | 26 | WindowModel.shared.setWindowKeepScreenOn(true); |
| 27 | - console.log("add-- +1") | 27 | + Logger.debug(TAG, "add-- +1") |
| 28 | } | 28 | } |
| 29 | 29 | ||
| 30 | static del() { | 30 | static del() { |
| 31 | - console.log("del-- -1") | 31 | + Logger.debug(TAG, "del-- -1") |
| 32 | MGPlayRenderViewIns.intCount--; | 32 | MGPlayRenderViewIns.intCount--; |
| 33 | if (MGPlayRenderViewIns.intCount <= 0) { | 33 | if (MGPlayRenderViewIns.intCount <= 0) { |
| 34 | WindowModel.shared.setWindowKeepScreenOn(false); | 34 | WindowModel.shared.setWindowKeepScreenOn(false); |
| @@ -24,11 +24,11 @@ class MGPlayRenderViewIns { | @@ -24,11 +24,11 @@ class MGPlayRenderViewIns { | ||
| 24 | static add() { | 24 | static add() { |
| 25 | MGPlayRenderViewIns.intCount++; | 25 | MGPlayRenderViewIns.intCount++; |
| 26 | WindowModel.shared.setWindowKeepScreenOn(true); | 26 | WindowModel.shared.setWindowKeepScreenOn(true); |
| 27 | - console.log("add-- +1") | 27 | + Logger.debug(TAG, "add-- +1") |
| 28 | } | 28 | } |
| 29 | 29 | ||
| 30 | static del() { | 30 | static del() { |
| 31 | - console.log("del-- -1") | 31 | + Logger.debug(TAG, "del-- -1") |
| 32 | MGPlayRenderViewIns.intCount--; | 32 | MGPlayRenderViewIns.intCount--; |
| 33 | if (MGPlayRenderViewIns.intCount <= 0) { | 33 | if (MGPlayRenderViewIns.intCount <= 0) { |
| 34 | WindowModel.shared.setWindowKeepScreenOn(false); | 34 | WindowModel.shared.setWindowKeepScreenOn(false); |
| @@ -66,7 +66,6 @@ export struct WDPlayerRenderView { | @@ -66,7 +66,6 @@ export struct WDPlayerRenderView { | ||
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | this.playerController.onVideoSizeChange = (width: number, height: number) => { | 68 | this.playerController.onVideoSizeChange = (width: number, height: number) => { |
| 69 | - console.log(`WDPlayerRenderView onVideoSizeChange width:${width} videoTop:${height}`) | ||
| 70 | Logger.info(TAG, ` onVideoSizeChange width:${width} height:${height}`) | 69 | Logger.info(TAG, ` onVideoSizeChange width:${width} height:${height}`) |
| 71 | this.videoWidth = width; | 70 | this.videoWidth = width; |
| 72 | this.videoHeight = height; | 71 | this.videoHeight = height; |
-
Please register or login to post a comment