Parcourir la source

Add 完成小程序互助列表

Yue il y a 2 ans
Parent
commit
74dddcbcf7
95 fichiers modifiés avec 2299 ajouts et 869 suppressions
  1. 10 1
      SERVER/YanZhongXYH/script/sql/Add.sql
  2. 24 21
      SERVER/YanZhongXYH/script/sql/XYHSQL.sql
  3. 2 0
      SERVER/YanZhongXYH/xyh-common/src/main/java/cn/xyh/common/constant/CacheNames.java
  4. 1 1
      SERVER/YanZhongXYH/xyh-common/src/main/java/cn/xyh/common/constant/TransConstant.java
  5. 5 7
      SERVER/YanZhongXYH/xyh-common/src/main/java/cn/xyh/common/core/service/IUserService.java
  6. 0 40
      SERVER/YanZhongXYH/xyh-common/src/main/java/cn/xyh/common/translation/impl/UserNameTranslationImpl.java
  7. 65 0
      SERVER/YanZhongXYH/xyh-common/src/main/java/cn/xyh/common/translation/impl/UserTranslationImpl.java
  8. 8 6
      SERVER/YanZhongXYH/xyh-framework/src/main/java/cn/xyh/framework/satoken/service/SaPermissionImpl.java
  9. 4 12
      SERVER/YanZhongXYH/xyh-generator/src/main/java/cn/xyh/generator/service/impl/GenEmptyService.java
  10. 11 1
      SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/controller/AmActivityController.java
  11. 7 1
      SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/controller/AmAlumnusController.java
  12. 9 1
      SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/controller/AmHelpController.java
  13. 1 1
      SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/domain/AmActivity.java
  14. 3 3
      SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/domain/AmActivityApply.java
  15. 2 2
      SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/domain/AmAlumnus.java
  16. 1 1
      SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/domain/AmHelp.java
  17. 4 0
      SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/domain/AmNews.java
  18. 2 2
      SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/domain/vo/AmActivityApplyVo.java
  19. 4 4
      SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/domain/vo/AmActivityVo.java
  20. 18 12
      SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/domain/vo/AmAlumnusVo.java
  21. 3 3
      SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/domain/vo/AmHelpVo.java
  22. 10 1
      SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/domain/vo/AmNewsVo.java
  23. 2 1
      SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/service/IAmActivityService.java
  24. 3 1
      SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/service/IAmAlumnusService.java
  25. 3 1
      SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/service/IAmHelpService.java
  26. 13 3
      SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/service/impl/AmActivityServiceImpl.java
  27. 16 2
      SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/service/impl/AmAlumnusServiceImpl.java
  28. 13 3
      SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/service/impl/AmHelpServiceImpl.java
  29. 9 7
      SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/service/impl/AmNewsServiceImpl.java
  30. 1 1
      SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/system/controller/system/SysProfileController.java
  31. 2 1
      SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/system/service/ISysUserService.java
  32. 30 5
      SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/system/service/SysLoginService.java
  33. 0 2
      SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/system/service/SysRegisterService.java
  34. 12 0
      SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/system/service/impl/SysCategoryServiceImpl.java
  35. 76 29
      SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/system/service/impl/SysUserServiceImpl.java
  36. 18 10
      SERVER/YanZhongXYH/xyh-system/src/main/resources/mapper/amActivity/AmAlumnusMapper.xml
  37. 3 2
      SERVER/YanZhongXYH/xyh-system/src/main/resources/mapper/amActivity/AmNewsMapper.xml
  38. 131 459
      UI/XYH.APP/package-lock.json
  39. 1 0
      UI/XYH.APP/package.json
  40. 1 2
      UI/XYH.APP/src/App.vue
  41. 95 0
      UI/XYH.APP/src/api/amActivity/_activity.ts
  42. 83 0
      UI/XYH.APP/src/api/amActivity/_alumnus.ts
  43. 75 0
      UI/XYH.APP/src/api/amActivity/_attach.ts
  44. 95 0
      UI/XYH.APP/src/api/amActivity/_help.ts
  45. 88 0
      UI/XYH.APP/src/api/amActivity/_news.ts
  46. 20 0
      UI/XYH.APP/src/api/amActivity/index.ts
  47. 3 0
      UI/XYH.APP/src/api/index.ts
  48. 0 8
      UI/XYH.APP/src/api/system/_alumnus.ts
  49. 23 0
      UI/XYH.APP/src/api/system/_category.ts
  50. 3 3
      UI/XYH.APP/src/api/system/index.ts
  51. 1 1
      UI/XYH.APP/src/components/chart/vb-chart.vue
  52. 3 2
      UI/XYH.APP/src/components/vber/cell-group/vb-cell-group.vue
  53. 120 0
      UI/XYH.APP/src/components/vber/dropdown/vb-dropdown.vue
  54. 4 4
      UI/XYH.APP/src/components/vber/icon/vb-icon.vue
  55. 57 38
      UI/XYH.APP/src/components/vber/list/vb-list.vue
  56. 5 5
      UI/XYH.APP/src/components/vber/loading/vb-loading.vue
  57. 1 1
      UI/XYH.APP/src/components/vber/picker-m/vb-picker-m.vue
  58. 1 1
      UI/XYH.APP/src/components/vber/progress/vb-progress.vue
  59. 23 10
      UI/XYH.APP/src/core/services/RequestService.ts
  60. 7 0
      UI/XYH.APP/src/core/utils/index.ts
  61. 28 0
      UI/XYH.APP/src/pages-sub/activity/detail.vue
  62. 100 0
      UI/XYH.APP/src/pages-sub/alumnus/detail.vue
  63. 28 0
      UI/XYH.APP/src/pages-sub/help/detail.vue
  64. 0 0
      UI/XYH.APP/src/pages-sub/mine/about.vue
  65. 0 0
      UI/XYH.APP/src/pages-sub/mine/help.vue
  66. 0 0
      UI/XYH.APP/src/pages-sub/mine/info/edit.vue
  67. 0 0
      UI/XYH.APP/src/pages-sub/mine/info/index.vue
  68. 0 0
      UI/XYH.APP/src/pages-sub/mine/info/profile.vue
  69. 0 0
      UI/XYH.APP/src/pages-sub/mine/privacy.vue
  70. 0 0
      UI/XYH.APP/src/pages-sub/mine/profile/avatar.vue
  71. 0 0
      UI/XYH.APP/src/pages-sub/mine/profile/edit.vue
  72. 0 0
      UI/XYH.APP/src/pages-sub/mine/pwd.vue
  73. 0 0
      UI/XYH.APP/src/pages-sub/mine/setting.vue
  74. 54 39
      UI/XYH.APP/src/pages.json
  75. 19 19
      UI/XYH.APP/src/pages/account/login.vue
  76. 206 2
      UI/XYH.APP/src/pages/activity/index.vue
  77. 44 24
      UI/XYH.APP/src/pages/alumnus/index.vue
  78. 206 2
      UI/XYH.APP/src/pages/help/index.vue
  79. 1 3
      UI/XYH.APP/src/pages/index/index.vue
  80. 1 1
      UI/XYH.APP/src/pages/index/welcome.vue
  81. 0 8
      UI/XYH.APP/src/pages/mine/profile/index.vue
  82. 15 21
      UI/XYH.APP/src/route/_pages.ts
  83. 26 2
      UI/XYH.APP/src/static/font/iconfont.css
  84. BIN
      UI/XYH.APP/src/static/font/iconfont.ttf
  85. BIN
      UI/XYH.APP/src/static/font/iconfont.woff
  86. BIN
      UI/XYH.APP/src/static/font/iconfont.woff2
  87. 225 18
      UI/XYH.APP/src/static/scss/vb-component/_base.scss
  88. 82 0
      UI/XYH.APP/src/static/scss/vb-component/_dropdown.scss
  89. 1 1
      UI/XYH.APP/src/static/scss/vb-component/_icon.scss
  90. 9 1
      UI/XYH.APP/src/static/scss/vb-component/_list.scss
  91. 4 1
      UI/XYH.APP/src/static/scss/vb-component/_loading.scss
  92. 1 0
      UI/XYH.APP/src/static/scss/vb-component/index.scss
  93. 4 2
      UI/XYH.APP/src/stores/_auth.ts
  94. 3 3
      UI/XYH.APP/src/stores/_profile.ts
  95. 7 0
      UI/XYH.VUE/src/core/utils/index.ts

+ 10 - 1
SERVER/YanZhongXYH/script/sql/Add.sql

@@ -47,7 +47,8 @@ insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component,
 values (2007, '校友审核', 2001, '5', '#', '', 1, 0, 'F', '0', '0', 'amActivity:alumnus:audit', '',
         '', '', 'admin', sysdate(), '', null, '');
 
-
+insert into sys_role_menu
+values ('1', 3);
 insert into sys_role_menu
 values ('1', 2001);
 insert into sys_role_menu
@@ -63,6 +64,8 @@ values ('1', 2006);
 insert into sys_role_menu
 values ('1', 2007);
 
+insert into sys_role_menu
+values ('2', 3);
 insert into sys_role_menu
 values ('2', 2001);
 insert into sys_role_menu
@@ -78,6 +81,12 @@ values ('2', 2006);
 insert into sys_role_menu
 values ('2', 2007);
 
+insert into sys_role_menu
+values ('3', 3);
+insert into sys_role_menu
+values ('3', 2001);
+insert into sys_role_menu
+values ('3', 2002);
 insert into sys_role_menu
 values ('3', 2003);
 insert into sys_role_menu

+ 24 - 21
SERVER/YanZhongXYH/script/sql/XYHSQL.sql

@@ -19,7 +19,7 @@ create table am_alumnus
     graduate_year char(4) comment '毕业年份',
     am_class      varchar(15) comment '班级',
     audit_status  char(1)     default '0' comment '审核状态 0未审核 1已通过 2未通过',
-    audit_id      bigint(20) comment '审核人ID',
+    audit_user    varchar(64) comment '审核人ID',
     audit_time    datetime comment '审核时间',
     education     varchar(30) default '' comment '最高学历',
     province      varchar(10) comment '省份',
@@ -127,22 +127,23 @@ create table am_friends_apply
 drop table if exists am_news;
 create table am_news
 (
-    news_id     char(30)    not null comment '新闻id',
-    title       varchar(50) not null comment '新闻标题',
-    category    char(5)     not null comment '新闻类别',
-    content     text        not null comment '新闻内容',
-    date        datetime comment '发布日期',
-    status      char(4)      default '0' comment '状态(0草稿 1发布)',
-    is_head     char(1)      default '0' comment '是否头条(0否 1是)',
-    is_hot      char(1)      default '0' comment '是否Hot(0否 1是)',
-    is_close    char(1)      default '0' comment '是否关闭(0否 1是)',
-    images      varchar(1000) comment '图片短链',
-    del_flag    char(1)      default '0' comment '删除标志(0代表存在 1代表删除)',
-    create_by   varchar(64)  default '' comment '创建者',
-    create_time datetime comment '创建时间',
-    update_by   varchar(64)  default '' comment '更新者',
-    update_time datetime comment '更新时间',
-    remark      varchar(500) default null comment '备注',
+    news_id      char(30)    not null comment '新闻id',
+    title        varchar(50) not null comment '新闻标题',
+    category     char(5)     not null comment '新闻类别',
+    content      text        not null comment '新闻内容',
+    date         datetime comment '发布日期',
+    status       char(4)      default '0' comment '状态(0草稿 1发布)',
+    publish_user varchar(64) comment '发布人',
+    is_head      char(1)      default '0' comment '是否头条(0否 1是)',
+    is_hot       char(1)      default '0' comment '是否Hot(0否 1是)',
+    is_close     char(1)      default '0' comment '是否关闭(0否 1是)',
+    images       varchar(1000) comment '图片短链',
+    del_flag     char(1)      default '0' comment '删除标志(0代表存在 1代表删除)',
+    create_by    varchar(64)  default '' comment '创建者',
+    create_time  datetime comment '创建时间',
+    update_by    varchar(64)  default '' comment '更新者',
+    update_time  datetime comment '更新时间',
+    remark       varchar(500) default null comment '备注',
     primary key (news_id)
 ) engine = innodb comment = '资讯信息';
 
@@ -163,7 +164,7 @@ create table am_activity
     area          varchar(50)  not null comment '活动区域',
     address       varchar(50) comment '活动地点',
     audit_status  char(4)      default 0 comment '状态(0申请中 1通过 2拒绝)',
-    audit_user    bigint(20) comment '审核人',
+    audit_user    varchar(64) comment '审核人',
     audit_time    datetime comment '审核时间',
     is_head       char(1)      default '0' comment '是否头条(0否 1是)',
     is_hot        char(1)      default '0' comment '是否Hot(0否 1是)',
@@ -190,11 +191,11 @@ create table am_activity_apply
     am_id           bigint(20) not null comment '校友id',
     activity_id     char(30)   not null comment '活动id',
     audit_status    char(4)        default 0 comment '状态(0申请中 1通过 2拒绝)',
-    audit_user      bigint(20) comment '审核人',
+    audit_user      varchar(64) comment '审核人',
     audit_time      datetime comment '审核时间',
     cost            decimal(18, 2) default null default 0 comment '费用',
     cost_status     char(4)        default '0' comment '费用状态(0未支付 1已支付)',
-    cost_audit_user bigint(20) comment '费用审核人',
+    cost_audit_user varchar(64) comment '费用审核人',
     cost_time       datetime       default null comment '费用确认时间',
     del_flag        char(1)        default '0' comment '删除标志(0代表存在 1代表删除)',
     create_by       varchar(64)    default '' comment '创建者',
@@ -219,7 +220,7 @@ create table am_help
     expiry_date  datetime     not null comment '有效日期',
     area         varchar(50)  not null comment '有效区域',
     audit_status char(4)      default 0 comment '状态(0申请中 1通过 2拒绝)',
-    audit_user   bigint(20) comment '审核人',
+    audit_user   varchar(64) comment '审核人',
     audit_time   datetime comment '审核时间',
     is_head      char(1)      default '0' comment '是否头条(0否 1是)',
     is_hot       char(1)      default '0' comment '是否Hot(0否 1是)',
@@ -248,6 +249,8 @@ create table am_comment
     user_id     bigint(20) not null comment '评论人id',
     content     text       not null comment '评论内容',
     status      char(4)      default '0' comment '状态(0正常 1异常)',
+    audit_user  varchar(64) comment '状态审核人',
+    audit_time  datetime comment '状态审核时间',
     is_head     char(1)      default '0' comment '是否头条(0否 1是)',
     is_close    char(1)      default '0' comment '是否关闭(0否 1是)',
     images      varchar(1000) comment '图片短链',

+ 2 - 0
SERVER/YanZhongXYH/xyh-common/src/main/java/cn/xyh/common/constant/CacheNames.java

@@ -55,4 +55,6 @@ public interface CacheNames {
      */
     String ONLINE_TOKEN = "online_tokens";
 
+    String SYS_CATEGORY_TYPE = "sys_category_type#60d";
+
 }

+ 1 - 1
SERVER/YanZhongXYH/xyh-common/src/main/java/cn/xyh/common/constant/TransConstant.java

@@ -10,7 +10,7 @@ public interface TransConstant {
     /**
      * 用户id转账号
      */
-    String USER_ID_OR_NAME_TO_NAME = "user_id_or_name_to_name";
+    String USER_ID_OR_NAME_TO_USER = "user_id_or_name_to_name";
 
     /**
      * 部门id转名称

+ 5 - 7
SERVER/YanZhongXYH/xyh-common/src/main/java/cn/xyh/common/core/service/IUserService.java

@@ -1,5 +1,7 @@
 package cn.xyh.common.core.service;
 
+import cn.xyh.common.core.domain.entity.SysUser;
+
 /**
  * 通用 用户服务
  *
@@ -8,19 +10,15 @@ package cn.xyh.common.core.service;
 public interface IUserService {
 
     /**
-     * 通过用户ID查询用户账户
+     * 通过用户ID查询用户
      *
      * @param userId 用户ID
      * @return 用户账户
      */
-    String selectUserNameById(Long userId);
-
-    String selectUserNameByUserName(String key);
-
+    SysUser selectSysUserById(Long userId);
 
-    String selectUserNickNameById(Long key);
+    SysUser selectSysUserByUserName(String userName);
 
-    String selectUserNickNameByUserName(String key);
 }
 
 

+ 0 - 40
SERVER/YanZhongXYH/xyh-common/src/main/java/cn/xyh/common/translation/impl/UserNameTranslationImpl.java

@@ -1,40 +0,0 @@
-package cn.xyh.common.translation.impl;
-
-import cn.xyh.common.annotation.TranslationType;
-import cn.xyh.common.constant.TransConstant;
-import cn.xyh.common.core.service.IUserService;
-import cn.xyh.common.translation.TranslationInterface;
-import lombok.AllArgsConstructor;
-import org.springframework.stereotype.Component;
-
-/**
- * 用户名翻译实现
- *
- * @author Yue
- */
-@Component
-@AllArgsConstructor
-@TranslationType(type = TransConstant.USER_ID_OR_NAME_TO_NAME)
-public class UserNameTranslationImpl implements TranslationInterface<String> {
-
-    private final IUserService userService;
-
-    @Override
-    public String translation(Object key, String other) {
-        if (key instanceof Long) {
-            if (other.equals("name")) {
-                return userService.selectUserNickNameById((Long) key);
-            } else {
-                return userService.selectUserNameById((Long) key);
-            }
-        } else if (key instanceof String) {
-            if (other.equals("name")) {
-                return (String) key;
-                //return userService.selectUserNickNameByUserName((String) key);
-            } else {
-                return userService.selectUserNameByUserName((String) key);
-            }
-        }
-        return null;
-    }
-}

+ 65 - 0
SERVER/YanZhongXYH/xyh-common/src/main/java/cn/xyh/common/translation/impl/UserTranslationImpl.java

