Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
wuyanan
2024-09-19 14:31:53 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
adc8c00ea1f73e57623db4e7972242301076a6b4
adc8c00e
1 parent
6cb302d1
ref |> 调整直播频道直播回顾楼层参与人数使用统一转换方法
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
28 deletions
sight_harmony/features/wdComponent/src/main/ets/components/cardview/LiveBigImage02Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhGridLayout02NewsContent.ets
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomePageTopComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/LiveBigImage02Component.ets
View file @
adc8c00
...
...
@@ -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
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhGridLayout02NewsContent.ets
View file @
adc8c00
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) + '人参加'
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/peopleShipHomePage/PeopleShipHomePageTopComponent.ets
View file @
adc8c00
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问题
...
...
Please
register
or
login
to post a comment