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
陈剑华
2024-05-10 17:01:15 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
22673b0597c4e5804437a5a09ecc7b9c3f4d8cc7
22673b05
2 parents
6ab37de7
abff5015
Merge remote-tracking branch 'origin/main'
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
37 additions
and
32 deletions
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePageMoreFunctionUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePageUserSimpleInfoUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/TopNavigationComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/setting/MineSettingComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/EmptyComponent.ets
sight_harmony/features/wdComponent/src/main/ets/model/MineSettingDatasModel.ets
sight_harmony/features/wdComponent/src/main/ets/pages/MineHomePage.ets
sight_harmony/features/wdComponent/src/main/resources/base/media/mine_user_arrow_2.png
sight_harmony/features/wdComponent/src/main/resources/base/media/mine_user_edit.png
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TabLiveComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentComponent.ets
View file @
22673b0
import ArrayList from '@ohos.util.ArrayList'
import { ViewType } from 'wdConstant/Index';
import { DateTimeUtils, EmitterEventId, EmitterUtils, LazyDataSource } from 'wdKit/Index';
import PageModel from '../../../viewmodel/PageModel';
import { commentItemModel, commentListModel, WDPublicUserType } from '../model/CommentModel';
import commentViewModel from '../viewmodel/CommentViewModel'
import { commentItemModel, WDPublicUserType } from '../model/CommentModel';
import commentViewModel from '../viewmodel/CommentViewModel';
import { CommentText } from './CommentText';
import measure from '@ohos.measure'
import { CommentCustomDialog } from './CommentCustomDialog'
import { CommentCustomDialog } from './CommentCustomDialog';
import { publishCommentModel } from '../model/PublishCommentModel';
import { ifaa } from '@kit.OnlineAuthenticationKit';
import { HttpUrlUtils, HttpUtils } from 'wdNetwork/Index';
import NoMoreLayout from '../../page/NoMoreLayout';
import { HttpUtils } from 'wdNetwork/Index';
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
import {
ColorUtils } from '../../../utils/ColorUtils
';
import {
EmptyComponent } from '../../view/EmptyComponent
';
const TAG = 'CommentComponent';
...
...
@@ -27,10 +21,8 @@ export struct CommentComponent {
// @State private browSingModel: commentListModel = new commentListModel()
/*必传*/
@ObjectLink publishCommentModel: publishCommentModel
listScroller: ListScroller = new ListScroller(); // scroller控制器
historyOffset: number = 0; // 上次浏览到列表距离顶端的偏移量offset
isloading: boolean = false
@State allDatas: LazyDataSource<commentItemModel> = new LazyDataSource();
@State dialogController: CustomDialogController | null = null;
...
...
@@ -142,7 +134,7 @@ export struct CommentComponent {
build() {
Column() {
List({
scroller:this.listScroller
}) {
List({
scroller: this.listScroller
}) {
ListItemGroup({ header: this.titleHeader() })
LazyForEach(this.allDatas, (item: commentItemModel, index: number) => {
...
...
@@ -181,10 +173,15 @@ export struct CommentComponent {
// 加载更多
ListItem() {
if (this.hasMore === false) NoMoreLayout()
if (this.hasMore === false) {
// NoMoreLayout()
EmptyComponent({ emptyType: 17 })
.height(300)
}
}
.onReachEnd(()=>{
}
.onReachEnd(() => {
if (this.hasMore) {
this.getData()
}
...
...
@@ -197,11 +194,13 @@ export struct CommentComponent {
//获取数据
async getData() {
commentViewModel.fetchContentCommentList(this.currentPage + '', this.publishCommentModel.targetId, this.publishCommentModel.targetType)
commentViewModel.fetchContentCommentList(this.currentPage + '', this.publishCommentModel.targetId,
this.publishCommentModel.targetType)
.then(commentListModel => {
this.currentPage++
if (Number.parseInt(commentListModel.totalCommentNum) > Number.parseInt(this.publishCommentModel.totalCommentNumer)) {
if (Number.parseInt(commentListModel.totalCommentNum) >
Number.parseInt(this.publishCommentModel.totalCommentNumer)) {
this.publishCommentModel.totalCommentNumer = commentListModel.totalCommentNum + ''
}
...
...
@@ -223,7 +222,7 @@ export struct CommentComponent {
});
}
else
{
}
else
{
this.hasMore = false
}
})
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePageMoreFunctionUI.ets
View file @
22673b0
...
...
@@ -47,7 +47,7 @@ export default struct MinePageMoreFunctionUI {
.fontWeight(400)
Blank()
Image($r('app.media.mine_user_arrow'))
Image($r('app.media.mine_user_arrow
_2
'))
.width('27lpx')
.height('27lpx')
.objectFit(ImageFit.Auto)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePageUserSimpleInfoUI.ets
View file @
22673b0
...
...
@@ -83,14 +83,15 @@ export default struct MinePageUserSimpleInfoUI {
.height('29lpx')
}.margin({top:'15lpx'})
}.alignItems(HorizontalAlign.Start)
.margin({top:'12lpx',left:'
17
lpx'})
.margin({top:'12lpx',left:'
23
lpx'})
.width('352lpx')
}else{
Row(){
Text("登录注册")
.fontColor($r('app.color.color_222222'))
.textOverflow({ overflow: TextOverflow.Ellipsis })
.fontSize('33lpx')
.fontSize('38lpx')
.lineHeight("46lpx")
.fontWeight(600)
Image($r('app.media.mine_user_edit'))
.width('11lpx')
...
...
@@ -101,7 +102,7 @@ export default struct MinePageUserSimpleInfoUI {
}.onClick(()=>{
this.jumpLogin()
})
.margin({top:'11lpx',left:'
17
lpx'})
.margin({top:'11lpx',left:'
23
lpx'})
.width('352lpx')
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/TopNavigationComponent.ets
View file @
22673b0
import { BottomNavDTO, CompDTO, TopNavDTO } from 'wdBean';
import { SpConstants } from 'wdConstant';
import { DisplayUtils, LazyDataSource, Logger, SPHelper } from 'wdKit';
import { DisplayUtils, LazyDataSource, Logger, SPHelper
, NetworkUtil, ToastUtils
} from 'wdKit';
import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter';
import { PageComponent } from './PageComponent';
import { ChannelSubscriptionLayout } from './ChannelSubscriptionLayout';
...
...
@@ -209,7 +209,11 @@ export struct TopNavigationComponent {
.height(30)
.width(124)
.onClick(() => {
if (NetworkUtil.isNetConnected()) {
ProcessUtils.gotoMorningEveningPaper()
} else {
ToastUtils.showToast('网络出小差了,请检查网络后重试', 1000)
}
})
}.width('100%')
.justifyContent(FlexAlign.SpaceBetween)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/setting/MineSettingComponent.ets
View file @
22673b0
...
...
@@ -256,7 +256,7 @@ export struct MineSettingComponent {
// 右侧文案和右箭头
Row() {
Text((item.itemType=='clear_cache') ? this.cacheSize.toFixed(2) + 'M
B
' : '')
Text((item.itemType=='clear_cache') ? this.cacheSize.toFixed(2) + 'M' : '')
.fontColor('#999999')
.maxLines(1)
Image($r('app.media.mine_user_arrow'))
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/EmptyComponent.ets
View file @
22673b0
...
...
@@ -231,7 +231,7 @@ export struct EmptyComponent {
this.emptyType === WDViewDefaultType.WDViewDefaultType_NoComment1) {
imageString = $r('app.media.icon_no_comment')
} else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoSearchResult) {
imageString = $r('app.media.icon_no_result')
imageString = $r('app.media.icon_no_result
1
')
} else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoNetwork) {
imageString = $r('app.media.icon_no_net1')
} else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_ContentFailed) {
...
...
sight_harmony/features/wdComponent/src/main/ets/model/MineSettingDatasModel.ets
View file @
22673b0
...
...
@@ -47,13 +47,13 @@ class MineSettingDatasModel{
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '接收推送', null, 1, pushState,"push_switch"))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '隐私设罝', null, 0, false,"private_setting"))
let wifiState=SPHelper.default.getSync(SpConstants.SETTING_WIFI_IMAGE_SWITCH,false) as boolean
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '仅
WiF
i网络加载图片', null, 1, wifiState,"wifi_switch"))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '仅
wif
i网络加载图片', null, 1, wifiState,"wifi_switch"))
let videoState=SPHelper.default.getSync(SpConstants.SETTING_WIFI_VIDEO_SWITCH,false) as boolean
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '
WiF
i网络情况下自动播放视频', null, 1, videoState,"video_switch"))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '
wif
i网络情况下自动播放视频', null, 1, videoState,"video_switch"))
let suspensionState=SPHelper.default.getSync(SpConstants.SETTING_SUSPENSION_SWITCH,false) as boolean
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '开启播放器悬浮窗', null, 1, suspensionState,"suspensionState_switch"))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, null, null, 2, null,""))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '清
除
缓存', '32MB', 0, false,"clear_cache"))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '清
理
缓存', '32MB', 0, false,"clear_cache"))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '评价我们', null, 0, false,""))
return this.mainSettingData
...
...
sight_harmony/features/wdComponent/src/main/ets/pages/MineHomePage.ets
View file @
22673b0
...
...
@@ -392,7 +392,7 @@ struct MineHomePage {
this.userName = value.userName
this.headPhotoUrl = value.headPhotoUrl
if(StringUtils.isNotEmpty(value.introduction)){
this.desc = value.introduction
this.desc =
"简介:" +
value.introduction
this.isHasIntroduction = true
}else{
this.desc = "点击添加简介,让大家认识你"
...
...
sight_harmony/features/wdComponent/src/main/resources/base/media/mine_user_arrow_2.png
0 → 100644
View file @
22673b0
271 Bytes
sight_harmony/features/wdComponent/src/main/resources/base/media/mine_user_edit.png
View file @
22673b0
290 Bytes
|
W:
|
H:
276 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TabLiveComponent.ets
View file @
22673b0
...
...
@@ -90,7 +90,7 @@ export struct TabLiveComponent {
20)
.then(
(data) => {
Logger.debug(TAG, `${JSON.stringify(data)}`)
Logger.debug(TAG,
'直播间数据:' +
`${JSON.stringify(data)}`)
if (data.barrageResponses && data.barrageResponses.length > 0) {
/**
* 在直播聊天添加一条新内容逻辑:
...
...
@@ -117,6 +117,7 @@ export struct TabLiveComponent {
if (StringUtils.isEmpty(this.liveDetailsBean.oldNewsId)
&& this.liveDetailsBean
&& this.liveDetailsBean.liveInfo.liveState != 'wait') {
this.pageModel.viewType = ViewType.LOADED;
this.updateLiveListData()
} else {
this.pageModel.viewType = ViewType.EMPTY;
...
...
Please
register
or
login
to post a comment