wuyanan

ref |> 调整直播频道直播回顾楼层参与人数使用统一转换方法

... ... @@ -2,7 +2,7 @@ import { CompDTO, ContentDTO } from 'wdBean';
import { ProcessUtils } from 'wdRouter';
import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
import { hasClicked, persistentStorage } from '../../utils/persistentStorage';
import { DateTimeUtils } from 'wdKit/Index';
import { DateTimeUtils, NumberFormatterUtils } from 'wdKit/Index';
import { LottieView } from '../lottie/LottieView';
import { router } from '@kit.ArkUI';
... ... @@ -155,13 +155,6 @@ export struct LiveBigImage02Component {
}
private computeShowNum(count: number): string {
if (count >= 10000) {
let num = (count / 10000).toFixed(1)
if (Number(num.substring(num.length - 1)) == 0) {
num = num.substring(0, num.length - 2)
}
return num + '万人参加'
}
return `${count}人参加`
return NumberFormatterUtils.formatNumberWithWan(count) + '人参加'
}
}
\ No newline at end of file
... ...
import { CompDTO, ContentDTO, LiveRoomDataBean } from 'wdBean';
import { CommonConstants } from 'wdConstant/Index';
import { Logger } from 'wdKit/Index';
import { Logger, NumberFormatterUtils } from 'wdKit/Index';
import { ProcessUtils } from 'wdRouter';
import PageViewModel from '../../viewmodel/PageViewModel';
import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
... ... @@ -98,15 +98,7 @@ export struct ZhGridLayout02NewsContent {
}
private computeShowNum(bean: LiveRoomDataBean): string {
let count = bean.pv
if (count >= 10000) {
let num = (count / 10000).toFixed(1)
if (Number(num.substring(num.length - 1)) == 0) {
num = num.substring(0, num.length - 2)
}
return num + '万人参加'
}
return `${count}人参加`
return NumberFormatterUtils.formatNumberWithWan(bean.pv) + '人参加'
}
}
... ...
import measure from '@ohos.measure'
import { DisplayUtils } from 'wdKit'
import { DisplayUtils, NumberFormatterUtils } from 'wdKit'
import { PeopleShipHomePageHeadComponent } from './PeopleShipHomePageHeadComponent'
import { PeopleShipHomePageAttestationComponent } from './PeopleShipHomePageAttestationComponent'
import { Logger } from 'wdKit'
... ... @@ -366,14 +366,7 @@ export struct PeopleShipHomePageTopComponent {
}
private computeShowNum(count: number) {
if (count >= 10000) {
let num = ( count / 10000).toFixed(1)
if (Number(num.substring(num.length-1)) == 0) {
num = num.substring(0, num.length-2)
}
return num + '万'
}
return `${count}`
return NumberFormatterUtils.formatNumberWithWan(count)
}
// 通过省份code获取IP问题
... ...