@@ -0,0 +1,65 @@
+package cn.xyh.common.translation.impl;
+
+import cn.xyh.common.annotation.TranslationType;
+import cn.xyh.common.constant.TransConstant;
+import cn.xyh.common.core.domain.entity.SysUser;
+import cn.xyh.common.core.service.IUserService;
+import cn.xyh.common.translation.TranslationInterface;
+import lombok.AllArgsConstructor;
+import org.springframework.stereotype.Component;
+
+import java.text.SimpleDateFormat;
+
+/**
+ * 用户名翻译实现
+ *
+ * @author Yue
+ */
+@Component
+@AllArgsConstructor
+@TranslationType(type = TransConstant.USER_ID_OR_NAME_TO_USER)
+public class UserTranslationImpl implements TranslationInterface<String> {
+
+    private final IUserService userService;
+
+    @Override
+    public String translation(Object key, String other) {
+        SysUser sysUser = null;
+        if (key instanceof Long) {
+            sysUser = userService.selectSysUserById((Long) key);
+        } else if (key instanceof String) {
+            sysUser = userService.selectSysUserByUserName((String) key);
+        }
+
+        if (sysUser == null) {
+            return null;
+        }
+        switch (other) {
+            case "name":
+            case "nickName":
+                return sysUser.getNickName();
+            case "ph":
+            case "phone":
+            case "phonenumber":
+                return sysUser.getPhonenumber();
+            case "email":
+                return sysUser.getEmail();
+            case "avatar":
+                return sysUser.getAvatar();
+            case "orgId":
+                return sysUser.getOrgId() + "";
+            case "orgName":
+                return sysUser.getOrg().getOrgName();
+            case "userType":
+                return sysUser.getUserType();
+            case "loginIp":
+                return sysUser.getLoginIp();
+            case "loginDate":
+                SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+                return sysUser.getLoginDate() != null ? dateFormat.format(sysUser.getLoginDate()) : "";
+            case "userName":
+            default:
+                return sysUser.getUserName();
+        }
+    }
+}

+ 8 - 6
SERVER/YanZhongXYH/xyh-framework/src/main/java/cn/xyh/framework/satoken/service/SaPermissionImpl.java

