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
liyubing
2024-05-20 18:10:06 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
05c949003a87f5d0f01e59743d1b3a97e53181a2
05c94900
2 parents
35d48230
b3f5160b
Merge remote-tracking branch 'origin/main'
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
11 deletions
sight_harmony/commons/wdKit/src/main/ets/utils/KVStoreHelper.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardSourceInfo.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card9Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/message/subscribe/SubscribeMessageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/setting/EnvironmentCustomDialog.ets
sight_harmony/commons/wdKit/src/main/ets/utils/KVStoreHelper.ets
View file @
05c9490
...
...
@@ -89,6 +89,15 @@ export class KVStoreHelper {
}
}
deleteAll() {
this.kvManager?.deleteKVStore(AppUtils.getPackageName(getContext()), KVStoreHelper._default_store_id)
.then(() => {
Logger.error(TAG, 'deleteAll success')
}).catch((e: object) => {
Logger.error(TAG, 'deleteAll error: ' + JSON.stringify(e))
})
}
private checkStoreCreated() {
if (!this.kvManager) {
this.createKVManager()
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardSourceInfo.ets
View file @
05c9490
...
...
@@ -53,7 +53,7 @@ export struct CardSourceInfo {
// .flexShrink(0);
// }
if (this.contentDTO.source) {
Text(DateTimeUtils.getCommentTime(Number.parseFloat(
this.contentDTO.publishTime
)))
Text(DateTimeUtils.getCommentTime(Number.parseFloat(
new Date(this.contentDTO.publishTime).getTime().toString()
)))
.fontSize($r("app.float.font_size_11"))
.fontColor($r("app.color.color_B0B0B0"))
.flexShrink(0);
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card9Component.ets
View file @
05c9490
...
...
@@ -143,7 +143,7 @@ export struct Card9Component {
// 标题
Image($r("app.media.timeAxis"))
.width(9)
.height(
9
)
.height(
6
)
.margin({ right: 5 })
.fillColor(item.newsTitleColor)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/message/subscribe/SubscribeMessageComponent.ets
View file @
05c9490
import { LazyDataSource, StringUtils } from 'wdKit/Index';
import { LazyDataSource,
NetworkUtil,
StringUtils } from 'wdKit/Index';
import { Remark, SubscribeMessageModel,
WDMessageCenterMessageType } from '../../../../model/InteractMessageModel';
import MinePageDatasModel from '../../../../model/MinePageDatasModel';
...
...
@@ -22,6 +22,7 @@ export struct SubscribeMessageComponent{
@State isGetRequest: boolean = false
private scroller: Scroller = new Scroller();
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
@State isConnectNetwork : boolean = NetworkUtil.isNetConnected()
aboutToAppear() {
this.getNewPageData()
...
...
@@ -33,9 +34,27 @@ export struct SubscribeMessageComponent{
CustomTitleUI({ titleName: "预约消息" })
if (this.count == 0) {
if (this.isGetRequest == true) {
EmptyComponent({ emptyType: 5 })
.height('100%')
.width('100%')
if(this.isConnectNetwork){
EmptyComponent({ emptyType: 5 })
.height('100%')
.width('100%')
}else{
EmptyComponent({ emptyType: 1,emptyHeight:"100%" ,retry: () => {
this.isConnectNetwork = NetworkUtil.isNetConnected()
if(this.isConnectNetwork){
this.curPageNum = 1;
this.hasMore = true
this.isGetRequest = false
this.data.clear()
if (!this.isLoading) {
this.getNewPageData()
}
}
},})
.layoutWeight(1)
.width('100%')
}
}
} else {
CustomPullToRefresh({
...
...
sight_harmony/features/wdComponent/src/main/ets/components/setting/EnvironmentCustomDialog.ets
View file @
05c9490
import { SPHelper } from 'wdKit/Index';
import {
KVStoreHelper,
SPHelper } from 'wdKit/Index';
import { HostEnum, HostManager, HttpUrlUtils } from 'wdNetwork/Index';
@CustomDialog
...
...
@@ -86,10 +86,15 @@ export struct EnvironmentCustomDialog {
Button('确认')
.margin({ top: 20 })
.onClick(() => {
// HttpUrlUtils.hostUrl = this.currentEnvironment
SPHelper.default.saveSync('hostUrl', this.currentEnvironment);
this.controller.close()
this.confirm()
new Promise<void>(() => {
// HttpUrlUtils.hostUrl = this.currentEnvironment
SPHelper.default.saveSync('hostUrl', this.currentEnvironment);
// 清首页缓存
KVStoreHelper.default.deleteAll()
// TODO 清sp相关
this.controller.close()
this.confirm()
})
})
}.height(261).backgroundColor(Color.White).borderRadius(6).width('74%')
...
...
Please
register
or
login
to post a comment