refactor(gx): 重构GXAppPermissions和MineCertListScreen组件

- 将客户端相关配置的key从'sdk'改为'app',如CLIENT_ID、USER_ID等
- 新增HospitalViewItem接口,用于展示医院信息
- 重构CertBean,新增服务端返回的医院信息相关字段
- 更新GXData,新增服务状态信息相关接口
- 重构GXAppPermissions组件,移除冗余代码
- 新建StatusHelper工具类,用于处理状态相关逻辑
- 更新MineCertListScreen组件,使用新的数据结构和状态处理逻辑
这个提交包含在:
徐勤民 2024-11-13 15:50:50 +08:00
父节点 092ac9edbc
当前提交 a0627a137b

查看文件

@ -55,7 +55,7 @@ function customDialogBuilder<T>(option: ListOptions<T>, dialogTag: string) {
topRight: 10 topRight: 10
}) })
.visibility(option.title ? Visibility.Visible : Visibility.None) .visibility(option.title ? Visibility.Visible : Visibility.None)
Column(){ Column() {
List() { List() {
ForEach(option.values, (item: T, index: number) => { ForEach(option.values, (item: T, index: number) => {
ListItem() { ListItem() {
@ -96,7 +96,7 @@ function customDialogBuilder<T>(option: ListOptions<T>, dialogTag: string) {
}) // 每行之间的分界线 }) // 每行之间的分界线
.edgeEffect(EdgeEffect.Spring) // 边缘效果设置为Spring .edgeEffect(EdgeEffect.Spring) // 边缘效果设置为Spring
.width('100%') .width('100%')
.height(option.values === undefined ? '20%' :option.values.length < 5 ? option.values.length*60 : 300) .height(option.values === undefined ? '20%' : option.values.length < 5 ? option.values.length * 60 : 300)
if (option.cancel) { if (option.cancel) {
Column() { Column() {
@ -225,18 +225,18 @@ export class ToolsHelper {
title: options.title, title: options.title,
message: options.msg, message: options.msg,
buttons: [{ buttons: [{
text: options.confirm?.text ?? "确定",
color: options.confirm?.color ?? "#000000",
}, {
text: options.cancel?.text ?? "取消", text: options.cancel?.text ?? "取消",
color: options.cancel?.color ?? "#666666", color: options.cancel?.color ?? "#666666",
}] }, {
text: options.confirm?.text ?? "确定",
color: options.confirm?.color ?? "#000000",
},]
}) })
.then((data) => { .then((data) => {
if (data.index === 0) { if (data.index === 0) {
options.confirm?.onClick && options.confirm.onClick()
} else {
options.cancel?.onClick && options.cancel.onClick() options.cancel?.onClick && options.cancel.onClick()
} else {
options.confirm?.onClick && options.confirm.onClick()
} }
}) })
.catch((err: Error) => { .catch((err: Error) => {