yangchenggong1_wd

fix:bug[18407] 关注列表下的粉丝数精度鸿蒙与安卓不一致

... ... @@ -231,13 +231,10 @@ export struct FollowListDetailUI {
value.forEach((item) => {
if (data.creatorId == item.creatorId) {
data.headPhotoUrl = item.headPhotoUrl
if (item.fansNum > 10000) {
let temp = (item.fansNum / 10000) + ""
let index = temp.indexOf('.')
if (index != -1) {
temp = temp.substring(0, index + 2)
} else {
temp = temp
if (item.fansNum >= 10000) {
let temp = (item.fansNum / 10000) .toFixed(1)
if (Number(temp.substring(temp.length-1)) == 0) {
temp = temp.substring(0, temp.length-2)
}
data.cnFansNum = temp + "万"
} else {
... ...
... ... @@ -207,13 +207,10 @@ export struct HomePageBottomFollowComponent {
value.list.forEach((value) => {
let fansNum: number = value.fansNum
let fansNumString = ""
if (fansNum > 10000) {
let temp = (fansNum / 10000) + ""
let index = temp.indexOf('.')
if (index != -1) {
temp = temp.substring(0, index + 2)
} else {
temp = temp
if (fansNum >= 10000) {
let temp = (fansNum / 10000) .toFixed(1)
if (Number(temp.substring(temp.length-1)) == 0) {
temp = temp.substring(0, temp.length-2)
}
fansNumString = temp + "万"
} else {
... ...
... ... @@ -168,7 +168,18 @@ export struct OtherHomePageBottomFollowComponent{
this.hasMore = false
}else{
value.list.forEach((value)=>{
this.data_follow.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,value.fansNum+"",value.introduction,value.attentionCreatorId,"1",value.attentionUserId,value.cnUserType,value.cnUserId,value.mainControl,value.banControl,value.authIcon))
let fansNum: number = value.fansNum
let fansNumString = ""
if (fansNum >= 10000) {
let temp = (fansNum / 10000) .toFixed(1)
if (Number(temp.substring(temp.length-1)) == 0) {
temp = temp.substring(0, temp.length-2)
}
fansNumString = temp + "万"
} else {
fansNumString = fansNum + ""
}
this.data_follow.push(new FollowListDetailItem(value.attentionHeadPhotoUrl,value.attentionUserName,fansNumString,value.introduction,value.attentionCreatorId,"1",value.attentionUserId,value.cnUserType,value.cnUserId,value.mainControl,value.banControl,value.authIcon))
})
this.data_follow.notifyDataReload()
this.count = this.data_follow.totalCount()
... ...