@@ -22,13 +22,14 @@ public class SaPermissionImpl implements StpInterface {
     public List<String> getPermissionList(Object loginId, String loginType) {
         LoginUser loginUser = LoginHelper.getLoginUser();
         UserType userType = UserType.getUserType(loginUser.getUserType());
+        ArrayList<String> list = new ArrayList<>();
         if (userType == UserType.SYS_USER) {
-            return new ArrayList<>(loginUser.getMenuPermission());
+            list = new ArrayList<>(loginUser.getMenuPermission());
         } else if (userType == UserType.AM_USER) {
             // 其他端 自行根据业务编写
-            return new ArrayList<>(loginUser.getMenuPermission());
+            list = new ArrayList<>(loginUser.getMenuPermission());
         }
-        return new ArrayList<>();
+        return list;
     }
 
     /**
@@ -38,12 +39,13 @@ public class SaPermissionImpl implements StpInterface {
     public List<String> getRoleList(Object loginId, String loginType) {
         LoginUser loginUser = LoginHelper.getLoginUser();
         UserType userType = UserType.getUserType(loginUser.getUserType());
+        ArrayList<String> list = new ArrayList<>();
         if (userType == UserType.SYS_USER) {
-            return new ArrayList<>(loginUser.getRolePermission());
+            list = new ArrayList<>(loginUser.getRolePermission());
         } else if (userType == UserType.AM_USER) {
             // 其他端 自行根据业务编写
-            return new ArrayList<>(loginUser.getMenuPermission());
+            list = new ArrayList<>(loginUser.getMenuPermission());
         }
-        return new ArrayList<>();
+        return list;
     }
 }

+ 4 - 12
SERVER/YanZhongXYH/xyh-generator/src/main/java/cn/xyh/generator/service/impl/GenEmptyService.java

@@ -1,5 +1,6 @@
 package cn.xyh.generator.service.impl;
 
+import cn.xyh.common.core.domain.entity.SysUser;
 import cn.xyh.common.core.service.*;
 import org.springframework.stereotype.Service;
 
@@ -40,28 +41,19 @@ public class GenEmptyService implements IConfigService, IOrgService, IDictServic
         return false;
     }
 
-    @Override
-    public String selectUserNameById(Long userId) {
-        return null;
-    }
 
     @Override
-    public String selectUserNameByUserName(String key) {
-        return null;
-    }
-
-    @Override
-    public String selectUserNickNameById(Long key) {
+    public String selectNameById(Long id) {
         return null;
     }
 
     @Override
-    public String selectUserNickNameByUserName(String key) {
+    public SysUser selectSysUserById(Long userId) {
         return null;
     }
 
     @Override
-    public String selectNameById(Long id) {
+    public SysUser selectSysUserByUserName(String userName) {
         return null;
     }
 }

+ 11 - 1
SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/controller/AmActivityController.java

@@ -55,6 +55,16 @@ public class AmActivityController extends BaseController {
         return amActivityService.queryPageList(bo, pageQuery);
     }
 
+    /**
+     * 查询活动信息列表
+     */
+    @SaCheckPermission(PermissionName.AmActivityActivity)
+    @GetMapping("/activity")
+    public TableDataInfo<AmActivityVo> activity(AmActivityBo bo, PageQuery pageQuery) {
+        return amActivityService.queryPageActivity(bo, pageQuery);
+    }
+
+
     /**
      * 导出活动信息列表
      */
@@ -131,7 +141,7 @@ public class AmActivityController extends BaseController {
         if (StringUtils.isEmpty(status)) {
             status = AuditStatusEnum.WAIT.getValue();
         }
-        return toAjax(amActivityService.updateAuditStatus(status, activityId, getUserId()));
+        return toAjax(amActivityService.updateAuditStatus(status, activityId));
     }
 
     /**

+ 7 - 1
SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/controller/AmAlumnusController.java

@@ -50,6 +50,12 @@ public class AmAlumnusController extends BaseController {
         return amAlumnusService.queryPageList(query, pageQuery);
     }
 
+    @SaCheckPermission(value = {PermissionName.AmActivityAlumnus, PermissionName.AmActivityAlumnusQuery}, mode = SaMode.OR)
+    @GetMapping("/alumnus")
+    public TableDataInfo<AmAlumnusVo> alumnus(AmAlumnusBo query, PageQuery pageQuery) {
+        return amAlumnusService.queryPageAlumnus(query, pageQuery);
+    }
+
 
     /**
      * 导出校友信息列表
@@ -133,7 +139,7 @@ public class AmAlumnusController extends BaseController {
         if (StringUtils.isEmpty(status)) {
             status = "0";
         }
-        return toAjax(amAlumnusService.updateAuditStatus(status, amId, getUserId()));
+        return toAjax(amAlumnusService.updateAuditStatus(status, amId));
     }
 
 }

+ 9 - 1
SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/controller/AmHelpController.java

@@ -48,6 +48,14 @@ public class AmHelpController extends BaseController {
         return amHelpService.queryPageList(bo, pageQuery);
     }
 
+    /**
+     * 查询互助信息列表
+     */
+    @SaCheckPermission(PermissionName.AmActivityHelpQuery)
+    @GetMapping("/help")
+    public TableDataInfo<AmHelpVo> help(AmHelpBo bo, PageQuery pageQuery) {
+        return amHelpService.queryPageHelp(bo, pageQuery);
+    }
 
     /**
      * 获取互助信息详细信息
@@ -105,7 +113,7 @@ public class AmHelpController extends BaseController {
         if (StringUtils.isEmpty(status)) {
             status = AuditStatusEnum.WAIT.getValue();
         }
-        return toAjax(amHelpService.updateAuditStatus(status, helpId, getUserId()));
+        return toAjax(amHelpService.updateAuditStatus(status, helpId));
     }
 
     /**

+ 1 - 1
SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/domain/AmActivity.java

@@ -70,7 +70,7 @@ public class AmActivity extends BaseEntity {
     /**
      * 审核人
      */
-    private Long auditUser;
+    private String auditUser;
     /**
      * 审核时间
      */

+ 3 - 3
SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/domain/AmActivityApply.java

@@ -31,7 +31,7 @@ public class AmActivityApply extends BaseEntity {
      * 校友id
      */
     private Long amId;
-    
+
     /**
      * 活动id
      */
@@ -43,7 +43,7 @@ public class AmActivityApply extends BaseEntity {
     /**
      * 审核人
      */
-    private Long auditUser;
+    private String auditUser;
     /**
      * 审核时间
      */
@@ -59,7 +59,7 @@ public class AmActivityApply extends BaseEntity {
     /**
      * 费用审核人
      */
-    private Long costAuditUser;
+    private String costAuditUser;
     /**
      * 费用确认时间
      */

+ 2 - 2
SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/domain/AmAlumnus.java

@@ -65,9 +65,9 @@ public class AmAlumnus extends BaseEntity {
     private String auditStatus;
 
     /**
-     * 审核人id
+     * 审核人
      */
-    private Long auditId;
+    private String auditUser;
     /**
      * 审核时间
      */

+ 1 - 1
SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/domain/AmHelp.java

@@ -54,7 +54,7 @@ public class AmHelp extends BaseEntity {
     /**
      * 审核人
      */
-    private Long auditUser;
+    private String auditUser;
     /**
      * 审核时间
      */

+ 4 - 0
SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/domain/AmNews.java

@@ -47,6 +47,10 @@ public class AmNews extends BaseEntity {
      * 状态(0草稿 1发布)
      */
     private String status;
+    /**
+     * 发布人
+     */
+    private String publishUser;
     /**
      * 是否头条(0否 1是)
      */

+ 2 - 2
SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/domain/vo/AmActivityApplyVo.java

@@ -50,7 +50,7 @@ public class AmActivityApplyVo implements Serializable {
      * 审核人
      */
     @ExcelProperty(value = "审核人")
-    private Long auditUser;
+    private String auditUser;
 
     /**
      * 审核时间
@@ -75,7 +75,7 @@ public class AmActivityApplyVo implements Serializable {
      * 费用审核人
      */
     @ExcelProperty(value = "费用审核人")
-    private Long costAuditUser;
+    private String costAuditUser;
 
     /**
      * 费用确认时间

+ 4 - 4
SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/domain/vo/AmActivityVo.java

@@ -103,10 +103,10 @@ public class AmActivityVo implements Serializable {
      * 审核人
      */
     @ExcelProperty(value = "审核人")
-    private Long auditUser;
+    private String auditUser;
 
-    @Translation(type = TransConstant.USER_ID_OR_NAME_TO_NAME, mapper = "auditUser")
-    private Long auditUserName;
+    //@Translation(type = TransConstant.USER_ID_OR_NAME_TO_USER, mapper = "auditUser")
+    //private String auditUserName;
 
     /**
      * 审核时间
@@ -136,7 +136,7 @@ public class AmActivityVo implements Serializable {
     private String isSys;
 
 
-    @Translation(type = TransConstant.USER_ID_OR_NAME_TO_NAME, mapper = "createdBy", other = "name")
+    @Translation(type = TransConstant.USER_ID_OR_NAME_TO_USER, mapper = "createdBy", other = "name")
     private String createdBy;
 
     /**

+ 18 - 12
SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/domain/vo/AmAlumnusVo.java

@@ -36,25 +36,31 @@ public class AmAlumnusVo implements Serializable {
     @ExcelProperty(value = "用户id")
     private Long userId;
 
+    private String userName;
+
     private Long orgId;
+
     @ExcelProperty(value = "校友会")
     private String orgName;
+
+
     @ExcelProperty(value = "手机号码")
     private String phonenumber;
+    private String avatar;
     private String userType;
 
-    /**
-     * 最后登录IP
-     */
-    @ExcelProperty(value = "最后登录IP")
-    private String loginIp;
-
     /**
      * 最后登录时间
      */
     @ExcelProperty(value = "最后登录时间")
     private Date loginDate;
 
+    /**
+     * 最后登录IP
+     */
+    @ExcelProperty(value = "最后登录IP")
+    private String loginIp;
+
 
     /**
      * 姓名
@@ -166,17 +172,17 @@ public class AmAlumnusVo implements Serializable {
     @ExcelDictFormat(dictType = "alumnus_audit_status")
     private String auditStatus;
 
-    @Translation(type = TransConstant.DICT_TYPE_TO_LABEL, mapper = "auditStatus", other = "alumnus_audit_status")
-    private String auditStatusName;
+    //@Translation(type = TransConstant.DICT_TYPE_TO_LABEL, mapper = "auditStatus", other = "alumnus_audit_status")
+    //private String auditStatusName;
 
 
     /**
-     * 审核人id
+     * 审核人
      */
-    private Long auditId;
+    private Long auditUser;
 
-    @Translation(type = TransConstant.USER_ID_OR_NAME_TO_NAME, mapper = "auditId")
-    private String auditUser;
+    //@Translation(type = TransConstant.USER_ID_OR_NAME_TO_USER, mapper = "auditUser")
+    //private String auditUserName;
     /**
      * 审核时间
      */

+ 3 - 3
SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/domain/vo/AmHelpVo.java

@@ -77,11 +77,11 @@ public class AmHelpVo implements Serializable {
     /**
      * 审核人
      */
-    private Long auditUser;
+    private String auditUser;
 
 
     @ExcelProperty(value = "审核人")
-    @Translation(type = TransConstant.USER_ID_OR_NAME_TO_NAME, mapper = "auditUser")
+    @Translation(type = TransConstant.USER_ID_OR_NAME_TO_USER, mapper = "auditUser")
     private Long auditUserName;
 
     /**
@@ -131,6 +131,6 @@ public class AmHelpVo implements Serializable {
     private String remark;
 
 
-    @Translation(type = TransConstant.USER_ID_OR_NAME_TO_NAME, mapper = "createdBy", other = "name")
+    @Translation(type = TransConstant.USER_ID_OR_NAME_TO_USER, mapper = "createdBy", other = "name")
     private String createdBy;
 }

+ 10 - 1
SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/domain/vo/AmNewsVo.java

@@ -69,6 +69,15 @@ public class AmNewsVo implements Serializable {
     @ExcelDictFormat(dictType = "news_status")
     private String status;
 
+    /**
+     * 发布人
+     */
+    private String publishUser;
+    /**
+     * 发布时间
+     */
+    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd")
+    private Date publishTime;
     /**
      * 是否头条(0否 1是)
      */
@@ -102,7 +111,7 @@ public class AmNewsVo implements Serializable {
     @ExcelProperty(value = "备注")
     private String remark;
 
-    @Translation(type = TransConstant.USER_ID_OR_NAME_TO_NAME, mapper = "createdBy", other = "name")
+    @Translation(type = TransConstant.USER_ID_OR_NAME_TO_USER, mapper = "createdBy", other = "name")
     private String createdBy;
 
 

+ 2 - 1
SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/service/IAmActivityService.java

@@ -49,7 +49,7 @@ public interface IAmActivityService {
     /**
      * 更新活动状态
      */
-    Boolean updateAuditStatus(String status, String activityId, Long userId);
+    Boolean updateAuditStatus(String status, String activityId);
 
     Boolean updateHead(String status, String activityId);
 
@@ -62,4 +62,5 @@ public interface IAmActivityService {
 
     TableDataInfo<AmActivityVo> queryMyJoinActivities(Long amId, PageQuery pageQuery);
 
+    TableDataInfo<AmActivityVo> queryPageActivity(AmActivityBo bo, PageQuery pageQuery);
 }

+ 3 - 1
SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/service/IAmAlumnusService.java

@@ -36,6 +36,8 @@ public interface IAmAlumnusService {
      */
     TableDataInfo<AmAlumnusVo> queryPageList(AmAlumnusBo bo, PageQuery pageQuery);
 
+    TableDataInfo<AmAlumnusVo> queryPageAlumnus(AmAlumnusBo bo, PageQuery pageQuery);
+
     /**
      * 查询校友信息列表
      */
@@ -69,5 +71,5 @@ public interface IAmAlumnusService {
     /**
      * 更新审核状态
      */
-    Boolean updateAuditStatus(String status, Long amId, Long userId);
+    Boolean updateAuditStatus(String status, Long amId);
 }

+ 3 - 1
SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/service/IAmHelpService.java

@@ -49,11 +49,13 @@ public interface IAmHelpService {
     /**
      * 更新活动状态
      */
-    Boolean updateAuditStatus(String status, String helpId, Long userId);
+    Boolean updateAuditStatus(String status, String helpId);
 
     Boolean updateHead(String status, String helpId);
 
     Boolean updateClose(String status, String helpId);
 
     Boolean updateHot(String status, String helpId);
+
+    TableDataInfo<AmHelpVo> queryPageHelp(AmHelpBo bo, PageQuery pageQuery);
 }

+ 13 - 3
SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/service/impl/AmActivityServiceImpl.java

@@ -11,6 +11,7 @@ import cn.xyh.amActivity.service.IAmActivityService;
 import cn.xyh.common.core.domain.PageQuery;
 import cn.xyh.common.core.page.TableDataInfo;
 import cn.xyh.common.exception.ServiceException;
+import cn.xyh.common.helper.LoginHelper;
 import cn.xyh.common.utils.StreamUtils;
 import cn.xyh.common.utils.StringUtils;
 import cn.xyh.oss.service.IOssFileService;
@@ -89,6 +90,13 @@ public class AmActivityServiceImpl implements IAmActivityService {
         return baseMapper.selectVoList(lqw);
     }
 
+    @Override
+    public TableDataInfo<AmActivityVo> queryPageActivity(AmActivityBo bo, PageQuery pageQuery) {
+        LambdaQueryWrapper<AmActivity> lqw = buildQueryWrapper(bo);
+        Page<AmActivityVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
+        return TableDataInfo.build(result);
+    }
+
     private LambdaQueryWrapper<AmActivity> buildQueryWrapper(AmActivityBo bo) {
         Map<String, Object> params = bo.getParams();
         LambdaQueryWrapper<AmActivity> lqw = Wrappers.lambdaQuery();
@@ -180,10 +188,10 @@ public class AmActivityServiceImpl implements IAmActivityService {
     }
 
     @Override
-    public Boolean updateAuditStatus(String status, String activityId, Long userId) {
+    public Boolean updateAuditStatus(String status, String activityId) {
         return baseMapper.update(null, new LambdaUpdateWrapper<AmActivity>()
                 .set(AmActivity::getAuditStatus, status)
-                .set(AmActivity::getAuditUser, userId)
+                .set(AmActivity::getAuditUser, LoginHelper.getUsername())
                 .set(AmActivity::getAuditTime, LocalDateTime.now())
                 .eq(AmActivity::getActivityId, activityId)
         ) > 0;
@@ -228,7 +236,7 @@ public class AmActivityServiceImpl implements IAmActivityService {
         lqw.and(w -> {
             List<AmActivityApply> applyList = baseApplyMapper.selectList(new LambdaQueryWrapper<AmActivityApply>()
                     .eq(AmActivityApply::getAmId, amId)
-                    .ne(AmActivityApply::getAuditUser, AuditStatusEnum.NOT_PASS.getValue())
+                    .ne(AmActivityApply::getAuditStatus, AuditStatusEnum.NOT_PASS.getValue())
                     .select(AmActivityApply::getActivityId)
             );
             List<String> ids = StreamUtils.toList(applyList, AmActivityApply::getActivityId);
@@ -238,4 +246,6 @@ public class AmActivityServiceImpl implements IAmActivityService {
         Page<AmActivityVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
         return TableDataInfo.build(result);
     }
+
+
 }

+ 16 - 2
SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/service/impl/AmAlumnusServiceImpl.java

@@ -14,6 +14,7 @@ import cn.xyh.common.core.domain.entity.SysUser;
 import cn.xyh.common.core.page.TableDataInfo;
 import cn.xyh.common.core.service.IConfigService;
 import cn.xyh.common.exception.ServiceException;
+import cn.xyh.common.helper.LoginHelper;
 import cn.xyh.common.utils.StringUtils;
 import cn.xyh.system.service.ISysUserService;
 import cn.xyh.system.utils.GuidUtil;
@@ -23,6 +24,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.RequiredArgsConstructor;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.util.Collection;
 import java.util.Date;
@@ -101,6 +103,16 @@ public class AmAlumnusServiceImpl implements IAmAlumnusService {
         return TableDataInfo.build(result);
     }
 
+    /**
+     * 查询校友信息列表
+     */
+    @Override
+    public TableDataInfo<AmAlumnusVo> queryPageAlumnus(AmAlumnusBo bo, PageQuery pageQuery) {
+        LambdaQueryWrapper<AmAlumnus> lqw = buildQueryWrapper(bo);
+        Page<AmAlumnusVo> result = baseMapper.selectAlumnusPage(pageQuery.build(), lqw);
+        return TableDataInfo.build(result);
+    }
+
     /**
      * 查询校友信息列表
      */
@@ -142,6 +154,7 @@ public class AmAlumnusServiceImpl implements IAmAlumnusService {
      * 新增校友信息
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public Boolean insertByBo(AmAlumnusBo bo) {
         AmAlumnus add = BeanUtil.toBean(bo, AmAlumnus.class);
         validEntityBeforeSave(add);
@@ -188,6 +201,7 @@ public class AmAlumnusServiceImpl implements IAmAlumnusService {
      * 修改校友信息
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public Boolean updateByBo(AmAlumnusBo bo) {
         SysUser user = userService.selectUserById(bo.getUserId());
         userService.checkUserAllowed(user);
@@ -244,10 +258,10 @@ public class AmAlumnusServiceImpl implements IAmAlumnusService {
      * 更新审核状态
      */
     @Override
-    public Boolean updateAuditStatus(String status, Long amId, Long userId) {
+    public Boolean updateAuditStatus(String status, Long amId) {
         return baseMapper.update(null, new LambdaUpdateWrapper<AmAlumnus>()
                 .set(AmAlumnus::getAuditStatus, status)
-                .set(AmAlumnus::getAuditId, userId)
+                .set(AmAlumnus::getAuditUser, LoginHelper.getUsername())
                 .set(AmAlumnus::getAuditTime, new Date())
                 .eq(AmAlumnus::getAmId, amId)) > 0;
     }

+ 13 - 3
SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/service/impl/AmHelpServiceImpl.java

@@ -9,6 +9,7 @@ import cn.xyh.amActivity.service.IAmHelpService;
 import cn.xyh.common.core.domain.PageQuery;
 import cn.xyh.common.core.page.TableDataInfo;
 import cn.xyh.common.exception.ServiceException;
+import cn.xyh.common.helper.LoginHelper;
 import cn.xyh.common.utils.StringUtils;
 import cn.xyh.system.utils.AuditStatusEnum;
 import cn.xyh.system.utils.GuidUtil;
@@ -77,10 +78,17 @@ public class AmHelpServiceImpl implements IAmHelpService {
         return baseMapper.selectVoList(lqw);
     }
 
+    @Override
+    public TableDataInfo<AmHelpVo> queryPageHelp(AmHelpBo bo, PageQuery pageQuery) {
+        LambdaQueryWrapper<AmHelp> lqw = buildQueryWrapper(bo);
+        Page<AmHelpVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
+        return TableDataInfo.build(result);
+    }
+
     private LambdaQueryWrapper<AmHelp> buildQueryWrapper(AmHelpBo bo) {
         Map<String, Object> params = bo.getParams();
         LambdaQueryWrapper<AmHelp> lqw = Wrappers.lambdaQuery();
-        lqw.eq(StringUtils.isNotBlank(bo.getTitle()), AmHelp::getTitle, bo.getTitle());
+        lqw.like(StringUtils.isNotBlank(bo.getTitle()), AmHelp::getTitle, bo.getTitle());
         lqw.eq(StringUtils.isNotBlank(bo.getCategory()), AmHelp::getCategory, bo.getCategory());
         lqw.eq(StringUtils.isNotBlank(bo.getContent()), AmHelp::getContent, bo.getContent());
         lqw.between(params.get("beginExpiryDate") != null && params.get("endExpiryDate") != null,
@@ -151,10 +159,10 @@ public class AmHelpServiceImpl implements IAmHelpService {
 
 
     @Override
-    public Boolean updateAuditStatus(String status, String helpId, Long userId) {
+    public Boolean updateAuditStatus(String status, String helpId) {
         return baseMapper.update(null, new LambdaUpdateWrapper<AmHelp>()
                 .set(AmHelp::getAuditStatus, status)
-                .set(AmHelp::getAuditUser, userId)
+                .set(AmHelp::getAuditUser, LoginHelper.getUsername())
                 .set(AmHelp::getAuditTime, LocalDateTime.now())
                 .eq(AmHelp::getHelpId, helpId)
         ) > 0;
@@ -183,4 +191,6 @@ public class AmHelpServiceImpl implements IAmHelpService {
                 .eq(AmHelp::getHelpId, helpId)
         ) > 0;
     }
+
+
 }

+ 9 - 7
SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/amActivity/service/impl/AmNewsServiceImpl.java

@@ -8,6 +8,7 @@ import cn.xyh.amActivity.mapper.AmNewsMapper;
 import cn.xyh.amActivity.service.IAmNewsService;
 import cn.xyh.common.core.domain.PageQuery;
 import cn.xyh.common.core.page.TableDataInfo;
+import cn.xyh.common.helper.LoginHelper;
 import cn.xyh.common.utils.StringUtils;
 import cn.xyh.system.utils.GuidUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -75,7 +76,7 @@ public class AmNewsServiceImpl implements IAmNewsService {
     private LambdaQueryWrapper<AmNews> buildQueryWrapper(AmNewsBo bo) {
         Map<String, Object> params = bo.getParams();
         LambdaQueryWrapper<AmNews> lqw = Wrappers.lambdaQuery();
-        lqw.eq(StringUtils.isNotBlank(bo.getTitle()), AmNews::getTitle, bo.getTitle());
+        lqw.like(StringUtils.isNotBlank(bo.getTitle()), AmNews::getTitle, bo.getTitle());
         lqw.eq(StringUtils.isNotBlank(bo.getCategory()), AmNews::getCategory, bo.getCategory());
         lqw.eq(StringUtils.isNotBlank(bo.getContent()), AmNews::getContent, bo.getContent());
         lqw.eq(bo.getDate() != null, AmNews::getDate, bo.getDate());
@@ -138,28 +139,29 @@ public class AmNewsServiceImpl implements IAmNewsService {
     }
 
     @Override
-    public Boolean updateStatus(String status, String helpId) {
+    public Boolean updateStatus(String status, String newId) {
         return baseMapper.update(null, new LambdaUpdateWrapper<AmNews>()
                 .set(AmNews::getStatus, status)
+                .set(AmNews::getPublishUser, LoginHelper.getUsername())
                 .set(AmNews::getDate, LocalDateTime.now())
-                .eq(AmNews::getNewsId, helpId)
+                .eq(AmNews::getNewsId, newId)
         ) > 0;
     }
 
     @Override
-    public Boolean updateHead(String status, String helpId) {
+    public Boolean updateHead(String status, String newId) {
         return baseMapper.update(null, new LambdaUpdateWrapper<AmNews>()
                 .set(AmNews::getIsHead, status)
-                .eq(AmNews::getNewsId, helpId)
+                .eq(AmNews::getNewsId, newId)
         ) > 0;
     }
 
 
     @Override
-    public Boolean updateHot(String status, String helpId) {
+    public Boolean updateHot(String status, String newId) {
         return baseMapper.update(null, new LambdaUpdateWrapper<AmNews>()
                 .set(AmNews::getIsHot, status)
-                .eq(AmNews::getNewsId, helpId)
+                .eq(AmNews::getNewsId, newId)
         ) > 0;
     }
 }

+ 1 - 1
SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/system/controller/system/SysProfileController.java

@@ -108,7 +108,7 @@ public class SysProfileController extends BaseController {
         Map<String, Object> ajax = new HashMap<>();
         if (!avatarfile.isEmpty()) {
             String avatar = FileUploadUtils.upload(VberConfig.getAvatarPath(), avatarfile, MimeTypeUtils.IMAGE_EXTENSION);
-            if (userService.updateUserAvatar(getUsername(), avatar)) {
+            if (userService.updateUserAvatar(getUsername(), getUserId(), avatar)) {
                 ajax.put("imgUrl", avatar);
                 return R.ok(ajax);
             }

+ 2 - 1
SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/system/service/ISysUserService.java

@@ -170,10 +170,11 @@ public interface ISysUserService {
      * 修改用户头像
      *
      * @param userName 用户名
+     * @param userId
      * @param avatar   头像地址
      * @return 结果
      */
-    boolean updateUserAvatar(String userName, String avatar);
+    boolean updateUserAvatar(String userName, Long userId, String avatar);
 
     /**
      * 重置用户密码

+ 30 - 5
SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/system/service/SysLoginService.java

@@ -11,6 +11,7 @@ import cn.xyh.amActivity.domain.vo.AmAlumnusVo;
 import cn.xyh.amActivity.service.IAmAlumnusService;
 import cn.xyh.common.config.WxAppConfig;
 import cn.xyh.common.constant.CacheConstants;
+import cn.xyh.common.constant.CacheNames;
 import cn.xyh.common.constant.Constants;
 import cn.xyh.common.core.domain.dto.RoleDTO;
 import cn.xyh.common.core.domain.dto.XcxLoginDto;
@@ -37,6 +38,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.cache.annotation.CacheEvict;
+import org.springframework.cache.annotation.Caching;
 import org.springframework.stereotype.Service;
 
 import java.time.Duration;
@@ -82,7 +85,7 @@ public class SysLoginService {
             validateCaptcha(username, code, uuid);
         }
         // 框架登录不限制从什么表查询 只要最终构建出 LoginUser 即可
-        SysUser user = loadUserByUsername(username);
+        SysUser user = loadUserByPeu(username);
         checkLogin(LoginType.PASSWORD, username, () -> !BCrypt.checkpw(password, user.getPassword()));
         // 此处可根据登录用户的数据不同 自行创建 loginUser 属性不够用继承扩展就行了
         LoginUser loginUser = buildLoginUser(user);
@@ -225,10 +228,27 @@ public class SysLoginService {
         }
     }
 
-    private SysUser loadUserByUsername(String username) {
-        SysUser user = userMapper.selectOne(new LambdaQueryWrapper<SysUser>()
+    /**
+     * 根据 手机号码,邮箱,用户名 查询用户
+     *
+     * @param username
+     * @return
+     */
+    private SysUser loadUserByPeu(String username) {
+        SysUser user;
+        user = userMapper.selectOne(new LambdaQueryWrapper<SysUser>()
                 .select(SysUser::getUserName, SysUser::getStatus)
-                .eq(SysUser::getUserName, username));
+                .eq(SysUser::getPhonenumber, username));
+        //if (ObjectUtil.isNull(user)) {
+        //    user = userMapper.selectOne(new LambdaQueryWrapper<SysUser>()
+        //            .select(SysUser::getUserName, SysUser::getStatus)
+        //            .eq(SysUser::getEmail, username));
+        //}
+        if (ObjectUtil.isNull(user)) {
+            user = userMapper.selectOne(new LambdaQueryWrapper<SysUser>()
+                    .select(SysUser::getUserName, SysUser::getStatus)
+                    .eq(SysUser::getUserName, username));
+        }
         if (ObjectUtil.isNull(user)) {
             log.info("登录用户:{} 不存在.", username);
             throw new UserException("user.not.exists", username);
@@ -236,7 +256,7 @@ public class SysLoginService {
             log.info("登录用户:{} 已被停用.", username);
             throw new UserException("user.blocked", username);
         }
-        return userMapper.selectUserByUserName(username);
+        return userMapper.selectUserByUserName(user.getUserName());
     }
 
     private SysUser loadUserByPhoneNumber(String phoneNumber) {
@@ -333,11 +353,16 @@ public class SysLoginService {
         return loginUser;
     }
 
+
     /**
      * 记录登录信息
      *
      * @param userId 用户ID
      */
+    @Caching(evict = {
+            @CacheEvict(cacheNames = CacheNames.SYS_USER_NAME, key = "#userName")
+            , @CacheEvict(cacheNames = CacheNames.SYS_USER_NAME, key = "#userId")
+    })
     public void recordLoginInfo(Long userId, String username) {
         SysUser sysUser = new SysUser();
         sysUser.setUserId(userId);

+ 0 - 2
SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/system/service/SysRegisterService.java

@@ -69,8 +69,6 @@ public class SysRegisterService {
             throw new UserException("user.register.error");
         }
 
-        alumnusService.createAlumnus(sysUser.getUserId(), sysUser.getNickName());
-
         recordLogininfor(username, Constants.REGISTER, MessageUtils.message("user.register.success"));
     }
 

+ 12 - 0
SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/system/service/impl/SysCategoryServiceImpl.java

@@ -2,6 +2,7 @@ package cn.xyh.system.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.ObjectUtil;
+import cn.xyh.common.constant.CacheNames;
 import cn.xyh.common.core.domain.PageQuery;
 import cn.xyh.common.core.page.TableDataInfo;
 import cn.xyh.common.core.service.ICategoryService;
@@ -15,6 +16,9 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.RequiredArgsConstructor;
+import org.springframework.cache.annotation.CacheEvict;
+import org.springframework.cache.annotation.Cacheable;
+import org.springframework.cache.annotation.Caching;
 import org.springframework.stereotype.Service;
 
 import java.util.Collection;
@@ -55,6 +59,7 @@ public class SysCategoryServiceImpl implements ISysCategoryService, ICategorySer
      * 查询类别信息列表
      */
     @Override
+    @Cacheable(cacheNames = CacheNames.SYS_CATEGORY_TYPE, key = "#bo.categoryType")
     public List<SysCategoryVo> queryList(SysCategoryBo bo) {
         LambdaQueryWrapper<SysCategory> lqw = buildQueryWrapper(bo);
         return baseMapper.selectVoList(lqw);
@@ -75,6 +80,7 @@ public class SysCategoryServiceImpl implements ISysCategoryService, ICategorySer
      * 新增类别信息
      */
     @Override
+    @CacheEvict(cacheNames = CacheNames.SYS_CATEGORY_TYPE, key = "#bo.categoryType")
     public Boolean insertByBo(SysCategoryBo bo) {
         SysCategory add = BeanUtil.toBean(bo, SysCategory.class);
         validEntityBeforeSave(add);
@@ -89,6 +95,10 @@ public class SysCategoryServiceImpl implements ISysCategoryService, ICategorySer
      * 修改类别信息
      */
     @Override
+    @Caching(evict = {
+            @CacheEvict(cacheNames = CacheNames.SYS_CATEGORY_TYPE, key = "#bo.categoryType"),
+            @CacheEvict(cacheNames = CacheNames.SYS_CATEGORY_TYPE, key = "#bo.categoryId")
+    })
     public Boolean updateByBo(SysCategoryBo bo) {
         SysCategory update = BeanUtil.toBean(bo, SysCategory.class);
         validEntityBeforeSave(update);
@@ -106,6 +116,7 @@ public class SysCategoryServiceImpl implements ISysCategoryService, ICategorySer
      * 批量删除类别信息
      */
     @Override
+    @CacheEvict(cacheNames = CacheNames.SYS_CATEGORY_TYPE, allEntries = true)
     public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
         if (isValid) {
             //TODO 做一些业务上的校验,判断是否需要校验
@@ -114,6 +125,7 @@ public class SysCategoryServiceImpl implements ISysCategoryService, ICategorySer
     }
 
     @Override
+    @Cacheable(cacheNames = CacheNames.SYS_CATEGORY_TYPE, key = "#id")
     public String selectNameById(Long id) {
         SysCategory sysCategory = baseMapper.selectOne(new LambdaQueryWrapper<SysCategory>()
                 .select(SysCategory::getCategoryName).eq(SysCategory::getCategoryId, id));

+ 76 - 29
SERVER/YanZhongXYH/xyh-system/src/main/java/cn/xyh/system/service/impl/SysUserServiceImpl.java

@@ -3,6 +3,8 @@ package cn.xyh.system.service.impl;
 import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.util.ArrayUtil;
 import cn.hutool.core.util.ObjectUtil;
+import cn.xyh.amActivity.domain.AmAlumnus;
+import cn.xyh.amActivity.mapper.AmAlumnusMapper;
 import cn.xyh.common.constant.CacheNames;
 import cn.xyh.common.constant.UserConstants;
 import cn.xyh.common.core.domain.PageQuery;
@@ -29,7 +31,11 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
+import org.springframework.cache.Cache;
+import org.springframework.cache.CacheManager;
+import org.springframework.cache.annotation.CacheEvict;
 import org.springframework.cache.annotation.Cacheable;
+import org.springframework.cache.annotation.Caching;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -55,6 +61,8 @@ public class SysUserServiceImpl implements ISysUserService, IUserService {
     private final SysPostMapper postMapper;
     private final SysUserRoleMapper userRoleMapper;
     private final SysUserPostMapper userPostMapper;
+    private final AmAlumnusMapper alumnusMapper;
+    private final CacheManager cacheManager;
 
 
     @Override
@@ -291,12 +299,19 @@ public class SysUserServiceImpl implements ISysUserService, IUserService {
      * @return 结果
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public boolean registerUser(SysUser user) {
         user.setCreateBy(user.getUserName());
         user.setUpdateBy(user.getUserName());
         user.setRoleId(ALUMNUS_DEFAULT_ROLE_ID);
         boolean flag = baseMapper.insert(user) > 0;
-        insertUserRole(user);
+        if (flag) {
+            insertUserRole(user);
+            AmAlumnus am = new AmAlumnus();
+            am.setUserId(user.getUserId());
+            am.setName(user.getNickName());
+            flag = alumnusMapper.insert(am) > 0;
+        }
         return flag;
     }
 
@@ -306,6 +321,10 @@ public class SysUserServiceImpl implements ISysUserService, IUserService {
      * @param user 用户信息
      * @return 结果
      */
+    @Caching(evict = {
+            @CacheEvict(cacheNames = CacheNames.SYS_USER_NAME, key = "#user.userName")
+            , @CacheEvict(cacheNames = CacheNames.SYS_USER_NAME, key = "#user.userId")
+    })
     @Override
     @Transactional(rollbackFor = Exception.class)
     public int updateUser(SysUser user) {
@@ -324,6 +343,7 @@ public class SysUserServiceImpl implements ISysUserService, IUserService {
         return baseMapper.updateById(user);
     }
 
+
     /**
      * 用户授权角色
      *
@@ -344,6 +364,10 @@ public class SysUserServiceImpl implements ISysUserService, IUserService {
      * @param user 用户信息
      * @return 结果
      */
+    @Caching(evict = {
+            @CacheEvict(cacheNames = CacheNames.SYS_USER_NAME, key = "#user.userName")
+            , @CacheEvict(cacheNames = CacheNames.SYS_USER_NAME, key = "#user.userId")
+    })
     @Override
     public int updateUserStatus(SysUser user) {
         return baseMapper.updateById(user);
@@ -355,6 +379,10 @@ public class SysUserServiceImpl implements ISysUserService, IUserService {
      * @param user 用户信息
      * @return 结果
      */
+    @Caching(evict = {
+            @CacheEvict(cacheNames = CacheNames.SYS_USER_NAME, key = "#user.userName")
+            , @CacheEvict(cacheNames = CacheNames.SYS_USER_NAME, key = "#user.userId")
+    })
     @Override
     public int updateUserProfile(SysUser user) {
         return baseMapper.updateById(user);
@@ -364,11 +392,17 @@ public class SysUserServiceImpl implements ISysUserService, IUserService {
      * 修改用户头像
      *
      * @param userName 用户名
+     * @param userId
      * @param avatar   头像地址
      * @return 结果
      */
+
     @Override
-    public boolean updateUserAvatar(String userName, String avatar) {
+    @Caching(evict = {
+            @CacheEvict(cacheNames = CacheNames.SYS_USER_NAME, key = "#userName")
+            , @CacheEvict(cacheNames = CacheNames.SYS_USER_NAME, key = "#userId")
+    })
+    public boolean updateUserAvatar(String userName, Long userId, String avatar) {
         return baseMapper.update(null,
                 new LambdaUpdateWrapper<SysUser>()
                         .set(SysUser::getAvatar, avatar)
@@ -457,11 +491,22 @@ public class SysUserServiceImpl implements ISysUserService, IUserService {
     @Override
     @Transactional(rollbackFor = Exception.class)
     public int deleteUserById(Long userId) {
-        // 删除用户与角色关联
-        userRoleMapper.delete(new LambdaQueryWrapper<SysUserRole>().eq(SysUserRole::getUserId, userId));
-        // 删除用户与行业/兴趣分会表
-        userPostMapper.delete(new LambdaQueryWrapper<SysUserPost>().eq(SysUserPost::getUserId, userId));
-        return baseMapper.deleteById(userId);
+        SysUser user = selectUserById(userId);
+        if (ObjectUtil.isNotNull(user)) {
+            // 删除用户与角色关联
+            userRoleMapper.delete(new LambdaQueryWrapper<SysUserRole>().eq(SysUserRole::getUserId, userId));
+            // 删除用户与行业/兴趣分会表
+            userPostMapper.delete(new LambdaQueryWrapper<SysUserPost>().eq(SysUserPost::getUserId, userId));
+            int i = baseMapper.deleteById(userId);
+            Cache cache = cacheManager.getCache(CacheNames.SYS_USER_NAME);
+            // 删除用户缓存
+            if (cache != null) {
+                cache.evictIfPresent(user.getUserId());
+                cache.evictIfPresent(user.getUserName());
+            }
+            return i;
+        }
+        return 0;
     }
 
     /**
@@ -471,11 +516,21 @@ public class SysUserServiceImpl implements ISysUserService, IUserService {
      * @return 结果
      */
     @Override
+    @CacheEvict(cacheNames = CacheNames.SYS_USER_NAME, allEntries = true)
     @Transactional(rollbackFor = Exception.class)
     public int deleteUserByIds(Long[] userIds) {
+        Cache cache = cacheManager.getCache(CacheNames.SYS_USER_NAME);
         for (Long userId : userIds) {
             checkUserAllowed(new SysUser(userId));
             checkUserDataScope(userId);
+            // 删除缓存
+            if (ObjectUtil.isNotNull(cache)) {
+                SysUser user = cache.get(userId, SysUser.class);
+                if (ObjectUtil.isNotNull(user)) {
+                    cache.evict(userId);
+                    cache.evict(user.getUserName());
+                }
+            }
         }
         List<Long> ids = Arrays.asList(userIds);
         // 删除用户与角色关联
@@ -490,33 +545,25 @@ public class SysUserServiceImpl implements ISysUserService, IUserService {
         return baseMapper.selectUserByOpenId(openid);
     }
 
-    @Cacheable(cacheNames = CacheNames.SYS_USER_NAME, key = "#userId")
-    @Override
-    public String selectUserNameById(Long userId) {
-        SysUser sysUser = baseMapper.selectOne(new LambdaQueryWrapper<SysUser>()
-                .select(SysUser::getUserName).eq(SysUser::getUserId, userId));
-        return ObjectUtil.isNull(sysUser) ? null : sysUser.getUserName();
-    }
-
-    @Override
-    public String selectUserNameByUserName(String uName) {
-        SysUser sysUser = baseMapper.selectOne(new LambdaQueryWrapper<SysUser>()
-                .select(SysUser::getUserName).eq(SysUser::getUserName, uName));
-        return ObjectUtil.isNull(sysUser) ? null : sysUser.getUserName();
-    }
 
     @Override
-    public String selectUserNickNameById(Long userId) {
+    @Cacheable(cacheNames = CacheNames.SYS_USER_NAME, key = "#userId")
+    public SysUser selectSysUserById(Long userId) {
         SysUser sysUser = baseMapper.selectOne(new LambdaQueryWrapper<SysUser>()
-                .select(SysUser::getUserName).eq(SysUser::getUserId, userId));
-        return ObjectUtil.isNull(sysUser) ? null : sysUser.getNickName();
+                .eq(SysUser::getUserId, userId));
+        Cache cache = cacheManager.getCache(CacheNames.SYS_USER_NAME);
+        if (cache != null && cache.get(sysUser.getUserName()) == null) {
+            cache.putIfAbsent(sysUser.getUserName(), sysUser);
+        }
+        return sysUser;
     }
 
+    @Cacheable(cacheNames = CacheNames.SYS_USER_NAME, key = "#userName")
     @Override
-    public String selectUserNickNameByUserName(String uName) {
-        SysUser sysUser = baseMapper.selectOne(new LambdaQueryWrapper<SysUser>()
-                .select(SysUser::getUserName).eq(SysUser::getUserName, uName));
-        return ObjectUtil.isNull(sysUser) ? null : sysUser.getNickName();
+    public SysUser selectSysUserByUserName(String userName) {
+        SysUser sysUser;
+        sysUser = baseMapper.selectOne(new LambdaQueryWrapper<SysUser>()
+                .eq(SysUser::getUserName, userName));
+        return sysUser;
     }
-
 }

+ 18 - 10
SERVER/YanZhongXYH/xyh-system/src/main/resources/mapper/amActivity/AmAlumnusMapper.xml

@@ -14,7 +14,7 @@
         <result property="graduateYear" column="graduate_year"/>
         <result property="amClass" column="am_class"/>
         <result property="auditStatus" column="audit_status"/>
-        <result property="auditId" column="audit_id"/>
+        <result property="auditUser" column="audit_user"/>
         <result property="auditTime" column="audit_time"/>
         <result property="education" column="education"/>
         <result property="province" column="province"/>
@@ -50,7 +50,7 @@
         <result property="graduateYear" column="graduate_year"/>
         <result property="amClass" column="am_class"/>
         <result property="auditStatus" column="audit_status"/>
-        <result property="auditId" column="audit_id"/>
+        <result property="auditUser" column="audit_user"/>
         <result property="auditTime" column="audit_time"/>
         <result property="education" column="education"/>
         <result property="province" column="province"/>
@@ -99,8 +99,6 @@
                am.graduate_year,
                am.am_class,
                am.audit_status,
-               am.audit_id,
-               am.audit_time,
                am.education,
                am.province,
                am.city,
@@ -114,17 +112,23 @@
                am.industry_area,
                am.work_unit,
                am.position,
-               u.org_id,
-               u.phonenumber,
-               o.org_name,
+               am.del_flag,
                amex.address,
                amex.work_unit_more,
                amex.industry_more,
                amex.self_introduction,
-               amex.resources
+               amex.resources,
+               u.org_id,
+               u.user_name,
+               u.email,
+               u.phonenumber,
+               u.avatar,
+               u.login_ip,
+               u.login_date,
+               o.org_name
         FROM am_alumnus AS am
-                 LEFT JOIN sys_user AS u ON am.user_id = u.user_id
                  LEFT JOIN am_alumnus_ex AS amex ON am.am_id = amex.am_id
+                 LEFT JOIN sys_user AS u ON am.user_id = u.user_id
                  LEFT JOIN sys_org AS o ON u.org_id = o.org_id
         WHERE am.am_id = #{userId}
     </select>
@@ -147,9 +151,13 @@
                am.district,
                u.avatar,
                u.login_date,
-               u.login_ip
+               u.login_ip,
+               u.org_id,
+               u.phonenumber,
+               o.org_name
         FROM am_alumnus AS am
                  LEFT JOIN sys_user AS u ON am.user_id = u.user_id
+                 LEFT JOIN sys_org AS o ON u.org_id = o.org_id
             ${ew.getCustomSqlSegment}
     </select>
 

+ 3 - 2
SERVER/YanZhongXYH/xyh-system/src/main/resources/mapper/amActivity/AmNewsMapper.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="cn.xyh.amActivity.mapper.AmNewsMapper">
 
     <resultMap type="cn.xyh.amActivity.domain.AmNews" id="AmNewsResult">
@@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="content" column="content"/>
         <result property="date" column="date"/>
         <result property="status" column="status"/>
+        <result property="publishUser" column="publish_user"/>
         <result property="isHead" column="is_head"/>
         <result property="isHot" column="is_hot"/>
         <result property="isClose" column="is_close"/>

Fichier diff supprimé car celui-ci est trop grand
+ 131 - 459
UI/XYH.APP/package-lock.json


+ 1 - 0
UI/XYH.APP/package.json

@@ -54,6 +54,7 @@
     "@dcloudio/uni-quickapp-webview": "3.0.0-3080720230703001",
     "@dcloudio/uni-ui": "^1.4.28",
     "@vant/area-data": "^1.5.1",
+    "dayjs": "^1.11.10",
     "pinia": "2.0.23",
     "unplugin-auto-import": "^0.15.3",
     "unplugin-vue-components": "^0.24.1",

+ 1 - 2
UI/XYH.APP/src/App.vue

@@ -1,10 +1,9 @@
 <script setup lang="ts">
 import route from "./route"
 import appStore from "./stores"
-import JwtService from "@/core/services/JwtService"
 
 onLaunch(() => {
-  //JwtService.saveToken("eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiJhbToxMDAiLCJyblN0ciI6InEyMGJDT1dhZk9VWmRBcUNnSzR6TDRqTnA0Y05LQkFUIiwidXNlcklkIjoxMDB9.yLjULWll4qyBLI2wJ1AH85tJznqeChsMBCEddx5RZUA")
+  //appStore.authStore.xcxLogin()
   console.log("App Launch")
 })
 onShow(() => {

+ 95 - 0
UI/XYH.APP/src/api/amActivity/_activity.ts

@@ -0,0 +1,95 @@
+import Rs from "@/core/services/RequestService"
+
+class activityApi {
+  tableUrl = "/amActivity/activity/list"
+  exportUrl = "/amActivity/activity/export"
+
+  // 查询活动信息列表
+  listActivity = (query: any) => {
+    return Rs.get({
+      url: "/amActivity/activity/activity",
+      params: query,
+      loading: false,
+    })
+  }
+
+  // 查询活动信息详细
+  getActivity = (activityId: string) => {
+    return Rs.get({
+      url: "/amActivity/activity/" + activityId,
+      loading: true,
+    })
+  }
+
+  // 新增或修改活动信息
+  addOrUpdateActivity = (data: any, isUpdate: boolean) => {
+    return new Promise((r) => {
+      if (isUpdate || data.activityId) {
+        this.updateActivity(data).then((res: any) => {
+          message.msgSuccess("修改成功")
+          r(res)
+        })
+      } else {
+        this.addActivity(data).then((res: any) => {
+          message.msgSuccess("新增成功")
+          r(res)
+        })
+      }
+    })
+  }
+
+  // 新增活动信息
+  addActivity = (data: any) => {
+    return Rs.post({
+      url: "/amActivity/activity/add",
+      data: data,
+      successAlert: false,
+    })
+  }
+
+  // 修改活动信息
+  updateActivity = (data: any) => {
+    return Rs.post({
+      url: "/amActivity/activity/update",
+      data: data,
+      successAlert: false,
+    })
+  }
+
+  // 删除活动信息
+  delActivity = (activityId: string | string[]) => {
+    return Rs.del({
+      url: "/amActivity/activity/" + activityId,
+    })
+  }
+
+  auditActivity = (activityId: string, status: string) => {
+    return Rs.post({
+      url: `/amActivity/activity/audit/${activityId}/${status}`,
+      successAlert: true,
+    })
+  }
+
+  topActivity = (activityId: string, status: string) => {
+    return Rs.post({
+      url: `/amActivity/activity/top/${activityId}/${status}`,
+      successAlert: false,
+    })
+  }
+
+  hotActivity = (activityId: string, status: string) => {
+    return Rs.post({
+      url: `/amActivity/activity/hot/${activityId}/${status}`,
+      successAlert: false,
+    })
+  }
+
+  closeActivity = (activityId: string) => {
+    return Rs.post({
+      url: `/amActivity/activity/close/${activityId}`,
+      successAlert: false,
+    })
+  }
+}
+
+export default activityApi

+ 83 - 0
UI/XYH.APP/src/api/amActivity/_alumnus.ts

@@ -0,0 +1,83 @@
+import Rs from "@/core/services/RequestService"
+
+class alumnusApi {
+  tableUrl = "/amActivity/alumnus/list"
+  exportUrl = "/amActivity/alumnus/export"
+
+  // 查询校友信息列表
+  listAlumnus = (query: any) => {
+    return Rs.get({
+      url: "/amActivity/alumnus/alumnus",
+      params: query,
+      loading: false,
+    })
+  }
+
+  // 查询校友信息详细
+  getAlumnus = (amId: string) => {
+    return Rs.get({
+      url: "/amActivity/alumnus/" + amId,
+      loading: true,
+    })
+  }
+
+  // 新增或修改校友信息
+  addOrUpdateAlumnus = (data: any) => {
+    return new Promise((r) => {
+      if (data.amId) {
+        this.updateAlumnus(data).then((res: any) => {
+          message.msgSuccess("修改成功")
+          r(res)
+        })
+      } else {
+        this.addAlumnus(data).then((res: any) => {
+          message.msgSuccess("新增成功")
+          r(res)
+        })
+      }
+    })
+  }
+
+  // 新增校友信息
+  addAlumnus = (data: any) => {
+    return Rs.post({
+      url: "/amActivity/alumnus",
+      data: data,
+      successAlert: false,
+    })
+  }
+
+  // 修改校友信息
+  updateAlumnus = (data: any) => {
+    return Rs.put({
+      url: "/amActivity/alumnus",
+      data: data,
+      successAlert: false,
+    })
+  }
+
+  // 修改隐私设置
+  updatePrivacy = (val: string) => {
+    return Rs.post({
+      url: "/system/alumnus/updatePrivacy/" + val,
+      successAlert: false,
+    })
+  }
+
+  // 审核校友信息
+  auditAlumnus = (amId: string, status: string) => {
+    return Rs.post({
+      url: `/amActivity/alumnus/audit/${amId}/${status}`,
+      successAlert: true,
+    })
+  }
+
+  // 删除校友信息
+  delAlumnus = (amId: string | string[]) => {
+    return Rs.del({
+      url: "/amActivity/alumnus/" + amId,
+    })
+  }
+}
+
+export default alumnusApi

+ 75 - 0
UI/XYH.APP/src/api/amActivity/_attach.ts

@@ -0,0 +1,75 @@
+import Rs from "@/core/services/RequestService"
+
+class attachApi {
+	getAttachList = (sourceId: string, sourceType: string) => {
+		return Rs.get({
+			url: `/amActivity/attach/source/${sourceType}/${sourceId}`,
+			loading: false
+		})
+	}
+	// tableUrl = "/amActivity/attach/list"
+	// exportUrl = "/amActivity/attach/export"
+
+	// // 查询活动信息列表
+	// listActivity = (query: any) => {
+	// 	return Rs.get({
+	// 		url: "/amActivity/attach/list",
+	// 		params: query,
+	// 		loading: false
+	// 	})
+	// }
+
+	// // 查询活动信息详细
+	// getActivity = (attachId: string) => {
+	// 	return Rs.get({
+	// 		url: "/amActivity/attach/" + attachId,
+	// 		loading: false
+	// 	})
+	// }
+
+	// // 新增或修改活动信息
+	// addOrUpdateActivity = (data: any, isUpdate: boolean) => {
+	// 	return new Promise((r) => {
+	// 		if (isUpdate || data.attachId) {
+	// 			this.updateActivity(data).then((res: any) => {
+	// 				message.msgSuccess("修改成功")
+	// 				r(res)
+	// 			})
+	// 		} else {
+	// 			this.addActivity(data).then((res: any) => {
+	// 				message.msgSuccess("新增成功")
+	// 				r(res)
+	// 			})
+	// 		}
+	// 	})
+	// }
+
+	// // 新增活动信息
+	// addActivity = (data: any) => {
+	// 	return Rs.post({
+	// 		url: "/amActivity/attach/add",
+	// 		data: data,
+	// 		contentType: "multipart/form-data",
+	// 		successAlert: false
+	// 	})
+	// }
+
+	// // 修改活动信息
+	// updateActivity = (data: any) => {
+	// 	return Rs.post({
+	// 		url: "/amActivity/attach/update",
+	// 		contentType: "multipart/form-data",
+	// 		data: data,
+	// 		successAlert: false
+	// 	})
+	// }
+
+	// // 删除活动信息
+	// delActivity = (attachId: string | string[]) => {
+	// 	return Rs.del({
+	// 		url: "/amActivity/attach/" + attachId
+	// 	})
+	// }
+}
+
+export default attachApi

+ 95 - 0
UI/XYH.APP/src/api/amActivity/_help.ts

@@ -0,0 +1,95 @@
+import Rs from "@/core/services/RequestService"
+
+class helpApi {
+  tableUrl = "/amActivity/help/list"
+  exportUrl = "/amActivity/help/export"
+
+  // 查询互助信息列表
+  listHelp = (query: any) => {
+    return Rs.get({
+      url: "/amActivity/help/help",
+      params: query,
+      loading: false,
+    })
+  }
+
+  // 查询互助信息详细
+  getHelp = (helpId: string) => {
+    return Rs.get({
+      url: "/amActivity/help/" + helpId,
+      loading: true,
+    })
+  }
+
+  // 新增或修改互助信息
+  addOrUpdateHelp = (data: any) => {
+    return new Promise((r) => {
+      if (data.helpId) {
+        this.updateHelp(data).then((res: any) => {
+          message.msgSuccess("修改成功")
+          r(res)
+        })
+      } else {
+        this.addHelp(data).then((res: any) => {
+          message.msgSuccess("新增成功")
+          r(res)
+        })
+      }
+    })
+  }
+
+  // 新增互助信息
+  addHelp = (data: any) => {
+    return Rs.post({
+      url: "/amActivity/help",
+      data: data,
+      successAlert: false,
+    })
+  }
+
+  // 修改互助信息
+  updateHelp = (data: any) => {
+    return Rs.put({
+      url: "/amActivity/help",
+      data: data,
+      successAlert: false,
+    })
+  }
+
+  // 删除互助信息
+  delHelp = (helpId: string | string[]) => {
+    return Rs.del({
+      url: "/amActivity/help/" + helpId,
+    })
+  }
+
+  auditHelp = (helpId: string, status: string) => {
+    return Rs.post({
+      url: `/amActivity/help/audit/${helpId}/${status}`,
+      successAlert: true,
+    })
+  }
+
+  topHelp = (helpId: string, status: string) => {
+    return Rs.post({
+      url: `/amActivity/help/top/${helpId}/${status}`,
+      successAlert: false,
+    })
+  }
+
+  hotHelp = (helpId: string, status: string) => {
+    return Rs.post({
+      url: `/amActivity/help/hot/${helpId}/${status}`,
+      successAlert: false,
+    })
+  }
+
+  closeHelp = (helpId: string) => {
+    return Rs.post({
+      url: `/amActivity/help/close/${helpId}`,
+      successAlert: false,
+    })
+  }
+}
+
+export default helpApi

+ 88 - 0
UI/XYH.APP/src/api/amActivity/_news.ts

@@ -0,0 +1,88 @@
+import Rs from "@/core/services/RequestService"
+
+class newsApi {
+  tableUrl = "/amActivity/news/list"
+  exportUrl = "/amActivity/news/export"
+
+  // 查询资讯信息列表
+  listNews = (query: any) => {
+    return Rs.get({
+      url: "/amActivity/news/list",
+      params: query,
+      loading: false,
+    })
+  }
+
+  // 查询资讯信息详细
+  getNews = (newsId: string) => {
+    return Rs.get({
+      url: "/amActivity/news/" + newsId,
+      loading: true,
+    })
+  }
+
+  // 新增或修改资讯信息
+  addOrUpdateNews = (data: any) => {
+    return new Promise((r) => {
+      if (data.newsId) {
+        this.updateNews(data).then((res: any) => {
+          message.msgSuccess("修改成功")
+          r(res)
+        })
+      } else {
+        this.addNews(data).then((res: any) => {
+          message.msgSuccess("新增成功")
+          r(res)
+        })
+      }
+    })
+  }
+
+  // 新增资讯信息
+  addNews = (data: any) => {
+    return Rs.post({
+      url: "/amActivity/news",
+      data: data,
+      successAlert: false,
+    })
+  }
+
+  // 修改资讯信息
+  updateNews = (data: any) => {
+    return Rs.put({
+      url: "/amActivity/news",
+      data: data,
+      successAlert: false,
+    })
+  }
+
+  // 删除资讯信息
+  delNews = (newsId: string | string[]) => {
+    return Rs.del({
+      url: "/amActivity/news/" + newsId,
+    })
+  }
+
+  publishNews = (newsId: string, status: string) => {
+    return Rs.post({
+      url: `/amActivity/news/publish/${newsId}/${status}`,
+      successAlert: true,
+    })
+  }
+
+  topNews = (newsId: string, status: string) => {
+    return Rs.post({
+      url: `/amActivity/news/top/${newsId}/${status}`,
+      successAlert: false,
+    })
+  }
+
+  hotNews = (newsId: string, status: string) => {
+    return Rs.post({
+      url: `/amActivity/news/hot/${newsId}/${status}`,
+      successAlert: false,
+    })
+  }
+}
+
+export default newsApi

+ 20 - 0
UI/XYH.APP/src/api/amActivity/index.ts

@@ -0,0 +1,20 @@
+import Alumnus from "./_alumnus"
+import Activity from "./_activity"
+import Help from "./_help"
+import News from "./_news"
+
+export interface IAmApi {
+	alumnusApi: Alumnus
+	activityApi: Activity
+	helpApi: Help
+	newsApi: News
+}
+
+export const apis: IAmApi = {
+	alumnusApi: new Alumnus(),
+	activityApi: new Activity(),
+	helpApi: new Help(),
+	newsApi: new News()
+}
+
+export default apis

+ 3 - 0
UI/XYH.APP/src/api/index.ts

@@ -1,17 +1,20 @@
 import login from "./_login"
 import system, { type ISystemApi } from "./system"
 import monitor, { type IMonitorApi } from "./monitor"
+import amActivity, { type IAmApi } from "./amActivity"
 
 export interface IAppApi {
   loginApi: login
   system: ISystemApi
   monitor: IMonitorApi
+  amActivity: IAmApi
 }
 
 export const apis: IAppApi = {
   loginApi: new login(),
   system: system,
   monitor: monitor,
+  amActivity,
 }
 
 export default apis

+ 0 - 8
UI/XYH.APP/src/api/system/_alumnus.ts

@@ -57,14 +57,6 @@ class alumnusApi {
     })
   }
 
-  // 修改隐私设置
-  updatePrivacy = (val: string) => {
-    return Rs.post({
-      url: "/system/alumnus/updatePrivacy/" + val,
-      successAlert: false,
-    })
-  }
-
   // 删除校友
   delAlumnus = (amId: string | string[]) => {
     return Rs.del({

+ 23 - 0
UI/XYH.APP/src/api/system/_category.ts

@@ -0,0 +1,23 @@
+import Rs from "@/core/services/RequestService"
+
+class categoryApi {
+  getNewsCategory = () => {
+    return this.getCategoryByType("N")
+  }
+
+  getActivityCategory = () => {
+    return this.getCategoryByType("A")
+  }
+
+  getHelpCategory = () => {
+    return this.getCategoryByType("H")
+  }
+
+  // 根据类型查询类别信息列表
+  getCategoryByType = (type: string) => {
+    return Rs.get({
+      url: "/system/category/list/" + type,
+    })
+  }
+}
+export default categoryApi

+ 3 - 3
UI/XYH.APP/src/api/system/index.ts

@@ -6,7 +6,7 @@ import org from "./_org"
 import notice from "./_notice"
 import post from "./_post"
 import dict from "./_dict"
-import alumnus from "./_alumnus"
+import Category from "./_category"
 
 export interface ISystemApi {
   menuApi: menu
@@ -17,7 +17,7 @@ export interface ISystemApi {
   noticeApi: notice
   postApi: post
   dictApi: dict
-  alumnusApi: alumnus
+  categoryApi: Category
 }
 
 export const apis: ISystemApi = {
@@ -29,7 +29,7 @@ export const apis: ISystemApi = {
   noticeApi: new notice(),
   postApi: new post(),
   dictApi: new dict(),
-  alumnusApi: new alumnus(),
+  categoryApi: new Category(),
 }
 
 export default apis

+ 1 - 1
UI/XYH.APP/src/components/chart/vb-chart.vue

@@ -27,7 +27,7 @@ const data = ref<any>(props.chartData)
 const boxStyle = computed(() => {
   const style: any = {}
   if (props.height) {
-    style.height = props.height + "px"
+    style.height = addUnit(props.height)
   }
   return style
 })

+ 3 - 2
UI/XYH.APP/src/components/vber/cell-group/vb-cell-group.vue

@@ -11,13 +11,14 @@ const props = withDefaults(
     mb?: boolean
     isTran?: boolean
     round?: boolean
-    class?: string
+    customClass?: string
     style?: string
   }>(),
   {
     title: "",
     mb: true,
     round: true,
+    customClass: "",
   }
 )
 
@@ -30,7 +31,7 @@ const groupStyle = computed(() => {
   return style
 })
 const groupClass = computed(() => {
-  let str = `${props.class}`
+  let str = `${props.customClass}`
   if (props.inset) {
     str += " vb-cell-group--inset"
   }

+ 120 - 0
UI/XYH.APP/src/components/vber/dropdown/vb-dropdown.vue

@@ -0,0 +1,120 @@
+<script setup lang="ts">
+const props = withDefaults(
+  defineProps<{
+    modelValue: string | number
+    active: boolean
+    options: Array[]
+    customClass?: string
+    customStyle?: object
+    emptyTitle?: string
+    titleColor?: string
+    activeTitleColor?: string
+    activeColor?: string
+    map?: { text: string; value: string | number }
+  }>(),
+  {
+    modelValue: "",
+    options: () => [],
+    customClass: "",
+    emptyTitle: "全部",
+    map: () => {
+      return { text: "text", value: "value" }
+    },
+  }
+)
+const emits = defineEmits<{
+  (e: "update:modelValue", v: string | number): void
+  (e: "change", v: string | number): void
+  (e: "click"): void
+}>()
+const { modelValue, active } = toRefs(props)
+const show = ref(false)
+
+const title = computed(() => {
+  if (!props.modelValue) {
+    return props.emptyTitle || ""
+  }
+  let str = ""
+  if (props.options.length > 0) {
+    let item = props.options.find((item) => item[props.map.value] == modelValue.value)
+    if (item) {
+      str = item[props.map.text]
+    }
+  }
+  return str
+})
+const dropdownClass = computed(() => {
+  let str = "vb-dropdown"
+  if (props.customClass) {
+    str += " " + props.customClass
+  }
+  if (active.value) {
+    str += " vb-dropdown--active"
+  }
+  return str
+})
+const dropdownStyle = computed(() => {
+  const style = Object.assign({}, props.customStyle || {})
+  return style
+})
+const titleStyle = computed(() => {
+  const style = {}
+  if (active.value && props.activeTitleColor) {
+    style.color = props.activeTitleColor
+  } else if (props.titleColor) {
+    style.color = props.titleColor
+  }
+  return style
+})
+
+const itemStyle = (item) => {
+  const style = {}
+  if (item[props.map.value] == modelValue.value && props.activeColor) {
+    style.color = props.activeColor
+  }
+  return style
+}
+
+function bindItemClick(item: any) {
+  const val = item[props.map.value]
+  if (val != modelValue.value) {
+    emits("update:modelValue", val)
+    emits("change", val)
+  }
+  show.value = false
+}
+
+function bindClick() {
+  emits("click")
+  show.value = !show.value
+}
+function close() {
+  show.value = false
+}
+defineExpose({ close })
+</script>
+<template>
+  <view :class="dropdownClass" :style="dropdownStyle">
+    <view
+      class="vb-dropdown__title"
+      :class="{ 'vb-dropdown__title--down': show }"
+      :style="titleStyle"
+      @click="bindClick"
+    >
+      {{ title }}
+    </view>
+    <view v-if="show" class="vb-dropdown__options">
+      <view
+        v-for="(item, index) in options"
+        class="vb-dropdown__option"
+        :class="{ active: item[props.map.value] === modelValue }"
+        @click="bindItemClick(item)"
+        :key="index"
+      >
+        <view slot="title" class="van-dropdown-item__title item-title-class" :style="itemStyle(item)">
+          {{ item[props.map.text] }}
+        </view>
+      </view>
+    </view>
+  </view>
+</template>

+ 4 - 4
UI/XYH.APP/src/components/vber/icon/vb-icon.vue

@@ -8,7 +8,7 @@ const props = withDefaults(
     color?: string
     size?: string | number
     iconPrefix?: string
-    class?: string
+    customClass?: string
     style?: string
   }>(),
   {
@@ -16,7 +16,7 @@ const props = withDefaults(
     size: "16px",
     dot: false,
     iconPrefix: "vb-icon",
-    class: "",
+    customClass: "",
   }
 )
 const emits = defineEmits<{ (e: "click", event: MouseEvent): void }>()
@@ -40,7 +40,7 @@ const badgePropsOpt = computed(() => {
 })
 
 const iconClass = computed(() => {
-  let str = `${props.class}`
+  let str = `${props.customClass}`
   if (badgePropsOpt) {
     str += " vb-badge__wrapper"
   }
@@ -56,7 +56,7 @@ const iconStyle = computed(() => {
     style.color = props.color
   }
   if (props.size) {
-    style.fontSize = `${props.size}${typeof props.size == "string" ? "" : "px"}`
+    style.fontSize = addUnit(props.size)
   }
 
   return style

+ 57 - 38
UI/XYH.APP/src/components/vber/list/vb-list.vue

@@ -3,41 +3,45 @@ const props = withDefaults(
   defineProps<{
     data?: any[]
     queryFun?: (query: any) => Promise<any>
-    queryParam?: any
+    queryParams?: any
     order?: string
     isAsc?: boolean
     pageSize?: number
     offset?: string | number
+    height?: number | string
     loadingText?: string
     finishedText?: string
     errorText?: string
     immediateCheck?: boolean
     initLoad?: boolean
-    immediateLoad?: boolean //深度监听 queryParam 的变化
+    immediateLoad?: boolean //深度监听 queryParams 的变化
     //direction?: "up" | "down"
     scroller?: Element
+    customClass: string
   }>(),
   {
     data: () => [],
     loading: false,
     error: false,
     finished: false,
-    offset: 300,
+    offset: "250px",
+    height: "600px",
     loadingText: "加载中...",
-    finishedText: "",
-    errorText: "",
+    finishedText: "没有更多数据了",
+    errorText: "服务器错误",
     immediateCheck: true,
     //direction: "up",
-    pageSize: 10,
+    pageSize: 5,
     isAsc: true,
     initLoad: true,
+    customClass: "",
   }
 )
 const emits = defineEmits<{
   (e: "scroll"): void
 }>()
 const id = `vb-list_${new Date().getTime()}${Math.floor(Math.random() * 100000)}`
-const { queryParam } = toRefs(props)
+const { queryParams } = toRefs(props)
 const scrollIntoId = ref("")
 const root = ref()
 const total = ref(0)
@@ -50,10 +54,11 @@ const isRemote = computed(() => {
   return props.queryFun && typeof props.queryFun === "function"
 })
 const isFinished = computed(() => {
-  return (
-    (isRemote.value && pageNum.value * pageSize.value >= total.value) ||
-    (!isRemote.value && pageNum.value * pageSize.value >= props.data.length)
-  )
+  if (isRemote.value) {
+    return remoteData.value.length >= total.value
+  } else {
+    return pageNum.value * pageSize.value >= props.data.length
+  }
 })
 const data = computed(() => {
   if (isRemote.value) {
@@ -63,10 +68,25 @@ const data = computed(() => {
     return props.data.slice(0, len - 1)
   }
 })
-
+const listClass = computed(() => {
+  let str = `vb-list`
+  if (props.customClass) {
+    str += " " + props.customClass
+  }
+  return str
+})
+const scrollStyle = computed(() => {
+  const style: any = {}
+  if (props.height) {
+    style.height = addUnit(props.height)
+  }
+  return style
+})
 function bindLoad() {
-  pageNum.value++
-  loadData()
+  if (!loading.value && !isFinished.value) {
+    pageNum.value++
+    loadData()
+  }
 }
 function bindScroll() {
   emits("scroll")
@@ -77,7 +97,7 @@ function loadData() {
     return
   }
   loading.value = true
-  const params = {
+  let params = {
     pageNum: pageNum.value,
     pageSize: pageSize.value,
   }
@@ -85,20 +105,18 @@ function loadData() {
     params.orderByColumn = order
     params.isAsc = props.isAsc ? "asc" : "desc"
   }
-  if (queryParam.value) {
-    params.query = queryParam.value
+  if (queryParams.value) {
+    params = Object.assign({}, params, queryParams.value)
   }
+  console.log("List-Params", params)
   props
     .queryFun(params)
     .then((res) => {
+      //console.log("LIST", res)
       loading.value = false
-      if (res.code === 200) {
-        remoteData.value = remoteData.value.concat(res.rows || res.data)
-        total.value = res.total
-        isError.value = false
-      } else {
-        isError.value = true
-      }
+      remoteData.value = remoteData.value.concat(res.rows || res.data)
+      total.value = res.total
+      isError.value = false
     })
     .catch(() => {
       loading.value = false
@@ -118,7 +136,7 @@ function search(isReset?) {
 }
 
 watch(
-  () => props.queryParam,
+  () => props.queryParams,
   () => {
     search()
   },
@@ -136,39 +154,40 @@ onLoad(init)
 defineExpose({ search })
 </script>
 <template>
-  <view class="vb-list" :id="id" ref="root">
+  <view :class="listClass" :id="id">
     <scroll-view
-      :scroll-y="true"
-      :upper-threshold="offset"
+      scroll-y="true"
       :lower-threshold="offset"
-      :scroll-into-view="scrollIntoId"
       :enable-back-to-top="false"
       :refresher-enabled="false"
       :enable-flex="false"
       @scrolltolower="bindLoad"
       @scroll="bindScroll"
+      :style="scrollStyle"
     >
-      <template v-for="(item, index) in data" :key="index">
-        <slot name="item" :item="item"></slot>
-      </template>
+      <view>
+        <template v-for="(item, index) in data" :key="index">
+          <slot name="item" :item="item"></slot>
+        </template>
+      </view>
       <template v-if="loading">
         <slot v-if="$slots.loading" name="loading" />
         <view v-else class="vb-list--loading">
           <vb-loading :loadingText="loadingText" :showText="true"></vb-loading>
         </view>
       </template>
-      <template v-if="isFinished">
+      <view class="vb-list__finished" v-if="!loading && isFinished">
         <slot v-if="$slots.finished" name="finished" />
-        <view v-else-if="finishedText" class="vb-list--finished">
+        <view v-else-if="finishedText" class="vb-list__finished-text">
           {{ finishedText }}
         </view>
-      </template>
-      <template v-if="isError">
+      </view>
+      <view class="vb-list__error" v-if="!loading && isError">
         <slot v-if="$slots.error" name="error" />
-        <view v-else-if="errorText" class="vb-list--error">
+        <view v-else-if="errorText" class="vb-list__error-text">
           {{ errorText }}
         </view>
-      </template>
+      </view>
     </scroll-view>
   </view>
 </template>

+ 5 - 5
UI/XYH.APP/src/components/vber/loading/vb-loading.vue

@@ -35,7 +35,7 @@ const iconStyle = computed(() => {
     style.color = props.color
   }
   if (props.size) {
-    const size = typeof props.size === "number" ? props.size + "px" : props.size
+    const size = addUnit(props.size)
     style.width = size
     style.height = size
   }
@@ -61,10 +61,10 @@ const textStyle = computed(() => {
         <slot name="icon"></slot>
       </template>
       <template v-else>
-        <svg v-if="props.type == 'circular'" class="vb-loading__circular" viewBox="25 25 50 50">
+        <!-- <svg v-if="props.type == 'circular'" class="vb-loading__circular" viewBox="25 25 50 50">
           <circle cx="50" cy="50" r="20" fill="none"></circle>
-        </svg>
-        <template v-else-if="props.type == 'spinner'">
+        </svg> -->
+        <template v-if="props.type == 'spinner'">
           <i class="vb-loading__line vb-loading__line--1"></i>
           <i class="vb-loading__line vb-loading__line--2"></i>
           <i class="vb-loading__line vb-loading__line--3"></i>
@@ -79,7 +79,7 @@ const textStyle = computed(() => {
           <i class="vb-loading__line vb-loading__line--12"></i>
         </template>
       </template>
-      <text v-if="showText && text" class="vb-loading__text" :style="textStyle">{{ text }}</text>
     </view>
+    <view v-if="showText" class="vb-loading__text" :style="textStyle">{{ text }}</view>
   </view>
 </template>

+ 1 - 1
UI/XYH.APP/src/components/vber/picker-m/vb-picker-m.vue

@@ -87,7 +87,7 @@ const _popupTitle = computed(() => {
 const popupStyle = computed(() => {
   const style: any = {}
   if (props.height) {
-    style.height = typeof props.height == "string" ? props.height : props.height + "px"
+    style.height = addUnit(props.height)
   }
   return style
 })

+ 1 - 1
UI/XYH.APP/src/components/vber/progress/vb-progress.vue

@@ -22,7 +22,7 @@ const props = withDefaults(
 const progressStyle = computed(() => {
   const style: any = {}
   if (props.height) {
-    style.height = Number(props.height) ? props.height + "px" : props.height
+    style.height = addUnit(props.height)
   }
   return style
 })

+ 23 - 10
UI/XYH.APP/src/core/services/RequestService.ts

@@ -20,8 +20,8 @@ const defaultOption = {
   errorAlert: true,
   needProcess: true,
   header: {},
+  retryCount: 0,
 }
-
 function beforeRequest(config: any) {
   config = Object.assign({}, defaultOption, config || {})
   if (!config.url) {
@@ -57,6 +57,7 @@ function handleResponse(result: any, config: any, resolve: (v: any) => void, rej
     resolve(result)
     return
   }
+  //console.log("RS", result)
   const code = result.code || 200
   if (code == 200) {
     if (config.successAlert) {
@@ -66,18 +67,30 @@ function handleResponse(result: any, config: any, resolve: (v: any) => void, rej
         msgUtil.msgSuccess((config.method = "put" ? "修改成功" : (config.method = "delete" ? "删除成功" : "操作成功")))
       }
     }
-    resolve(result.data)
+    if (result.rows != undefined && result.total != undefined) {
+      resolve({ total: result.total, rows: result.rows })
+    } else {
+      resolve(result.data)
+    }
   } else {
     let msg = errorCode[code] || result.msg || errorCode["default"]
     if (code === 401) {
-      msgUtil.confirm("登录状态已过期,您可以继续留在该页面,或者重新登录?").then((res: any) => {
-        if (res.confirm) {
-          appStore.authStore.logout().then(() => {
-            route.reLaunch("login")
-          })
-        }
-      })
-      reject("无效的会话,请重新登录。")
+      if (config.retryCount < 2) {
+        config.retryCount++
+        console.log("RS Retry", config.retryCount)
+        appStore.authStore.xcxLogin().then(() => {
+          request(config).then(resolve).catch(reject)
+        })
+      } else {
+        msgUtil.confirm("登录状态已过期,您可以继续留在该页面,或者重新登录?").then((res: any) => {
+          if (res.confirm) {
+            appStore.authStore.logout().then(() => {
+              route.reLaunch("login")
+            })
+          }
+        })
+        reject("无效的会话,请重新登录。")
+      }
     }
     if (config.errorAlert) {
       msgUtil.msgError(msg)

+ 7 - 0
UI/XYH.APP/src/core/utils/index.ts

@@ -40,3 +40,10 @@ export function convertStyle(str: string) {
   }, {})
   return obj
 }
+
+export function addUnit(value: string | number) {
+  if (value == null || value == "") {
+    return undefined
+  }
+  return /^-?\d+(\.\d+)?$/.test("" + value) ? value + "px" : value
+}

+ 28 - 0
UI/XYH.APP/src/pages-sub/activity/detail.vue

@@ -0,0 +1,28 @@
+<template>
+  <view class="page-container">
+    活动详情
+    <view>{{ data.title }}</view>
+  </view>
+</template>
+
+<script lang="ts" setup>
+import apis from "@/api"
+import route from "@/route"
+
+const data = ref<any>({})
+const params = route.getRouteParams("alumnusActivity")
+
+function loadData(id: string) {
+  console.log("加载活动信息", id)
+  // 加载活动信息
+  if (id) {
+    apis.amActivity.activityApi.getActivity(id).then((res) => {
+      data.value = res
+      console.log("加载活动信息成功", res)
+    })
+  }
+}
+loadData(params.id)
+</script>
+
+<style scoped></style>

+ 100 - 0
UI/XYH.APP/src/pages-sub/alumnus/detail.vue

@@ -0,0 +1,100 @@
+<template>
+  <view class="page-container">
+    <view class="h-40px">1</view>
+    <vb-list :query-fun="apis.amActivity.activityApi.listActivity" :query-params="queryParams">
+      <template #item="{ item }">
+        <vb-cell-group custom-class="">
+          <view class="flex-column p-15 pos-r" @click="onClick(item)">
+            <view
+              class="pos-a px-8 py-3 fs-12 text-white"
+              :class="getStatusClass(item)"
+              style="top: 0; right: 0; border-radius: 0 0 0 var(--vb-cell-group-radius); opacity: 0.5"
+            >
+              {{ getStatus(item) }}
+            </view>
+
+            <view class="pb-5 pt-2 fs-20 font-bold">{{ item.title }}</view>
+            <view class="py-5 ps-5">
+              <view class="text-gray-5">
+                <vb-icon name="home" :size="22" custom-class="text-gray-5"></vb-icon>
+                {{ item.isSys ? "平台发布" : item.createdBy }}
+              </view>
+            </view>
+            <view class="d-flex py-5">
+              <view class="text-gray-8 w-100 me-10 text-indent">
+                {{ getContent(item) }}
+              </view>
+              <view v-if="item.images" class="w-150px h-80px">
+                <image class="w-100 h-100 br-8" :src="getImage(item)" :lazy-load="true" mode="aspectFill"></image>
+              </view>
+            </view>
+            <view class="pt-5 pb-2 d-flex">
+              <view class="text-vb pe-10">{{ item.categoryName }}</view>
+              <view class="px-5 text-gray-5">
+                <vb-icon name="calendar" :size="22" custom-class="text-gray-5"></vb-icon>
+                {{ formatDate(item.activityDate, "YYYY-MM-DD ddd") }}
+              </view>
+              <view class="px-5"></view>
+            </view>
+          </view>
+        </vb-cell-group>
+      </template>
+    </vb-list>
+  </view>
+</template>
+
+<script lang="ts" setup>
+import apis from "@/api"
+import route from "@/route"
+import configs from "@/core/config"
+import dayjs from "dayjs"
+// import relativeTime from "dayjs/plugin/relativeTime" // 导入插件
+import "dayjs/locale/zh-cn" // 导入本地化语言
+// dayjs.extend(relativeTime) // 使用插件
+dayjs.locale("zh-cn") // 使用本地化语言
+const queryParams = ref({
+  auditStatus: 1,
+})
+const isShowDetail = ref(true)
+function getContent(item: any) {
+  if (item.content) {
+    return item.content.length > 55 ? item.content.replace(/<[^>]+>/g, "").substring(0, 55) + "..." : item.content
+  }
+  return ""
+}
+function getImage(item: any) {
+  if (item.images) {
+    const arr = item.images.split(",")
+    return `${configs.baseUrl}/oss/preview/${arr[0]}`
+  }
+  return ""
+}
+function formatDate(date: any, format = "YYYY-MM-DD") {
+  return dayjs(date).format(format)
+}
+
+function getStatusClass(item) {
+  if (item.close == "1" || dayjs(item.expiryDate).isBefore(new Date())) {
+    return "bg-danger"
+  }
+  if (item.auditStatus == "1") {
+    return "bg-vb"
+  }
+  return ""
+}
+function getStatus(item) {
+  if (item.close == "1" || dayjs(item.expiryDate).isBefore(new Date())) {
+    return "已结束"
+  }
+  if (item.auditStatus == "1") {
+    return "互助中"
+  }
+  return ""
+}
+
+function onClick(item: any) {
+  route.navigate("activityDetail", { id: item.activityId })
+}
+</script>
+
+<style scoped></style>

+ 28 - 0
UI/XYH.APP/src/pages-sub/help/detail.vue

@@ -0,0 +1,28 @@
+<template>
+  <view class="page-container">
+    互助详情
+    <view>{{ data.title }}</view>
+  </view>
+</template>
+
+<script lang="ts" setup>
+import apis from "@/api"
+import route from "@/route"
+
+const data = ref<any>({})
+const params = route.getRouteParams("alumnusActivity")
+
+function loadData(id: string) {
+  console.log("加载互助信息", id)
+  // 加载互助信息
+  if (id) {
+    apis.amActivity.helpApi.getHelp(id).then((res) => {
+      data.value = res
+      console.log("加载互助信息成功", res)
+    })
+  }
+}
+loadData(params.id)
+</script>
+
+<style scoped></style>

+ 0 - 0
UI/XYH.APP/src/pages/mine/about/index.vue → UI/XYH.APP/src/pages-sub/mine/about.vue


+ 0 - 0
UI/XYH.APP/src/pages/mine/help/index.vue → UI/XYH.APP/src/pages-sub/mine/help.vue


+ 0 - 0
UI/XYH.APP/src/pages/mine/info/edit.vue → UI/XYH.APP/src/pages-sub/mine/info/edit.vue


+ 0 - 0
UI/XYH.APP/src/pages/mine/info/index.vue → UI/XYH.APP/src/pages-sub/mine/info/index.vue


+ 0 - 0
UI/XYH.APP/src/pages/mine/info/profile.vue → UI/XYH.APP/src/pages-sub/mine/info/profile.vue


+ 0 - 0
UI/XYH.APP/src/pages/mine/setting/privacy.vue → UI/XYH.APP/src/pages-sub/mine/privacy.vue


+ 0 - 0
UI/XYH.APP/src/pages/mine/profile/avatar.vue → UI/XYH.APP/src/pages-sub/mine/profile/avatar.vue


+ 0 - 0
UI/XYH.APP/src/pages/mine/profile/edit.vue → UI/XYH.APP/src/pages-sub/mine/profile/edit.vue


+ 0 - 0
UI/XYH.APP/src/pages/mine/pwd/index.vue → UI/XYH.APP/src/pages-sub/mine/pwd.vue


+ 0 - 0
UI/XYH.APP/src/pages/mine/setting/index.vue → UI/XYH.APP/src/pages-sub/mine/setting.vue


+ 54 - 39
UI/XYH.APP/src/pages.json

@@ -33,37 +33,12 @@
         "navigationBarTitleText": "首页"
       }
     },
-    {
-      "path": "pages/work/index",
-      "style": {
-        "navigationBarTitleText": "工作台"
-      }
-    },
     {
       "path": "pages/mine/index",
       "style": {
         "navigationBarTitleText": "个人中心"
       }
     },
-    {
-      "path": "pages/mine/pwd/index",
-      "style": {
-        "navigationBarTitleText": "修改密码"
-      }
-    },
-
-    {
-      "path": "pages/mine/help/index",
-      "style": {
-        "navigationBarTitleText": "常见问题"
-      }
-    },
-    {
-      "path": "pages/mine/about/index",
-      "style": {
-        "navigationBarTitleText": "关于我们"
-      }
-    },
     {
       "path": "pages/common/webview/index",
       "style": {
@@ -103,53 +78,93 @@
     {
       "path": "pages/help/index",
       "style": {
-        "navigationBarTitleText": "新闻资讯"
+        "navigationBarTitleText": "校友互助"
       }
     },
     {
       "path": "pages/news/index",
       "style": {
-        "navigationBarTitleText": "校友互助"
+        "navigationBarTitleText": "新闻资讯"
       }
     }
   ],
   "subPackages": [
     {
-      "root": "pages/mine/profile",
+      "root": "pages-sub/mine",
       "pages": [
         {
-          "path": "edit",
+          "path": "profile/edit",
           "style": {
             "navigationBarTitleText": "完善个人信息"
           }
         },
         {
-          "path": "index",
+          "path": "profile/avatar",
           "style": {
-            "navigationBarTitleText": "个人信息"
+            "navigationBarTitleText": "上传头像"
           }
         },
         {
-          "path": "avatar",
+          "path": "setting",
           "style": {
-            "navigationBarTitleText": "上传头像"
+            "navigationBarTitleText": "应用设置"
+          }
+        },
+        {
+          "path": "privacy",
+          "style": {
+            "navigationBarTitleText": "隐私设置"
+          }
+        },
+        {
+          "path": "pwd",
+          "style": {
+            "navigationBarTitleText": "修改密码"
+          }
+        },
+        {
+          "path": "about",
+          "style": {
+            "navigationBarTitleText": "关于我们"
+          }
+        },
+        {
+          "path": "help",
+          "style": {
+            "navigationBarTitleText": "常见问题"
           }
         }
       ]
     },
     {
-      "root": "pages/mine/setting",
+      "root": "pages-sub/alumnus",
       "pages": [
         {
-          "path": "index",
+          "path": "detail",
           "style": {
-            "navigationBarTitleText": "应用设置"
+            "navigationBarTitleText": "校友主页"
           }
-        },
+        }
+      ]
+    },
+    {
+      "root": "pages-sub/activity",
+      "pages": [
         {
-          "path": "privacy",
+          "path": "detail",
           "style": {
-            "navigationBarTitleText": "隐私设置"
+            "navigationBarTitleText": "活动详情"
+          }
+        }
+      ]
+    },
+    {
+      "root": "pages-sub/help",
+      "pages": [
+        {
+          "path": "detail",
+          "style": {
+            "navigationBarTitleText": "互助详情"
           }
         }
       ]

+ 19 - 19
UI/XYH.APP/src/pages/account/login.vue

@@ -78,25 +78,25 @@ function handleForgetPwd() {
 getCode()
 loginForm.openid = appStore.authStore.getOpenId()
 
-// onLoad(() => {
-//   appStore.authStore
-//     .xcxLogin()
-//     .then((res: boolean) => {
-//       if (res) {
-//         store.getInfo().then(() => {
-//           route.reLaunch("index")
-//         })
-//       } else {
-//         getCode()
-//         loginForm.openid = appStore.authStore.getOpenId()
-//         message.msgSuccess("获取到openid: " + loginForm.openid)
-//       }
-//     })
-//     .catch((err: any) => {
-//       message.error(err)
-//       getCode()
-//     })
-// })
+onLoad(() => {
+  appStore.authStore
+    .xcxLogin()
+    .then((res: boolean) => {
+      if (res) {
+        store.getInfo().then(() => {
+          route.reLaunch("index")
+        })
+      } else {
+        getCode()
+        loginForm.openid = appStore.authStore.getOpenId()
+        //message.msgSuccess("获取到openid: " + loginForm.openid)
+      }
+    })
+    .catch((err: any) => {
+      message.error(err)
+      getCode()
+    })
+})
 </script>
 <template>
   <view class="normal-login-container">

+ 206 - 2
UI/XYH.APP/src/pages/activity/index.vue

@@ -1,8 +1,212 @@
 <template>
-  <div class="index">index</div>
+  <view class="">
+    <view class="bg-white px-15 pt-15" :style="{ height: topHeight + 'px' }">
+      <view class="d-flex align-center">
+        <input
+          class="w-100 px-20 h-40px br-30 me-10"
+          type="text"
+          placeholder="搜索校友活动标题"
+          v-model="searchTitle"
+          style="background: #f2f2f2"
+          confirm-type="search"
+          adjust-position="false"
+          auto-blur="true"
+          @confirm="onSearch"
+        />
+        <vb-button class="w-25" round icon="flow-mark">发布</vb-button>
+      </view>
+      <view class="d-flex h-30px mt-10 pb-5 align-center">
+        <vb-dropdown
+          ref="dropdownRef"
+          v-model="searchCategory"
+          :active="activeCategoryIndex == '0'"
+          empty-title="全部分类"
+          :options="categoryColumns"
+          :map="{ text: 'categoryName', value: 'categoryId' }"
+          @click="onCategoryClick(0)"
+          @change="changeCategory"
+          custom-class="px-8"
+        ></vb-dropdown>
+
+        <template v-for="(v, i) in categoryTabList" :key="i">
+          <view class="text-gray-4">|</view>
+          <view
+            class="px-5"
+            :class="{ 'text-vb font-bold': activeCategoryIndex == i + 1 }"
+            @click="onCategoryClick(i + 1, v.value)"
+          >
+            {{ v.text }}
+          </view>
+        </template>
+      </view>
+    </view>
+    <vb-list
+      custom-class="mx-15 pt-15"
+      :query-fun="apis.amActivity.activityApi.listActivity"
+      :query-params="queryParams"
+      :height="listHeight"
+    >
+      <template #item="{ item }">
+        <vb-cell-group custom-class="">
+          <view class="flex-column p-15 pos-r" @click="onClick(item)">
+            <view
+              class="pos-a px-8 py-3 fs-12 text-white"
+              :class="getStatusClass(item)"
+              style="top: 0; right: 0; border-radius: 0 0 0 var(--vb-cell-group-radius)"
+            >
+              {{ getStatus(item) }}
+            </view>
+
+            <view class="pb-5 pt-2 fs-20 font-bold">{{ item.title }}</view>
+            <view class="py-5 ps-5">
+              <view class="text-gray-5">
+                <vb-icon name="home" :size="22" custom-class="text-gray-5"></vb-icon>
+                {{ item.isSys ? "平台发布" : item.createdBy }}
+              </view>
+            </view>
+            <view class="d-flex py-5">
+              <view class="text-gray-8 w-100 me-10 text-indent">
+                {{ getContent(item) }}
+              </view>
+              <view v-if="item.images" class="w-150px h-80px">
+                <image class="w-100 h-100 br-8" :src="getImage(item)" :lazy-load="true" mode="aspectFill"></image>
+              </view>
+            </view>
+            <view class="pt-5 pb-2 d-flex">
+              <view class="text-vb pe-10">{{ item.categoryName }}</view>
+              <view class="px-5 text-gray-5">
+                <vb-icon name="calendar" :size="22" custom-class="text-gray-5"></vb-icon>
+                {{ formatDate(item.activityDate, "YYYY-MM-DD ddd") }}
+              </view>
+              <view class="px-5"></view>
+            </view>
+          </view>
+        </vb-cell-group>
+      </template>
+    </vb-list>
+  </view>
 </template>
 
 <script lang="ts" setup>
+import apis from "@/api"
+import route from "@/route"
+import configs from "@/core/config"
+import dayjs from "dayjs"
+// import relativeTime from "dayjs/plugin/relativeTime" // 导入插件
+import "dayjs/locale/zh-cn" // 导入本地化语言
+// dayjs.extend(relativeTime) // 使用插件
+dayjs.locale("zh-cn") // 使用本地化语言
+
+const wHeight = uni.getWindowInfo().windowHeight
+const topHeight = ref(95)
+const listHeight = computed(() => {
+  return wHeight - topHeight.value - 15
+})
+const dropdownRef = ref()
+const searchTitle = ref("")
+const searchCategory = ref("")
+const searchType = ref("")
+const queryParams = ref({
+  title: "",
+  auditStatus: 1,
+})
+const activeCategoryIndex = ref(0)
+const categoryColumns = ref([])
+const categoryTabList = computed(() => {
+  const arr = []
+  arr.push({ text: "最新", value: "new" })
+  arr.push({ text: "最热", value: "hot" })
+  arr.push({ text: "最近一周", value: "week" })
+  arr.push({ text: "最近一月", value: "month" })
+  arr.push({ text: "全部", value: "" })
+  return arr
+})
+function getContent(item: any) {
+  if (item.content) {
+    return item.content.length > 55 ? item.content.replace(/<[^>]+>/g, "").substring(0, 55) + "..." : item.content
+  }
+  return ""
+}
+function getImage(item: any) {
+  if (item.images) {
+    const arr = item.images.split(",")
+    return `${configs.baseUrl}/oss/preview/${arr[0]}`
+  }
+  return ""
+}
+function formatDate(date: any, format = "YYYY-MM-DD") {
+  return dayjs(date).format(format)
+}
+
+function getStatusClass(item) {
+  if (item.close == "1") {
+    return "bg-danger"
+  }
+  if (dayjs(item.expiryDate).isBefore(new Date())) {
+    return "bg-warning"
+  }
+  if (item.auditStatus == "1") {
+    return "bg-vb"
+  }
+  return ""
+}
+function getStatus(item) {
+  if (item.close == "1") {
+    return "已结束"
+  }
+  if (dayjs(item.expiryDate).isBefore(new Date())) {
+    return "已过期"
+  }
+  if (item.auditStatus == "1") {
+    return "报名中"
+  }
+  return ""
+}
+
+function onClick(item: any) {
+  route.navigate("activityDetail", { id: item.activityId })
+}
+
+function onCategoryClick(index, type) {
+  activeCategoryIndex.value = index
+  if (index != 0) {
+    searchCategory.value = ""
+    dropdownRef.value?.close()
+    searchType.value = type
+  } else {
+    searchType.value = ""
+  }
+
+  search()
+}
+
+function changeCategory(e) {
+  search()
+}
+
+function onSearch() {
+  //console.log("SEARCH", searchTitle.value)
+  search()
+}
+
+function search() {
+  const params = {
+    auditStatus: 1,
+  }
+  params.title = searchTitle.value || ""
+  params.category = searchCategory.value || ""
+  queryParams.value = params
+}
+
+function loadCategory() {
+  apis.system.categoryApi.getActivityCategory().then((res) => {
+    categoryColumns.value = [{ categoryName: "全部分类", categoryId: "" }, ...res]
+  })
+}
+function init() {
+  loadCategory()
+}
+onLoad(init)
 </script>
 
-<style scoped></style>
+<style scoped></style>

+ 44 - 24
UI/XYH.APP/src/pages/alumnus/index.vue

@@ -1,12 +1,27 @@
 <template>
   <view class="page-container">
     <view class="h-40px">1</view>
-    <vb-list :query-fun="apis.system.alumnusApi.listAlumnus" :query-params="queryParams">
+    <vb-list :query-fun="apis.amActivity.alumnusApi.listAlumnus" :query-params="queryParams" :page-size="10">
       <template #item="{ item }">
         <vb-cell-group>
-          <view class="am-book d-flex p-10">
-            <view class="avatar px-5" :class="{ man: item.gender == '0', woman: item.gender == '1' }">
-              <view class="w-70px h-70px br-round bg-gray-3"></view>
+          <view class="am-book d-flex p-10" @click="onClick(item)">
+            <view class="avatar px-5">
+              <view class="w-70px h-70px br-round bg-gray-3 pos-r">
+                <view
+                  class="w-20px h-20px m-auto br-round d-flex flex-center pos-a"
+                  :class="{ 'bg-blue': item.gender == '0', 'bg-pink': item.gender == '1' }"
+                  style="top: 0px; right: 0px"
+                >
+                  <i
+                    class="iconfont fs-13 text-white"
+                    :class="{
+                      'icon-gender-male': item.gender == '0',
+                      'icon-gender-female': item.gender == '1',
+                    }"
+                  ></i>
+                </view>
+                <image class="w-100 h-100 br-round" :src="getAvatar(item)"></image>
+              </view>
             </view>
             <view class="am-info w-100 px-10 flex-column justify-around" style="">
               <view class="am-name d-flex align-baseline pb-3">
@@ -18,21 +33,23 @@
                 </text>
               </view>
               <view v-if="isShowDetail" class="flex-column text-gray-6 fs-14">
-                <view v-if="item.workUnit" class="pt-5">{{ item.workUnit }}</view>
+                <view v-if="item.workUnit" class="pt-5">
+                  {{ item.workUnit }}
+                  <text v-if="item.position">
+                    <text class="px-5">-</text>
+                    {{ item.position }}
+                  </text>
+                </view>
                 <view class="pt-5">
                   <text v-if="item.industry">{{ item.industry }}</text>
                   <text v-if="item.industryArea">
                     <text class="px-5">-</text>
                     {{ item.industryArea }}
                   </text>
-                  <text v-if="item.position">
-                    <text class="px-5">-</text>
-                    {{ item.position }}
-                  </text>
                 </view>
               </view>
               <view class="am-action pt-5">
-                <view class="text-gray-5 fs-14">{{ getLastLogin(item) }} 活跃</view>
+                <view class="text-gray-5 fs-14" v-if="item.loginDate">{{ getLastLogin(item) }} 活跃</view>
               </view>
             </view>
           </view>
@@ -44,21 +61,24 @@
 
 <script lang="ts" setup>
 import apis from "@/api"
-
-const queryParams = ref({})
+import route from "@/route"
+import configs from "@/core/config"
+import dayjs from "dayjs"
+import relativeTime from "dayjs/plugin/relativeTime" // 导入插件
+import "dayjs/locale/zh-cn" // 导入本地化语言
+dayjs.extend(relativeTime) // 使用插件
+dayjs.locale("zh-cn") // 使用本地化语言
+const queryParams = ref({
+  auditStatus: 1,
+})
 const isShowDetail = ref(true)
+function getAvatar(item: any) {
+  return item.avatar ? configs.baseUrl + item.avatar : `/static/images/avatars/default${item.gender}.png`
+}
 function getLastLogin(item: any) {
-  return "一周前"
+  return dayjs(item.loginDate).fromNow()
 }
-</script>
-
-<style lang="scss" scoped>
-.am-book {
-  .avatar {
-    &.man {
-    }
-    &.woman {
-    }
-  }
+function onClick(item: any) {
+  route.navigate("alumnusDetail", { id: item.amId, userId: item.userId })
 }
-</style>
+</script>

+ 206 - 2
UI/XYH.APP/src/pages/help/index.vue

@@ -1,8 +1,212 @@
 <template>
-  <div class="index">index</div>
+  <view>
+    <view class="bg-white px-15 pt-15" :style="{ height: topHeight + 'px' }">
+      <view class="d-flex align-center">
+        <input
+          class="w-100 px-20 h-40px br-30 me-10"
+          type="text"
+          placeholder="搜索校友互助标题"
+          v-model="searchTitle"
+          style="background: #f2f2f2"
+          confirm-type="search"
+          adjust-position="false"
+          auto-blur="true"
+          @confirm="onSearch"
+        />
+        <vb-button class="w-25" round icon="flow-mark">发布</vb-button>
+      </view>
+      <view class="d-flex h-30px mt-10 pb-5 align-center">
+        <vb-dropdown
+          ref="dropdownRef"
+          v-model="searchCategory"
+          :active="activeCategoryIndex == '0'"
+          empty-title="全部分类"
+          :options="categoryColumns"
+          :map="{ text: 'categoryName', value: 'categoryId' }"
+          @click="onCategoryClick(0)"
+          @change="changeCategory"
+          custom-class="px-8"
+        ></vb-dropdown>
+
+        <template v-for="(v, i) in categoryTabList" :key="i">
+          <view class="text-gray-4">|</view>
+          <view
+            class="px-5"
+            :class="{ 'text-vb font-bold': activeCategoryIndex == i + 1 }"
+            @click="onCategoryClick(i + 1, v.value)"
+          >
+            {{ v.text }}
+          </view>
+        </template>
+      </view>
+    </view>
+    <vb-list
+      custom-class="mx-15 pt-15"
+      :query-fun="apis.amActivity.helpApi.listHelp"
+      :query-params="queryParams"
+      :height="listHeight"
+    >
+      <template #item="{ item }">
+        <vb-cell-group custom-class="">
+          <view class="flex-column p-15 pos-r" @click="onClick(item)">
+            <view
+              class="pos-a px-8 py-3 fs-12 text-white"
+              :class="getStatusClass(item)"
+              style="top: 0; right: 0; border-radius: 0 0 0 var(--vb-cell-group-radius); opacity: 0.8"
+            >
+              {{ getStatus(item) }}
+            </view>
+
+            <view class="pb-5 pt-2 fs-20 font-bold">{{ item.title }}</view>
+            <view class="py-5 ps-5">
+              <view class="text-gray-5">
+                <vb-icon name="home" :size="22" custom-class="text-gray-5"></vb-icon>
+                {{ item.isSys ? "平台发布" : item.createdBy }}
+              </view>
+            </view>
+            <view class="d-flex py-5">
+              <view class="text-gray-8 w-100 me-10 text-indent">
+                {{ getContent(item) }}
+              </view>
+              <view v-if="item.images" class="w-150px h-80px">
+                <image class="w-100 h-100 br-8" :src="getImage(item)" :lazy-load="true" mode="aspectFill"></image>
+              </view>
+            </view>
+            <view class="pt-5 pb-2 d-flex">
+              <view class="text-vb pe-10">{{ item.categoryName }}</view>
+              <view class="px-5 text-gray-5">
+                <vb-icon name="calendar" :size="22" custom-class="text-gray-5"></vb-icon>
+                {{ formatDate(item.activityDate, "YYYY-MM-DD ddd") }}
+              </view>
+              <view class="px-5"></view>
+            </view>
+          </view>
+        </vb-cell-group>
+      </template>
+    </vb-list>
+  </view>
 </template>
 
 <script lang="ts" setup>
+import apis from "@/api"
+import route from "@/route"
+import configs from "@/core/config"
+import dayjs from "dayjs"
+// import relativeTime from "dayjs/plugin/relativeTime" // 导入插件
+import "dayjs/locale/zh-cn" // 导入本地化语言
+// dayjs.extend(relativeTime) // 使用插件
+dayjs.locale("zh-cn") // 使用本地化语言
+const wHeight = uni.getWindowInfo().windowHeight
+const topHeight = ref(95)
+const listHeight = computed(() => {
+  return wHeight - topHeight.value - 15
+})
+const dropdownRef = ref()
+const searchTitle = ref("")
+const searchCategory = ref("")
+const searchCategory2 = ref("")
+const queryParams = ref({
+  title: "",
+  auditStatus: 1,
+})
+const activeCategoryIndex = ref(0)
+const categoryColumns = ref([])
+const categoryTabList = computed(() => {
+  const arr = []
+  arr.push({ text: "创业", value: "50" })
+  arr.push({ text: "资源", value: "51" })
+  arr.push({ text: "求职", value: "52" })
+  arr.push({ text: "供需", value: "54" })
+  arr.push({ text: "商务", value: "55" })
+  arr.push({ text: "全部", value: "" })
+  return arr
+})
+function getContent(item: any) {
+  if (item.content) {
+    return item.content.length > 55 ? item.content.replace(/<[^>]+>/g, "").substring(0, 55) + "..." : item.content
+  }
+  return ""
+}
+function getImage(item: any) {
+  if (item.images) {
+    const arr = item.images.split(",")
+    return `${configs.baseUrl}/oss/preview/${arr[0]}`
+  }
+  return ""
+}
+function formatDate(date: any, format = "YYYY-MM-DD") {
+  return dayjs(date).format(format)
+}
+
+function getStatusClass(item) {
+  if (item.close == "1") {
+    return "bg-danger"
+  }
+  if (dayjs(item.expiryDate).isBefore(new Date())) {
+    return "bg-warning"
+  }
+  if (item.auditStatus == "1") {
+    return "bg-vb"
+  }
+  return ""
+}
+function getStatus(item) {
+  if (item.close == "1") {
+    return "已结束"
+  }
+  if (dayjs(item.expiryDate).isBefore(new Date())) {
+    return "已过期"
+  }
+  if (item.auditStatus == "1") {
+    return "互助中"
+  }
+  return ""
+}
+
+function onClick(item: any) {
+  route.navigate("helpDetail", { id: item.helpId })
+}
+
+function onCategoryClick(index, categoryId) {
+  activeCategoryIndex.value = index
+  if (index != 0) {
+    searchCategory.value = ""
+    dropdownRef.value?.close()
+    searchCategory2.value = categoryId
+  } else {
+    searchCategory2.value = ""
+  }
+
+  search()
+}
+
+function changeCategory(e) {
+  search()
+}
+
+function onSearch() {
+  //console.log("SEARCH", searchTitle.value)
+  search()
+}
+
+function search() {
+  const params = {
+    auditStatus: 1,
+    title: searchTitle.value,
+    category: searchCategory.value || searchCategory2.value || "",
+  }
+  queryParams.value = params
+}
+
+function loadCategory() {
+  apis.system.categoryApi.getHelpCategory().then((res) => {
+    categoryColumns.value = [{ categoryName: "全部分类", categoryId: "" }, ...res]
+  })
+}
+function init() {
+  loadCategory()
+}
+onLoad(init)
 </script>
 
-<style scoped></style>
+<style scoped></style>

+ 1 - 3
UI/XYH.APP/src/pages/index/index.vue

@@ -12,9 +12,7 @@ import route from "@/route"
 import appStore from "@/stores"
 import apis from "@/api"
 
-const title = ref(
-  appStore.amProfileStore.getProfileInfo().orgName ? appStore.amProfileStore.getProfileInfo().orgName : "盐城中学校友会"
-)
+const title = ref(appStore.authStore.getUser()?.orgName ? appStore.authStore.getUser()?.orgName : "盐城中学校友会")
 onLoad(() => {
   if (appStore.authStore.getAuditStatus() != 1) {
     console.log("未审核校友跳转掉信息编辑页面")

+ 1 - 1
UI/XYH.APP/src/pages/index/welcome.vue

@@ -12,7 +12,7 @@ import route from "@/route"
 import appStore from "@/stores"
 
 const title = computed(() =>
-  appStore.authStore.getUser().orgName ? appStore.authStore.getUser().orgName : "盐城中学校友会"
+  appStore.authStore.getUser()?.orgName ? appStore.authStore.getUser().orgName : "盐城中学校友会"
 )
 onLoad(() => {
   if (!appStore.authStore.isAuthenticated) {

+ 0 - 8
UI/XYH.APP/src/pages/mine/profile/index.vue

@@ -1,8 +0,0 @@
-<template>
-  <div class="index">index</div>
-</template>
-
-<script lang="ts" setup>
-</script>
-
-<style scoped></style>

+ 15 - 21
UI/XYH.APP/src/route/_pages.ts

@@ -1,14 +1,3 @@
-const work = {
-  work: "/pages/work/index",
-}
-
-const mine = {
-  mine: "/pages/mine/index",
-  mineInfo: "/pages/mine/profile/index",
-  pwd: "/pages/mine/pwd/index",
-  question: "/pages/mine/help/index",
-  about: "/pages/mine/about/index",
-}
 // 主包
 const mainPackage = {
   login: "/pages/account/login",
@@ -17,23 +6,28 @@ const mainPackage = {
   systemLogin: "/pages/account/systemLogin",
   index: "/pages/index/index",
   welcome: "/pages/index/welcome",
-  ...work,
-  ...mine,
+  mine: "/pages/mine/index",
   webview: "/pages/common/webview/index",
   textview: "/pages/common/textview/index",
 }
 // 分包
-const profile = {
-  profileEdit: "/pages/mine/profile/edit",
-  avatar: "/pages/mine/profile/avatar",
+const mineSub = {
+  profileEdit: "/pages-sub/mine/profile/edit",
+  avatar: "/pages-sub/mine/profile/avatar",
+  setting: "/pages-sub/mine/setting",
+  settingPrivacy: "/pages-sub/mine/privacy",
+  pwd: "/pages-sub/mine/pwd",
+  question: "/pages-sub/mine/help",
+  about: "/pages-sub/mine/about",
 }
-const setting = {
-  setting: "/pages/mine/setting/index",
-  settingPrivacy: "/pages/mine/setting/privacy",
+const alumnusSub = {
+  alumnusDetail: "/pages-sub/alumnus/detail",
+  activityDetail: "/pages-sub/activity/detail",
+  helpDetail: "/pages-sub/help/detail",
 }
 const subPackage = {
-  ...profile,
-  ...setting,
+  ...mineSub,
+  ...alumnusSub,
 }
 
 const pages = {

+ 26 - 2
UI/XYH.APP/src/static/font/iconfont.css

@@ -1,6 +1,7 @@
 @font-face {
   font-family: "iconfont"; /* Project id 4173588 */
-  src: url('iconfont.ttf?t=1704345246979') format('truetype');
+  src: url("iconfont.woff2?t=1705929188539") format("woff2"), url("iconfont.woff?t=1705929188539") format("woff"),
+    url("iconfont.ttf?t=1705929188539") format("truetype");
 }
 
 .iconfont {
@@ -11,6 +12,30 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-top:before {
+  content: "\e64e";
+}
+
+.icon-hot:before {
+  content: "\e71d";
+}
+
+.icon-calendar:before {
+  content: "\e839";
+}
+
+.icon-gender-female:before {
+  content: "\e77c";
+}
+
+.icon-gender-male:before {
+  content: "\e77d";
+}
+
+.icon-user-copy:before {
+  content: "\e88f";
+}
+
 .icon-cooperation:before {
   content: "\e611";
 }
@@ -190,4 +215,3 @@
 .icon-friend-fill:before {
   content: "\e657";
 }
-

BIN
UI/XYH.APP/src/static/font/iconfont.ttf


BIN
UI/XYH.APP/src/static/font/iconfont.woff


BIN
UI/XYH.APP/src/static/font/iconfont.woff2


+ 225 - 18
UI/XYH.APP/src/static/scss/vb-component/_base.scss

@@ -4,7 +4,8 @@ input,
 textarea,
 image,
 text,
-scroll-view {
+scroll-view,
+:host {
   box-sizing: border-box;
   --vb-icon-font-family: "iconfont";
   --vb-xyh-color: #0e9489;
@@ -83,6 +84,9 @@ scroll-view {
 }
 
 .w {
+  &-a {
+    width: auto;
+  }
   &-1 {
     &px {
       width: 1px;
@@ -278,6 +282,9 @@ scroll-view {
 }
 
 .h {
+  &-a {
+    height: auto;
+  }
   &-1 {
     &px {
       height: 1px;
@@ -529,10 +536,10 @@ scroll-view {
     align-items: center;
   }
   &-start {
-    align-items: start;
+    align-items: flex-start;
   }
   &-end {
-    align-items: end;
+    align-items: flex-end;
   }
   &-baseline {
     align-items: baseline;
@@ -685,22 +692,22 @@ scroll-view {
 
 .text {
   &-xyh {
-    color: var(--vb-color);
+    color: var(--vb-color) !important;
   }
   &-vb {
-    color: var(--vb-color);
+    color: var(--vb-color) !important;
   }
   &-primary {
-    color: var(--vb-primary-color);
+    color: var(--vb-primary-color) !important;
   }
   &-warning {
-    color: var(--vb-warning-color);
+    color: var(--vb-warning-color) !important;
   }
   &-danger {
-    color: var(--vb-danger-color);
+    color: var(--vb-danger-color) !important;
   }
   &-success {
-    color: var(--vb-success-color);
+    color: var(--vb-success-color) !important;
   }
   &-pink {
     color: var(--vb-pink);
@@ -760,22 +767,22 @@ scroll-view {
 
 .bg {
   &-xyh {
-    background-color: var(--vb-background-color);
+    background-color: var(--vb-color) !important;
   }
   &-vb {
-    background-color: var(--vb-background-color);
+    background-color: var(--vb-color) !important;
   }
   &-primary {
-    background-color: var(--vb-primary-background-color);
+    background-color: var(--vb-primary-color) !important;
   }
   &-warning {
-    background-color: var(--vb-warning-background-color);
+    background-color: var(--vb-warning-color) !important;
   }
   &-danger {
-    background-color: var(--vb-danger-background-color);
+    background-color: var(--vb-danger-color) !important;
   }
   &-success {
-    background-color: var(--vb-success-background-color);
+    background-color: var(--vb-success-color) !important;
   }
   &-pink {
     background-color: var(--vb-pink);
@@ -835,9 +842,39 @@ scroll-view {
 
 .m {
   &- {
+    &a {
+      margin: auto;
+    }
+    &0 {
+      margin: 0px;
+    }
+    &1 {
+      margin: 1px;
+    }
+    &2 {
+      margin: 2px;
+    }
+    &3 {
+      margin: 3px;
+    }
+    &4 {
+      margin: 4px;
+    }
     &5 {
       margin: 5px;
     }
+    &6 {
+      margin: 6px;
+    }
+    &7 {
+      margin: 7px;
+    }
+    &8 {
+      margin: 8px;
+    }
+    &9 {
+      margin: 9px;
+    }
     &10 {
       margin: 10px;
     }
@@ -902,10 +939,38 @@ scroll-view {
       margin-left: 0;
       margin-right: 0;
     }
+    &-1 {
+      margin-left: 1;
+      margin-right: 1;
+    }
+    &-2 {
+      margin-left: 2;
+      margin-right: 2;
+    }
+    &-3 {
+      margin-left: 3;
+      margin-right: 3;
+    }
+    &-4 {
+      margin-left: 4;
+      margin-right: 4;
+    }
     &-5 {
       margin-left: 5px;
       margin-right: 5px;
     }
+    &-7 {
+      margin-left: 7px;
+      margin-right: 7px;
+    }
+    &-8 {
+      margin-left: 8px;
+      margin-right: 8px;
+    }
+    &-9 {
+      margin-left: 9px;
+      margin-right: 9px;
+    }
     &-10 {
       margin-left: 10px;
       margin-right: 10px;
@@ -988,10 +1053,42 @@ scroll-view {
       margin-top: 0;
       margin-bottom: 0;
     }
+    &-1 {
+      margin-top: 1px;
+      margin-bottom: 1px;
+    }
+    &-2 {
+      margin-top: 2px;
+      margin-bottom: 2px;
+    }
+    &-3 {
+      margin-top: 3px;
+      margin-bottom: 3px;
+    }
+    &-4 {
+      margin-top: 4px;
+      margin-bottom: 4px;
+    }
     &-5 {
       margin-top: 5px;
       margin-bottom: 5px;
     }
+    &-6 {
+      margin-top: 6px;
+      margin-bottom: 6px;
+    }
+    &-7 {
+      margin-top: 7px;
+      margin-bottom: 7px;
+    }
+    &-8 {
+      margin-top: 8px;
+      margin-bottom: 8px;
+    }
+    &-9 {
+      margin-top: 9px;
+      margin-bottom: 9px;
+    }
     &-10 {
       margin-top: 10px;
       margin-bottom: 10px;
@@ -1333,9 +1430,36 @@ scroll-view {
 
 .p {
   &- {
+    &0 {
+      padding: 0px;
+    }
+    &1 {
+      padding: 1px;
+    }
+    &2 {
+      padding: 2px;
+    }
+    &3 {
+      padding: 3px;
+    }
+    &4 {
+      padding: 4px;
+    }
     &5 {
       padding: 5px;
     }
+    &6 {
+      padding: 6px;
+    }
+    &7 {
+      padding: 7px;
+    }
+    &8 {
+      padding: 8px;
+    }
+    &9 {
+      padding: 9px;
+    }
     &10 {
       padding: 10px;
     }
@@ -1400,10 +1524,38 @@ scroll-view {
       padding-left: 0;
       padding-right: 0;
     }
+    &-1 {
+      padding-left: 1;
+      padding-right: 1;
+    }
+    &-2 {
+      padding-left: 2;
+      padding-right: 2;
+    }
+    &-3 {
+      padding-left: 3;
+      padding-right: 3;
+    }
+    &-4 {
+      padding-left: 4;
+      padding-right: 4;
+    }
     &-5 {
       padding-left: 5px;
       padding-right: 5px;
     }
+    &-7 {
+      padding-left: 7px;
+      padding-right: 7px;
+    }
+    &-8 {
+      padding-left: 8px;
+      padding-right: 8px;
+    }
+    &-9 {
+      padding-left: 9px;
+      padding-right: 9px;
+    }
     &-10 {
       padding-left: 10px;
       padding-right: 10px;
@@ -1486,10 +1638,42 @@ scroll-view {
       padding-top: 0;
       padding-bottom: 0;
     }
+    &-1 {
+      padding-top: 1px;
+      padding-bottom: 1px;
+    }
+    &-2 {
+      padding-top: 2px;
+      padding-bottom: 2px;
+    }
+    &-3 {
+      padding-top: 3px;
+      padding-bottom: 3px;
+    }
+    &-4 {
+      padding-top: 4px;
+      padding-bottom: 4px;
+    }
     &-5 {
       padding-top: 5px;
       padding-bottom: 5px;
     }
+    &-6 {
+      padding-top: 6px;
+      padding-bottom: 6px;
+    }
+    &-7 {
+      padding-top: 7px;
+      padding-bottom: 7px;
+    }
+    &-8 {
+      padding-top: 8px;
+      padding-bottom: 8px;
+    }
+    &-9 {
+      padding-top: 9px;
+      padding-bottom: 9px;
+    }
     &-10 {
       padding-top: 10px;
       padding-bottom: 10px;
@@ -1829,8 +2013,31 @@ scroll-view {
   }
 }
 
-.text-center {
-  text-align: center;
+.text {
+  &-l {
+    text-align: left;
+  }
+  &-r {
+    text-align: right;
+  }
+  &-c {
+    text-align: center;
+  }
+  &-center {
+    text-align: center;
+  }
+  &-indent {
+    text-indent: 2em;
+  }
+}
+
+.pos {
+  &-r {
+    position: relative;
+  }
+  &-a {
+    position: absolute;
+  }
 }
 
 .vb-clearfix:after {
@@ -1872,7 +2079,7 @@ scroll-view {
   right: -50%;
   bottom: -50%;
   left: -50%;
-  border: 0 solid var(--vb-border-color);
+  border: 0 solid var(--vb-border-color) !important;
   transform: scale(0.5);
 }
 

+ 82 - 0
UI/XYH.APP/src/static/scss/vb-component/_dropdown.scss

@@ -0,0 +1,82 @@
+view {
+  --dropdown-menu-height: 50px;
+  --dropdown-menu-background-color: var(--vb-white);
+  --dropdown-menu-title-font-size: 15px;
+  --dropdown-menu-title-line-height: 18px;
+  --dropdown-menu-box-shadow: 0 2px 12px fade(--gray-7, 12);
+  --dropdown-menu-title-padding: 0px 16px 0px 0px;
+  --dropdown-menu-title-text-color: var(--vb-gray-8);
+  --dropdown-menu-title-disabled-text-color: var(--vb-gray-6);
+  --dropdown-menu-title-active-text-color: var(--vb-color);
+  --dropdown-menu-title-font-size: 15px;
+  --dropdown-menu-active-color: var(--vb-color);
+  --dropdown-menu-option-active-color: var(--vb-color);
+}
+
+.vb-dropdown {
+  user-select: none;
+  position: relative;
+  &__title {
+    position: relative;
+    box-sizing: border-box;
+    max-width: 100%;
+    padding: var(--dropdown-menu-title-padding);
+    color: var(--dropdown-menu-title-text-color);
+    font-size: var(--dropdown-menu-title-font-size);
+    line-height: var(--dropdown-menu-title-line-height);
+
+    &::after {
+      position: absolute;
+      top: 50%;
+      right: 3px;
+      margin-top: -5px;
+      border: 3px solid;
+      border-color: transparent transparent currentColor currentColor;
+      transform: rotate(-45deg);
+      opacity: 0.8;
+      content: "";
+    }
+
+    &--active {
+      color: var(--dropdown-menu-title-active-text-color);
+    }
+
+    &--down {
+      &::after {
+        margin-top: -1px;
+        transform: rotate(135deg);
+      }
+    }
+  }
+  &__options {
+    position: fixed;
+    left: 0;
+    right: 0;
+    z-index: 1000;
+    background-color: var(--dropdown-menu-background-color);
+    height: 60vh;
+    overflow-y: auto;
+  }
+  &__option {
+    text-align: left;
+    width: 100vw;
+    padding: 8px;
+    padding-left: 25px;
+    cursor: pointer;
+    border-bottom: 1px solid #ebeef5;
+    &__title {
+      color: var(--vb-gray-6);
+    }
+    &.active {
+      color: var(--dropdown-menu-option-active-color);
+      font-weight: bold;
+    }
+  }
+
+  &--active {
+    .vb-dropdown__title {
+      color: var(--dropdown-menu-active-color);
+      font-weight: bold;
+    }
+  }
+}

+ 1 - 1
UI/XYH.APP/src/static/scss/vb-component/_icon.scss

@@ -6,7 +6,7 @@ view {
   position: relative;
   display: inline-block;
   color: var(--vb-color);
-  font: normal normal normal 14px/1 var(--vb-icon-font-family, "iconfont");
+  font: normal normal normal 16px/1 var(--vb-icon-font-family, "iconfont") !important;
   font-size: inherit;
   text-rendering: auto;
   -webkit-font-smoothing: antialiased;

+ 9 - 1
UI/XYH.APP/src/static/scss/vb-component/_list.scss

@@ -1,7 +1,7 @@
 view {
   --vb-list-text-color: var(--vb-text-color-2);
   --vb-list-text-font-size: var(--vb-font-size-md);
-  --vb-list-text-line-height: 50px;
+  --vb-list-text-line-height: 40px;
   --vb-list-loading-icon-size: 16px;
 }
 .vb-list {
@@ -13,6 +13,14 @@ view {
     line-height: var(--vb-list-text-line-height);
     text-align: center;
   }
+  .vb-loading {
+    text-align: center;
+    &__text {
+      color: var(--vb-list-text-color);
+      font-size: var(--vb-list-text-font-size);
+      line-height: var(--vb-list-text-line-height);
+    }
+  }
 
   &__placeholder {
     height: 0;

+ 4 - 1
UI/XYH.APP/src/static/scss/vb-component/_loading.scss

@@ -22,7 +22,10 @@ view {
     vertical-align: middle;
     animation: vb-rotate var(--vb-loading-spinner-duration) linear infinite;
     &--circular {
-      animation-duration: 2s;
+      // animation-duration: 2s;
+      border: 1px solid transparent;
+      border-top-color: currentColor;
+      border-radius: 100%;
     }
     &--spinner {
       animation-timing-function: steps(12);

+ 1 - 0
UI/XYH.APP/src/static/scss/vb-component/index.scss

@@ -8,3 +8,4 @@
 @import "./progress";
 @import "./popup";
 @import "./list";
+@import "./dropdown";

+ 4 - 2
UI/XYH.APP/src/stores/_auth.ts

@@ -8,7 +8,7 @@ export const USER_KEY = "USER_KEY"
 export const useAuthStore = defineStore("auth", () => {
   const errors = ref({})
   const user = ref<User>(localCache.getJSONRef(USER_KEY, {}) as unknown as User)
-  
+
   const isAuthenticated = ref(!!JwtService.getToken())
   //oR0I65C3nS6KlxF2UHcKOq5-oqmE
   const openid = ref("oR0I65C3nS6KlxF2UHcKOq5-oqmE")
@@ -64,12 +64,14 @@ export const useAuthStore = defineStore("auth", () => {
   function xcxLogin() {
     return new Promise((resolve, reject) => {
       wx.login().then((res: any) => {
-        console.log("WX_CODE", res.code)
+        //console.log("WX_CODE", res.code)
         const code = res.code
         apis.loginApi.xcxLogin(code).then((res) => {
           console.log("openid", res)
           if (res.code === 200) {
             setToken(res.data.token)
+            getInfo()
+            appStore.amProfileStore.loadProfile()
             resolve(true)
           } else if (res.code === 401) {
             openid.value = res.data.openid

+ 3 - 3
UI/XYH.APP/src/stores/_profile.ts

@@ -10,7 +10,7 @@ export const useAmProfileStore = defineStore("amProfile", () => {
     return new Promise((resolve, reject) => {
       const amId = appStore.authStore.getUser().amId + ""
       // 这里需要根据amId获取对应的校友信息
-      apis.system.alumnusApi.getAlumnus(amId).then((res) => {
+      apis.amActivity.alumnusApi.getAlumnus(amId).then((res) => {
         amInfo.value = res
         localCache.setJSON(ALUMNUS_PROFILE_KEY, res)
         resolve(amInfo.value)
@@ -36,7 +36,7 @@ export const useAmProfileStore = defineStore("amProfile", () => {
   }
 
   function updateProfile(data: Partial<AlumnusProfile>) {
-    apis.system.alumnusApi.updateAlumnus(data).then((res) => {
+    apis.amActivity.alumnusApi.updateAlumnus(data).then((res) => {
       amInfo.value = { ...amInfo.value, ...data }
       localCache.setJSON(ALUMNUS_PROFILE_KEY, amInfo.value)
       message.msgSuccess("保存成功")
@@ -45,7 +45,7 @@ export const useAmProfileStore = defineStore("amProfile", () => {
 
   function updatePrivacy(val: string) {
     return new Promise((resolve, reject) => {
-      apis.system.alumnusApi.updatePrivacy(val).then(() => {
+      apis.amActivity.alumnusApi.updatePrivacy(val).then(() => {
         amInfo.value = { ...amInfo.value, amPublic: val }
         localCache.setJSON(ALUMNUS_PROFILE_KEY, amInfo.value)
         resolve(amInfo.value)

+ 7 - 0
UI/XYH.VUE/src/core/utils/index.ts

@@ -695,3 +695,10 @@ export function isNumberStr(str: string) {
 export const getAssetPath = (path: string): string => {
 	return import.meta.env.BASE_URL + path
 }
+
+function addUnit(value: string | number) {
+	if (value == null || value == "") {
+		return undefined
+	}
+	return /^-?\d+(\.\d+)?$/.test("" + value) ? value + "px" : value
+}

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff