Showing
11 changed files
with
37 additions
and
14 deletions
| @@ -195,7 +195,8 @@ export struct RmhTitle { | @@ -195,7 +195,8 @@ export struct RmhTitle { | ||
| 195 | 195 | ||
| 196 | Blank() | 196 | Blank() |
| 197 | if (this.rmhInfo?.cnIsAttention) { | 197 | if (this.rmhInfo?.cnIsAttention) { |
| 198 | - Row() { | 198 | + Column() { |
| 199 | + Row(){ | ||
| 199 | if (Number(this.followStatus) === 0) { | 200 | if (Number(this.followStatus) === 0) { |
| 200 | Image($r('app.media.rmh_follow')) | 201 | Image($r('app.media.rmh_follow')) |
| 201 | .width(16) | 202 | .width(16) |
| @@ -205,9 +206,9 @@ export struct RmhTitle { | @@ -205,9 +206,9 @@ export struct RmhTitle { | ||
| 205 | Text(Number(this.followStatus) === 0 ? '关注' : '已关注') | 206 | Text(Number(this.followStatus) === 0 ? '关注' : '已关注') |
| 206 | .fontSize($r('app.float.font_size_13')) | 207 | .fontSize($r('app.float.font_size_13')) |
| 207 | .fontColor(Number(this.followStatus) === 0 ? $r('app.color.color_ED2800') : 0xc6c6c6) | 208 | .fontColor(Number(this.followStatus) === 0 ? $r('app.color.color_ED2800') : 0xc6c6c6) |
| 209 | + }.margin({top:4}) | ||
| 208 | } | 210 | } |
| 209 | .flexShrink(0) | 211 | .flexShrink(0) |
| 210 | - .alignSelf(ItemAlign.Center) | ||
| 211 | .onClick(() => { | 212 | .onClick(() => { |
| 212 | this.handleAccention(); | 213 | this.handleAccention(); |
| 213 | }) | 214 | }) |
| @@ -86,7 +86,7 @@ export struct Card14Component { | @@ -86,7 +86,7 @@ export struct Card14Component { | ||
| 86 | .height(78) | 86 | .height(78) |
| 87 | .borderRadius($r('app.float.image_border_radius')) | 87 | .borderRadius($r('app.float.image_border_radius')) |
| 88 | .border({ | 88 | .border({ |
| 89 | - width: 1, | 89 | + width: 0.5, |
| 90 | color: '#0D000000' | 90 | color: '#0D000000' |
| 91 | }) | 91 | }) |
| 92 | .borderStyle(BorderStyle.Solid) | 92 | .borderStyle(BorderStyle.Solid) |
| @@ -124,7 +124,7 @@ export struct Card6Component { | @@ -124,7 +124,7 @@ export struct Card6Component { | ||
| 124 | .borderRadius(5) | 124 | .borderRadius(5) |
| 125 | .aspectRatio(this.contentDTO.appStyle === CompStyle.Card_13 ? 3 / 2 : 3 / 4) | 125 | .aspectRatio(this.contentDTO.appStyle === CompStyle.Card_13 ? 3 / 2 : 3 / 4) |
| 126 | .height(this.contentDTO.appStyle === CompStyle.Card_13 ? 78 : 156) | 126 | .height(this.contentDTO.appStyle === CompStyle.Card_13 ? 78 : 156) |
| 127 | - .border({width: 1, color: 0xf5f5f5}) | 127 | + .border({width: 0.5, color: 0xf5f5f5}) |
| 128 | .borderStyle(BorderStyle.Solid) | 128 | .borderStyle(BorderStyle.Solid) |
| 129 | CardMediaInfo({ contentDTO: this.contentDTO }) | 129 | CardMediaInfo({ contentDTO: this.contentDTO }) |
| 130 | } | 130 | } |
| @@ -12,6 +12,7 @@ const TAG = "MinePageUserSimpleInfoUI" | @@ -12,6 +12,7 @@ const TAG = "MinePageUserSimpleInfoUI" | ||
| 12 | @Component | 12 | @Component |
| 13 | export default struct MinePageUserSimpleInfoUI { | 13 | export default struct MinePageUserSimpleInfoUI { |
| 14 | @Watch('loginStateChange') @Prop isLogin :boolean | 14 | @Watch('loginStateChange') @Prop isLogin :boolean |
| 15 | + @Consume @Watch('pageShowForUpdateData') pageShow :number ///监听用户名是否需要更新 | ||
| 15 | @State userName:string = "登录注册" | 16 | @State userName:string = "登录注册" |
| 16 | @State headPhotoUrl:string = "" | 17 | @State headPhotoUrl:string = "" |
| 17 | userType:string = "1" | 18 | userType:string = "1" |
| @@ -41,6 +42,13 @@ export default struct MinePageUserSimpleInfoUI { | @@ -41,6 +42,13 @@ export default struct MinePageUserSimpleInfoUI { | ||
| 41 | } | 42 | } |
| 42 | } | 43 | } |
| 43 | 44 | ||
| 45 | + pageShowForUpdateData(){ | ||
| 46 | + let name = SPHelper.default.getSync(SpConstants.USER_NAME,"") as string | ||
| 47 | + if (name != this.userName) { | ||
| 48 | + this.loginStateChange() | ||
| 49 | + } | ||
| 50 | + } | ||
| 51 | + | ||
| 44 | build(){ | 52 | build(){ |
| 45 | Row(){ | 53 | Row(){ |
| 46 | //头像 | 54 | //头像 |
| @@ -49,6 +49,8 @@ struct ChannelSubscriptionLayout { | @@ -49,6 +49,8 @@ struct ChannelSubscriptionLayout { | ||
| 49 | 49 | ||
| 50 | changeTab: (index: number) => void = () => { | 50 | changeTab: (index: number) => void = () => { |
| 51 | } | 51 | } |
| 52 | + changeTopNavTab: (index: number) => void = () => { | ||
| 53 | + } | ||
| 52 | 54 | ||
| 53 | aboutToAppear() { | 55 | aboutToAppear() { |
| 54 | this.changeMyChannelData() | 56 | this.changeMyChannelData() |
| @@ -362,6 +364,7 @@ struct ChannelSubscriptionLayout { | @@ -362,6 +364,7 @@ struct ChannelSubscriptionLayout { | ||
| 362 | .onClick(() => { | 364 | .onClick(() => { |
| 363 | this.indexSettingChannelId = item.channelId | 365 | this.indexSettingChannelId = item.channelId |
| 364 | AppStorage.set('indexSettingChannelId', item.channelId) | 366 | AppStorage.set('indexSettingChannelId', item.channelId) |
| 367 | + this.changeTopNavTab(index) | ||
| 365 | }) | 368 | }) |
| 366 | }) | 369 | }) |
| 367 | } | 370 | } |
| @@ -4,6 +4,9 @@ import { editModel, editModelParams, WDEditDataModelType } from '../../model/Edi | @@ -4,6 +4,9 @@ import { editModel, editModelParams, WDEditDataModelType } from '../../model/Edi | ||
| 4 | import EditInfoViewModel from '../../viewmodel/EditInfoViewModel'; | 4 | import EditInfoViewModel from '../../viewmodel/EditInfoViewModel'; |
| 5 | // import { encryptMessage } from '../../../utils/cryptoUtil' | 5 | // import { encryptMessage } from '../../../utils/cryptoUtil' |
| 6 | import { encryptMessage } from 'wdLogin/src/main/ets/utils/cryptoUtil' | 6 | import { encryptMessage } from 'wdLogin/src/main/ets/utils/cryptoUtil' |
| 7 | +import { SPHelper } from 'wdKit'; | ||
| 8 | +import { SpConstants } from 'wdConstant'; | ||
| 9 | + | ||
| 7 | @Entry | 10 | @Entry |
| 8 | @Component | 11 | @Component |
| 9 | struct EditUserNikeNamePage { | 12 | struct EditUserNikeNamePage { |
| @@ -88,6 +91,7 @@ struct EditUserNikeNamePage { | @@ -88,6 +91,7 @@ struct EditUserNikeNamePage { | ||
| 88 | } | 91 | } |
| 89 | 92 | ||
| 90 | goBack(){ | 93 | goBack(){ |
| 94 | + SPHelper.default.saveSync(SpConstants.USER_NAME, this.nikeName) | ||
| 91 | let params: editModelParams = { | 95 | let params: editModelParams = { |
| 92 | userName: this.nikeName | 96 | userName: this.nikeName |
| 93 | } | 97 | } |
| @@ -137,7 +137,7 @@ struct PeopleShipHomePage { | @@ -137,7 +137,7 @@ struct PeopleShipHomePage { | ||
| 137 | // .height('calc(100% - 44vp)') | 137 | // .height('calc(100% - 44vp)') |
| 138 | .onDidScroll(() => { | 138 | .onDidScroll(() => { |
| 139 | this.topOpacity = this.scroller.currentOffset().yOffset / 120 | 139 | this.topOpacity = this.scroller.currentOffset().yOffset / 120 |
| 140 | - if (this.scroller.currentOffset().yOffset >= this.topHeight - 66) { | 140 | + if (this.scroller.currentOffset().yOffset >= this.topHeight) { |
| 141 | this.attentionOpacity = true | 141 | this.attentionOpacity = true |
| 142 | } else { | 142 | } else { |
| 143 | this.attentionOpacity = false | 143 | this.attentionOpacity = false |
| @@ -287,7 +287,10 @@ export struct TopNavigationComponentNew { | @@ -287,7 +287,10 @@ export struct TopNavigationComponentNew { | ||
| 287 | navItem: this.navItem, | 287 | navItem: this.navItem, |
| 288 | changeTab: (index) => { | 288 | changeTab: (index) => { |
| 289 | this.channelJumpToPage(index) | 289 | this.channelJumpToPage(index) |
| 290 | - } | 290 | + }, |
| 291 | + changeTopNavTab: (index) => { | ||
| 292 | + this.changePage(index) | ||
| 293 | + }, | ||
| 291 | }) | 294 | }) |
| 292 | .id('channelManageBtn') | 295 | .id('channelManageBtn') |
| 293 | .alignRules({ | 296 | .alignRules({ |
| @@ -11,6 +11,7 @@ import { | @@ -11,6 +11,7 @@ import { | ||
| 11 | batchLikeAndCollectParams, | 11 | batchLikeAndCollectParams, |
| 12 | } from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest'; | 12 | } from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest'; |
| 13 | import { ParamType, TrackConstants, TrackingButton, TrackingContent } from 'wdTracking/Index'; | 13 | import { ParamType, TrackConstants, TrackingButton, TrackingContent } from 'wdTracking/Index'; |
| 14 | +import { promptAction } from '@kit.ArkUI'; | ||
| 14 | 15 | ||
| 15 | const TAG = 'LikeComponent'; | 16 | const TAG = 'LikeComponent'; |
| 16 | 17 | ||
| @@ -437,6 +438,9 @@ export struct LikeComponent { | @@ -437,6 +438,9 @@ export struct LikeComponent { | ||
| 437 | console.log(TAG, "点赞 params", JSON.stringify(params)) | 438 | console.log(TAG, "点赞 params", JSON.stringify(params)) |
| 438 | ContentDetailRequest.postExecuteLike(params).then((data) => { | 439 | ContentDetailRequest.postExecuteLike(params).then((data) => { |
| 439 | 440 | ||
| 441 | + if (data.code != 0) { | ||
| 442 | + promptAction.showToast({ message: data.message }) | ||
| 443 | + }else { | ||
| 440 | console.log(TAG, '点赞接口调用成功', JSON.stringify(data)) | 444 | console.log(TAG, '点赞接口调用成功', JSON.stringify(data)) |
| 441 | 445 | ||
| 442 | // 直播点赞一直增加 | 446 | // 直播点赞一直增加 |
| @@ -461,6 +465,8 @@ export struct LikeComponent { | @@ -461,6 +465,8 @@ export struct LikeComponent { | ||
| 461 | } | 465 | } |
| 462 | 466 | ||
| 463 | this.enableBtn = true | 467 | this.enableBtn = true |
| 468 | + | ||
| 469 | + } | ||
| 464 | }).catch(() => { | 470 | }).catch(() => { |
| 465 | this.enableBtn = true | 471 | this.enableBtn = true |
| 466 | }) | 472 | }) |
| @@ -79,7 +79,7 @@ struct MineHomePage { | @@ -79,7 +79,7 @@ struct MineHomePage { | ||
| 79 | Stack({ alignContent: Alignment.Top }){ | 79 | Stack({ alignContent: Alignment.Top }){ |
| 80 | Image($r('app.media.title_bg')) | 80 | Image($r('app.media.title_bg')) |
| 81 | .width('100%') | 81 | .width('100%') |
| 82 | - .height(182) | 82 | + .height(206) |
| 83 | .objectFit(ImageFit.Cover) | 83 | .objectFit(ImageFit.Cover) |
| 84 | 84 | ||
| 85 | Row() | 85 | Row() |
| @@ -205,7 +205,7 @@ struct MineHomePage { | @@ -205,7 +205,7 @@ struct MineHomePage { | ||
| 205 | } | 205 | } |
| 206 | }) | 206 | }) |
| 207 | .backgroundColor($r('app.color.color_transparent')) | 207 | .backgroundColor($r('app.color.color_transparent')) |
| 208 | - .height(86) | 208 | + .height(100) |
| 209 | .width('100%') | 209 | .width('100%') |
| 210 | .padding({ left: 10 }) | 210 | .padding({ left: 10 }) |
| 211 | 211 |
| @@ -109,13 +109,12 @@ struct Index { | @@ -109,13 +109,12 @@ struct Index { | ||
| 109 | Stack({ alignContent: Alignment.End }) { | 109 | Stack({ alignContent: Alignment.End }) { |
| 110 | Column() { //标题 时间 进度条 | 110 | Column() { //标题 时间 进度条 |
| 111 | Marquee({ | 111 | Marquee({ |
| 112 | - start: this.start, | 112 | + start: true, |
| 113 | step: 5, | 113 | step: 5, |
| 114 | loop: Number.POSITIVE_INFINITY, | 114 | loop: Number.POSITIVE_INFINITY, |
| 115 | fromStart: true, | 115 | fromStart: true, |
| 116 | src: this.audioTitle | 116 | src: this.audioTitle |
| 117 | }) | 117 | }) |
| 118 | - .marqueeUpdateStrategy(MarqueeUpdateStrategy.DEFAULT) | ||
| 119 | .width("60%") | 118 | .width("60%") |
| 120 | .height(20) | 119 | .height(20) |
| 121 | .fontColor('#222222') | 120 | .fontColor('#222222') |
| @@ -126,10 +125,9 @@ struct Index { | @@ -126,10 +125,9 @@ struct Index { | ||
| 126 | // .onStart(() => { | 125 | // .onStart(() => { |
| 127 | // console.info('Marquee animation complete onStart') | 126 | // console.info('Marquee animation complete onStart') |
| 128 | // }) | 127 | // }) |
| 129 | - .onBounce(() => { | ||
| 130 | - console.info('Marquee animation complete onBounce') | ||
| 131 | - this.start = false | ||
| 132 | - }) | 128 | + // .onBounce(() => { |
| 129 | + // console.info('Marquee animation complete onBounce') | ||
| 130 | + // }) | ||
| 133 | // .onFinish(() => { | 131 | // .onFinish(() => { |
| 134 | // console.info('Marquee animation complete onFinish') | 132 | // console.info('Marquee animation complete onFinish') |
| 135 | // }) | 133 | // }) |
-
Please register or login to post a comment