Bladeren bron

红娘工作台积分商城

YH_0525 1 maand geleden
bovenliggende
commit
d62aa7a5ec

+ 1 - 0
.gitignore

@@ -17,3 +17,4 @@ target/
 
 # 忽略系统临时文件
 Thumbs.db
+-e "/target/\n/**/target/\n.kiro/\ngit/\nLiangZhiYUMao/static/" 

+ 5 - 6
LiangZhiYUMao/pages/index/index.vue

@@ -249,11 +249,7 @@
 		data() {
 			return {
 				// 用户信息
-				userInfo: {
-					nickname: '小张',
-					userId: null,
-					isMatchmaker: '1' // 测试用,实际从后端获取
-				},
+				userInfo: {},
 				matchCount: 3,
 
 				// 轮播图数据
@@ -340,6 +336,8 @@
 		},
 		onShow() {
 			console.log('📱 页面onShow触发')
+			// 页面显示时重新加载用户信息(确保登录后能更新)
+			this.loadUserInfo()
 			// 页面显示时检查是否为红娘
 			this.checkMatchmakerStatus()
 		},
@@ -391,8 +389,9 @@
 						return
 					}
 					
+					// 获取UserSig时使用原始imUserId(包含m_前缀)
 					const sigRes = await uni.request({
-						url: `http://localhost:8083/api/im/getUserSig?userId=${imUserId}`,
+						url: `http://localhost:8083/api/im/getUserSig?userId=${encodeURIComponent(imUserId)}`,
 						method: 'GET'
 					})
 					

+ 2 - 1
gateway/src/main/java/com/zhentao/filter/GatewayRoutes.java

@@ -7,8 +7,9 @@ import org.springframework.context.annotation.Configuration;
 
 /**
  * 网关路由配置
+ * 注意:路由已迁移到 application.yml,此类暂时禁用避免冲突
  */
-@Configuration
+// @Configuration  // 暂时禁用,使用 application.yml 中的路由配置
 public class GatewayRoutes {
 
     @Bean

+ 2 - 0
gateway/src/main/resources/application.yml

@@ -53,6 +53,8 @@ spring:
             - Path=/api/im/**
           filters:
             - StripPrefix=0
+          metadata:
+            response-timeout: 5000
         
         # 好友服务路由(拉黑等功能)
         - id: chatfriend-api-route

+ 3 - 3
service/Essential/src/main/resources/application.yml

@@ -67,9 +67,9 @@ mybatis-plus:
 # MinIO配置
 minio:
   endpoint: http://115.190.125.125:9000
-  accessKey: minioadmin
-  secretKey: minioadmin
-  bucketName: user-feedback
+  access-key: minioadmin
+  secret-key: minioadmin
+  bucket-name: user-feedback
 
 # 头像本地存储配置
 avatar:

+ 1 - 0
service/admin/src/main/java/com/zhentao/entity/Matchmaker.java

@@ -36,6 +36,7 @@ public class Matchmaker implements Serializable {
     private String avatarUrl;
     private Integer matchmakerType;
     private Integer level;
+    private Integer points;  // 积分
     private Integer successCouples;
     private Integer provinceId;
     private Integer cityId;

+ 1 - 0
service/login/src/main/java/com/zhentao/pojo/Users.java

@@ -116,6 +116,7 @@ public class Users implements Serializable {
     /**
      * 是否为红娘   0-否 1-是
      */
+    @TableField("is_matchmaker")
     private Integer isMatchmaker;
 
     @TableField(exist = false)

+ 2 - 2
service/websocket/src/main/java/com/zhentao/controller/TIMController.java

@@ -30,10 +30,10 @@ public class TIMController {
     
     /**
      * 获取 UserSig
-     * GET /api/im/getUserSig?userId=1
+     * GET /api/im/getUserSig?userId=1 或 userId=m_21
      */
     @GetMapping("/getUserSig")
-    public Map<String, Object> getUserSig(@RequestParam String userId) {
+    public Map<String, Object> getUserSig(@RequestParam(name = "userId") String userId) {
         Map<String, Object> result = new HashMap<>();
         
         try {

+ 3 - 3
service/websocket/src/main/resources/application.yml

@@ -81,6 +81,6 @@ tim:
 # MinIO 对象存储配置
 minio:
   endpoint: http://115.190.125.125:9000
-  accessKey: minioadmin
-  secretKey: minioadmin
-  bucketName: minion-voice-files
+  access-key: minioadmin
+  secret-key: minioadmin
+  bucket-name: minion-voice-files