Ver Fonte

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

- 将客户端相关配置的key从'sdk'改为'app',如CLIENT_ID、USER_ID等
- 新增HospitalViewItem接口,用于展示医院信息
- 重构CertBean,新增服务端返回的医院信息相关字段
- 更新GXData,新增服务状态信息相关接口
- 重构GXAppPermissions组件,移除冗余代码
- 新建StatusHelper工具类,用于处理状态相关逻辑
- 更新MineCertListScreen组件,使用新的数据结构和状态处理逻辑
徐勤民 há 5 meses atrás
pai
commit
a0627a137b
1 ficheiros alterados com 8 adições e 8 exclusões
  1. 8 8
      src/main/ets/utils/ToolsHelper.ets

+ 8 - 8
src/main/ets/utils/ToolsHelper.ets

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