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-20 18:27:37 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
8aad87ae6f1179bd20f0f0b23ab1c7b27fd29fa8
8aad87ae
2 parents
e1c23ab4
05c94900
Merge branch 'main' of
http://192.168.1.42/developOne/harmonyPool
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
34 deletions
sight_harmony/commons/wdKit/src/main/ets/utils/KVStoreHelper.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardViewAdv/CardAdvGanMiComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card9Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/setting/EnvironmentCustomDialog.ets
sight_harmony/commons/wdKit/src/main/ets/utils/KVStoreHelper.ets
View file @
8aad87a
...
...
@@ -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/cardViewAdv/CardAdvGanMiComponent.ets
View file @
8aad87a
...
...
@@ -124,7 +124,7 @@ export struct CardAdvGanMiComponent {
})
// 更多按钮
commonButton(this.advExtraData
)
this.commonButton(
)
}
.width(CommonConstants.FULL_WIDTH)
...
...
@@ -134,40 +134,45 @@ export struct CardAdvGanMiComponent {
})
}
}
/*
/*
标题样式
*/
@Builder
function commonButton(advExtraData: AdvExtraData) {
@Builder
commonButton() {
Row() {
Row() {
Blank()
Text(advExtraData.itemMore.title == null ? $r('app.string.look_more') : advExtraData.itemMore.title)
.fontColor('#222222')
.fontSize('14fp')
Image($r('app.media.icon_comp_more_right_red')).width(16).height(16)
Blank()
Row() {
Blank()
Text(this.advExtraData.itemMore == undefined ? $r('app.string.look_more') :
this.advExtraData.itemMore.title == undefined ? $r('app.string.look_more') : this.advExtraData.itemMore.title)
.fontColor('#222222')
.fontSize('14fp')
Image($r('app.media.icon_comp_more_right_red')).width(16).height(16)
Blank()
}
.width('100%')
.backgroundColor('#F5F5F5')
.borderRadius(3)
.padding({ top: 10, bottom: 10, })
.onClick(() => {
if (this.advExtraData.itemMore != undefined) {
let matInfo: CompAdvMatInfoBean = {
linkUrl: this.advExtraData.itemMore.linkUrl,
linkType: this.advExtraData.itemMore.linkType
} as CompAdvMatInfoBean;
ProcessUtils.openAdvDetail(matInfo)
}
})
}.width('100%').padding({
left: $r('app.float.card_comp_pagePadding_lf'),
right: $r('app.float.card_comp_pagePadding_lf'),
}
.width('100%')
.backgroundColor('#F5F5F5')
.borderRadius(3)
.padding({ top: 10, bottom: 10, })
.onClick(() => {
let matInfo: CompAdvMatInfoBean = {
linkUrl: advExtraData.itemMore.linkUrl,
linkType: advExtraData.itemMore.linkType
} as CompAdvMatInfoBean;
ProcessUtils.openAdvDetail(matInfo)
})
}.width('100%').padding({
left: $r('app.float.card_comp_pagePadding_lf'),
right: $r('app.float.card_comp_pagePadding_lf'),
})
}
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card9Component.ets
View file @
8aad87a
...
...
@@ -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/setting/EnvironmentCustomDialog.ets
View file @
8aad87a
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