陈剑华

Merge remote-tracking branch 'origin/main'

... ... @@ -195,19 +195,20 @@ export struct RmhTitle {
Blank()
if (this.rmhInfo?.cnIsAttention) {
Row() {
if (Number(this.followStatus) === 0) {
Image($r('app.media.rmh_follow'))
.width(16)
.height(16)
}
Column() {
Row(){
if (Number(this.followStatus) === 0) {
Image($r('app.media.rmh_follow'))
.width(16)
.height(16)
}
Text(Number(this.followStatus) === 0 ? '关注' : '已关注')
.fontSize($r('app.float.font_size_13'))
.fontColor(Number(this.followStatus) === 0 ? $r('app.color.color_ED2800') : 0xc6c6c6)
Text(Number(this.followStatus) === 0 ? '关注' : '已关注')
.fontSize($r('app.float.font_size_13'))
.fontColor(Number(this.followStatus) === 0 ? $r('app.color.color_ED2800') : 0xc6c6c6)
}.margin({top:4})
}
.flexShrink(0)
.alignSelf(ItemAlign.Center)
.onClick(() => {
this.handleAccention();
})
... ...
... ... @@ -86,7 +86,7 @@ export struct Card14Component {
.height(78)
.borderRadius($r('app.float.image_border_radius'))
.border({
width: 1,
width: 0.5,
color: '#0D000000'
})
.borderStyle(BorderStyle.Solid)
... ...
... ... @@ -124,7 +124,7 @@ export struct Card6Component {
.borderRadius(5)
.aspectRatio(this.contentDTO.appStyle === CompStyle.Card_13 ? 3 / 2 : 3 / 4)
.height(this.contentDTO.appStyle === CompStyle.Card_13 ? 78 : 156)
.border({width: 1, color: 0xf5f5f5})
.border({width: 0.5, color: 0xf5f5f5})
.borderStyle(BorderStyle.Solid)
CardMediaInfo({ contentDTO: this.contentDTO })
}
... ...
... ... @@ -12,6 +12,7 @@ const TAG = "MinePageUserSimpleInfoUI"
@Component
export default struct MinePageUserSimpleInfoUI {
@Watch('loginStateChange') @Prop isLogin :boolean
@Consume @Watch('pageShowForUpdateData') pageShow :number ///监听用户名是否需要更新
@State userName:string = "登录注册"
@State headPhotoUrl:string = ""
userType:string = "1"
... ... @@ -41,6 +42,13 @@ export default struct MinePageUserSimpleInfoUI {
}
}
pageShowForUpdateData(){
let name = SPHelper.default.getSync(SpConstants.USER_NAME,"") as string
if (name != this.userName) {
this.loginStateChange()
}
}
build(){
Row(){
//头像
... ...
... ... @@ -49,6 +49,8 @@ struct ChannelSubscriptionLayout {
changeTab: (index: number) => void = () => {
}
changeTopNavTab: (index: number) => void = () => {
}
aboutToAppear() {
this.changeMyChannelData()
... ... @@ -362,6 +364,7 @@ struct ChannelSubscriptionLayout {
.onClick(() => {
this.indexSettingChannelId = item.channelId
AppStorage.set('indexSettingChannelId', item.channelId)
this.changeTopNavTab(index)
})
})
}
... ...
... ... @@ -4,6 +4,9 @@ import { editModel, editModelParams, WDEditDataModelType } from '../../model/Edi
import EditInfoViewModel from '../../viewmodel/EditInfoViewModel';
// import { encryptMessage } from '../../../utils/cryptoUtil'
import { encryptMessage } from 'wdLogin/src/main/ets/utils/cryptoUtil'
import { SPHelper } from 'wdKit';
import { SpConstants } from 'wdConstant';
@Entry
@Component
struct EditUserNikeNamePage {
... ... @@ -88,6 +91,7 @@ struct EditUserNikeNamePage {
}
goBack(){
SPHelper.default.saveSync(SpConstants.USER_NAME, this.nikeName)
let params: editModelParams = {
userName: this.nikeName
}
... ...
... ... @@ -137,7 +137,7 @@ struct PeopleShipHomePage {
// .height('calc(100% - 44vp)')
.onDidScroll(() => {
this.topOpacity = this.scroller.currentOffset().yOffset / 120
if (this.scroller.currentOffset().yOffset >= this.topHeight - 66) {
if (this.scroller.currentOffset().yOffset >= this.topHeight) {
this.attentionOpacity = true
} else {
this.attentionOpacity = false
... ...
... ... @@ -287,7 +287,10 @@ export struct TopNavigationComponentNew {
navItem: this.navItem,
changeTab: (index) => {
this.channelJumpToPage(index)
}
},
changeTopNavTab: (index) => {
this.changePage(index)
},
})
.id('channelManageBtn')
.alignRules({
... ...
... ... @@ -11,6 +11,7 @@ import {
batchLikeAndCollectParams,
} from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest';
import { ParamType, TrackConstants, TrackingButton, TrackingContent } from 'wdTracking/Index';
import { promptAction } from '@kit.ArkUI';
const TAG = 'LikeComponent';
... ... @@ -437,30 +438,35 @@ export struct LikeComponent {
console.log(TAG, "点赞 params", JSON.stringify(params))
ContentDetailRequest.postExecuteLike(params).then((data) => {
console.log(TAG, '点赞接口调用成功', JSON.stringify(data))
if (data.code != 0) {
promptAction.showToast({ message: data.message })
}else {
console.log(TAG, '点赞接口调用成功', JSON.stringify(data))
// 直播点赞一直增加
if (this.contentDetailData.liveInfo) {
this.likeStatus = true
this.likeCount++
TrackingContent.like(true,this.pageId,this.pageName,this.pageParam)
} else {
this.likeStatus = !this.likeStatus
//点赞和取消点赞成功后更新点赞数
if (this.likeStatus) {
// 直播点赞一直增加
if (this.contentDetailData.liveInfo) {
this.likeStatus = true
this.likeCount++
TrackingContent.like(true,this.pageId,this.pageName,this.pageParam)
} else {
this.likeCount--
TrackingContent.like(false,this.pageId,this.pageName,this.pageParam)
this.likeStatus = !this.likeStatus
//点赞和取消点赞成功后更新点赞数
if (this.likeStatus) {
this.likeCount++
TrackingContent.like(true,this.pageId,this.pageName,this.pageParam)
} else {
this.likeCount--
TrackingContent.like(false,this.pageId,this.pageName,this.pageParam)
}
}
}
if (this.likeCount <= 0) {
this.likeCount = 0
}
if (this.likeCount <= 0) {
this.likeCount = 0
}
this.enableBtn = true
this.enableBtn = true
}
}).catch(() => {
this.enableBtn = true
})
... ...
... ... @@ -79,7 +79,7 @@ struct MineHomePage {
Stack({ alignContent: Alignment.Top }){
Image($r('app.media.title_bg'))
.width('100%')
.height(182)
.height(206)
.objectFit(ImageFit.Cover)
Row()
... ... @@ -205,7 +205,7 @@ struct MineHomePage {
}
})
.backgroundColor($r('app.color.color_transparent'))
.height(86)
.height(100)
.width('100%')
.padding({ left: 10 })
... ...
... ... @@ -109,13 +109,12 @@ struct Index {
Stack({ alignContent: Alignment.End }) {
Column() { //标题 时间 进度条
Marquee({
start: this.start,
start: true,
step: 5,
loop: Number.POSITIVE_INFINITY,
fromStart: true,
src: this.audioTitle
})
.marqueeUpdateStrategy(MarqueeUpdateStrategy.DEFAULT)
.width("60%")
.height(20)
.fontColor('#222222')
... ... @@ -126,10 +125,9 @@ struct Index {
// .onStart(() => {
// console.info('Marquee animation complete onStart')
// })
.onBounce(() => {
console.info('Marquee animation complete onBounce')
this.start = false
})
// .onBounce(() => {
// console.info('Marquee animation complete onBounce')
// })
// .onFinish(() => {
// console.info('Marquee animation complete onFinish')
// })
... ...