ソースを参照

上线测试更改BUG

wangwenju 1 ヶ月 前
コミット
4bdb9876e4
91 ファイル変更1419 行追加3562 行削除
  1. 0 211
      LiangZhiYUMao/API接口说明.md
  2. 24 37
      LiangZhiYUMao/App.vue
  3. 1 3
      LiangZhiYUMao/components/butlogin.vue
  4. 1 6
      LiangZhiYUMao/config/api-config.js
  5. 2 2
      LiangZhiYUMao/config/match-config.js
  6. 170 426
      LiangZhiYUMao/pages.json
  7. 7 9
      LiangZhiYUMao/pages/activities/detail.vue
  8. 1 2
      LiangZhiYUMao/pages/activities/list.vue
  9. 8 10
      LiangZhiYUMao/pages/astrology/bazi-match.vue
  10. 5 6
      LiangZhiYUMao/pages/astrology/bazi.vue
  11. 6 7
      LiangZhiYUMao/pages/astrology/constellation-match.vue
  12. 5 7
      LiangZhiYUMao/pages/astrology/constellation.vue
  13. 3 12
      LiangZhiYUMao/pages/astrology/index.vue
  14. 1 1
      LiangZhiYUMao/pages/astrology/mbti.vue
  15. 6 13
      LiangZhiYUMao/pages/astrology/zodiac.vue
  16. 0 340
      LiangZhiYUMao/pages/astrology/提升权威性方案.md
  17. 5 5
      LiangZhiYUMao/pages/blacklist/index.vue
  18. 22 34
      LiangZhiYUMao/pages/courses/detail.vue
  19. 10 14
      LiangZhiYUMao/pages/courses/list.vue
  20. 3 3
      LiangZhiYUMao/pages/feedback/index.vue
  21. 37 85
      LiangZhiYUMao/pages/index/index.vue
  22. 19 42
      LiangZhiYUMao/pages/match/index.vue
  23. 8 14
      LiangZhiYUMao/pages/matchmaker-workbench/activities.vue
  24. 11 12
      LiangZhiYUMao/pages/matchmaker-workbench/activity-detail.vue
  25. 1 1
      LiangZhiYUMao/pages/matchmaker-workbench/add-resource.vue
  26. 3 3
      LiangZhiYUMao/pages/matchmaker-workbench/audit-records.vue
  27. 40 85
      LiangZhiYUMao/pages/matchmaker-workbench/client-detail.vue
  28. 6 6
      LiangZhiYUMao/pages/matchmaker-workbench/course-detail.vue
  29. 11 50
      LiangZhiYUMao/pages/matchmaker-workbench/courses.vue
  30. 5 5
      LiangZhiYUMao/pages/matchmaker-workbench/earn-points.vue
  31. 5 5
      LiangZhiYUMao/pages/matchmaker-workbench/edit-profile.vue
  32. 17 19
      LiangZhiYUMao/pages/matchmaker-workbench/index.vue
  33. 21 24
      LiangZhiYUMao/pages/matchmaker-workbench/message.vue
  34. 19 25
      LiangZhiYUMao/pages/matchmaker-workbench/mine.vue
  35. 1 1
      LiangZhiYUMao/pages/matchmaker-workbench/my-activities.vue
  36. 69 134
      LiangZhiYUMao/pages/matchmaker-workbench/my-resources.vue
  37. 2 2
      LiangZhiYUMao/pages/matchmaker-workbench/points-detail.vue
  38. 4 4
      LiangZhiYUMao/pages/matchmaker-workbench/points-mall.vue
  39. 43 75
      LiangZhiYUMao/pages/matchmaker-workbench/precise-match.vue
  40. 3 4
      LiangZhiYUMao/pages/matchmaker-workbench/product-detail.vue
  41. 49 85
      LiangZhiYUMao/pages/matchmaker-workbench/quality-resources.vue
  42. 6 6
      LiangZhiYUMao/pages/matchmaker-workbench/ranking.vue
  43. 53 86
      LiangZhiYUMao/pages/matchmaker-workbench/resource-input.vue
  44. 14 17
      LiangZhiYUMao/pages/matchmaker-workbench/sign-in.vue
  45. 21 22
      LiangZhiYUMao/pages/matchmaker-workbench/success-case-upload.vue
  46. 2 2
      LiangZhiYUMao/pages/matchmaker-workbench/system-messages.vue
  47. 12 12
      LiangZhiYUMao/pages/matchmakers/detail.vue
  48. 14 18
      LiangZhiYUMao/pages/matchmakers/list.vue
  49. 72 180
      LiangZhiYUMao/pages/mine/index.vue
  50. 9 11
      LiangZhiYUMao/pages/mine/my-activities.vue
  51. 9 9
      LiangZhiYUMao/pages/mine/my-dynamics.vue
  52. 7 16
      LiangZhiYUMao/pages/page3/page3.vue
  53. 10 21
      LiangZhiYUMao/pages/part-time-matchmaker/index.vue
  54. 1 1
      LiangZhiYUMao/pages/partner-requirement/index.vue
  55. 9 5
      LiangZhiYUMao/pages/plaza/index.vue
  56. 3 8
      LiangZhiYUMao/pages/plaza/publish.vue
  57. 40 67
      LiangZhiYUMao/pages/profile/index.vue
  58. 28 39
      LiangZhiYUMao/pages/recommend/index.vue
  59. 2 3
      LiangZhiYUMao/pages/recommend/user-detail.vue
  60. 6 9
      LiangZhiYUMao/pages/recommend/user-dynamics.vue
  61. 2 2
      LiangZhiYUMao/pages/settings/about.vue
  62. 4 9
      LiangZhiYUMao/pages/settings/index.vue
  63. 3 4
      LiangZhiYUMao/pages/success-case/detail.vue
  64. 8 13
      LiangZhiYUMao/pages/success-case/list.vue
  65. 3 3
      LiangZhiYUMao/pages/today-recommend/index.vue
  66. 4 8
      LiangZhiYUMao/pages/vip/index.vue
  67. 0 27
      LiangZhiYUMao/project.private.config.json
  68. 10 10
      LiangZhiYUMao/subpkg-message/chat/chat.vue
  69. 9 9
      LiangZhiYUMao/subpkg-message/index/index.vue
  70. 0 0
      LiangZhiYUMao/subpkg-message/system/system.vue
  71. 8 10
      LiangZhiYUMao/utils/api.js
  72. 13 23
      LiangZhiYUMao/utils/bazi.js
  73. 2 2
      LiangZhiYUMao/utils/chat-api.js
  74. 23 42
      LiangZhiYUMao/utils/constellation.js
  75. 102 79
      LiangZhiYUMao/utils/tim-manager.js
  76. 38 87
      LiangZhiYUMao/utils/tim-presence-manager.js
  77. 11 19
      LiangZhiYUMao/utils/userAuth.js
  78. 21 32
      LiangZhiYUMao/utils/websocket.js
  79. 17 142
      LiangZhiYUMao/utils/zodiac-enhanced.js
  80. 0 556
      LiangZhiYUMao/八字API配置助手.html
  81. 1 1
      gateway/src/main/resources/application.yml
  82. 68 68
      marriageAdmin-vue/src/config/api.js
  83. 30 1
      marriageAdmin-vue/src/views/activity/ActivityRegistrations.vue
  84. 1 1
      marriageAdmin-vue/src/views/report/ReportList.vue
  85. 3 3
      marriageAdmin-vue/✅ Dashboard所有问题修复总结.md
  86. 2 2
      marriageAdmin-vue/✅ Dashboard数据显示问题已修复.md
  87. 55 39
      service/Essential/src/main/java/com/zhentao/controller/AvatarUploadController.java
  88. 2 2
      service/Essential/src/main/java/com/zhentao/service/impl/ActivityOrderServiceImpl.java
  89. 4 1
      service/Essential/src/main/resources/application.yml
  90. 1 1
      service/dynamic/src/main/java/com/zhentao/service/impl/MediaUploadServiceImpl.java
  91. 2 5
      service/login/src/main/java/com/zhentao/controller/AuthCodeController.java

+ 0 - 211
LiangZhiYUMao/API接口说明.md

@@ -1,211 +0,0 @@
-# API 接口使用说明
-
-## ⚠️ 重要发现
-
-### 天行数据 `/zodiac/index` 接口实际用途
-
-根据[官方文档](https://www.tianapi.com/apiview/83-1),这个接口是:
-
-- ❌ **不是**生肖运势接口
-- ✅ **是**生肖配对接口
-
-### 接口详情
-
-**接口地址**: `https://apis.tianapi.com/zodiac/index`
-
-**参数要求**:
-```
-key: 你的API Key
-me:  我的生肖(如:猴)
-he:  对方生肖(如:羊)
-```
-
-**返回数据**:
-```json
-{
-  "code": 200,
-  "msg": "success",
-  "result": {
-    "title": "猴:羊",
-    "mcontent": "男羊+女猴:难以成为配偶...",
-    "fcontent": "女羊+男猴:强以结合...",
-    "mcontent1": "男猴+女羊:可以生活在一起...",
-    "fcontent1": "女猴+男羊:不可能结合..."
-  }
-}
-```
-
-## 🔄 调用失败原因分析
-
-### 之前的错误用法
-
-```javascript
-// ❌ 错误:使用了不存在的参数
-uni.request({
-  url: 'https://apis.tianapi.com/zodiac/index',
-  data: {
-    key: 'xxx',
-    name: '鼠'  // ❌ 错误!接口没有name参数
-  }
-})
-```
-
-**为什么失败**:
-1. 参数名错误(应该是 `me` 和 `he`,不是 `name`)
-2. 缺少必需参数(需要两个生肖,不是一个)
-3. 接口功能不匹配(是配对查询,不是运势查询)
-
-**错误表现**:
-```
-❌ HTTP状态码异常: undefined
-❌ HTTP错误: 无响应
-```
-
-## ✅ 已实施的解决方案
-
-### 1. 停止错误的API调用
-
-```javascript
-// zodiac-enhanced.js
-export async function getZodiacFortuneFromAPI(zodiac) {
-  // 直接使用本地数据,不再调用不存在的运势API
-  console.log('ℹ️ 天行数据暂无生肖运势接口,使用本地数据')
-  
-  return {
-    ...zodiacUtil.getTodayFortune(zodiac),
-    source: 'local_no_api',
-    dataFrom: '本地数据(天行数据暂无运势接口)'
-  }
-}
-```
-
-### 2. 新增正确的配对功能
-
-```javascript
-// 🆕 可以使用的生肖配对API
-export async function getZodiacMatch(myZodiac, targetZodiac) {
-  const response = await uni.request({
-    url: 'https://apis.tianapi.com/zodiac/index',
-    data: {
-      key: TIANAPI_CONFIG.API_KEY,
-      me: myZodiac,    // ✅ 正确参数
-      he: targetZodiac // ✅ 正确参数
-    }
-  })
-  
-  return response.data.result
-}
-```
-
-## 📱 功能现状
-
-### ✅ 属相测算功能
-- **状态**: 正常工作
-- **数据来源**: 本地数据
-- **用户体验**: 无影响,功能完全可用
-- **说明**: 使用本地算法生成运势数据
-
-### ✅ 生肖配对功能(新增)
-- **状态**: 可用(如果需要)
-- **数据来源**: 天行数据API
-- **接口**: `/zodiac/index`
-- **用法**: 查询两个生肖的配对关系
-
-## 🎯 使用建议
-
-### 方案一:继续使用本地数据(推荐)
-**优点**:
-- ✅ 无需API调用,响应快速
-- ✅ 无API限制,无调用次数限制
-- ✅ 功能完全可用
-- ✅ 用户体验良好
-
-**适用场景**: 当前属相测算功能
-
-### 方案二:寻找其他生肖运势API
-如果确实需要外部API数据,可以考虑:
-
-1. **其他API提供商**
-   - 聚合数据(https://www.juhe.cn/)
-   - 阿凡提数据(https://www.avatardata.cn/)
-   - 其他专业命理API
-
-2. **自建数据库**
-   - 建立专业的运势数据库
-   - 每日更新运势内容
-   - 完全可控
-
-### 方案三:使用配对功能
-可以在app中添加生肖配对功能:
-
-```javascript
-import zodiacEnhanced from '@/utils/zodiac-enhanced.js'
-
-// 查询两个生肖的配对关系
-const matchResult = await zodiacEnhanced.getZodiacMatch('鼠', '牛')
-console.log('配对结果:', matchResult)
-```
-
-## 📊 当前代码状态
-
-### 修改的文件
-
-1. **config/api-config.js**
-   - ✅ 标注了接口的真实用途
-   - ✅ 将 `zodiac` 改名为 `zodiacMatch`(更准确)
-   - ✅ 添加了详细注释
-
-2. **utils/zodiac-enhanced.js**
-   - ✅ 停止了错误的API调用
-   - ✅ 改为直接返回本地数据
-   - ✅ 新增了 `getZodiacMatch()` 配对功能
-   - ✅ 保留了完整的错误处理代码(注释中)
-
-3. **新增文档**
-   - ✅ API接口说明.md(本文件)
-   - ✅ 天行数据API诊断指南.md
-
-## 🧪 测试说明
-
-### 测试属相测算
-1. 打开属相测试页面
-2. 选择生日并点击"开始测算"
-3. 应该能正常显示结果
-4. 数据来源显示:"本地数据(天行数据暂无运势接口)"
-5. 控制台显示:`ℹ️ 天行数据暂无生肖运势接口,使用本地数据`
-
-### 测试生肖配对(如需使用)
-```javascript
-// 在控制台测试
-const zodiacEnhanced = require('@/utils/zodiac-enhanced.js')
-zodiacEnhanced.default.getZodiacMatch('猴', '羊').then(result => {
-  console.log('配对结果:', result)
-})
-```
-
-## 📝 总结
-
-**问题根源**: 
-- 使用了错误的API端点
-- `/zodiac/index` 是配对接口,不是运势接口
-
-**解决方案**: 
-- ✅ 停止错误的API调用
-- ✅ 改用本地数据
-- ✅ 功能正常工作
-- ✅ 新增正确的配对功能供未来使用
-
-**用户体验**: 
-- ✅ 无任何影响
-- ✅ 功能完全可用
-- ✅ 响应速度更快(无需等待API)
-
----
-
-**修复状态**: ✅ 已完成并验证
-**最后更新**: 2025-10-13
-
-
-
-
-

+ 24 - 37
LiangZhiYUMao/App.vue

@@ -10,7 +10,7 @@ export default {
 	},
 
 	onLaunch: function () {
-		console.log('=== App启动 ===');
+
 		
 		// 初始化TIM(全局)
 		this.initGlobalTIM();
@@ -21,24 +21,22 @@ export default {
 			if (app) {
 				app.globalData.initGlobalTIM = this.initGlobalTIM.bind(this);
 				app.globalData.initPresenceManager = this.initPresenceManager.bind(this);
-				console.log('✅ 全局方法挂载成功');
+				
 			}
 		}, 100);
 	},
 	
 	onShow: function () {
-		console.log('=== App显示 ===');
-		console.log('   当前时间:', new Date().toLocaleTimeString());
-		
+	
 		// 延迟检查TIM连接状态,避免在登录过程中重复调用
 		setTimeout(() => {
-			console.log('⏰ 开始执行 checkTIMConnection...');
+		
 			this.checkTIMConnection();
 		}, 500);  // 缩短延迟时间到 500ms
 	},
 	
 	onHide: function () {
-		console.log('=== App隐藏 ===');
+		
 		// App切换到后台时,不断开连接,保持在线状态
 	},
 	
@@ -59,39 +57,38 @@ export default {
 				const userId = uni.getStorageSync('userId') || userInfo?.userId || userInfo?.id;
 				
 				if (!userId) {
-					console.log('⚠️ 未登录,跳过TIM初始化');
+					
 					return;
 				}
 				
 				// 如果TIM已经登录且用户ID匹配,跳过
 				if (timManager.isLogin && String(timManager.userId) === String(userId)) {
-					console.log('✅ TIM已登录,用户ID:', userId);
+					
 					return;
 				}
 				
-				console.log('?? 开始初始化全局TIM,用户ID:', userId);
-			
+				
 			// 初始化TIM SDK(只在首次初始化)
 			const SDKAppID = 1600109674;
 			if (!timManager.tim) {
 				timManager.init(SDKAppID);
-				console.log('✅ TIM SDK 初始化完成');
+			
 			}
 			
 			// 如果用户ID不匹配,先登出旧用户
 			if (timManager.isLogin && timManager.userId && String(timManager.userId) !== String(userId)) {
-				console.log('⚠️ 检测到用户切换,先登出旧用户...');
+				
 				try {
 					await timManager.logout();
-					console.log('✅ 旧用户已登出');
+				
 				} catch (e) {
-					console.warn('⚠️ 登出失败,继续登录新用户:', e.message);
+				
 				}
 			}
 			
 			// 获取UserSig
 			const res = await uni.request({
-				url: `http://localhost:8083/api/im/getUserSig?userId=${userId}`,
+				url: `https://api.zhongruanke.cn/api/im/getUserSig?userId=${userId}`,
 				method: 'GET'
 			});
 			
@@ -100,7 +97,7 @@ export default {
 				
 				// 登录TIM
 				await timManager.login(String(userId), userSig);
-				console.log('✅ 全局TIM登录成功');
+				
 				
 				// TIM 登录成功后,初始化在线状态管理器
 				await this.initPresenceManager(userId);
@@ -108,7 +105,7 @@ export default {
 				throw new Error('获取UserSig失败');
 			}
 			} catch (error) {
-				console.error('❌ 初始化全局TIM失败:', error);
+				
 			} finally {
 				this._timInitializing = false
 			}
@@ -119,14 +116,14 @@ export default {
 		 */
 		async initPresenceManager(userId) {
 			try {
-				console.log('?? 初始化在线状态管理器,用户ID:', userId);
+				
 				
 				// 初始化 TIM + WebSocket 混合状态管理器
 				await timPresenceManager.init(String(userId));
 				
-				console.log('✅ 在线状态管理器初始化成功');
+				
 			} catch (error) {
-				console.error('❌ 初始化在线状态管理器失败:', error);
+				
 			}
 		},
 		
@@ -134,40 +131,30 @@ export default {
 		 * 检查TIM连接状态和WebSocket连接状态
 		 */
 		checkTIMConnection() {
-			console.log('?? ========== 开始检查连接状态 ==========');
 			
 			// 获取当前登录用户ID
 			const userId = uni.getStorageSync('userId');
-			console.log('   当前用户ID:', userId);
+			
 			
 			if (!userId) {
-				console.log('⚠️ 未登录,跳过连接检查');
-				console.log('=========================================');
+			
 				return;
 			}
 			
 			// 检查 TIM 是否登录
-			console.log('   TIM 登录状态:', timManager.isLogin);
-			console.log('   TIM 用户ID:', timManager.userId);
+			
 			
 			if (!timManager.isLogin) {
-				console.log('⚠️ TIM未登录,尝试重新初始化');
-				console.log('=========================================');
+			
 				this.initGlobalTIM();
 				return;
 			}
 			
 			// 检查 WebSocket 是否连接
-			console.log('   WebSocket 连接状态:', timPresenceManager.isConnected);
-			
+		
 			if (!timPresenceManager.isConnected) {
-				console.log('⚠️ WebSocket未连接,尝试重新初始化在线状态管理器');
-				console.log('=========================================');
 				this.initPresenceManager(userId);
-			} else {
-				console.log('✅ TIM和WebSocket连接正常');
-				console.log('=========================================');
-			}
+			} 
 		}
 	},
 	

+ 1 - 3
LiangZhiYUMao/components/butlogin.vue

@@ -36,8 +36,6 @@
 		methods: { 	
 			colse(){this.$refs.popup.close()},
 			btns(e){
-				console.log(e,'e.detail.code换取手机号')
-				console.log('微信返回详情:', e.detail)
 				
 				// 用户拒绝授权
 				if (e.detail.errMsg == 'getPhoneNumber:fail user deny') {
@@ -48,7 +46,7 @@
 				
 				// 微信返回其他错误(如 errorCode: -10000 系统错误)
 				if (e.detail.errMsg && e.detail.errMsg.includes('fail')) {
-					console.error('获取手机号失败:', e.detail.errMsg, 'errorCode:', e.detail.errorCode)
+					
 					// 开发环境提示:继续登录但使用默认手机号
 					uni.showModal({
 						title: '提示',

+ 1 - 6
LiangZhiYUMao/config/api-config.js

@@ -35,12 +35,7 @@ export const TIANAPI_CONFIG = {
 
 // 配置验证
 export function validateConfig() {
-	if (TIANAPI_CONFIG.API_KEY === 'YOUR_API_KEY_HERE') {
-		console.warn('⚠️ 警告:请先配置天行数据API Key!')
-		console.warn('📍 配置文件位置:config/api-config.js')
-		console.warn('🔗 获取Key:https://www.tianapi.com/')
-		return false
-	}
+	
 	return true
 }
 

+ 2 - 2
LiangZhiYUMao/config/match-config.js

@@ -6,11 +6,11 @@
 const getBaseUrl = () => {
 	// 开发环境:使用本地地址
 	if (process.env.NODE_ENV === 'development') {
-		return 'http://localhost:8083';
+		return 'https://api.zhongruanke.cn';
 	}
 	
 	// 生产环境:使用服务器地址
-	return 'http://115.190.125.125:8083';
+	return 'https://api.zhongruanke.cn';
 };
 
 export const MATCH_API_CONFIG = {

+ 170 - 426
LiangZhiYUMao/pages.json

@@ -7,203 +7,26 @@
 				"navigationStyle": "custom"
 			}
 		},
-		{
-			"path": "pages/matchmaker-workbench/index",
-			"style": {
-				"navigationBarTitleText": "红娘工作台",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/matchmaker-workbench/my-resources",
-			"style": {
-				"navigationBarTitleText": "我的资源",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/matchmaker-workbench/resource-input",
-			"style": {
-				"navigationBarTitleText": "信息录入",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/matchmaker-workbench/client-detail",
-			"style": {
-				"navigationBarTitleText": "客户信息",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/matchmaker-workbench/precise-match",
-			"style": {
-				"navigationBarTitleText": "精准匹配",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/matchmaker-workbench/quality-resources",
-			"style": {
-				"navigationBarTitleText": "优质资源",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/matchmaker-workbench/points-mall",
-			"style": {
-				"navigationBarTitleText": "积分商城",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/matchmaker-workbench/courses",
-			"style": {
-				"navigationBarTitleText": "培训课程",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/matchmaker-workbench/course-detail",
-			"style": {
-				"navigationBarTitleText": "课程详情",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/matchmaker-workbench/ranking",
-			"style": {
-				"navigationBarTitleText": "红娘排行榜",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/matchmaker-workbench/message",
-			"style": {
-				"navigationBarTitleText": "消息",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/matchmaker-workbench/system-messages",
-			"style": {
-				"navigationBarTitleText": "系统通知",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/matchmaker-workbench/audit-records",
-			"style": {
-				"navigationBarTitleText": "审核记录",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/matchmaker-workbench/mine",
-			"style": {
-				"navigationBarTitleText": "我的",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/matchmaker-workbench/sign-in",
-			"style": {
-				"navigationBarTitleText": "签到",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/matchmaker-workbench/add-resource",
-			"style": {
-				"navigationBarTitleText": "信息录入",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/matchmaker-workbench/account-settings",
-			"style": {
-				"navigationBarTitleText": "账户设置",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/matchmaker-workbench/edit-profile",
-			"style": {
-				"navigationBarTitleText": "编辑资料",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/matchmaker-workbench/product-detail",
-			"style": {
-				"navigationBarTitleText": "商品详情",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/matchmaker-workbench/points-detail",
-			"style": {
-				"navigationBarTitleText": "积分明细",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/matchmaker-workbench/earn-points",
-			"style": {
-				"navigationBarTitleText": "赚取积分",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/matchmaker-workbench/success-case-upload",
-			"style": {
-				"navigationBarTitleText": "撮合成功审核",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/matchmaker-workbench/my-activities",
-			"style": {
-				"navigationBarTitleText": "我的活动",
-				"navigationStyle": "custom"
-			}
-		},
 		{
 			"path": "pages/page3/page3",
 			"style": {
 				"navigationBarTitleText": "授权登录"
 			}
 		},
-	{
-		"path": "pages/plaza/index",
-		"style": {
-			"navigationBarTitleText": "动态广场",
-			"navigationStyle": "custom"
-		}
-	},
 		{
-			"path": "pages/plaza/publish",
+			"path": "pages/plaza/index",
 			"style": {
-				"navigationBarTitleText": "发布动态",
-				"navigationBarBackgroundColor": "#E91E63",
-				"navigationBarTextStyle": "white"
+				"navigationBarTitleText": "动态广场",
+				"navigationStyle": "custom"
 			}
 		},
-	{
-		"path": "pages/plaza/detail",
-		"style": {
-			"navigationBarTitleText": "动态详情",
-			"navigationStyle": "custom"
-		}
-	},
-	{
-		"path": "pages/plaza/report",
-		"style": {
-			"navigationBarTitleText": "举报",
-			"navigationBarBackgroundColor": "#E91E63",
-			"navigationBarTextStyle": "white"
-		}
-	},
+				{
+					"path": "pages/plaza/publish",
+					"style": {
+						"navigationBarTitleText": "分享心动",
+						"navigationStyle": "custom" // 和广场页保持一致的导航样式
+					}
+				},
 		{
 			"path": "pages/recommend/index",
 			"style": {
@@ -212,43 +35,6 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
-		{
-			"path": "pages/recommend/user-detail",
-			"style": {
-				"navigationBarTitleText": "用户详情",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/recommend/user-dynamics",
-			"style": {
-				"navigationBarTitleText": "用户动态",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/message/index",
-			"style": {
-				"navigationBarTitleText": "消息",
-				"navigationBarBackgroundColor": "#E91E63",
-				"navigationBarTextStyle": "white"
-			}
-		},
-		{
-			"path": "pages/message/chat",
-			"style": {
-				"navigationBarTitleText": "聊天",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/message/system",
-			"style": {
-				"navigationBarTitleText": "系统消息",
-				"navigationBarBackgroundColor": "#E91E63",
-				"navigationBarTextStyle": "white"
-			}
-		},
 		{
 			"path": "pages/mine/index",
 			"style": {
@@ -258,224 +44,182 @@
 			}
 		},
 		{
-			"path": "pages/matchmakers/list",
-			"style": {
-				"navigationBarTitleText": "红娘服务",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/matchmakers/detail",
-			"style": {
-				"navigationBarTitleText": "红娘详情",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/activities/list",
-			"style": {
-				"navigationBarTitleText": "活动列表",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/activities/detail",
-			"style": {
-				"navigationBarTitleText": "活动详情",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/courses/list",
-			"style": {
-				"navigationBarTitleText": "精品课程",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/courses/detail",
-			"style": {
-				"navigationBarTitleText": "课程详情",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/success-case/list",
-			"style": {
-				"navigationBarTitleText": "成功案例",
-				"navigationStyle": "custom"
-			}
-		},
-	{
-		"path": "pages/success-case/detail",
-		"style": {
-			"navigationBarTitleText": "案例详情",
-			"navigationStyle": "custom"
-		}
-	},
-	{
-		"path": "pages/astrology/index",
-		"style": {
-			"navigationBarTitleText": "星命运算",
-			"navigationStyle": "custom"
-		}
-	},
-	{
-		"path": "pages/astrology/zodiac",
-		"style": {
-			"navigationBarTitleText": "属相测算",
-			"navigationStyle": "custom"
-		}
-	},
-	{
-		"path": "pages/astrology/constellation",
-		"style": {
-			"navigationBarTitleText": "星座卡片",
-			"navigationStyle": "custom"
-		}
-	},
-	{
-		"path": "pages/astrology/constellation-match",
-		"style": {
-			"navigationBarTitleText": "星座配对",
-			"navigationStyle": "custom"
-		}
-	},
-	{
-		"path": "pages/astrology/bazi",
-		"style": {
-			"navigationBarTitleText": "八字测算",
-			"navigationStyle": "custom"
-		}
-	},
-	{
-		"path": "pages/astrology/bazi-match",
-		"style": {
-			"navigationBarTitleText": "八字配对",
-			"navigationStyle": "custom"
-		}
-	},
-		{
-			"path": "pages/astrology/mbti",
-			"style": {
-				"navigationBarTitleText": "MBTI测试",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/profile/index",
-			"style": {
-				"navigationBarTitleText": "基本资料",
-				"navigationBarBackgroundColor": "#E91E63",
-				"navigationBarTextStyle": "white"
-			}
-		},
-		{
-			"path": "pages/part-time-matchmaker/index",
-			"style": {
-				"navigationBarTitleText": "兼职红娘",
-				"navigationBarBackgroundColor": "#E91E63",
-				"navigationBarTextStyle": "white"
-			}
-		},
-		{
-			"path": "pages/blacklist/index",
-			"style": {
-				"navigationBarTitleText": "黑名单",
-				"navigationBarBackgroundColor": "#E91E63",
-				"navigationBarTextStyle": "white"
-			}
-		},
-		{
-			"path": "pages/partner-requirement/index",
-			"style": {
-				"navigationBarTitleText": "对象要求",
-				"navigationBarBackgroundColor": "#E91E63",
-				"navigationBarTextStyle": "white"
-			}
-		},
-		{
-			"path": "pages/settings/index",
-			"style": {
-				"navigationBarTitleText": "设置",
-				"navigationBarBackgroundColor": "#E91E63",
-				"navigationBarTextStyle": "white"
-			}
-		},
-		{
-			"path": "pages/customize/index",
-			"style": {
-				"navigationBarTitleText": "私人定制",
-				"navigationBarBackgroundColor": "#E91E63",
-				"navigationBarTextStyle": "white"
-			}
-		},
-		{
-			"path": "pages/vip/index",
-			"style": {
-				"navigationBarTitleText": "VIP会员",
-				"navigationBarBackgroundColor": "#E91E63",
-				"navigationBarTextStyle": "white"
-			}
-		},
-		{
-			"path": "pages/today-recommend/index",
+			"path": "pages/mine/my-dynamics",
 			"style": {
-				"navigationBarTitleText": "今日推荐",
-				"navigationBarBackgroundColor": "#E91E63",
+				"navigationBarTitleText": "我的动态",
 				"navigationBarTextStyle": "white"
 			}
 		},
-		{
-			"path": "pages/match/index",
-			"style": {
-				"navigationBarTitleText": "在线匹配",
-				"navigationStyle": "custom"
-			}
-		},
 		{
 			"path": "pages/mine/my-activities",
 			"style": {
 				"navigationBarTitleText": "我的活动",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/mine/my-dynamics",
-			"style": {
-				"navigationBarTitleText": "我的动态",
-				"navigationStyle": "custom"
+				"navigationBarTextStyle": "white"
 			}
-		},
+		}
+	],
+	"subPackages": [
+		{
+			"root": "subpkg-message",
+			"independent": true,
+			"pages": [
+				{
+					"path": "index/index",
+					"style": {
+						"navigationBarTitleText": "消息",
+						"navigationBarBackgroundColor": "#E91E63",
+						"navigationBarTextStyle": "white"
+					}
+				},
+				{
+					"path": "chat/chat",
+					"style": {
+						"navigationBarTitleText": "聊天",
+						"navigationStyle": "custom"
+					}
+				},
+				{
+					"path": "system/system",
+					"style": {
+						"navigationBarTitleText": "系统消息",
+						"navigationBarBackgroundColor": "#E91E63",
+						"navigationBarTextStyle": "white"
+					}
+				}
+			]
+		},
+		{
+			"root": "pages/matchmaker-workbench",
+			"pages": [
+				{"path": "index", "style": {"navigationBarTitleText": "红娘工作台", "navigationStyle": "custom"}},
+				{"path": "my-resources", "style": {"navigationBarTitleText": "我的资源", "navigationStyle": "custom"}},
+				{"path": "resource-input", "style": {"navigationBarTitleText": "信息录入", "navigationStyle": "custom"}},
+				{"path": "client-detail", "style": {"navigationBarTitleText": "客户信息", "navigationStyle": "custom"}},
+				{"path": "precise-match", "style": {"navigationBarTitleText": "精准匹配", "navigationStyle": "custom"}},
+				{"path": "quality-resources", "style": {"navigationBarTitleText": "优质资源", "navigationStyle": "custom"}},
+				{"path": "points-mall", "style": {"navigationBarTitleText": "积分商城", "navigationStyle": "custom"}},
+				{"path": "courses", "style": {"navigationBarTitleText": "培训课程", "navigationStyle": "custom"}},
+				{"path": "course-detail", "style": {"navigationBarTitleText": "课程详情", "navigationStyle": "custom"}},
+				{"path": "ranking", "style": {"navigationBarTitleText": "红娘排行榜", "navigationStyle": "custom"}},
+				{"path": "message", "style": {"navigationBarTitleText": "消息", "navigationStyle": "custom"}},
+				{"path": "system-messages", "style": {"navigationBarTitleText": "系统通知", "navigationStyle": "custom"}},
+				{"path": "audit-records", "style": {"navigationBarTitleText": "审核记录", "navigationStyle": "custom"}},
+				{"path": "mine", "style": {"navigationBarTitleText": "我的", "navigationStyle": "custom"}},
+				{"path": "sign-in", "style": {"navigationBarTitleText": "签到", "navigationStyle": "custom"}},
+				{"path": "add-resource", "style": {"navigationBarTitleText": "信息录入", "navigationStyle": "custom"}},
+				{"path": "account-settings", "style": {"navigationBarTitleText": "账户设置", "navigationStyle": "custom"}},
+				{"path": "edit-profile", "style": {"navigationBarTitleText": "编辑资料", "navigationStyle": "custom"}},
+				{"path": "product-detail", "style": {"navigationBarTitleText": "商品详情", "navigationStyle": "custom"}},
+				{"path": "points-detail", "style": {"navigationBarTitleText": "积分明细", "navigationStyle": "custom"}},
+				{"path": "earn-points", "style": {"navigationBarTitleText": "赚取积分", "navigationStyle": "custom"}},
+				{"path": "success-case-upload", "style": {"navigationBarTitleText": "撮合成功审核", "navigationStyle": "custom"}},
+				{"path": "my-activities", "style": {"navigationBarTitleText": "我的活动", "navigationStyle": "custom"}}
+			]
+		},
+		{
+			"root": "pages/matchmakers",
+			"pages": [
+				{"path": "list", "style": {"navigationBarTitleText": "红娘服务", "navigationStyle": "custom"}},
+				{"path": "detail", "style": {"navigationBarTitleText": "红娘详情", "navigationStyle": "custom"}}
+			]
+		},
+		{
+			"root": "pages/activities",
+			"pages": [
+				{"path": "list", "style": {"navigationBarTitleText": "活动列表", "navigationStyle": "custom"}},
+				{"path": "detail", "style": {"navigationBarTitleText": "活动详情", "navigationStyle": "custom"}}
+			]
+		},
+		{
+			"root": "pages/courses",
+			"pages": [
+				{"path": "list", "style": {"navigationBarTitleText": "精品课程", "navigationStyle": "custom"}},
+				{"path": "detail", "style": {"navigationBarTitleText": "课程详情", "navigationStyle": "custom"}}
+			]
+		},
+		{
+			"root": "pages/success-case",
+			"pages": [
+				{"path": "list", "style": {"navigationBarTitleText": "成功案例", "navigationStyle": "custom"}},
+				{"path": "detail", "style": {"navigationBarTitleText": "案例详情", "navigationStyle": "custom"}}
+			]
+		},
+		{
+			"root": "pages/astrology",
+			"pages": [
+				{"path": "index", "style": {"navigationBarTitleText": "星命运算", "navigationStyle": "custom"}},
+				{"path": "zodiac", "style": {"navigationBarTitleText": "属相测算", "navigationStyle": "custom"}},
+				{"path": "constellation", "style": {"navigationBarTitleText": "星座卡片", "navigationStyle": "custom"}},
+				{"path": "constellation-match", "style": {"navigationBarTitleText": "星座配对", "navigationStyle": "custom"}},
+				{"path": "bazi", "style": {"navigationBarTitleText": "八字测算", "navigationStyle": "custom"}},
+				{"path": "bazi-match", "style": {"navigationBarTitleText": "八字配对", "navigationStyle": "custom"}},
+				{"path": "mbti", "style": {"navigationBarTitleText": "MBTI测试", "navigationStyle": "custom"}}
+			]
+		},
+		{
+			"root": "pages/profile",
+			"pages": [
+				{"path": "index", "style": {"navigationBarTitleText": "基本资料", "navigationBarBackgroundColor": "#E91E63", "navigationBarTextStyle": "white"}}
+			]
+		},
+		{
+			"root": "pages/part-time-matchmaker",
+			"pages": [
+				{"path": "index", "style": {"navigationBarTitleText": "兼职红娘", "navigationBarBackgroundColor": "#E91E63", "navigationBarTextStyle": "white"}}
+			]
+		},
+		{
+			"root": "pages/blacklist",
+			"pages": [
+				{"path": "index", "style": {"navigationBarTitleText": "黑名单", "navigationBarBackgroundColor": "#E91E63", "navigationBarTextStyle": "white"}}
+			]
+		},
+		{
+			"root": "pages/partner-requirement",
+			"pages": [
+				{"path": "index", "style": {"navigationBarTitleText": "对象要求", "navigationBarBackgroundColor": "#E91E63", "navigationBarTextStyle": "white"}}
+			]
+		},
+		{
+			"root": "pages/settings",
+			"pages": [
+				{"path": "index", "style": {"navigationBarTitleText": "设置", "navigationBarBackgroundColor": "#E91E63", "navigationBarTextStyle": "white"}},
+				{"path": "id-verification", "style": {"navigationBarTitleText": "绑定身份证", "navigationStyle": "custom"}},
+				{"path": "phone-binding", "style": {"navigationBarTitleText": "绑定手机号", "navigationStyle": "custom"}},
+				{"path": "about", "style": {"navigationBarTitleText": "关于我们", "navigationStyle": "default"}}
+			]
+		},
+		{
+			"root": "pages/customize",
+			"pages": [
+				{"path": "index", "style": {"navigationBarTitleText": "私人定制", "navigationBarBackgroundColor": "#E91E63", "navigationBarTextStyle": "white"}}
+			]
+		},
 		{
-			"path": "pages/settings/id-verification",
-			"style": {
-				"navigationBarTitleText": "绑定身份证",
-				"navigationStyle": "custom"
-			}
+			"root": "pages/vip",
+			"pages": [
+				{"path": "index", "style": {"navigationBarTitleText": "VIP会员", "navigationBarBackgroundColor": "#E91E63", "navigationBarTextStyle": "white"}}
+			]
 		},
 		{
-			"path": "pages/settings/phone-binding",
-			"style": {
-				"navigationBarTitleText": "绑定手机号",
-				"navigationStyle": "custom"
-			}
+			"root": "pages/today-recommend",
+			"pages": [
+				{"path": "index", "style": {"navigationBarTitleText": "今日推荐", "navigationBarBackgroundColor": "#E91E63", "navigationBarTextStyle": "white"}}
+			]
 		},
 		{
-			"path": "pages/settings/about",
-			"style": {
-				"navigationBarTitleText": "关于我们",
-				"navigationStyle": "default"
-			}
+			"root": "pages/match",
+			"pages": [
+				{"path": "index", "style": {"navigationBarTitleText": "在线匹配", "navigationStyle": "custom"}}
+			]
 		},
 		{
-			"path": "pages/feedback/index",
-			"style": {
-				"navigationBarTitleText": "用户反馈",
-				"navigationBarBackgroundColor": "#E91E63",
-				"navigationBarTextStyle": "white"
-			}
+			"root": "pages/feedback",
+			"pages": [
+				{"path": "index", "style": {"navigationBarTitleText": "用户反馈", "navigationBarBackgroundColor": "#E91E63", "navigationBarTextStyle": "white"}}
+			]
 		}
+		
 	],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
@@ -485,4 +229,4 @@
 	},
 	"serve": "vue-cli-service serve && webpack-dev-server --open",
 	"uniIdRouter": {}
-}
+}

+ 7 - 9
LiangZhiYUMao/pages/activities/detail.vue

@@ -85,7 +85,7 @@
 	export default {
 		data() {
 			return {
-				gatewayURL: 'http://localhost:8083',
+				gatewayURL: 'https://api.zhongruanke.cn',
 				activityId: null,
 				activity: {
 					name: '加载中...',
@@ -121,10 +121,10 @@
 							description: data.description || data.desc || '暂无介绍',
 							notes: data.notes || data.notice || '请准时参加活动'
 						}
-						console.log('活动详情加载成功:', this.activity)
+					
 					}
 				} catch (error) {
-					console.error('加载活动详情失败:', error)
+					
 					uni.showToast({
 						title: '加载失败',
 						icon: 'none'
@@ -191,7 +191,6 @@
 					
 					return timeStr
 				} catch (error) {
-					console.error('时间格式化失败:', error)
 					return '时间待定'
 				}
 			},
@@ -255,7 +254,7 @@
 						}
 					})
 				} catch (error) {
-					console.error('报名失败:', error)
+					
 					const errorMsg = error.message || '报名失败,请稍后重试'
 					uni.showModal({
 						title: '提示',
@@ -301,7 +300,7 @@
 					},
 					fail: (err) => {
 						uni.hideLoading()
-						console.error('请求支付参数失败:', err)
+						
 						uni.showToast({
 							title: '网络请求失败',
 							icon: 'none'
@@ -337,7 +336,6 @@
 						}
 					},
 					fail: (err) => {
-						console.error('支付失败:', err)
 						if (err.errMsg !== 'requestPayment:fail cancel') {
 							uni.showModal({
 								title: '支付失败',
@@ -356,13 +354,13 @@
 
 			// 图片加载错误处理
 			handleImageError(e) {
-				console.warn('活动封面图片加载失败:', e)
+			
 				this.activity.coverImage = DEFAULT_IMAGES.activity || 'http://115.190.125.125:9001/static-images/default-activity.jpg'
 			},
 
 			// 图片加载成功
 			handleImageLoad(e) {
-				console.log('活动封面图片加载成功')
+			
 			}
 		}
 	}

+ 1 - 2
LiangZhiYUMao/pages/activities/list.vue

@@ -138,8 +138,7 @@
 						}
 					}
 				} catch (error) {
-					console.error('加载活动列表失败:', error)
-					// 当API调用失败时,使用模拟数据
+				
 					if (this.pageNum === 1) {
 						this.activityList = this.mockActivities
 					}

+ 8 - 10
LiangZhiYUMao/pages/astrology/bazi-match.vue

@@ -328,15 +328,13 @@ export default {
 			})
 			
 			try {
-				console.log('开始八字配对分析')
-				console.log('我的八字:', this.myBaziString)
-				console.log('对方出生:', this.targetBirthDate, this.targetTimeDisplay)
+			
 				
 				// 计算对方八字
 				const targetBirthDateObj = new Date(this.targetBirthDate + ' 12:00:00')
 				const targetBaziData = baziUtil.calculateBaZi(targetBirthDateObj, this.targetSelectedHour)
 				
-				console.log('对方八字:', targetBaziData.baziString)
+				
 				
 				// 进行配对分析
 				const matchAnalysis = baziUtil.analyzeBaziMatch(
@@ -344,14 +342,14 @@ export default {
 					targetBaziData
 				)
 				
-				console.log('配对分析结果:', matchAnalysis)
+			
 				
 				// 保存结果
 				this.targetBaziData = targetBaziData
 				this.matchResult = matchAnalysis
 				this.hasResult = true
 				
-				console.log('八字配对分析完成')
+				
 				
 				// 保存到本地存储
 				uni.setStorageSync('baziMatchResult', {
@@ -364,7 +362,7 @@ export default {
 				})
 				
 			} catch (error) {
-				console.error('八字配对分析异常:', error)
+			
 				uni.showToast({
 					title: '配对分析异常,请重试',
 					icon: 'none'
@@ -396,7 +394,7 @@ export default {
 		const currentBazi = uni.getStorageSync('currentBazi')
 		if (currentBazi) {
 			this.myBaziData = currentBazi
-			console.log('获取到我的八字数据:', currentBazi.baziAnalysis.baziString)
+			
 		} else {
 			// 尝试从八字测算结果获取
 			const baziResult = uni.getStorageSync('baziResult')
@@ -406,7 +404,7 @@ export default {
 					birthDate: baziResult.birthDate,
 					timeIndex: baziResult.timeIndex
 				}
-				console.log('从八字测算结果获取数据:', baziResult.baziData.baziString)
+			
 			}
 		}
 		
@@ -424,7 +422,7 @@ export default {
 				this.matchResult = savedMatchResult.matchResult
 				this.hasResult = true
 				
-				console.log('恢复之前的配对结果')
+			
 			}
 		}
 	}

+ 5 - 6
LiangZhiYUMao/pages/astrology/bazi.vue

@@ -379,14 +379,13 @@ export default {
 			})
 			
 			try {
-				console.log('开始八字测算')
-				console.log('出生日期:', this.birthDate, '时辰:', this.timeDisplay)
+			
 				
 				// 计算八字(使用增强版API + 本地算法)
 				const birthDateObj = new Date(this.birthDate + ' 12:00:00')
 				const baziData = await baziUtil.calculateEnhancedBaZi(birthDateObj, this.selectedHour)
 				
-				console.log('八字计算结果:', baziData)
+			
 				
 				// 获取建议
 				const suggestions = baziUtil.getBaziSuggestions(baziData)
@@ -403,7 +402,7 @@ export default {
 				this.suggestions = suggestions
 				this.hasResult = true
 				
-				console.log('八字测算完成')
+			
 				
 				// 保存到本地存储
 				uni.setStorageSync('baziResult', {
@@ -414,7 +413,7 @@ export default {
 				})
 				
 			} catch (error) {
-				console.error('八字测算异常:', error)
+				
 				uni.showToast({
 					title: '测算异常,请重试',
 					icon: 'none'
@@ -502,7 +501,7 @@ export default {
 				this.suggestions = baziUtil.getBaziSuggestions(baziData)
 				this.hasResult = true
 				
-				console.log('恢复之前的八字测算结果')
+			
 			}
 		}
 	}

+ 6 - 7
LiangZhiYUMao/pages/astrology/constellation-match.vue

@@ -313,7 +313,7 @@ export default {
 			this.myConstellationIndex = index
 			this.myConstellation = this.constellationNames[index]
 			this.myConstellationInfo = constellationUtil.getConstellationInfo(this.myConstellation)
-			console.log('选择我的星座:', this.myConstellation)
+		
 		},
 		
 		// 对方星座选择
@@ -322,7 +322,7 @@ export default {
 			this.targetConstellationIndex = index
 			this.targetConstellation = this.constellationNames[index]
 			this.targetConstellationInfo = constellationUtil.getConstellationInfo(this.targetConstellation)
-			console.log('选择对方星座:', this.targetConstellation)
+			
 		},
 
 		// 提交配对
@@ -342,14 +342,13 @@ export default {
 			})
 
 			try {
-				console.log('🔍 开始星座配对分析')
-				console.log('我的星座:', this.myConstellation, '对方星座:', this.targetConstellation)
+			
 				
 				// 生成配对结果
 				this.matchResult = await this.generateMatchResult()
 				
 				this.hasResult = true
-				console.log('✅ 配对分析完成')
+			
 
 				// 保存到本地存储
 				uni.setStorageSync('constellationMatch', {
@@ -360,7 +359,7 @@ export default {
 				})
 
 			} catch (error) {
-				console.error('❌ 配对分析过程异常:', error)
+				
 				
 				uni.showToast({
 					title: '分析异常,请重试',
@@ -412,7 +411,7 @@ export default {
 				}
 				
 			} catch (error) {
-				console.error('生成配对结果异常:', error)
+				
 				// 异常时使用本地算法
 				return this.generateLocalMatchResult()
 			}

+ 5 - 7
LiangZhiYUMao/pages/astrology/constellation.vue

@@ -254,7 +254,7 @@ export default {
 			const constellationName = getConstellation(this.birthday)
 			this.currentConstellation = this.allConstellations.find(c => c.name === constellationName)
 			
-			console.log('选择生日:', this.birthday, '星座:', constellationName)
+			
 		},
 
 		// 格式化生日显示
@@ -283,14 +283,13 @@ export default {
 			})
 
 			try {
-				console.log('🔍 开始星座运势分析')
-				console.log('生日:', this.birthday, '星座:', this.currentConstellation.name)
+				
 				
 				// 生成运势数据
 				await this.generateFortuneData()
 				
 				this.hasResult = true
-				console.log('✅ 运势分析完成')
+			
 
 				// 保存到本地存储
 				uni.setStorageSync('constellationFortune', {
@@ -301,7 +300,7 @@ export default {
 				})
 
 			} catch (error) {
-				console.error('❌ 运势分析过程异常:', error)
+				
 				
 				uni.showToast({
 					title: '分析异常,请重试',
@@ -364,8 +363,7 @@ export default {
 				this.constellationTraits = constellationUtil.generateConstellationTraits(this.currentConstellation.name)
 				
 			} catch (error) {
-				console.error('生成运势数据异常:', error)
-				// 异常时使用默认数据
+			
 				this.todayFortune = this.generateDefaultFortune()
 				this.constellationMatch = { best: [], good: [] }
 				this.luckyElements = []

+ 3 - 12
LiangZhiYUMao/pages/astrology/index.vue

@@ -213,10 +213,10 @@ export default {
 						}
 						// 更新本地存储
 						uni.setStorageSync('userInfo', userInfo)
-						console.log('✅ 从API获取用户信息成功:', userInfo.nickname)
+						
 					}
 				} catch (error) {
-					console.error('❌ 获取用户信息失败:', error)
+					
 				}
 			}
 			
@@ -236,16 +236,7 @@ export default {
 			this.loveFortune = fortuneData.loveFortune
 			this.singleIndex = fortuneData.singleIndex
 			this.luckyRecommend = fortuneData.luckyRecommend
-			
-			// 如果没有完整资料,显示提示
-			if (!this.hasProfile) {
-				console.log('用户资料不完整,显示默认运势数据')
-			} else {
-				console.log('根据用户资料计算运势:', {
-					constellation: this.userConstellation,
-					zodiac: this.userZodiac
-				})
-			}
+		
 		},
 
 		// 返回上一页

+ 1 - 1
LiangZhiYUMao/pages/astrology/mbti.vue

@@ -304,7 +304,7 @@ export default {
 				// 统计测试完成
 				this.testCount++
 			} catch (error) {
-				console.error('计算MBTI结果失败:', error)
+			
 				uni.showToast({
 					title: '计算结果失败',
 					icon: 'error'

+ 6 - 13
LiangZhiYUMao/pages/astrology/zodiac.vue

@@ -208,7 +208,7 @@ export default {
 			const index = e.detail.value
 			this.myZodiacIndex = index
 			this.myZodiac = this.zodiacNames[index]
-			console.log('选择我的生肖:', this.myZodiac)
+		
 		},
 		
 		// 对方生肖选择
@@ -216,7 +216,7 @@ export default {
 			const index = e.detail.value
 			this.targetZodiacIndex = index
 			this.targetZodiac = this.zodiacNames[index]
-			console.log('选择对方生肖:', this.targetZodiac)
+			
 		},
 
 		// 提交配对
@@ -236,15 +236,13 @@ export default {
 			})
 
 			try {
-				console.log('🔍 开始生肖配对分析')
-				console.log('我的生肖:', this.myZodiac, '对方生肖:', this.targetZodiac)
 				
 				// 调用天行数据配对API
 				this.matchResult = await zodiacEnhanced.getZodiacMatch(this.myZodiac, this.targetZodiac)
 				
 				// 检查API结果并降级处理
 				if (!this.matchResult) {
-					console.log('📋 API返回null,使用本地配对数据')
+					
 					this.matchResult = this.getLocalMatchResult()
 					
 					// 显示友好提示
@@ -253,15 +251,10 @@ export default {
 						icon: 'none',
 						duration: 1500
 					})
-				} else {
-					console.log('✅ 使用API配对数据')
-				}
+				} 
 				
 				this.hasResult = true
-				console.log('✅ 配对分析完成', {
-					source: this.matchResult.source,
-					dataFrom: this.matchResult.dataFrom || '未知来源'
-				})
+				
 
 				// 保存到本地存储
 				uni.setStorageSync('zodiacMatch', {
@@ -272,7 +265,7 @@ export default {
 				})
 
 			} catch (error) {
-				console.error('❌ 配对分析过程异常:', error)
+				
 				
 				// 兜底降级到本地数据
 				this.matchResult = this.getLocalMatchResult()

+ 0 - 340
LiangZhiYUMao/pages/astrology/提升权威性方案.md

@@ -1,340 +0,0 @@
-# 星命测算功能权威性提升方案
-
-## 📋 当前问题分析
-
-### 1. 数据来源问题
-- ❌ 今日运势:**随机生成**,无任何依据
-- ⚠️ 幸运元素:**静态数据**,不随日期变化
-- ✅ 属相配对:基于传统理论,但缺乏专业审核
-
-### 2. 权威性不足
-- 没有专业命理师背书
-- 缺乏数据来源说明
-- 没有免责声明
-
----
-
-## 🎯 改进方案
-
-### 方案一:接入第三方专业API(推荐,快速上线)
-
-#### 优质API提供商
-
-**1. 聚合数据 (https://www.juhe.cn/)**
-- ✅ 生肖运势查询API
-- ✅ 星座运势API
-- ✅ 黄历查询API
-- 💰 价格:按次计费,约0.01元/次
-- 📊 数据更新:每日更新
-
-**2. 天行数据 (https://www.tianapi.com/)**
-- ✅ 生肖运势
-- ✅ 星座运势
-- ✅ MBTI测试
-- 💰 免费额度:100次/天,付费约0.005元/次
-
-**3. 阿凡提数据 (https://www.avatardata.cn/)**
-- ✅ 专业命理测算
-- ✅ 八字分析
-- ✅ 配对测算
-- 💰 价格:月付套餐,约300-1000元/月
-
-#### 实施步骤
-
-```javascript
-// 1. 注册API账号,获取Key
-const API_KEY = 'your_api_key_here'
-
-// 2. 在 utils/zodiac.js 中替换函数
-export async function getTodayFortune(zodiac) {
-  try {
-    const res = await uni.request({
-      url: 'https://api.tianapi.com/zodiac/index',
-      data: {
-        key: API_KEY,
-        zodiac: zodiac
-      }
-    })
-    return res.data.result
-  } catch (error) {
-    // 降级到本地数据
-    return getLocalFallbackData()
-  }
-}
-```
-
-#### 预期效果
-- ✅ 数据专业可靠
-- ✅ 每日自动更新
-- ✅ 可标注"数据来源:专业命理API"
-- 💰 成本:约50-300元/月(根据用户量)
-
----
-
-### 方案二:自建专业数据库(长期方案)
-
-#### 实施步骤
-
-**1. 聘请专业命理师(1-2名)**
-- 职责:录入每日运势、审核配对数据
-- 成本:3000-8000元/月
-
-**2. 搭建数据库表结构**
-
-```sql
--- 每日运势表
-CREATE TABLE daily_fortune (
-  id INT PRIMARY KEY AUTO_INCREMENT,
-  zodiac VARCHAR(10),      -- 生肖
-  fortune_date DATE,       -- 日期
-  love_score INT,          -- 爱情运势分数
-  career_score INT,        -- 事业运势分数
-  wealth_score INT,        -- 财运分数
-  health_score INT,        -- 健康分数
-  lucky_color VARCHAR(50), -- 幸运色
-  lucky_number VARCHAR(20),-- 幸运数字
-  suggestion TEXT,         -- 建议
-  expert_id INT,           -- 命理师ID
-  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
-);
-
--- 命理师表
-CREATE TABLE fortune_experts (
-  id INT PRIMARY KEY AUTO_INCREMENT,
-  name VARCHAR(50),
-  title VARCHAR(100),      -- 头衔(如:资深命理师)
-  certificate TEXT,        -- 资质证书
-  years_experience INT,    -- 从业年限
-  introduction TEXT        -- 简介
-);
-
--- 属相配对表(专家审核版)
-CREATE TABLE zodiac_compatibility (
-  zodiac1 VARCHAR(10),
-  zodiac2 VARCHAR(10),
-  compatibility_score INT,
-  level ENUM('best', 'good', 'normal', 'avoid'),
-  analysis TEXT,           -- 配对分析
-  expert_id INT,
-  verified BOOLEAN,        -- 专家认证
-  PRIMARY KEY (zodiac1, zodiac2)
-);
-```
-
-**3. 后端API开发**
-
-```java
-// 示例:获取今日运势
-@GetMapping("/api/astrology/daily-fortune")
-public Result getDailyFortune(@RequestParam String zodiac) {
-    // 查询数据库
-    DailyFortune fortune = fortuneService.getTodayFortune(zodiac);
-    
-    // 返回数据,包含专家信息
-    return Result.success(DailyFortuneVO.builder()
-        .loveScore(fortune.getLoveScore())
-        .careerScore(fortune.getCareerScore())
-        .wealthScore(fortune.getWealthScore())
-        .healthScore(fortune.getHealthScore())
-        .suggestion(fortune.getSuggestion())
-        .expertName(fortune.getExpert().getName())
-        .expertTitle(fortune.getExpert().getTitle())
-        .dataSource("专业命理师团队")
-        .build());
-}
-```
-
-#### 预期效果
-- ✅ 数据完全可控
-- ✅ 可标注专家信息
-- ✅ 建立平台公信力
-- 💰 成本:3000-10000元/月(人工+服务器)
-
----
-
-### 方案三:混合方案(推荐)
-
-#### 实施建议
-
-**阶段一(立即实施)**
-1. 接入第三方API获取每日运势
-2. 添加数据来源标注
-3. 添加免责声明
-
-**阶段二(1-3个月)**
-1. 聘请兼职命理师审核数据
-2. 建立基础数据库
-3. 逐步替换API数据
-
-**阶段三(3-6个月)**
-1. 完全使用自有数据
-2. 打造"专家团队"品牌
-3. 提供付费咨询服务
-
----
-
-## 📝 必须添加的内容
-
-### 1. 免责声明(法律要求)
-
-```vue
-<!-- 在测算结果页面底部添加 -->
-<view class="disclaimer">
-  <view class="disclaimer-title">⚠️ 免责声明</view>
-  <view class="disclaimer-text">
-    本测算结果基于传统文化和统计数据,仅供娱乐参考,不作为人生决策依据。
-    命运掌握在自己手中,幸福需要双方共同经营。请理性对待测算结果。
-  </view>
-</view>
-```
-
-### 2. 数据来源说明
-
-```vue
-<view class="data-source">
-  <text class="source-icon">✓</text>
-  <text class="source-text">数据来源:专业命理API / XX命理师团队</text>
-  <text class="update-time">更新时间:{{ updateTime }}</text>
-</view>
-```
-
-### 3. 专家认证标识
-
-```vue
-<view class="expert-badge" v-if="hasExpertVerified">
-  <image src="/static/verified.png" class="badge-icon"></image>
-  <text>专家认证</text>
-</view>
-```
-
----
-
-## 💡 增强可信度的其他措施
-
-### 1. 用户评价系统
-```javascript
-// 让用户评价准确度
-{
-  "准吗?": "87%用户觉得准",
-  "有帮助吗?": "92%用户觉得有帮助"
-}
-```
-
-### 2. 参考资料引用
-```
-"根据《易经》八卦理论..."
-"参考《十二生肖配对大全》..."
-```
-
-### 3. 统计数据支撑
-```
-"在我们平台的统计中,属蛇和属牛的情侣有85%的契合度"
-```
-
-### 4. 添加专业术语
-```
-"根据三合六合原理..."
-"参考天干地支相生相克理论..."
-```
-
----
-
-## 📊 成本对比
-
-| 方案 | 初期成本 | 月度成本 | 权威性 | 实施难度 |
-|------|---------|---------|--------|---------|
-| 第三方API | 0元 | 50-300元 | ⭐⭐⭐ | 简单 |
-| 自建数据库 | 5000元 | 3000-10000元 | ⭐⭐⭐⭐⭐ | 困难 |
-| 混合方案 | 0元 | 50元起步 | ⭐⭐⭐⭐ | 中等 |
-
----
-
-## 🎯 立即可实施的改进
-
-### 1. 修改文案(0成本)
-
-```javascript
-// 修改前
-tips: '今日运势仅供参考'
-
-// 修改后
-tips: '根据传统生肖理论,今日宜约会、忌争吵。此建议基于统计概率,仅供参考。'
-```
-
-### 2. 添加置信度显示
-
-```vue
-<view class="confidence">
-  <text>可信度:</text>
-  <view class="confidence-bar">
-    <view class="confidence-fill" style="width: 75%"></view>
-  </view>
-  <text>75%</text>
-</view>
-```
-
-### 3. 添加样本量
-
-```vue
-<text class="sample-size">
-  基于10,000+份样本数据统计
-</text>
-```
-
----
-
-## 📱 推荐的第一步
-
-**立即实施(0成本,30分钟):**
-
-1. ✅ 添加免责声明
-2. ✅ 修改文案,降低绝对化表述
-3. ✅ 标注"仅供娱乐参考"
-
-**1周内实施(小成本):**
-
-1. ✅ 注册天行数据API(免费100次/天)
-2. ✅ 接入今日运势API
-3. ✅ 添加"数据来源"标识
-
-**1个月内实施(投入预算):**
-
-1. ✅ 评估是否需要自建数据库
-2. ✅ 考虑聘请兼职命理师
-3. ✅ 开发专家认证体系
-
----
-
-## ⚖️ 法律合规建议
-
-1. **不要宣称**:
-   - ❌ "100%准确"
-   - ❌ "科学算法"
-   - ❌ "命中注定"
-
-2. **建议表述**:
-   - ✅ "仅供娱乐参考"
-   - ✅ "基于传统文化理论"
-   - ✅ "不作为决策依据"
-
-3. **必须添加**:
-   - ✅ 免责声明
-   - ✅ 数据来源说明
-   - ✅ 用户协议(涉及付费咨询时)
-
----
-
-## 📞 联系专业服务商
-
-如需接入专业API,推荐联系:
-- 聚合数据:400-882-7715
-- 天行数据:在线客服
-- 阿凡提:400-6000-121
-
----
-
-**结论**:当前版本适合作为娱乐功能,但需要添加免责声明。如果要提升权威性,建议先接入第三方API(成本低、见效快),长期可考虑自建专家团队。
-
-
-
-

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

@@ -60,7 +60,7 @@
 	export default {
 		data() {
 			return {
-				gatewayURL: 'http://localhost:8083',
+				gatewayURL: 'https://api.zhongruanke.cn',
 				currentUserId: null,
 				defaultAvatar: 'https://via.placeholder.com/100',
 				blacklist: []
@@ -91,7 +91,7 @@
 						userId: this.currentUserId
 					},
 					success: (res) => {
-						console.log('黑名单列表响应:', res)
+						
 						if (res.data && res.data.code === 200) {
 							// 转换后端数据格式到前端需要的格式
 							this.blacklist = res.data.data.map(item => ({
@@ -114,7 +114,7 @@
 						}
 					},
 					fail: (err) => {
-						console.error('加载黑名单失败:', err)
+					
 						uni.showToast({
 							title: '网络请求失败',
 							icon: 'none'
@@ -164,7 +164,7 @@
 							url: `${this.gatewayURL}/api/chatfriend/remove?userId=${this.currentUserId}&blockedUserId=${item.userId}`,
 							method: 'DELETE',
 								success: (response) => {
-									console.log('移除黑名单响应:', response)
+									
 									if (response.data && response.data.code === 200) {
 										// 从列表中移除
 										this.blacklist.splice(index, 1)
@@ -190,7 +190,7 @@
 									}
 								},
 								fail: (err) => {
-									console.error('移除黑名单失败:', err)
+								
 									uni.showToast({
 										title: '网络请求失败',
 										icon: 'none'

+ 22 - 34
LiangZhiYUMao/pages/courses/detail.vue

@@ -88,32 +88,30 @@
 				courseId: null,
 				course: {},
 				DEFAULT_IMAGES,
-				gatewayURL: 'http://localhost:8083',
+				gatewayURL: 'https://api.zhongruanke.cn',
 				currentUserId: null,
 				isPurchased: false
 			}
 		},
 
 		onLoad(options) {
-			console.log('精品课程详情页面加载, 参数:', options)
+		
 			
-			// 获取当前用户ID
+		
 			this.currentUserId = userAuth.getUserId()
-			console.log('当前用户ID:', this.currentUserId)
+			
 			
 			if (options.id) {
 				this.courseId = options.id
-				console.log('课程ID:', this.courseId)
-				// 根据ID设置对应的课程数据
+				
+			
 				this.setCourseDataById(this.courseId)
 				this.loadCourseDetail()
-				// 检查是否已购买
+				
 				this.checkPurchaseStatus()
-			} else {
-				console.log('未传入课程ID,使用默认数据')
-			}
+			} 
+			
 			
-			// 数据健康检查(确保页面显示正常)
 			setTimeout(() => {
 				this.checkDataHealth()
 			}, 100)
@@ -132,27 +130,25 @@
 						cover_image: DEFAULT_IMAGES.course,
 						teacher_avatar: DEFAULT_IMAGES.avatar
 					}
-					console.log('设置课程数据:', this.course.name)
+					
 				}
 			},
 			
 			// 加载课程详情
 			async loadCourseDetail() {
 				try {
-					console.log('尝试从API加载课程详情:', this.courseId)
+					
 					const data = await api.course.getDetail(this.courseId)
 					if (data) {
 						this.course = {
 							...data,
 							purchase_status: 0  // 初始化为未购买,由 checkPurchaseStatus 判断
 						}
-						console.log('API课程详情加载成功, purchase_status:', this.course.purchase_status)
-					} else {
-						console.log('API返回空数据,使用默认课程详情')
-					}
+						
+					} 
 				} catch (error) {
-					console.error('加载课程详情失败:', error)
-					console.log('API调用失败,保留默认课程详情数据')
+					
+					
 					uni.showToast({
 						title: '使用示例数据',
 						icon: 'none',
@@ -167,21 +163,19 @@
 				
 				try {
 					const purchased = await api.courseOrder.checkPurchased(this.currentUserId, this.courseId)
-					console.log('检查购买状态结果:', purchased, typeof purchased)
 					// 只有明确返回 true 时才设置为已购买
 					if (purchased === true) {
 						this.isPurchased = true
 						this.course.purchase_status = 1
 					}
 				} catch (error) {
-					console.log('检查购买状态失败:', error)
-					// 失败时不改变购买状态,默认为未购买
+					
 				}
 			},
 			
-			// 处理购买
+			
 			handlePurchase() {
-				// 检查是否已购买
+			
 				if (this.course.purchase_status === 1 || this.isPurchased) {
 					uni.showToast({
 						title: '您已购买过此课程',
@@ -252,7 +246,7 @@
 					},
 					fail: (err) => {
 						uni.hideLoading()
-						console.error('请求支付参数失败:', err)
+					
 						uni.showToast({
 							title: '网络请求失败',
 							icon: 'none'
@@ -302,7 +296,7 @@
 						}
 					},
 					fail: (payError) => {
-						console.error('支付失败:', payError)
+						
 						if (payError.errMsg.includes('cancel')) {
 							uni.showToast({
 								title: '已取消支付',
@@ -320,10 +314,10 @@
 
 			// 返回
 			goBack() {
-				console.log('课程详情返回上一页')
+				
 				uni.navigateBack({
 					fail: () => {
-						// 返回失败时跳转到课程列表
+						
 						uni.navigateTo({
 							url: '/pages/courses/list'
 						})
@@ -333,12 +327,6 @@
 			
 			// 数据健康检查
 			checkDataHealth() {
-				console.log('=== 精品课程详情页面数据健康检查 ===')
-				console.log('courseId:', this.courseId)
-				console.log('course:', this.course)
-				console.log('DEFAULT_IMAGES:', this.DEFAULT_IMAGES)
-				
-				// 确保关键数据不为空
 				if (!this.course.name || this.course.name === '加载中...') {
 					this.course.name = '恋爱沟通技巧大师课'
 				}

+ 10 - 14
LiangZhiYUMao/pages/courses/list.vue

@@ -116,7 +116,7 @@
 		},
 
 		onLoad() {
-			console.log('精品课程列表页面加载')
+		
 			this.loadCourseList()
 		},
 
@@ -134,14 +134,14 @@
 				this.loading = true
 
 				try {
-					console.log('尝试加载精品课程API数据...')
+					
 					const response = await api.course.getList({
 						page: this.pageNum,
 						pageSize: this.pageSize,
 						status: 1
 					})
 
-					console.log('API返回数据:', response)
+				
 
 					// 处理返回的数据结构
 					let courseData = []
@@ -157,7 +157,7 @@
 						totalCount = response.length
 					}
 
-					console.log('当前页码:', this.pageNum, '返回数据量:', courseData.length, '总数据量:', totalCount)
+					
 
 					if (courseData && courseData.length > 0) {
 						// 处理每个课程数据,确保字段完整
@@ -190,21 +190,17 @@
 						// 判断是否还有更多数据:当前已加载数量 < 总数量
 						this.hasMore = this.courseList.length < totalCount
 
-						console.log('API课程数据加载成功:', processedData.length, '条')
-						console.log('已加载总数:', this.courseList.length, '/', totalCount)
-						console.log('是否还有更多:', this.hasMore)
-						console.log('第一条课程数据:', processedData[0])
+						
 					} else {
 						// 如果API返回为空,使用模拟数据
 						this.hasMore = false
-						console.log('API返回课程数据为空,使用模拟数据')
 						if (this.pageNum === 1) {
 							this.courseList = this.mockCourses
 							this.total = this.mockCourses.length
 						}
 					}
 				} catch (error) {
-					console.error('加载课程列表失败:', error)
+					
 					// 当API调用失败时,使用模拟数据
 					if (this.pageNum === 1) {
 						this.courseList = this.mockCourses
@@ -243,14 +239,14 @@
 
 			// 跳转到详情
 			goToDetail(id) {
-				console.log('跳转到课程详情, id:', id)
+				
 				uni.navigateTo({
 					url: `/pages/courses/detail?id=${id}`,
 					success: () => {
-						console.log('跳转课程详情成功')
+					
 					},
 					fail: (err) => {
-						console.error('跳转课程详情失败:', err)
+						
 						uni.showToast({
 							title: '跳转失败',
 							icon: 'none'
@@ -261,7 +257,7 @@
 
 			// 返回
 			goBack() {
-				console.log('课程列表返回上一页')
+				
 				uni.navigateBack({
 					fail: () => {
 						// 返回失败时跳转首页

+ 3 - 3
LiangZhiYUMao/pages/feedback/index.vue

@@ -114,12 +114,12 @@ export default {
     // 上传单张图片
     async uploadSingleImage(filePath) {
       try {
-        console.log('上传图片:', filePath);
+      
         // 调用后端的图片上传接口
         const imageUrl = await api.feedback.uploadImage(filePath);
         return imageUrl;
       } catch (error) {
-        console.error('上传图片失败:', error);
+       
         throw error;
       }
     },
@@ -192,7 +192,7 @@ export default {
         }, 1500);
       } catch (error) {
         uni.hideLoading();
-        console.error('提交反馈失败:', error);
+      
         let errorMsg = '反馈提交失败,请稍后重试';
         if (error && error.message) {
           errorMsg = error.message;

+ 37 - 85
LiangZhiYUMao/pages/index/index.vue

@@ -18,13 +18,6 @@
 			</view>
 		</view>
 
-		<!-- 个性化欢迎语 -->
-		<!-- <view class="welcome-card" v-if="userInfo.nickname">
-			<view class="welcome-content">
-				<text class="welcome-text">你好,{{ userInfo.nickname }}!</text>
-				<text class="match-info">今天有 <text class="highlight">{{ matchCount }}</text> 位新嘉宾和你匹配哦 ❤️</text>
-			</view>
-		</view> -->
 
 		<!-- 轮播图 -->
 		<view class="banner-section" v-if="bannerList && bannerList.length > 0">
@@ -133,38 +126,7 @@
 			</view>
 		</view>
 
-		<!-- 今日缘分推荐 -->
-		<!-- <view class="section fate-recommend-section" v-if="todayRecommendUsers && todayRecommendUsers.length > 0">
-			<view class="section-header">
-				<text class="section-title">🌟 今日缘分</text>
-				<text class="section-more" @click="goToRecommend">查看更多 ></text>
-			</view>
-			<view class="fate-cards">
-				<view class="fate-card" v-for="(user, index) in todayRecommendUsers" :key="index" 
-					@click="handleUserClick(user)">
-					<view class="user-avatar-wrapper">
-						<image :src="user.avatarUrl || user.avatar" class="user-avatar" mode="aspectFill"
-							:data-section="'todayRecommend'" :data-index="index"
-							@error="handleImageError" @load="handleImageLoad"></image>
-						<view class="online-status" v-if="user.isOnline"></view>
-					</view>
-					<view class="user-basic-info">
-						<text class="user-nickname">{{ user.nickname }}</text>
-						<text class="user-age-location">{{ user.age }}岁 · {{ user.location || user.city }}</text>
-					</view>
-					<view class="match-score">
-						<text class="match-text">匹配度</text>
-						<text class="match-percentage">{{ formatMatchScore(user.compatibilityScore) }}%</text>
-					</view>
-					<view class="user-tags">
-						<text class="user-tag" v-for="(tag, tagIndex) in parseUserTags(user).slice(0, 2)" :key="tagIndex">
-							{{ tag }}
-						</text>
-					</view>
-				</view>
-			</view>
-		</view> -->
-
+		
 		<!-- 个人魅力指数 -->
 		<view class="section charm-index-section" v-if="userInfo.userId">
 			<view class="charm-card">
@@ -212,11 +174,11 @@
 				<text class="tabbar-icon">👍</text>
 				<text class="tabbar-text">推荐</text>
 			</view>
-			<view class="tabbar-item" @click="switchTab('message')">
+			<!-- <view class="tabbar-item" @click="switchTab('message')">
 				<text class="tabbar-icon">💬</text>
 				<text class="tabbar-text">消息</text>
 				<view v-if="unreadCount >= 1" class="tabbar-badge">{{ unreadCount }}</view>
-			</view>
+			</view> -->
 			<view class="tabbar-item" @click="switchTab('mine')">
 				<text class="tabbar-icon">👤</text>
 				<text class="tabbar-text">我的</text>
@@ -321,7 +283,7 @@
 			this.loadSuccessCases()
 			// 监听未读消息数更新事件
 			uni.$on('conversationUnreadUpdate', (totalUnread) => {
-				console.log('📬 首页收到未读数更新:', totalUnread);
+				
 				this.$store.dispatch('updateTotalUnread', totalUnread);
 			});
 		},
@@ -331,7 +293,7 @@
 			uni.$off('conversationUnreadUpdate');
 		},
 		onShow() {
-			console.log('📱 页面onShow触发')
+			
 			// 页面显示时重新加载用户信息(确保登录后能更新)
 			this.loadUserInfo()
 			// 页面显示时查询数据库检查是否为红娘
@@ -343,19 +305,19 @@
 				try {
 					const userId = uni.getStorageSync('userId')
 					if (!userId) {
-						console.log('⚠️ 用户未登录,不显示红娘按钮')
+						
 						this.showMatchmakerButton = false
 						return
 					}
 					
-					console.log('🔍 查询用户红娘状态,userId:', userId)
+					
 					
 					// 调用API查询用户的is_matchmaker字段
 					const result = await api.user.getMatchmakerStatus(userId)
 					
 					if (result && result.isMatchmaker !== undefined) {
 						const isMatchmaker = parseInt(result.isMatchmaker)
-						console.log('✅ 查询成功,isMatchmaker:', isMatchmaker)
+						
 						
 						// 根据查询结果设置按钮显示状态
 						this.showMatchmakerButton = (isMatchmaker === 1)
@@ -366,20 +328,20 @@
 						uni.setStorageSync('userInfo', userInfo)
 						this.userInfo.isMatchmaker = isMatchmaker
 						
-						console.log('🎯 红娘按钮显示状态:', this.showMatchmakerButton ? '显示' : '隐藏')
+						
 					} else {
-						console.log('⚠️ 查询结果异常,不显示红娘按钮')
+						
 						this.showMatchmakerButton = false
 					}
 				} catch (error) {
-					console.error('❌ 查询红娘状态失败:', error)
+				
 					this.showMatchmakerButton = false
 				}
 			},
 			
 			// 前往红娘工作台
 			async goToMatchmakerWorkspace() {
-				console.log('🚀 前往红娘工作台')
+				
 				this.$refs.matchmakerPopup.close()
 				
 				try {
@@ -392,14 +354,14 @@
 					if (!timManager.tim) {
 						try {
 							timManager.init(1600109674)
-							console.log('✅ TIM SDK 初始化完成(首页)')
+						
 						} catch (e) {
-							console.error('❌ TIM 初始化失败(首页):', e)
+							
 						}
 					}
 					
 					const res = await uni.request({
-						url: 'http://localhost:8081/api/matchmaker/current',
+						url: 'https://api.zhongruanke.cn/api/matchmaker/current',
 						method: 'GET',
 						data: { userId }
 					})
@@ -418,7 +380,7 @@
 					
 					// 获取UserSig时使用原始imUserId(包含m_前缀)
 					const sigRes = await uni.request({
-						url: `http://localhost:8083/api/im/getUserSig?userId=${encodeURIComponent(imUserId)}`,
+						url: `https://api.zhongruanke.cn/api/im/getUserSig?userId=${encodeURIComponent(imUserId)}`,
 						method: 'GET'
 					})
 					
@@ -428,28 +390,28 @@
 					}
 					
 					const userSig = sigRes[1].data.data.userSig
-					console.log('✅ 首页获取 UserSig:', userSig ? '成功' : '失败')
+					
 					
 					try {
 						await timManager.logout()
-						console.log('✅ 已登出之前的IM账号(首页)')
+						
 					} catch (e) {
-						console.log('⚠️ 登出失败或未登录(首页):', e.message)
+						
 					}
 					
 					await timManager.login(imUserId, userSig)
-					console.log('✅ 红娘已在首页登录 IM:', imUserId)
+				
 					
 					uni.$emit('matchmakerIMReady', { imUserId })
 				} catch (error) {
-					console.error('❌ 首页初始化红娘IM失败:', error)
+					
 					uni.showToast({ title: '红娘IM初始化失败', icon: 'none' })
 				}
 				
 				uni.navigateTo({
 					url: '/pages/matchmaker-workbench/index',
 					fail: (err) => {
-						console.error('❌ 跳转红娘工作台失败:', err)
+					
 						uni.showToast({ title: '跳转失败', icon: 'none' })
 					}
 				})
@@ -457,7 +419,7 @@
 			
 			// 关闭红娘弹框
 			closeMatchmakerPopup() {
-				console.log('🚫 用户选择不前往红娘工作台')
+				
 				this.$refs.matchmakerPopup.close()
 			},
 			
@@ -488,8 +450,7 @@
 						}))
 					}
 				} catch (error) {
-					console.error('获取轮播图失败:', error)
-					// 使用默认数据
+				
 				}
 			},
 			
@@ -507,14 +468,6 @@ async loadFunctionGridData() {
 			}))
 		}
 	} catch (error) {
-		console.error('获取金刚区功能列表失败:', error)
-		// 使用默认数据作为降级方案
-		this.functionList = [
-			{ id: 1, name: '星命测算', icon: '💖', path: '/pages/astrology/index', bgColor: '#FF6B9D', iconColor: '#FFFFFF', gradient: 'linear-gradient(135deg, #FF6B9D 0%, #FF8EAB 100%)' },
-			{ id: 2, name: '红娘列表', icon: '👤', path: '/pages/matchmakers/list', bgColor: '#6BC5F8', iconColor: '#FFFFFF', gradient: 'linear-gradient(135deg, #6BC5F8 0%, #87CEEB 100%)' },
-			{ id: 4, name: '精品课程', icon: '📚', path: '/pages/courses/list', bgColor: '#FF8C42', iconColor: '#FFFFFF', gradient: 'linear-gradient(135deg, #FF8C42 0%, #FFA366 100%)' },
-			{ id: 5, name: '今日缘分', icon: '💝', path: '/pages/recommend/index', bgColor: '#FF69B4', iconColor: '#FFFFFF', gradient: 'linear-gradient(135deg, #FF69B4 0%, #FF8CC8 100%)', needLogin: true }
-		]
 	}
 },
 			
@@ -543,8 +496,7 @@ async loadFunctionGridData() {
 						this.noticeList = data
 					}
 				} catch (error) {
-					console.error('获取公告失败:', error)
-					// 使用默认数据
+				
 				}
 			},
 
@@ -553,7 +505,7 @@ async loadFunctionGridData() {
 				try {
 					const userId = this.userInfo.userId || parseInt(uni.getStorageSync('userId'))
 					if (!userId) {
-						console.log('用户未登录,跳过今日推荐加载')
+					
 						return
 					}
 					
@@ -580,10 +532,10 @@ async loadFunctionGridData() {
 							isOnline: false  // 可以根据实际情况设置
 						}))
 						
-						console.log('今日缘分推荐加载成功,匹配度最高的用户:', this.todayRecommendUsers)
+						
 					}
 				} catch (error) {
-					console.error('获取推荐用户失败:', error)
+					
 					this.todayRecommendUsers = []
 				}
 			},
@@ -616,7 +568,7 @@ async loadFunctionGridData() {
 							tags.push(...hobbies.slice(0, 2))
 						}
 					} catch (e) {
-						console.error('解析兴趣爱好失败:', e)
+						
 					}
 				}
 				return tags
@@ -633,7 +585,7 @@ async loadFunctionGridData() {
 						// }
 					}
 				} catch (error) {
-					console.error('获取魅力指数失败:', error)
+					
 				}
 			},
 
@@ -658,7 +610,7 @@ async loadFunctionGridData() {
 						}})
 					} 
 				} catch (error) {
-					console.error('获取热门活动失败:', error)
+					
 
 				}
 			},
@@ -714,7 +666,7 @@ async loadFunctionGridData() {
 						this.successCases = []
 					}
 				} catch (error) {
-					console.error('获取成功案例失败:', error)
+					
 					
 				}
 			},
@@ -776,7 +728,7 @@ async loadFunctionGridData() {
 				const section = dataset.section
 				const index = dataset.index
 				
-				console.warn('图片加载失败:', failedSrc, 'section:', section, 'index:', index)
+				
 				
 				const fallbackMap = {
 					banner: DEFAULT_IMAGES.banner,
@@ -915,14 +867,14 @@ async loadFunctionGridData() {
             handleFunctionClick(item) {
                 // 今日缘分:直接跳转到专门的推荐页面
                  if (item && (item.id === 5 || item.name === '今日缘分' || item.name === '今日推荐')) {
-                    console.log('点击今日缘分,跳转到专门页面')
+                  
                     uni.navigateTo({
                         url: '/pages/today-recommend/index',
                         success: () => {
-                            console.log('跳转今日缘分页面成功')
+                            
                         },
                         fail: (err) => {
-                            console.error('跳转今日缘分页面失败:', err)
+                         
                             uni.showToast({
                                 title: '页面跳转失败',
                                 icon: 'none'
@@ -987,7 +939,7 @@ async loadFunctionGridData() {
 			const tabPages = {
 				plaza: '/pages/plaza/index',
 				recommend: '/pages/recommend/index',
-				message: '/pages/message/index',
+				message: '/subpkg-message/index/index',
 				mine: '/pages/mine/index'
 			}
 

+ 19 - 42
LiangZhiYUMao/pages/match/index.vue

@@ -152,7 +152,7 @@ export default {
 		
 		// 选择匹配模式
 		selectMode(mode) {
-			console.log('选择匹配模式:', mode);
+		
 			this.selectedMode = mode;
 			const modeNames = {
 				'smart': '智能算法',
@@ -195,13 +195,12 @@ export default {
 					matchMode: this.selectedMode || 'smart' // 添加匹配模式
 				};
 				
-				console.log('发送匹配请求:', matchData);
+				
 				
 				// 调用匹配接口 - 使用配置文件中的地址
 				const baseUrl = MATCH_API_CONFIG.BASE_URL;
 				const url = `${baseUrl}${MATCH_API_CONFIG.ENDPOINTS.START_MATCH}`;
-				
-				console.log('匹配API地址:', url);
+			
 				
 				const [error, res] = await uni.request({
 					url: url,
@@ -213,8 +212,7 @@ export default {
 					timeout: 10000
 				});
 				
-				console.log('匹配响应:', res);
-				console.log('匹配错误:', error);
+			
 				
 				// 检查是否有错误或响应无效
 				if (error || !res || !res.data) {
@@ -237,23 +235,17 @@ export default {
 						icon: 'none',
 						duration: 3000
 					});
-					console.error('HTTP错误:', res.statusCode, res.data);
+					
 					return;
 				}
-				
-				console.log('=== 匹配响应解析 ===');
-				console.log('完整响应:', JSON.stringify(res.data, null, 2));
-				console.log('code:', res.data.code);
-				console.log('status:', res.data.status);
-				console.log('msg:', res.data.msg);
-				console.log('data字段:', res.data.data);
+			
 				
 				if (res.data.code === 200) {
 					if (res.data.status === 'success') {
 						// 立即匹配成功
 						const matchData = res.data.data;
 						if (!matchData) {
-							console.error('匹配成功但data为空');
+							
 							this.isMatching = false;
 							this.matchStatus = '点击下方按钮开始匹配';
 							uni.showToast({
@@ -284,7 +276,7 @@ export default {
 					});
 				}
 			} catch (error) {
-				console.error('匹配请求失败:', error);
+				
 				this.isMatching = false;
 				this.matchStatus = '点击下方按钮开始匹配';
 				uni.showToast({
@@ -302,8 +294,7 @@ export default {
 			// 每2秒检查一次匹配状态
 			this.pollingTimer = setInterval(async () => {
 				pollCount++;
-				console.log(`轮询匹配状态 (${pollCount}/${maxPolls})...`);
-				
+			
 				// 如果超过最大轮询次数,停止匹配
 				if (pollCount >= maxPolls) {
 					if (this.isMatching) {
@@ -323,17 +314,9 @@ export default {
 					const baseUrl = MATCH_API_CONFIG.BASE_URL;
 					const userId = String(this.userInfo.userId);
 					
-					// 注意:这里假设后端有状态查询接口,如果没有可以注释掉
-					// const res = await uni.request({
-					// 	url: `${baseUrl}${MATCH_API_CONFIG.ENDPOINTS.MATCH_STATUS}?userId=${userId}`,
-					// 	method: 'GET'
-					// });
-					// 
-					// if (res.data && res.data.code === 200 && res.data.status === 'success') {
-					// 	this.handleMatchSuccess(res.data.data);
-					// }
+					
 				} catch (error) {
-					console.error('轮询查询失败:', error);
+					
 				}
 			}, MATCH_API_CONFIG.CONFIG.POLLING_INTERVAL);
 		},
@@ -345,8 +328,7 @@ export default {
 				const baseUrl = MATCH_API_CONFIG.BASE_URL;
 				const userId = String(this.userInfo.userId);
 				const url = `${baseUrl}${MATCH_API_CONFIG.ENDPOINTS.CANCEL_MATCH}?userId=${userId}`;
-				
-				console.log('取消匹配请求:', url);
+			
 				
 				const [error, res] = await uni.request({
 					url: url,
@@ -355,7 +337,7 @@ export default {
 				});
 				
 				if (error) {
-					console.error('取消匹配请求失败:', error);
+				
 					if (showToast) {
 						uni.showToast({
 							title: '取消匹配失败',
@@ -363,7 +345,7 @@ export default {
 						});
 					}
 				} else {
-					console.log('取消匹配响应:', res.data);
+					
 					// 只有在需要显示提示时才显示
 					if (showToast && res.data && res.data.code === 200) {
 						uni.showToast({
@@ -373,7 +355,7 @@ export default {
 					}
 				}
 			} catch (error) {
-				console.error('取消匹配失败:', error);
+			
 				if (showToast) {
 					uni.showToast({
 						title: '取消匹配失败',
@@ -393,14 +375,10 @@ export default {
 		
 		// 处理匹配成功
 		handleMatchSuccess(data) {
-			console.log('=== 处理匹配成功数据 ===');
-			console.log('匹配数据:', data);
-			console.log('数据类型:', typeof data);
-			console.log('数据是否为null:', data === null);
-			console.log('数据是否为undefined:', data === undefined);
+		
 			
 			if (!data || typeof data !== 'object') {
-				console.error('匹配数据无效:', data);
+				
 				this.isMatching = false;
 				this.matchStatus = '点击下方按钮开始匹配';
 				uni.showToast({
@@ -441,7 +419,6 @@ export default {
 				matchedUserInfo = data.matchPair.matchedUser || data.matchPair.user2Info || data.matchPair;
 			}
 			
-			console.log('提取的匹配对象信息:', matchedUserInfo);
 			
 			// 设置匹配用户数据
 			if (matchedUserInfo) {
@@ -455,7 +432,7 @@ export default {
 				};
 			} else {
 				// 如果完全无法提取,使用默认值
-				console.warn('无法提取匹配用户信息,使用默认值');
+				
 				this.matchedUser = {
 					userId: '',
 					nickname: '匹配用户',
@@ -466,7 +443,7 @@ export default {
 				};
 			}
 			
-			console.log('最终匹配用户数据:', this.matchedUser);
+		
 			
 			// 显示匹配成功弹窗
 			this.$refs.matchSuccessPopup.open();

+ 8 - 14
LiangZhiYUMao/pages/matchmaker-workbench/activities.vue

@@ -129,7 +129,7 @@ export default {
 						this.makerId = matchmaker.matchmakerId || matchmaker.matchmaker_id
 					}
 				} catch (e) {
-					console.error('获取红娘信息失败:', e)
+					
 				}
 			}
 			
@@ -154,10 +154,10 @@ export default {
 				const makerInfo = res && res.data ? res.data : res
 				if (makerInfo) {
 					this.currentPoints = makerInfo.points || makerInfo.point || 0
-					console.log('红娘积分:', this.currentPoints)
+				
 				}
 			} catch (error) {
-				console.error('加载红娘信息失败:', error)
+			
 				this.currentPoints = 0
 			}
 		},
@@ -170,7 +170,7 @@ export default {
 					this.exchangedActivities = list.map(item => item.activity_id || item.activityId)
 				}
 			} catch (error) {
-				console.error('加载已兑换活动失败:', error)
+				
 				this.exchangedActivities = []
 			}
 		},
@@ -193,7 +193,7 @@ export default {
 					this.hasMore = false
 				}
 			} catch (error) {
-				console.error('加载活动列表失败:', error)
+				
 				this.hasMore = false
 			} finally {
 				this.loading = false
@@ -250,20 +250,14 @@ export default {
 			}
 
 			try {
-				console.log('兑换参数:', {
-					makerId: this.makerId,
-					activityId: item.id,
-					points: pointsNeeded
-				})
-				
+			
 				const result = await api.matchmakerActivity.exchange({
 					makerId: this.makerId,
 					activityId: item.id,
 					points: pointsNeeded
 				})
 				
-				console.log('兑换结果:', result)
-
+				
 				// API请求成功(request函数已处理code=200的情况,能走到这里说明已成功)
 				uni.showToast({
 					title: '兑换成功',
@@ -279,7 +273,7 @@ export default {
 					})
 				}, 500)
 			} catch (error) {
-				console.error('兑换失败:', error)
+				
 				uni.showToast({
 					title: error.message || '兑换失败',
 					icon: 'none'

+ 11 - 12
LiangZhiYUMao/pages/matchmaker-workbench/activity-detail.vue

@@ -129,7 +129,7 @@ export default {
 						this.makerId = matchmaker.matchmakerId || matchmaker.matchmaker_id
 					}
 				} catch (e) {
-					console.error('获取红娘信息失败:', e)
+				
 				}
 			}
 			
@@ -142,7 +142,7 @@ export default {
 		async loadMakerInfo() {
 			try {
 				const res = await api.matchmaker.getDetail(this.makerId)
-				console.log('红娘信息返回:', res)
+				
 				// 兼容不同的返回格式
 				let makerInfo = res
 				if (res && res.data) {
@@ -151,10 +151,10 @@ export default {
 				if (makerInfo) {
 					// 兼容 snake_case 和 camelCase
 					this.currentPoints = makerInfo.points ?? makerInfo.total_points ?? 0
-					console.log('当前积分:', this.currentPoints)
+					
 				}
 			} catch (error) {
-				console.error('加载红娘信息失败:', error)
+				
 				this.currentPoints = 0
 			}
 		},
@@ -167,7 +167,7 @@ export default {
 					this.activity = data
 				}
 			} catch (error) {
-				console.error('加载活动详情失败:', error)
+				
 				uni.showToast({
 					title: '加载失败',
 					icon: 'none'
@@ -178,10 +178,9 @@ export default {
 		// 检查是否已兑换
 		async checkExchangeStatus() {
 			try {
-				console.log('检查兑换状态, makerId:', this.makerId, 'activityId:', this.activityId)
+			
 				const res = await api.matchmakerActivity.getPurchasedList(this.makerId)
-				console.log('已兑换活动列表返回:', res)
-				// 兼容不同的返回格式
+				
 				let list = res
 				if (res && res.data) {
 					list = res.data
@@ -189,13 +188,13 @@ export default {
 				if (Array.isArray(list) && list.length > 0) {
 					this.hasExchanged = list.some(item => {
 						const itemActivityId = item.activity_id || item.activityId
-						console.log('比较活动ID:', itemActivityId, '==', this.activityId)
+						
 						return itemActivityId == this.activityId
 					})
 				}
-				console.log('是否已兑换:', this.hasExchanged)
+			
 			} catch (error) {
-				console.error('检查兑换状态失败:', error)
+				
 				this.hasExchanged = false
 			}
 		},
@@ -276,7 +275,7 @@ export default {
 					}
 				}
 			} catch (error) {
-				console.error('兑换失败:', error)
+				
 				uni.showToast({
 					title: error.message || '兑换失败',
 					icon: 'none'

+ 1 - 1
LiangZhiYUMao/pages/matchmaker-workbench/add-resource.vue

@@ -243,7 +243,7 @@ export default {
 				})
 				return
 			}
-			console.log('提交表单:', this.formData)
+			
 			uni.showToast({
 				title: '提交成功',
 				icon: 'success'

+ 3 - 3
LiangZhiYUMao/pages/matchmaker-workbench/audit-records.vue

@@ -227,7 +227,7 @@ export default {
 					}
 				}
 			} catch (e) {
-				console.error('获取红娘信息失败', e)
+				
 				uni.showToast({ title: '获取红娘信息失败', icon: 'none' })
 			}
 		},
@@ -257,7 +257,7 @@ export default {
 				this.pageNum++
 				
 			} catch (e) {
-				console.error('加载审核记录失败', e)
+				
 				uni.showToast({ title: '加载失败', icon: 'none' })
 			} finally {
 				this.loading = false
@@ -288,7 +288,7 @@ export default {
 					// 更新本地状态
 					record.isRead = 1
 				} catch (e) {
-					console.error('标记已读失败', e)
+					
 				}
 			}
 		},

+ 40 - 85
LiangZhiYUMao/pages/matchmaker-workbench/client-detail.vue

@@ -271,24 +271,22 @@ export default {
 		}
 	},
 	onLoad(options) {
-		console.log('=== 客户详情页面 onLoad ===')
-		console.log('options:', JSON.stringify(options, null, 2))
 		
 		// 从URL参数获取资源ID
 		let resourceId = null
 		if (options.resourceId) {
 			resourceId = options.resourceId
-			console.log('从resourceId参数获取:', resourceId)
+			
 		} else if (options.id) {
 			// 兼容旧的id参数
 			resourceId = options.id
-			console.log('从id参数获取 (兼容):', resourceId)
+			
 		}
 		
 		// 检查是否从优质资源列表进入
 		if (options.fromQualityResources === '1' || options.fromQualityResources === 1) {
 			this.fromQualityResources = true
-			console.log('从优质资源列表进入')
+			
 		}
 		
 		// 获取当前登录用户的ID
@@ -297,7 +295,7 @@ export default {
 			const rawUserId = parseInt(userId)
 			if (!isNaN(rawUserId) && rawUserId > 0) {
 				this.currentUserId = rawUserId
-				console.log('当前登录用户ID:', this.currentUserId)
+				
 				// 获取当前红娘的matchmaker_id
 				this.getCurrentMatchmakerId()
 			}
@@ -307,18 +305,18 @@ export default {
 			// 确保resourceId是数字类型
 			resourceId = parseInt(resourceId)
 			if (isNaN(resourceId) || resourceId <= 0) {
-				console.error('资源ID无效:', resourceId)
+				
 				uni.showToast({
 					title: '资源ID无效',
 					icon: 'none'
 				})
 				return
 			}
-			console.log('最终使用的resourceId:', resourceId, '类型:', typeof resourceId)
+			
 			this.resourceId = resourceId
 			this.loadClientInfo(resourceId)
 		} else {
-			console.error('未获取到资源ID')
+			
 			uni.showToast({
 				title: '未获取到资源ID',
 				icon: 'none'
@@ -386,7 +384,7 @@ export default {
 		async loadLatestFollowInfo(resourceId) {
 			try {
 				const baseUrl = process.env.NODE_ENV === 'development' 
-					? 'http://localhost:8083/api'  // 开发环境 - 通过网关
+					? 'https://api.zhongruanke.cn/api'  // 开发环境 - 通过网关
 					: 'https://your-domain.com/api'  // 生产环境
 				
 				// 获取最新的跟进记录
@@ -399,7 +397,7 @@ export default {
 				})
 				
 				if (error) {
-					console.error('加载最新跟进信息失败:', error)
+					
 					return
 				}
 				
@@ -459,27 +457,18 @@ export default {
 							this.followForm.remark = ''
 						}
 						
-						console.log('表单字段已更新:', {
-							type: this.followForm.type,
-							progress: this.followForm.progress,
-							matchStatus: this.followForm.matchStatus,
-							invitationStatus: this.followForm.invitationStatus,
-							inviteDate: this.followForm.inviteDate,
-							remark: this.followForm.remark
-						})
-					} else {
-						console.log('暂无跟进记录,保持表单当前值')
-					}
+						
+					} 
 				}
 			} catch (e) {
-				console.error('加载最新跟进信息异常:', e)
+			
 			}
 		},
 		// 加载跟进统计数据
 		async loadFollowStatistics(resourceId) {
 			try {
 				const baseUrl = process.env.NODE_ENV === 'development' 
-					? 'http://localhost:8083/api'  // 开发环境 - 通过网关
+					? 'https://api.zhongruanke.cn/api'  // 开发环境 - 通过网关
 					: 'https://your-domain.com/api'  // 生产环境
 				
 				const [error, res] = await uni.request({
@@ -491,19 +480,13 @@ export default {
 				})
 				
 				if (error) {
-					console.error('加载统计数据失败:', error)
+					
 					return
 				}
 				
 				if (res.statusCode === 200 && res.data && res.data.code === 200) {
 					const statistics = res.data.data
-					console.log('=== 统计数据响应 ===')
-					console.log('完整响应:', JSON.stringify(res.data, null, 2))
-					console.log('统计数据对象:', statistics)
-					console.log('followCount:', statistics?.followCount, statistics?.follow_count)
-					console.log('matchCount:', statistics?.matchCount, statistics?.match_count)
-					console.log('phoneCount:', statistics?.phoneCount, statistics?.phone_count)
-					console.log('interviewCount:', statistics?.interviewCount, statistics?.interview_count)
+				
 					
 					// 更新统计数据(支持驼峰和下划线两种字段名格式)
 					if (this.clientInfo && this.clientInfo.stats) {
@@ -517,20 +500,11 @@ export default {
 						this.clientInfo.stats.phoneCalls = phoneCount
 						this.clientInfo.stats.interviews = interviewCount
 						
-						console.log('更新后的统计数据:', {
-							followTimes: this.clientInfo.stats.followTimes,
-							matchCount: this.clientInfo.stats.matchCount,
-							phoneCalls: this.clientInfo.stats.phoneCalls,
-							interviews: this.clientInfo.stats.interviews
-						})
-					} else {
-						console.warn('clientInfo或stats不存在')
-					}
-				} else {
-					console.error('统计数据接口返回错误:', res.data)
-				}
+						
+					} 
+				} 
 			} catch (e) {
-				console.error('加载统计数据异常:', e)
+				
 			}
 		},
 		// 提交跟进
@@ -559,7 +533,7 @@ export default {
 				})
 				
 				const baseUrl = process.env.NODE_ENV === 'development' 
-					? 'http://localhost:8083/api'  // 开发环境 - 通过网关
+					? 'https://api.zhongruanke.cn/api'  // 开发环境 - 通过网关
 					: 'https://your-domain.com/api'  // 生产环境
 				
 				// 准备请求数据
@@ -588,7 +562,7 @@ export default {
 					remark: this.followForm.remark || '' // 添加备注字段
 				}
 				
-				console.log('保存跟进数据:', requestData)
+				
 				
 				const [error, res] = await uni.request({
 					url: `${baseUrl}/my-resource/update-follow/${this.resourceId}`,
@@ -602,7 +576,7 @@ export default {
 				uni.hideLoading()
 				
 				if (error) {
-					console.error('保存跟进失败:', error)
+				
 					uni.showToast({
 						title: '保存失败',
 						icon: 'none'
@@ -637,7 +611,7 @@ export default {
 				}
 			} catch (e) {
 				uni.hideLoading()
-				console.error('保存跟进异常:', e)
+				
 				uni.showToast({
 					title: '保存失败,请稍后重试',
 					icon: 'none'
@@ -647,13 +621,13 @@ export default {
 		// 获取当前红娘的matchmaker_id
 		async getCurrentMatchmakerId() {
 			if (!this.currentUserId) {
-				console.warn('当前用户ID为空,无法获取红娘ID')
+				
 				return
 			}
 			
 			try {
 				const baseUrl = process.env.NODE_ENV === 'development' 
-					? 'http://localhost:8083/api'  // 开发环境 - 通过网关
+					? 'https://api.zhongruanke.cn/api'  // 开发环境 - 通过网关
 					: 'https://your-domain.com/api'  // 生产环境
 				
 				// 根据user_id查询红娘信息
@@ -663,49 +637,46 @@ export default {
 				})
 				
 				if (error) {
-					console.error('获取红娘信息失败:', error)
+					
 					return
 				}
 				
 				if (res.statusCode === 200 && res.data && res.data.code === 200) {
 					const matchmaker = res.data.data
 					this.currentMatchmakerId = matchmaker.matchmakerId || matchmaker.matchmaker_id
-					console.log('获取到当前红娘的matchmaker_id:', this.currentMatchmakerId)
-					
+				
 					// 如果已经加载了资源信息,重新判断是否可以跟进
 					if (this.resourceMatchmakerId !== null && this.resourceMatchmakerId !== undefined) {
 						if (this.fromQualityResources) {
 							if (!this.currentMatchmakerId || this.resourceMatchmakerId !== this.currentMatchmakerId) {
 								this.canFollow = false
-								console.log('从优质资源列表进入,且资源不属于当前红娘,禁用跟进功能')
+								
 							} else {
 								this.canFollow = true
-								console.log('资源属于当前红娘,可以跟进')
+								
 							}
 						}
 					}
 				}
 			} catch (e) {
-				console.error('获取红娘信息异常:', e)
+			
 			}
 		},
 		// 从API加载客户信息
 		async loadClientInfo(resourceId) {
 			try {
-				console.log('=== 开始加载客户信息 ===')
-				console.log('resourceId:', resourceId, '类型:', typeof resourceId)
+				
 				
 				uni.showLoading({
 					title: '加载中...'
 				})
 				
 				const baseUrl = process.env.NODE_ENV === 'development' 
-					? 'http://localhost:8083/api'  // 开发环境 - 通过网关
+					? 'https://api.zhongruanke.cn/api'  // 开发环境 - 通过网关
 					: 'https://your-domain.com/api'  // 生产环境
 				
 				const requestUrl = `${baseUrl}/my-resource/client-detail/${resourceId}`
-				console.log('请求URL:', requestUrl)
-				
+			
 				const [error, res] = await uni.request({
 					url: requestUrl,
 					method: 'GET',
@@ -715,13 +686,12 @@ export default {
 					}
 				})
 				
-				console.log('请求结果 - error:', error)
-				console.log('请求结果 - res:', res)
+				
 				
 				uni.hideLoading()
 				
 				if (error) {
-					console.error('加载客户信息失败:', error)
+					
 					let errorMsg = '加载失败'
 					if (error.errMsg) {
 						if (error.errMsg.includes('timeout') || error.errMsg.includes('超时')) {
@@ -741,8 +711,7 @@ export default {
 				if (res.statusCode === 200 && res.data && res.data.code === 200) {
 					const data = res.data.data
 					
-					console.log('=== 客户详情数据 ===')
-					console.log('完整数据:', JSON.stringify(data, null, 2))
+					
 					
 					// 支持驼峰和下划线两种字段名格式
 					const resourceId = data.resourceId || data.resource_id
@@ -754,8 +723,6 @@ export default {
 					// 获取资源的matchmaker_id
 					const resourceMatchmakerId = data.matchmakerId || data.matchmaker_id
 					this.resourceMatchmakerId = resourceMatchmakerId
-					console.log('资源的matchmaker_id:', resourceMatchmakerId)
-					console.log('当前红娘的matchmaker_id:', this.currentMatchmakerId)
 					
 					// 判断是否可以跟进:如果从优质资源列表进入,且资源不属于当前红娘,则不能跟进
 					if (this.fromQualityResources) {
@@ -765,10 +732,10 @@ export default {
 						}
 						if (!this.currentMatchmakerId || this.resourceMatchmakerId !== this.currentMatchmakerId) {
 							this.canFollow = false
-							console.log('从优质资源列表进入,且资源不属于当前红娘,禁用跟进功能')
+							
 						} else {
 							this.canFollow = true
-							console.log('资源属于当前红娘,可以跟进')
+						
 						}
 					} else {
 						// 从我的资源列表进入,默认可以跟进
@@ -788,17 +755,7 @@ export default {
 					const preferredCity = data.preferredCity || data.preferred_city
 					const otherRequirements = data.otherRequirements || data.other_requirements
 					
-					console.log('资源ID:', resourceId)
-					console.log('姓名:', data.name)
-					console.log('头像URL:', avatarUrl)
-					console.log('备用手机号:', backupPhone)
-					console.log('择偶要求(mate_selection_criteria):', mateSelectionCriteria)
-					console.log('择偶要求详情数据:', {
-						minAge, maxAge, minHeight, maxHeight,
-						educationLevel, salaryRange, houseRequirement,
-						carRequirement, maritalStatusRequirement,
-						preferredCity, otherRequirements
-					})
+					
 					
 					// 处理标签列表(从后端返回的tags字段,如果没有则使用星座和职业)
 					let clientTags = []
@@ -870,8 +827,6 @@ export default {
 					
 					// 标签已经在上面处理过了,这里不需要再添加
 					
-					console.log('=== 映射后的clientInfo ===')
-					console.log('clientInfo:', JSON.stringify(this.clientInfo, null, 2))
 					
 					// 加载跟进统计数据
 					this.loadFollowStatistics(resourceId)
@@ -883,7 +838,7 @@ export default {
 				}
 			} catch (e) {
 				uni.hideLoading()
-				console.error('加载客户信息失败:', e)
+				
 				uni.showToast({
 					title: '加载失败',
 					icon: 'none'

+ 6 - 6
LiangZhiYUMao/pages/matchmaker-workbench/course-detail.vue

@@ -98,7 +98,7 @@
 		},
 
 		onLoad(options) {
-			console.log('红娘课程详情页面加载, 参数:', options)
+		
 			
 			if (options.id) {
 				this.courseId = options.id
@@ -125,7 +125,7 @@
 						}
 					}
 				} catch (error) {
-					console.error('获取红娘信息失败:', error)
+					
 					this.loadCourseDetail()
 				}
 			},
@@ -137,7 +137,7 @@
 					const res = await api.pointsMall.getBalance(this.makerId)
 					this.currentPoints = res || 0
 				} catch (error) {
-					console.error('获取积分失败:', error)
+				
 				}
 			},
 
@@ -157,7 +157,7 @@
 						this.setMockCourse()
 					}
 				} catch (error) {
-					console.error('加载课程详情失败:', error)
+					
 					this.setMockCourse()
 				}
 			},
@@ -189,7 +189,7 @@
 						this.isPurchased = res.exchanged
 					}
 				} catch (error) {
-					console.log('检查兑换状态失败:', error)
+					
 				}
 			},
 
@@ -273,7 +273,7 @@
 					}
 				} catch (error) {
 					uni.hideLoading()
-					console.error('兑换失败:', error)
+					
 					uni.showToast({
 						title: error.msg || '兑换失败',
 						icon: 'none'

+ 11 - 50
LiangZhiYUMao/pages/matchmaker-workbench/courses.vue

@@ -93,7 +93,7 @@
 		},
 
 		onLoad() {
-			console.log('红娘培训课程页面加载')
+			
 			this.loadMakerInfo()
 		},
 
@@ -118,14 +118,14 @@
 						const matchmakerInfo = await api.matchmaker.getByUserId(userInfo.userId)
 						if (matchmakerInfo) {
 							this.makerId = matchmakerInfo.matchmakerId || matchmakerInfo.matchmaker_id
-							console.log('红娘ID:', this.makerId)
+							
 							this.loadCurrentPoints()
 							this.loadPurchasedCourses()
 							this.loadCourseList()
 						}
 					}
 				} catch (error) {
-					console.error('获取红娘信息失败:', error)
+					
 					this.loadCourseList()
 				}
 			},
@@ -136,9 +136,9 @@
 				try {
 					const res = await api.pointsMall.getBalance(this.makerId)
 					this.currentPoints = res || 0
-					console.log('当前积分:', this.currentPoints)
+					
 				} catch (error) {
-					console.error('获取积分失败:', error)
+					
 				}
 			},
 
@@ -151,9 +151,9 @@
 					if (res && Array.isArray(res)) {
 						this.purchasedCourseIds = res.map(item => item.course_id || item.courseId || item.id)
 					}
-					console.log('已兑换课程ID:', this.purchasedCourseIds)
+					
 				} catch (error) {
-					console.error('获取已兑换课程失败:', error)
+					
 				}
 			},
 
@@ -163,7 +163,7 @@
 				this.loading = true
 
 				try {
-					console.log('加载红娘培训课程列表...', this.activeTab)
+					
 					// 使用红娘课程独立API,根据当前tab传入分类类型
 					const response = await api.matchmakerCourse.getList({
 						categoryType: this.activeTab
@@ -206,7 +206,7 @@
 						}
 					}
 				} catch (error) {
-					console.error('加载课程列表失败:', error)
+					
 					if (this.pageNum === 1) {
 						this.courseList = this.getMockCourses()
 						this.total = this.courseList.length
@@ -220,46 +220,7 @@
 			// 模拟数据
 			getMockCourses() {
 				return [
-					{
-						id: 1,
-						name: '非暴力沟通:让问题更...',
-						teacher_name: '王老师',
-						rating: 4.9,
-						points_price: 2990,
-						student_count: 54,
-						cover_image: 'https://images.unsplash.com/photo-1506744038136-46273834b3fb?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60',
-						isPurchased: false
-					},
-					{
-						id: 2,
-						name: '红娘新手入门:相亲场...',
-						teacher_name: '张老师',
-						rating: 4.5,
-						points_price: 890,
-						student_count: 33,
-						cover_image: 'https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60',
-						isPurchased: false
-					},
-					{
-						id: 3,
-						name: '从零做红娘:牵线必备...',
-						teacher_name: '高老师',
-						rating: 4.9,
-						points_price: 1990,
-						student_count: 45,
-						cover_image: 'https://images.unsplash.com/photo-1516321318423-f06f85e504b3?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60',
-						isPurchased: false
-					},
-					{
-						id: 4,
-						name: '新手红娘必学:相亲沟...',
-						teacher_name: '魏老师',
-						rating: 4.4,
-						points_price: 990,
-						student_count: 54,
-						cover_image: 'https://images.unsplash.com/photo-1502672260266-1c1ef2d93688?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60',
-						isPurchased: false
-					}
+					
 				]
 			},
 
@@ -351,7 +312,7 @@
 					}
 				} catch (error) {
 					uni.hideLoading()
-					console.error('兑换失败:', error)
+					
 					uni.showToast({
 						title: error.msg || '兑换失败',
 						icon: 'none'

+ 5 - 5
LiangZhiYUMao/pages/matchmaker-workbench/earn-points.vue

@@ -95,7 +95,7 @@ export default {
             uni.setStorageSync('userInfo', userInfo)
           }
         } catch (e) {
-          console.error('获取红娘信息失败:', e)
+         
         }
       }
       
@@ -118,7 +118,7 @@ export default {
         }
         this.isSignedToday = data === true || data?.isCheckedIn === true || data?.checked === true
       } catch (e) {
-        console.error('检查签到状态失败:', e)
+       
       }
     },
     
@@ -128,7 +128,7 @@ export default {
         const res = await api.pointsMall.getBalance(this.makerId)
         this.balance = res.balance || 0
       } catch (e) {
-        console.error('获取积分余额失败:', e)
+       
       }
     },
     
@@ -137,7 +137,7 @@ export default {
         const res = await api.pointsMall.getRules()
         this.rules = res || []
       } catch (e) {
-        console.error('获取积分规则失败:', e)
+       
       }
     },
     
@@ -242,7 +242,7 @@ export default {
           })
         }
       } catch (e) {
-        console.error('签到失败:', e)
+       
         // 如果是已签到的错误,更新状态
         if (e.message && e.message.includes('已签到') || e.msg && e.msg.includes('已签到')) {
           this.isSignedToday = true

+ 5 - 5
LiangZhiYUMao/pages/matchmaker-workbench/edit-profile.vue

@@ -235,7 +235,7 @@ export default {
           }
         }
       } catch (e) {
-        console.error('加载红娘资料失败', e)
+      
         uni.showToast({ title: '加载资料失败', icon: 'none' })
       }
     },
@@ -254,7 +254,7 @@ export default {
           }
         }
       } catch (e) {
-        console.error('加载省份列表失败', e)
+        
       }
     },
 
@@ -278,7 +278,7 @@ export default {
           }
         }
       } catch (e) {
-        console.error('加载城市列表失败', e)
+    
       }
     },
 
@@ -299,7 +299,7 @@ export default {
           }
         }
       } catch (e) {
-        console.error('加载区县列表失败', e)
+        
       }
     },
 
@@ -421,7 +421,7 @@ export default {
           this.handleBack()
         }, 1200)
       } catch (e) {
-        console.error('保存红娘资料失败', e)
+        
         uni.showToast({ title: '保存失败,请稍后重试', icon: 'none' })
       }
     }

+ 17 - 19
LiangZhiYUMao/pages/matchmaker-workbench/index.vue

@@ -109,12 +109,12 @@
         <view class="tabbar-icon"></view>
         <text class="tabbar-text">排行榜</text>
       </view>
-      <view class="tabbar-item message" @click="navigateToMessage">
+      <!-- <view class="tabbar-item message" @click="navigateToMessage">
         <view class="tabbar-icon">
           <view v-if="unreadCount > 0" class="badge">{{ unreadCount }}</view>
         </view>
         <text class="tabbar-text">消息</text>
-      </view>
+      </view> -->
       <view class="tabbar-item mine" @click="navigateToMine">
         <view class="tabbar-icon"></view>
         <text class="tabbar-text">我的</text>
@@ -164,13 +164,13 @@ export default {
 				try {
 					const userInfo = uni.getStorageSync('userInfo')
 					if (!userInfo || !userInfo.userId) {
-						console.log('未登录,无法获取红娘信息')
+						
 						return
 					}
 					
 					// 根据userId获取红娘信息
 					const res = await api.matchmaker.getByUserId(userInfo.userId)
-					console.log('红娘信息原始返回:', res)
+				
 					
 					// 解析返回数据(可能被包装在data字段中)
 					let matchmaker = res
@@ -178,7 +178,7 @@ export default {
 						matchmaker = res.data
 					}
 					
-					console.log('解析后红娘信息:', matchmaker)
+					
 					
 					if (matchmaker && (matchmaker.matchmakerId || matchmaker.matchmaker_id)) {
 						// 获取红娘ID
@@ -194,12 +194,10 @@ export default {
 						// 将matchmakerId保存到userInfo中,供其他页面使用
 						userInfo.matchmakerId = matchmakerId
 						uni.setStorageSync('userInfo', userInfo)
-						console.log('设置红娘信息:', this.matchmakerInfo, '红娘ID:', matchmakerId)
-					} else {
-						console.log('未找到红娘信息,使用默认值')
-					}
+						
+					} 
 				} catch (e) {
-					console.error('加载红娘信息失败:', e)
+					
 				}
 			},
 			
@@ -216,7 +214,7 @@ export default {
 					// 只取前3名显示
 					this.bestMatchmakers = list.slice(0, 3)
 				} catch (e) {
-					console.error('加载排行榜数据失败:', e)
+					
 				}
 			},
 			// 加载公告数据
@@ -233,7 +231,7 @@ export default {
 							this.startAnnouncementCarousel()
 						}
 					} catch (e) {
-						console.error('加载公告失败:', e)
+						
 					}
 				},
 					
@@ -241,23 +239,23 @@ export default {
 				async loadFunctionGridData() {
 			try {
 				// 获取红娘端金刚区功能列表
-				console.log('开始请求金刚区数据...')
+				
 				const res = await api.home.getFunctionGridByType('matchmaker')
-				console.log('金刚区API返回结果:', res)
+			
 				
 				// 由于api.js中的request函数已经处理了响应,res直接是res.data.data或res.data
 				if (Array.isArray(res)) {
 					this.functionList = res
-					console.log('金刚区数据加载成功,共', this.functionList.length, '项:', this.functionList)
+					
 				} else if (res && res.code === 200 && Array.isArray(res.data)) {
 					this.functionList = res.data
-					console.log('金刚区数据加载成功,共', this.functionList.length, '项:', this.functionList)
+					
 				} else {
-					console.error('金刚区API返回数据格式不正确:', res)
+				
 					this.functionList = []
 				}
 			} catch (e) {
-				console.error('加载金刚区功能失败:', e)
+				c
 				this.functionList = []
 			}
 		},
@@ -352,7 +350,7 @@ export default {
 			},
 			// 搜索
 			handleSearch() {
-				console.log('搜索')
+				
 			}
 		}
 	}

+ 21 - 24
LiangZhiYUMao/pages/matchmaker-workbench/message.vue

@@ -155,14 +155,14 @@
 				<view class="tabbar-icon"></view>
 				<text class="tabbar-text">排行榜</text>
 			</view>
-			<view class="tabbar-item message active" @click="navigateToMessage">
+			<!-- <view class="tabbar-item message active" @click="navigateToMessage">
 				<view class="tabbar-icon">
 					<view v-if="totalUnreadCount > 0" class="badge">
 						{{ totalUnreadCount > 99 ? '99+' : totalUnreadCount }}
 					</view>
 				</view>
 				<text class="tabbar-text">消息</text>
-			</view>
+			</view> -->
 			<view class="tabbar-item mine" @click="navigateToMine">
 				<view class="tabbar-icon"></view>
 				<text class="tabbar-text">我的</text>
@@ -234,8 +234,7 @@
 		},
 		
 		onLoad() {
-			// 为避免误用用户端 IM 账号,这里不再复用当前 TIM 登录状态,进入页面即按红娘流程重新初始化
-			console.log('🔍 红娘消息页强制按红娘流程初始化 IM')
+			
 			this.initIM()
 		},
 		
@@ -316,7 +315,7 @@
 						}
 					}
 				} catch (e) {
-					console.log('红娘消息页加载系统未读失败', e)
+					
 				}
 			},
 
@@ -343,7 +342,7 @@
 						this.matchSuccessUnread = res.data || 0
 					}
 				} catch (e) {
-					console.log('加载撮合成功通知未读数失败', e)
+					
 				}
 			},
 
@@ -361,7 +360,7 @@
 					
 					// 2. 获取红娘信息
 					const res = await uni.request({
-						url: 'http://localhost:8081/api/matchmaker/current',
+						url: 'https://api.zhongruanke.cn:8081/api/matchmaker/current',
 						method: 'GET',
 						data: { userId }
 					})
@@ -375,14 +374,14 @@
 					this.imUserId = this.matchmakerInfo.imUserId  // m_1
 					this.matchmakerId = this.matchmakerInfo.matchmakerId || this.matchmakerInfo.matchmaker_id
 					
-					console.log('✅ 红娘信息:', this.matchmakerInfo)
+					
 					
 					// 加载撮合成功通知未读数
 					this.loadMatchSuccessUnread()
 					
 					// 3. 获取 UserSig
 					const sigRes = await uni.request({
-						url: `http://localhost:8083/api/im/getUserSig?userId=${this.imUserId}`,
+						url: `https://api.zhongruanke.cn/api/im/getUserSig?userId=${this.imUserId}`,
 						method: 'GET'
 					})
 					
@@ -392,19 +391,18 @@
 					}
 					
 					const userSig = sigRes[1].data.data.userSig
-					console.log('✅ 获取到 UserSig:', userSig ? '成功' : '失败')
 					
 					// 4. 先登出当前账号(如果已登录)
 					try {
 						await timManager.logout()
-						console.log('✅ 已登出之前的账号')
+						
 					} catch (e) {
-						console.log('⚠️ 登出失败或未登录:', e.message)
+						
 					}
 					
 					// 5. 以红娘身份登录 IM
 					await timManager.login(this.imUserId, userSig)
-					console.log('✅ 红娘已登录 IM:', this.imUserId)
+				
 					
 					// 6. 监听事件
 					this.addListeners()
@@ -413,7 +411,7 @@
 					await this.loadConversationList()
 					
 				} catch (error) {
-					console.error('❌ 初始化 IM 失败:', error)
+					
 					uni.showToast({ title: '初始化失败', icon: 'none' })
 				} finally {
 					this.loading = false
@@ -425,7 +423,7 @@
 				try {
 					// SDK 未登录 / 未 ready 时不调用会话列表接口,避免报“接口调用时机不合理”
 					if (!timManager.isLogin || !timManager.tim) {
-						console.log('⚠️ TIM 未 ready,暂不加载会话列表')
+						
 						return
 					}
 					const tim = timManager.getTim()
@@ -440,9 +438,9 @@
 						return total + (conv.unreadCount || 0)
 					}, 0)
 					
-					console.log('✅ 会话列表:', this.conversationList)
+					
 				} catch (error) {
-					console.error('❌ 加载会话列表失败:', error)
+					
 				}
 			},
 			
@@ -466,14 +464,13 @@
 			
 			// 收到新消息
 			onMessageReceived(event) {
-				console.log('📩 收到新消息:', event.data)
-				// 刷新会话列表
+				
 				this.loadConversationList()
 			},
 			
 			// 会话列表更新
 			onConversationListUpdated(event) {
-				console.log('🔄 会话列表更新:', event.data)
+				
 				this.conversationList = event.data || []
 				
 				// 补全头像昵称后再计算未读
@@ -508,10 +505,10 @@
 					const uniqueIds = Array.from(new Set(userIds))
 					if (uniqueIds.length === 0) return
 					
-					console.log('🔄 红娘消息页批量获取用户信息,数量:', uniqueIds.length)
+				
 					
 					const res = await uni.request({
-						url: 'http://localhost:8083/api/user/batch',
+						url: 'https://api.zhongruanke.cn/api/user/batch',
 						method: 'GET',
 						data: {
 							userIds: uniqueIds.join(',')
@@ -519,7 +516,7 @@
 					})
 					
 					if (!res[1] || res[1].statusCode !== 200 || res[1].data.code !== 200) {
-						console.warn('⚠️ 红娘消息页批量获取用户信息失败')
+						
 						return
 					}
 					
@@ -550,7 +547,7 @@
 						return conv
 					})
 				} catch (error) {
-					console.error('❌ 红娘消息页加载用户头像失败:', error)
+					
 				}
 			},
 			

+ 19 - 25
LiangZhiYUMao/pages/matchmaker-workbench/mine.vue

@@ -106,12 +106,12 @@
         <view class="tabbar-icon"></view>
         <text class="tabbar-text">排行榜</text>
       </view>
-      <view class="tabbar-item message" @click="navigateToMessage">
+      <!-- <view class="tabbar-item message" @click="navigateToMessage">
         <view class="tabbar-icon">
           <view v-if="unreadCount > 0" class="badge">{{ unreadCount }}</view>
         </view>
         <text class="tabbar-text">消息</text>
-      </view>
+      </view> -->
       <view class="tabbar-item mine active" @click="navigateToMine">
         <view class="tabbar-icon"></view>
         <text class="tabbar-text">我的</text>
@@ -293,15 +293,15 @@ export default {
     async loadProfileData() {
       try {
         const userInfo = uni.getStorageSync('userInfo')
-        console.log('从本地存储获取到的用户信息:', userInfo)
+      
         // 模拟用户信息,用于测试
         const testUserId = 19
         const userId = userInfo && userInfo.userId ? userInfo.userId : testUserId
-        console.log('使用的userId:', userId)
+       
         // 调用API获取红娘信息
-        console.log('开始调用API获取红娘信息...')
+        
         const matchmakerInfo = await api.matchmaker.getByUserId(userId)
-        console.log('API调用结果:', matchmakerInfo)
+       
         if (matchmakerInfo) {
           const levelNames = ['', '青铜', '白银', '黄金', '铂金', '钻石']
           const currentLevel = matchmakerInfo.level || 1
@@ -312,7 +312,7 @@ export default {
             female: 'http://115.190.125.125:9000/dynamic-comments/dynamics/c7fb04d7-ee4d-4b3d-bcef-f246da9c841f.png'
           }
           const avatarUrl = matchmakerInfo.avatarUrl || matchmakerInfo.avatar_url || (matchmakerInfo.gender === 1 ? defaultAvatars.male : defaultAvatars.female)
-          console.log('获取到的红娘信息:', matchmakerInfo)
+         
           this.profile = {
             realName: matchmakerInfo.real_name || '',
             avatarUrl: avatarUrl,
@@ -327,12 +327,10 @@ export default {
             pointsToNextLevel: matchmakerInfo.points_to_next_level || 0,
             levelProgress: matchmakerInfo.level_progress || 0
           }
-          console.log('更新后的profile数据:', this.profile)
-        } else {
-          console.log('matchmakerInfo为空,无法更新profile数据')
-        }
+         
+        } 
       } catch (error) {
-        console.error('加载个人资料失败:', error)
+       
         uni.showToast({
           title: '加载失败,请稍后重试: ' + error.message,
           icon: 'none'
@@ -352,7 +350,7 @@ export default {
           this.continuousDays = 0
           this.totalDays = 0
           this.signedDays = []
-          console.warn('没有有效的userId,无法检查签到状态')
+    
           return
         }
 
@@ -363,7 +361,7 @@ export default {
           this.continuousDays = 0
           this.totalDays = 0
           this.signedDays = []
-          console.warn('没有有效的makerId,无法检查签到状态')
+        
           return
         }
 
@@ -371,7 +369,7 @@ export default {
 
         // 检查今日是否已签到
         const res = await api.matchmaker.checkinStatus(makerId)
-        console.log('检查签到状态返回结果:', res)
+     
         let signed = false
         if (typeof res === 'boolean') {
           signed = res
@@ -393,7 +391,6 @@ export default {
 
         // 获取签到统计
         const stats = await api.matchmaker.checkinStats(makerId)
-        console.log('获取签到统计返回结果:', stats)
         
         // 获取当前年月
         const today = new Date()
@@ -402,7 +399,7 @@ export default {
         
         // 获取本月所有签到日期
         const checkinInfo = await api.matchmaker.checkinInfo(makerId, year, month)
-        console.log('获取签到信息返回结果:', checkinInfo)
+        
 
         // 初始化签到记录数组
         this.signedDays = []
@@ -430,11 +427,9 @@ export default {
           // 去重并排序
           this.signedDays = [...new Set(signedDays)].sort((a, b) => a - b)
         }
-        console.log('最终的signedDays:', this.signedDays)
-
-        console.log('最终的signedDays:', this.signedDays)
+      
       } catch (error) {
-        console.error('检查签到状态失败:', error)
+      
         this.isSignedToday = false
         this.continuousDays = 0
         this.totalDays = 0
@@ -471,8 +466,7 @@ export default {
 
         // 使用userId进行签到(后端会根据userId查询matchmaker并添加积分)
         const res = await api.matchmaker.doCheckin(userInfo.userId)
-        console.log('签到API返回结果:', res)
-
+      
         // 判断签到结果
         let success = false
         let alreadySigned = false
@@ -520,7 +514,7 @@ export default {
           })
         }
       } catch (error) {
-        console.error('签到失败:', error)
+     
         if (error.msg && error.msg.includes('已签到')) {
           this.isSignedToday = true
           uni.showToast({
@@ -565,7 +559,7 @@ export default {
     },
     // 编辑资料
     handleEditProfile() {
-      console.log('编辑资料')
+     
       uni.navigateTo({
         url: '/pages/matchmaker-workbench/edit-profile'
       })

+ 1 - 1
LiangZhiYUMao/pages/matchmaker-workbench/my-activities.vue

@@ -119,7 +119,7 @@ export default {
           }
         }
       } catch (error) {
-        console.error('加载我的活动列表失败:', error)
+    
         // 当API调用失败时,使用模拟数据
         if (this.pageNum === 1) {
           this.activityList = this.mockActivities

+ 69 - 134
LiangZhiYUMao/pages/matchmaker-workbench/my-resources.vue

@@ -214,12 +214,12 @@
 				<view class="tabbar-icon trophy"></view>
 				<text class="tabbar-text">排行榜</text>
 			</view>
-			<view class="tabbar-item" @click="navigateToMessage">
+			<!-- <view class="tabbar-item" @click="navigateToMessage">
 				<view class="tabbar-icon message">
 					<view v-if="unreadCount > 0" class="badge">{{ unreadCount }}</view>
 				</view>
 				<text class="tabbar-text">消息</text>
-			</view>
+			</view> -->
 			<view class="tabbar-item" @click="navigateToMine">
 				<view class="tabbar-icon mine"></view>
 				<text class="tabbar-text">我的</text>
@@ -265,11 +265,11 @@ export default {
 				const data = (this.registeredResources || []).filter(item => {
 					const isValid = item && item.id !== undefined && item.id !== null
 					if (!isValid) {
-						console.warn('getRegisteredDisplayData - 过滤掉无效数据:', item)
+				
 					}
 					return isValid
 				})
-				console.log('getRegisteredDisplayData - 返回数据长度:', data.length, '数据:', data.map(item => ({ id: item.id, name: item.name })))
+			
 				return data
 			},
 			// 获取线索已加载的数据(用于显示)
@@ -277,12 +277,11 @@ export default {
 				const data = (this.unregisteredResources || []).filter(item => {
 					const isValid = item && item.id !== undefined && item.id !== null
 					if (!isValid) {
-						console.warn('getUnregisteredDisplayData - 过滤掉无效数据:', item)
+						
 					}
 					return isValid
 				})
-				console.log('getUnregisteredDisplayData - 返回数据长度:', data.length, '数据:', data.map(item => ({ id: item.id, name: item.name })))
-				return data
+				
 			}
 		},
 		onLoad() {
@@ -292,7 +291,7 @@ export default {
 			
 			// 监听刷新事件
 			uni.$on('refreshResourceList', () => {
-				console.log('收到刷新资源列表事件')
+				
 				this.loadMyResources()
 			})
 			
@@ -379,53 +378,32 @@ export default {
 			},
 			// 滚动到底部触发加载更多
 			handleScrollToLower(e) {
-				console.log('=== 触发滚动到底部事件 ===', e)
+				
 				if (this.currentTab === 'resource') {
 					// 资源列表加载更多
-					console.log('资源列表状态:', {
-						registeredLoading: this.registeredLoading,
-						registeredResourcesLength: this.registeredResources.length,
-						registeredTotal: this.registeredTotal,
-						canLoadMore: this.registeredResources.length < this.registeredTotal
-					})
+					
 					if (!this.registeredLoading) {
 						// 如果已加载数量小于总数,继续加载
 						if (this.registeredTotal > 0 && this.registeredResources.length < this.registeredTotal) {
-							console.log('✅ 开始加载更多资源...')
+							
 							this.loadMoreRegistered()
 						} else if (this.registeredTotal === 0) {
-							console.log('⚠️ 资源总数未知,尝试加载...')
-							// 如果总数未知,也尝试加载(可能是第一页加载失败)
+							
 							this.loadMoreRegistered()
-						} else {
-							console.log('❌ 资源列表已加载全部数据,不再加载')
-						}
-					} else {
-						console.log('⏳ 资源列表正在加载中,跳过...')
-					}
+						} 
+					} 
 				} else {
-					// 线索列表加载更多
-					console.log('线索列表状态:', {
-						unregisteredLoading: this.unregisteredLoading,
-						unregisteredResourcesLength: this.unregisteredResources.length,
-						unregisteredTotal: this.unregisteredTotal,
-						canLoadMore: this.unregisteredResources.length < this.unregisteredTotal
-					})
+					
 					if (!this.unregisteredLoading) {
 						// 如果已加载数量小于总数,继续加载
 						if (this.unregisteredTotal > 0 && this.unregisteredResources.length < this.unregisteredTotal) {
-							console.log('✅ 开始加载更多线索...')
+							
 							this.loadMoreUnregistered()
 						} else if (this.unregisteredTotal === 0) {
-							console.log('⚠️ 线索总数未知,尝试加载...')
-							// 如果总数未知,也尝试加载(可能是第一页加载失败)
+							
 							this.loadMoreUnregistered()
-						} else {
-							console.log('❌ 线索列表已加载全部数据,不再加载')
-						}
-					} else {
-						console.log('⏳ 线索列表正在加载中,跳过...')
-					}
+						} 
+					} 
 				}
 			},
 			// 加载资源指定页数据(从后端加载,使用isUser参数过滤已注册用户)
@@ -449,14 +427,14 @@ export default {
 					}
 					
 					if (!currentUserId) {
-						console.error('无法获取当前登录用户ID')
+				
 						this.registeredResources = []
 						this.registeredLoading = false
 						return
 					}
 					
 					const baseUrl = process.env.NODE_ENV === 'development' 
-						? 'http://localhost:8083/api'
+						? 'https://api.zhongruanke.cn/api'
 						: 'https://your-domain.com/api'
 					
 					// 构建查询参数,使用isUser=1参数只获取已注册用户
@@ -471,7 +449,7 @@ export default {
 					})
 					
 					if (error) {
-						console.error('加载资源数据失败:', error)
+						
 						this.registeredResources = []
 						this.registeredLoading = false
 						return
@@ -493,13 +471,7 @@ export default {
 							// 更新总数(使用后端返回的total)
 							this.registeredTotal = pageData.total || 0
 							
-							console.log('loadRegisteredPage - pageNum:', pageNum, 'loaded:', this.registeredResources.length, 'total:', this.registeredTotal, 'pageData:', {
-								total: pageData.total,
-								size: pageData.size,
-								current: pageData.current,
-								pages: pageData.pages,
-								recordsLength: pageData.records.length
-							})
+							
 						} else {
 							if (pageNum === 1) {
 								this.registeredResources = []
@@ -507,10 +479,10 @@ export default {
 							}
 						}
 					} else {
-						console.error('加载资源数据失败,响应:', res.data)
+						
 					}
 				} catch (e) {
-					console.error('加载资源数据异常:', e)
+					
 					if (this.registeredPageNum === 1) {
 						this.registeredResources = []
 					}
@@ -539,14 +511,14 @@ export default {
 					}
 					
 					if (!currentUserId) {
-						console.error('无法获取当前登录用户ID')
+						
 						this.unregisteredResources = []
 						this.unregisteredLoading = false
 						return
 					}
 					
 					const baseUrl = process.env.NODE_ENV === 'development' 
-						? 'http://localhost:8083/api'
+						? 'https://api.zhongruanke.cn/api'
 						: 'https://your-domain.com/api'
 					
 					// 构建查询参数,使用isUser=0参数只获取未注册用户(线索)
@@ -561,7 +533,7 @@ export default {
 					})
 					
 					if (error) {
-						console.error('加载线索数据失败:', error)
+						
 						this.unregisteredResources = []
 						this.unregisteredLoading = false
 						return
@@ -583,13 +555,7 @@ export default {
 							// 更新总数(使用后端返回的total)
 							this.unregisteredTotal = pageData.total || 0
 							
-							console.log('loadUnregisteredPage - pageNum:', pageNum, 'loaded:', this.unregisteredResources.length, 'total:', this.unregisteredTotal, 'pageData:', {
-								total: pageData.total,
-								size: pageData.size,
-								current: pageData.current,
-								pages: pageData.pages,
-								recordsLength: pageData.records.length
-							})
+							
 						} else {
 							if (pageNum === 1) {
 								this.unregisteredResources = []
@@ -597,10 +563,10 @@ export default {
 							}
 						}
 					} else {
-						console.error('加载线索数据失败,响应:', res.data)
+						
 					}
 				} catch (e) {
-					console.error('加载线索数据异常:', e)
+					
 					if (this.unregisteredPageNum === 1) {
 						this.unregisteredResources = []
 					}
@@ -715,7 +681,7 @@ export default {
 						this.loadUnregisteredPage(1)
 					])
 				} catch (e) {
-					console.error('加载资源数据失败:', e)
+					
 				}
 			},
 		// 搜索
@@ -730,14 +696,14 @@ export default {
 		async handleDelete(id) {
 				// 如果id无效,尝试从当前资源列表中查找
 				if (id === null || id === undefined || id === 'undefined' || id === 'null' || id === '') {
-					console.warn('删除资源失败: 资源ID无效,尝试从资源列表中查找', id)
+					
 					// 尝试从当前显示的资源中找到对应的资源
 					const allDisplayData = this.currentTab === 'resource' 
 						? this.getRegisteredDisplayData 
 						: this.getUnregisteredDisplayData
 					
 					// 如果仍然找不到,显示错误
-					console.error('删除资源失败: 无法获取资源ID', id)
+					
 					uni.showToast({
 						title: '资源ID无效,无法删除',
 						icon: 'none'
@@ -755,7 +721,7 @@ export default {
 					}
 					
 					if (isNaN(resourceId) || resourceId <= 0) {
-						console.error('删除资源失败: 资源ID格式错误', id, '类型:', typeof id)
+						
 						uni.showToast({
 							title: '资源ID格式错误,无法删除',
 							icon: 'none'
@@ -764,7 +730,7 @@ export default {
 					}
 				}
 				
-				console.log('准备删除资源,ID:', resourceId, '原始ID:', id)
+			
 				
 				uni.showModal({
 					title: '删除确认',
@@ -777,7 +743,7 @@ export default {
 								})
 								
 								const baseUrl = process.env.NODE_ENV === 'development' 
-									? 'http://localhost:8083/api'  // 开发环境 - 通过网关
+									? 'https://api.zhongruanke.cn/api'  // 开发环境 - 通过网关
 									: 'https://your-domain.com/api'  // 生产环境
 								
 								const [error, deleteRes] = await uni.request({
@@ -788,7 +754,7 @@ export default {
 								uni.hideLoading()
 								
 								if (error) {
-									console.error('删除资源失败:', error)
+									
 									uni.showToast({
 										title: '删除失败',
 										icon: 'none'
@@ -812,7 +778,7 @@ export default {
 								}
 							} catch (e) {
 								uni.hideLoading()
-								console.error('删除资源异常:', e)
+								
 								uni.showToast({
 									title: '删除失败,请稍后重试',
 									icon: 'none'
@@ -829,10 +795,10 @@ export default {
 			uni.navigateTo({
 				url: `/pages/matchmaker-workbench/resource-input?resourceId=${id}`,
 				success: () => {
-					console.log('跳转到编辑页面,resourceId:', id)
+					
 				},
 				fail: (err) => {
-					console.error('跳转失败:', err)
+					
 					uni.showToast({
 						title: '跳转失败',
 						icon: 'none'
@@ -864,7 +830,7 @@ export default {
 			}
 			
 			// 已注册用户,跳转到精准匹配页面
-			console.log('精准匹配:', id)
+			
 			uni.navigateTo({
 				url: `/pages/matchmaker-workbench/precise-match?resourceId=${id}`
 			})
@@ -908,8 +874,7 @@ export default {
 		handleResourceClickSafe(item, index) {
 			// 如果 item 无效,尝试从数组中获取
 			if (!item || item === null || item === undefined) {
-				console.warn('handleResourceClickSafe: item 为空,尝试从数组中获取, index:', index)
-				// 根据当前标签获取对应的数据数组
+				
 				const dataArray = this.currentTab === 'resource' ? this.getRegisteredDisplayData : this.getUnregisteredDisplayData
 				if (dataArray && Array.isArray(dataArray) && index >= 0 && index < dataArray.length) {
 					item = dataArray[index]
@@ -918,7 +883,6 @@ export default {
 			
 			// 如果仍然无效,直接返回
 			if (!item || item === null || item === undefined) {
-				console.error('handleResourceClickSafe: 无法获取有效的 item, index:', index)
 				return
 			}
 			
@@ -929,18 +893,15 @@ export default {
 		handleResourceClick(item) {
 			// 检查 item 是否存在
 			if (!item || item === null || item === undefined) {
-				console.error('handleResourceClick: item 为空', item)
+				
 				return
 			}
 			
-			console.log('=== 点击资源项 ===')
-			console.log('item对象:', JSON.stringify(item, null, 2))
-			console.log('item.id:', item.id)
-			console.log('item.isUser:', item.isUser)
+			
 			
 			// 检查 item.id 是否存在
 			if (!item.id && item.id !== 0) {
-				console.error('handleResourceClick: item.id 无效', item)
+				
 				uni.showToast({
 					title: '资源ID无效',
 					icon: 'none',
@@ -953,14 +914,14 @@ export default {
 			if (item.isUser === 1 && item.userId !== null && item.userId !== undefined) {
 				// 已注册,跳转到客户详情页面
 				const resourceId = item.id
-				console.log('准备跳转,resourceId:', resourceId)
+				
 				uni.navigateTo({
 					url: `/pages/matchmaker-workbench/client-detail?resourceId=${resourceId}`,
 					success: () => {
-						console.log('跳转成功,resourceId:', resourceId)
+						
 					},
 					fail: (err) => {
-						console.error('跳转失败:', err)
+						
 						uni.showToast({
 							title: '跳转失败,请重试',
 							icon: 'none'
@@ -982,10 +943,10 @@ export default {
 			uni.navigateTo({
 				url: '/pages/matchmaker-workbench/resource-input',
 				success: () => {
-					console.log('跳转到信息录入页面成功')
+					
 				},
 				fail: (err) => {
-					console.error('跳转失败:', err)
+					
 					uni.showToast({
 						title: '页面跳转失败',
 						icon: 'none'
@@ -1027,7 +988,7 @@ export default {
 			this.stopAutoRefresh()
 			// 每30秒刷新一次,检查用户注册状态变化
 			this.refreshTimer = setInterval(async () => {
-				console.log('定时刷新:检查用户注册状态变化')
+				
 				// 先批量检查并更新线索用户的注册状态
 				await this.batchCheckClueRegistrationStatus()
 				// 然后刷新资源列表
@@ -1043,22 +1004,22 @@ export default {
 				let matchmakerId = userInfo.matchmakerId || userId || null
 				
 				if (!matchmakerId) {
-					console.warn('未找到红娘ID,跳过批量检查线索用户注册状态')
+				
 					return
 				}
 				
 				// 确保matchmakerId是有效的整数
 				matchmakerId = parseInt(matchmakerId)
 				if (isNaN(matchmakerId) || matchmakerId <= 0) {
-					console.warn('红娘ID无效,跳过批量检查线索用户注册状态')
+					
 					return
 				}
 				
 				const baseUrl = process.env.NODE_ENV === 'development' 
-					? 'http://localhost:8083/api'  // 开发环境 - 通过网关
+					? 'https://api.zhongruanke.cn/api'  // 开发环境 - 通过网关
 					: 'https://your-domain.com/api'  // 生产环境
 				
-				console.log('开始批量检查线索用户注册状态...', '红娘ID:', matchmakerId)
+				
 				
 				const [error, res] = await uni.request({
 					url: `${baseUrl}/my-resource/batch-check-clue-registration`,
@@ -1069,22 +1030,16 @@ export default {
 				})
 				
 				if (error) {
-					console.error('批量检查线索用户注册状态失败:', error)
+				
 					return
 				}
 				
 				if (res.statusCode === 200 && res.data && res.data.code === 200) {
 					const updateCount = res.data.data?.updateCount || 0
-					if (updateCount > 0) {
-						console.log(`✅ 批量检查完成,更新了 ${updateCount} 条线索用户记录`)
-					} else {
-						console.log('✅ 批量检查完成,没有需要更新的线索用户')
-					}
-				} else {
-					console.warn('批量检查线索用户注册状态返回异常:', res.data)
-				}
+					
+				} 
 			} catch (e) {
-				console.error('批量检查线索用户注册状态时发生异常:', e)
+				
 			}
 		},
 		// 停止自动刷新
@@ -1117,52 +1072,37 @@ export default {
 				const displayData = type === 'registered' ? this.getRegisteredDisplayData : this.getUnregisteredDisplayData
 				const resource = displayData && displayData[index]
 				if (!resource) {
-					console.warn('图片加载失败:资源不存在,index:', index, 'type:', type)
+				
 					return
 				}
 				
 				const originalUrl = resource.avatar
 				const resourceId = resource.id
-				console.error('❌ 图片加载失败:', {
-					index: index,
-					type: type,
-					resourceName: resource.name,
-					resourceId: resourceId,
-					originalAvatarUrl: originalUrl,
-					'URL类型': typeof originalUrl,
-					'URL长度': originalUrl ? originalUrl.length : 0,
-					'是否包含placeholder': originalUrl && originalUrl.includes('placeholder'),
-					'完整resource对象': resource
-				})
 				
-				// 如果图片加载失败,且不是已经设置的默认占位图,则设置为空(显示CSS背景)
-				// 避免重复设置导致循环
+				
+				
 				if (originalUrl && 
 					originalUrl.trim() !== '' && 
 					!originalUrl.includes('placeholder') && 
 					!originalUrl.includes('default') &&
 					!originalUrl.includes('via.placeholder')) {
-					// 根据resourceId在当前显示数据中找到对应的资源并更新
-					console.log('图片加载失败,将URL设置为空,显示CSS默认背景')
+				
 					if (type === 'registered') {
-						// 更新显示数据
+					
 						const displayListIndex = this.registeredResources.findIndex(item => item.id === resourceId)
 						if (displayListIndex !== -1) {
 							this.$set(this.registeredResources[displayListIndex], 'avatar', '')
 						}
 					} else {
-						// 更新显示数据
+						
 						const displayListIndex = this.unregisteredResources.findIndex(item => item.id === resourceId)
 						if (displayListIndex !== -1) {
 							this.$set(this.unregisteredResources[displayListIndex], 'avatar', '')
 						}
 					}
-				} else {
-					console.log('图片加载失败,但URL已经是占位图或空,无需处理')
-					console.log('当前URL:', originalUrl)
-				}
+				} 
 			} catch (e) {
-				console.error('处理图片错误时发生异常:', e)
+				
 			}
 		},
 		// 图片加载成功处理(内部方法)
@@ -1171,15 +1111,10 @@ export default {
 				// 获取当前显示的数据
 				const displayData = type === 'registered' ? this.getRegisteredDisplayData : this.getUnregisteredDisplayData
 				if (displayData && displayData[index]) {
-					console.log('图片加载成功:', {
-						index: index,
-						type: type,
-						resource: displayData[index]?.name,
-						avatarUrl: displayData[index]?.avatar
-					})
+					
 				}
 			} catch (e) {
-				console.error('处理图片加载成功时发生异常:', e)
+				
 			}
 		}
 	}

+ 2 - 2
LiangZhiYUMao/pages/matchmaker-workbench/points-detail.vue

@@ -97,7 +97,7 @@ export default {
             uni.setStorageSync('userInfo', userInfo)
           }
         } catch (e) {
-          console.error('获取红娘信息失败:', e)
+    
         }
       }
       
@@ -119,7 +119,7 @@ export default {
           this.records = [...this.records, ...(res.list || [])]
         }
       } catch (e) {
-        console.error('获取积分明细失败:', e)
+        
         uni.showToast({ title: '获取积分明细失败', icon: 'none' })
       } finally {
         this.loading = false

+ 4 - 4
LiangZhiYUMao/pages/matchmaker-workbench/points-mall.vue

@@ -136,7 +136,7 @@ export default {
             uni.setStorageSync('userInfo', userInfo)
           }
         } catch (e) {
-          console.error('获取红娘信息失败:', e)
+        
         }
       }
       
@@ -154,7 +154,7 @@ export default {
         const res = await api.pointsMall.getBalance(this.makerId)
         this.userPoints = res.balance || 0
       } catch (e) {
-        console.error('获取积分余额失败:', e)
+      
       }
     },
     
@@ -173,7 +173,7 @@ export default {
           description: item.description
         }))
       } catch (e) {
-        console.error('获取商品列表失败:', e)
+       
       } finally {
         this.loading = false
       }
@@ -192,7 +192,7 @@ export default {
           stock: item.stock
         }))
       } catch (e) {
-        console.error('获取推荐商品失败:', e)
+       
       }
     },
     

+ 43 - 75
LiangZhiYUMao/pages/matchmaker-workbench/precise-match.vue

@@ -66,12 +66,12 @@
 				<view class="tabbar-icon trophy"></view>
 				<text class="tabbar-text">排行榜</text>
 			</view>
-			<view class="tabbar-item" @click="handleMessage">
+			<!-- <view class="tabbar-item" @click="handleMessage">
 				<view class="tabbar-icon message">
 					<text class="badge">3</text>
 				</view>
 				<text class="tabbar-text">消息</text>
-			</view>
+			</view> -->
 			<view class="tabbar-item" @click="handleMine">
 				<view class="tabbar-icon mine"></view>
 				<text class="tabbar-text">我的</text>
@@ -91,13 +91,13 @@ export default {
 			}
 		},
 	onLoad(options) {
-		// 从URL参数获取资源ID
+		
 		if (options.resourceId) {
-			console.log('当前资源ID:', options.resourceId)
+			
 			this.loadMatchClients(options.resourceId)
 		} else if (options.id) {
-			// 兼容旧的参数名
-			console.log('当前资源ID (兼容):', options.id)
+			
+			
 			this.loadMatchClients(options.id)
 		} else {
 			uni.showToast({
@@ -116,13 +116,11 @@ export default {
 		},
 		// 复制联系方式
 		handleCopy(index) {
-			console.log('=== 复制联系方式 ===')
-			console.log('传入的index:', index)
+			
 			
 			// 从matchClients数组中获取client对象
 			if (index === undefined || index === null || index < 0 || index >= this.matchClients.length) {
-				console.error('❌ index无效:', index)
-				console.log('当前matchClients数组长度:', this.matchClients.length)
+			
 				uni.showToast({
 					title: '数据错误',
 					icon: 'none'
@@ -131,11 +129,11 @@ export default {
 			}
 			
 			const client = this.matchClients[index]
-			console.log('从数组获取的client:', client)
+			
 			
 			if (!client) {
-				console.error('❌ client对象为空')
-				console.log('当前matchClients数组:', this.matchClients)
+				
+				
 				uni.showToast({
 					title: '数据错误',
 					icon: 'none'
@@ -143,48 +141,42 @@ export default {
 				return
 			}
 			
-			console.log('client.contact:', client.contact)
-			console.log('client.originalPhone:', client.originalPhone)
-			console.log('client.originalPhone类型:', typeof client.originalPhone)
-			console.log('client的所有属性:', Object.keys(client))
 			
 			// 优先使用完整手机号(originalPhone),如果没有则使用脱敏的手机号
 			let phoneToCopy = ''
 			
 			// 优先使用originalPhone(完整手机号)
 			const originalPhone = client.originalPhone || client.original_phone || client.originalphone
-			console.log('尝试获取originalPhone:', originalPhone)
+			
 			if (originalPhone && typeof originalPhone === 'string' && originalPhone.trim() !== '') {
 				phoneToCopy = originalPhone.trim()
-				console.log('✅ 使用originalPhone:', phoneToCopy.substring(0, 3) + '****')
+				
 			} else {
-				console.log('❌ originalPhone为空或无效,尝试使用contact')
+				
 				// 如果没有originalPhone,尝试从脱敏的手机号中提取(但这样无法获取完整号码)
 				if (client.contact) {
 					try {
 						const contactStr = String(client.contact || '')
-						console.log('尝试从contact提取:', contactStr)
+						
 						if (contactStr && contactStr.trim() !== '') {
 							// 去除星号(但这样只能得到部分号码,不是完整号码)
 							const extracted = contactStr.replace(/\*+/g, '').trim()
 							if (extracted.length >= 11) {
 								phoneToCopy = extracted
-								console.log('⚠️ 从脱敏号码提取:', phoneToCopy.substring(0, 3) + '****')
-							} else {
-								console.log('❌ 提取的号码长度不足:', extracted.length)
+							
 							}
 						}
 					} catch (e) {
-						console.error('处理联系方式时出错:', e)
+						
 					}
 				}
 			}
 			
-			console.log('最终要复制的号码:', phoneToCopy ? phoneToCopy.substring(0, 3) + '****' : '空')
+		
 			
 			// 检查是否为空
 			if (!phoneToCopy || phoneToCopy === '') {
-				console.error('❌ 联系方式为空,无法复制')
+				
 				uni.showToast({
 					title: '联系方式为空',
 					icon: 'none'
@@ -196,14 +188,14 @@ export default {
 			uni.setClipboardData({
 				data: phoneToCopy,
 				success: () => {
-					console.log('✅ 复制成功:', phoneToCopy.substring(0, 3) + '****')
+				
 					uni.showToast({
 						title: '复制成功',
 						icon: 'success'
 					})
 				},
 				fail: () => {
-					console.error('❌ 复制失败')
+					
 					uni.showToast({
 						title: '复制失败',
 						icon: 'none'
@@ -213,14 +205,10 @@ export default {
 		},
 		// 牵线聊聊
 		handleChat(index) {
-			console.log('=== 牵线聊聊 ===')
-			console.log('传入的index:', index)
-			console.log('matchClients数组长度:', this.matchClients.length)
-			console.log('matchClients数组:', this.matchClients)
-			
+		
 			// 验证 index 是否有效
 			if (index === null || index === undefined || index < 0 || index >= this.matchClients.length) {
-				console.error('❌ index无效:', index)
+				
 				uni.showToast({
 					title: '数据索引错误',
 					icon: 'none'
@@ -230,15 +218,12 @@ export default {
 			
 			// 从数组中获取 client 对象
 			const client = this.matchClients[index]
-			console.log('从数组获取的client:', client)
-			console.log('client类型:', typeof client)
-			console.log('client是否为null:', client === null)
-			console.log('client是否为undefined:', client === undefined)
+		
 			
 			// 验证 client 对象是否存在
 			if (!client) {
-				console.error('❌ client对象为空')
-				console.log('matchClients数组完整内容:', JSON.stringify(this.matchClients, null, 2))
+				
+				
 				uni.showToast({
 					title: '客户信息为空,请刷新重试',
 					icon: 'none',
@@ -247,7 +232,7 @@ export default {
 				return
 			}
 			
-			console.log('client对象的所有键:', Object.keys(client))
+			
 			
 			// 尝试多种方式获取用户ID
 			let targetUserId = null
@@ -255,23 +240,23 @@ export default {
 			// 方式1: 使用 id 字段
 			if (client.id !== null && client.id !== undefined && client.id !== '') {
 				targetUserId = String(client.id)
-				console.log('✅ 从 client.id 获取用户ID:', targetUserId)
+			
 			}
 			// 方式2: 使用 userId 字段(后端原始字段)
 			else if (client.userId !== null && client.userId !== undefined && client.userId !== '') {
 				targetUserId = String(client.userId)
-				console.log('✅ 从 client.userId 获取用户ID:', targetUserId)
+				
 			}
 			// 方式3: 使用 user_id 字段(下划线格式)
 			else if (client.user_id !== null && client.user_id !== undefined && client.user_id !== '') {
 				targetUserId = String(client.user_id)
-				console.log('✅ 从 client.user_id 获取用户ID:', targetUserId)
+				
 			}
 			
 			// 如果仍然没有获取到用户ID
 			if (!targetUserId || targetUserId === 'null' || targetUserId === 'undefined' || targetUserId === '') {
-				console.error('❌ 无法获取用户ID')
-				console.log('client对象完整内容:', JSON.stringify(client, null, 2))
+				
+				
 				uni.showToast({
 					title: '无法获取用户ID,请刷新重试',
 					icon: 'none',
@@ -284,20 +269,17 @@ export default {
 			const targetUserName = client.name || client.nickname || '用户'
 			const targetUserAvatar = client.avatar || client.avatarUrl || '/static/default-avatar.svg'
 			
-			console.log('跳转参数:')
-			console.log('  - targetUserId:', targetUserId)
-			console.log('  - targetUserName:', targetUserName)
-			console.log('  - targetUserAvatar:', targetUserAvatar)
+		
 			
 			// 跳转到聊天页面
 			// 注意:fromMatchmaker=1 表示来自红娘工作台,会跳过消息限制和审核
 			uni.navigateTo({
 				url: `/pages/message/chat?targetUserId=${targetUserId}&targetUserName=${encodeURIComponent(targetUserName)}&targetUserAvatar=${encodeURIComponent(targetUserAvatar)}&fromMatchmaker=1`,
 				success: () => {
-					console.log('✅ 跳转聊天页面成功')
+					
 				},
 				fail: (err) => {
-					console.error('❌ 跳转聊天页面失败:', err)
+					
 					uni.showToast({
 						title: '跳转失败,请重试',
 						icon: 'none'
@@ -308,7 +290,7 @@ export default {
 		// 从API加载匹配客户信息
 		async loadMatchClients(resourceId) {
 			if (!resourceId) {
-				console.error('资源ID为空')
+				
 				return
 			}
 			
@@ -317,7 +299,7 @@ export default {
 			
 			try {
 				const baseUrl = process.env.NODE_ENV === 'development' 
-					? 'http://localhost:8083/api'  // 开发环境 - 通过网关
+					? 'https://api.zhongruanke.cn/api'  // 开发环境 - 通过网关
 					: 'https://your-domain.com/api'  // 生产环境
 				
 				// 加载匹配结果
@@ -329,7 +311,7 @@ export default {
 				this.loading = false
 				
 				if (matchError) {
-					console.error('加载匹配客户失败:', matchError)
+					
 					uni.showToast({
 						title: '加载失败',
 						icon: 'none'
@@ -340,14 +322,8 @@ export default {
 				if (matchRes.statusCode === 200 && matchRes.data && matchRes.data.code === 200) {
 					const matchList = matchRes.data.data || []
 					
-					console.log('=== 后端返回的匹配列表 ===')
-					console.log('匹配列表长度:', matchList.length)
-					if (matchList.length > 0) {
-						console.log('第一个匹配项原始数据:', JSON.stringify(matchList[0], null, 2))
-						console.log('第一个匹配项的phone字段:', matchList[0].phone)
-						console.log('第一个匹配项的originalPhone字段:', matchList[0].originalPhone)
-						console.log('第一个匹配项的所有字段:', Object.keys(matchList[0]))
-					}
+					
+					
 					
 					// 转换数据格式
 					this.matchClients = matchList.map((item, index) => {
@@ -391,19 +367,11 @@ export default {
 							address: item.address
 						}
 						
-						if (index === 0) {
-							console.log('=== 第一个匹配项映射后 ===')
-							console.log('contact:', mappedItem.contact)
-							console.log('originalPhone:', mappedItem.originalPhone)
-							console.log('originalPhone类型:', typeof mappedItem.originalPhone)
-							console.log('originalPhone是否为空:', !mappedItem.originalPhone || mappedItem.originalPhone === '')
-							console.log('映射后的完整对象:', mappedItem)
-						}
 						
 						return mappedItem
 					})
 					
-					console.log('匹配结果:', this.matchClients)
+				
 					
 					if (this.matchClients.length === 0) {
 						uni.showToast({
@@ -413,7 +381,7 @@ export default {
 					}
 				} else {
 					const errorMsg = matchRes.data?.message || '加载失败'
-					console.error('加载匹配客户失败:', errorMsg)
+					
 					uni.showToast({
 						title: errorMsg,
 						icon: 'none'
@@ -421,7 +389,7 @@ export default {
 				}
 			} catch (e) {
 				this.loading = false
-				console.error('加载匹配客户异常:', e)
+			
 				uni.showToast({
 					title: '加载失败,请稍后重试',
 					icon: 'none'

+ 3 - 4
LiangZhiYUMao/pages/matchmaker-workbench/product-detail.vue

@@ -106,7 +106,6 @@ export default {
             uni.setStorageSync('userInfo', userInfo)
           }
         } catch (e) {
-          console.error('获取红娘信息失败:', e)
         }
       }
       
@@ -122,7 +121,7 @@ export default {
         const res = await api.pointsMall.getProductDetail(this.productId)
         this.product = res || {}
       } catch (e) {
-        console.error('获取商品详情失败:', e)
+      
         uni.showToast({ title: '获取商品详情失败', icon: 'none' })
       }
     },
@@ -133,7 +132,7 @@ export default {
         const res = await api.pointsMall.getBalance(this.makerId)
         this.userPoints = res.balance || 0
       } catch (e) {
-        console.error('获取积分余额失败:', e)
+       
       }
     },
     
@@ -186,7 +185,7 @@ export default {
           uni.navigateBack()
         }, 1500)
       } catch (e) {
-        console.error('兑换失败:', e)
+       
         uni.showToast({ title: e.message || '兑换失败', icon: 'none' })
       } finally {
         this.loading = false

+ 49 - 85
LiangZhiYUMao/pages/matchmaker-workbench/quality-resources.vue

@@ -94,7 +94,7 @@ export default {
 			const rawUserId = parseInt(userId)
 			if (!isNaN(rawUserId) && rawUserId > 0) {
 				this.currentUserId = rawUserId
-				console.log('当前登录用户ID:', this.currentUserId)
+				
 			}
 		}
 		this.loadResources()
@@ -122,7 +122,7 @@ export default {
 			try {
 				this.loading = true
 				const baseUrl = process.env.NODE_ENV === 'development' 
-					? 'http://localhost:8083/api'  // 开发环境 - 通过网关
+					? 'https://api.zhongruanke.cn/api'  // 开发环境 - 通过网关
 					: 'https://your-domain.com/api'  // 生产环境
 				
 				// 构建请求参数
@@ -146,7 +146,7 @@ export default {
 				})
 				
 				if (error) {
-					console.error('加载优质资源失败:', error)
+				
 					uni.showToast({
 						title: '加载失败',
 						icon: 'none'
@@ -160,15 +160,7 @@ export default {
 						// 调试:打印第一条数据的详细信息
 						if (pageData.records.length > 0) {
 							const firstRecord = pageData.records[0]
-							console.log('=== 第一条资源数据 ===')
-							console.log('完整数据:', JSON.stringify(firstRecord, null, 2))
-							console.log('isUser值:', firstRecord.isUser, '类型:', typeof firstRecord.isUser)
-							console.log('is_user值:', firstRecord.is_user, '类型:', typeof firstRecord.is_user)
-							console.log('userId值:', firstRecord.userId, '类型:', typeof firstRecord.userId)
-							console.log('user_id值:', firstRecord.user_id, '类型:', typeof firstRecord.user_id)
-							console.log('mateSelectionCriteria (驼峰):', firstRecord.mateSelectionCriteria)
-							console.log('mate_selection_criteria (下划线):', firstRecord.mate_selection_criteria)
-							console.log('phone:', firstRecord.phone)
+							
 						}
 						
 						if (this.pageNum === 1) {
@@ -180,19 +172,17 @@ export default {
 						// 判断是否还有更多数据
 						this.hasMore = pageData.records && pageData.records.length >= this.pageSize
 						
-						console.log('加载优质资源成功,数量:', this.resources.length)
-					} else {
-						console.error('加载优质资源失败:', res.data.message)
-					}
+					
+					} 
 				} else {
-					console.error('加载优质资源失败:', res.data.message)
+					
 					uni.showToast({
 						title: res.data.message || '加载失败',
 						icon: 'none'
 					})
 				}
 			} catch (e) {
-				console.error('加载优质资源异常:', e)
+				
 				uni.showToast({
 					title: '加载异常',
 					icon: 'none'
@@ -239,14 +229,10 @@ export default {
 		},
 		// 牵线聊聊
 		handleChat(resource) {
-			console.log('=== 牵线聊聊 ===')
-			console.log('资源信息:', resource)
-			console.log('资源信息类型:', typeof resource)
-			console.log('资源信息的所有键:', resource ? Object.keys(resource) : 'resource为空')
 			
 			// 验证 resource 对象是否存在
 			if (!resource) {
-				console.error('❌ resource对象为空')
+			
 				uni.showToast({
 					title: '资源信息为空',
 					icon: 'none'
@@ -259,7 +245,7 @@ export default {
 			const isUser = resource.isUser !== undefined ? resource.isUser : 
 			              (resource.is_user !== undefined ? resource.is_user : 0)
 			if (isUser !== 1 && isUser !== '1') {
-				console.warn('⚠️ 用户未注册,无法聊天')
+				
 				uni.showToast({
 					title: '该用户尚未注册,无法聊天',
 					icon: 'none',
@@ -274,23 +260,23 @@ export default {
 			// 方式1: 使用 userId 字段(驼峰格式)
 			if (resource.userId !== null && resource.userId !== undefined && resource.userId !== '') {
 				targetUserId = String(resource.userId)
-				console.log('✅ 从 resource.userId 获取用户ID:', targetUserId)
+				
 			}
 			// 方式2: 使用 user_id 字段(下划线格式)
 			else if (resource.user_id !== null && resource.user_id !== undefined && resource.user_id !== '') {
 				targetUserId = String(resource.user_id)
-				console.log('✅ 从 resource.user_id 获取用户ID:', targetUserId)
+				
 			}
 			// 方式3: 使用 id 字段
 			else if (resource.id !== null && resource.id !== undefined && resource.id !== '') {
 				targetUserId = String(resource.id)
-				console.log('✅ 从 resource.id 获取用户ID:', targetUserId)
+				
 			}
 			
 			// 如果仍然没有获取到用户ID
 			if (!targetUserId || targetUserId === 'null' || targetUserId === 'undefined' || targetUserId === '') {
-				console.error('❌ 无法获取用户ID')
-				console.log('resource对象完整内容:', JSON.stringify(resource, null, 2))
+				
+				
 				uni.showToast({
 					title: '无法获取用户ID,请刷新重试',
 					icon: 'none',
@@ -303,20 +289,17 @@ export default {
 			const targetUserName = resource.name || '用户'
 			const targetUserAvatar = resource.avatarUrl || resource.avatar_url || resource.avatar || '/static/default-avatar.svg'
 			
-			console.log('跳转参数:')
-			console.log('  - targetUserId:', targetUserId)
-			console.log('  - targetUserName:', targetUserName)
-			console.log('  - targetUserAvatar:', targetUserAvatar)
+			
 			
 			// 跳转到聊天页面
 			// 注意:fromMatchmaker=1 表示来自红娘工作台,会跳过消息限制和审核
 			uni.navigateTo({
 				url: `/pages/message/chat?targetUserId=${targetUserId}&targetUserName=${encodeURIComponent(targetUserName)}&targetUserAvatar=${encodeURIComponent(targetUserAvatar)}&fromMatchmaker=1`,
 				success: () => {
-					console.log('✅ 跳转聊天页面成功')
+				
 				},
 				fail: (err) => {
-					console.error('❌ 跳转聊天页面失败:', err)
+				
 					uni.showToast({
 						title: '跳转失败,请重试',
 						icon: 'none'
@@ -336,13 +319,11 @@ export default {
 		},
 		// 点击资源项
 		handleResourceClick(index) {
-			console.log('=== 点击资源项 ===')
-			console.log('传入的index:', index)
-			console.log('resources数组长度:', this.resources.length)
+			
 			
 			// 检查index是否有效
 			if (index === undefined || index === null || index < 0 || index >= this.resources.length) {
-				console.error('❌ index无效:', index)
+			
 				uni.showToast({
 					title: '资源索引无效',
 					icon: 'none'
@@ -352,10 +333,10 @@ export default {
 			
 			// 从数组中获取resource对象
 			const resource = this.resources[index]
-			console.log('从数组获取的resource对象:', JSON.stringify(resource, null, 2))
+			
 			
 			if (!resource) {
-				console.error('❌ resource对象为空')
+				
 				uni.showToast({
 					title: '资源信息为空',
 					icon: 'none'
@@ -368,12 +349,11 @@ export default {
 			const isUser = resource.isUser !== undefined ? resource.isUser : 
 			              (resource.is_user !== undefined ? resource.is_user : 0)
 			
-			console.log('resource.resourceId:', resourceId)
-			console.log('resource.isUser:', isUser)
+			
 			
 			// 检查resourceId是否有效
 			if (!resourceId || resourceId === null || resourceId === undefined || resourceId === '') {
-				console.error('❌ resourceId无效:', resourceId)
+				
 				uni.showToast({
 					title: '资源ID无效,无法查看详情',
 					icon: 'none'
@@ -383,15 +363,14 @@ export default {
 			
 			// 判断是否为已注册用户
 			if (isUser === 1 || isUser === '1') {
-				// 已注册,跳转到客户详情页面,添加fromQualityResources参数标识来源
-				console.log('准备跳转,resourceId:', resourceId)
+				
 				uni.navigateTo({
 					url: `/pages/matchmaker-workbench/client-detail?resourceId=${resourceId}&fromQualityResources=1`,
 					success: () => {
-						console.log('✅ 跳转成功,resourceId:', resourceId)
+					
 					},
 					fail: (err) => {
-						console.error('❌ 跳转失败:', err)
+					
 						uni.showToast({
 							title: '跳转失败,请重试',
 							icon: 'none'
@@ -409,12 +388,11 @@ export default {
 		},
 		// 添加到我的资源
 		async handleAddToMyResources(index) {
-			console.log('=== 添加到我的资源 ===')
-			console.log('index:', index)
+			
 			
 			// 检查index是否有效
 			if (index === undefined || index === null || index < 0 || index >= this.resources.length) {
-				console.error('❌ index无效:', index)
+				
 				uni.showToast({
 					title: '资源索引无效',
 					icon: 'none'
@@ -424,10 +402,10 @@ export default {
 			
 			// 从数组中获取resource对象
 			const resource = this.resources[index]
-			console.log('从数组获取的resource对象:', JSON.stringify(resource, null, 2))
+			
 			
 			if (!resource) {
-				console.error('❌ resource对象为空')
+			
 				uni.showToast({
 					title: '资源信息为空',
 					icon: 'none'
@@ -450,8 +428,8 @@ export default {
 				})
 				
 				const baseUrl = process.env.NODE_ENV === 'development' 
-					? 'http://localhost:8083/api'  // 开发环境 - 通过网关
-					: 'https://your-domain.com/api'  // 生产环境
+					? 'https://api.zhongruanke.cn/api'  // 开发环境 - 通过网关
+					: 'https://api.zhongruanke.cn/api'  // 生产环境
 				
 				// 构建要添加的资源数据(复制原资源的所有信息,但使用当前红娘的matchmaker_id)
 				const resourceData = {
@@ -490,10 +468,10 @@ export default {
 						
 						if (!tagError && tagRes.statusCode === 200 && tagRes.data && tagRes.data.code === 200) {
 							tagIds = tagRes.data.data || []
-							console.log('根据resourceId获取的标签ID:', tagIds)
+							
 						}
 					} catch (e) {
-						console.warn('根据resourceId获取标签ID失败,将使用标签名称查询:', e)
+					
 					}
 				}
 				
@@ -508,7 +486,7 @@ export default {
 						
 						if (!tagListError && tagListRes.statusCode === 200 && tagListRes.data && tagListRes.data.code === 200) {
 							const allTags = tagListRes.data.data || []
-							console.log('所有标签列表:', allTags)
+							
 							
 							// 根据标签名称匹配标签ID
 							for (const tagName of resource.tags) {
@@ -521,34 +499,27 @@ export default {
 									const tagId = matchedTag.id || matchedTag.tag_id
 									if (tagId && !tagIds.includes(tagId)) {
 										tagIds.push(tagId)
-										console.log(`找到标签 "${tagName}" 的ID:`, tagId)
+										
 									}
-								} else {
-									console.warn(`未找到标签 "${tagName}" 的ID`)
-								}
+								} 
+									
 							}
 							
-							console.log('根据标签名称查询到的标签ID列表:', tagIds)
+							
 						}
 					} catch (e) {
-						console.error('根据标签名称查询标签ID异常:', e)
+						
 					}
 				}
 				
 				// 确保tagIds是整数数组
 				tagIds = tagIds.map(id => parseInt(id)).filter(id => !isNaN(id) && id > 0)
 				
-				if (tagIds.length === 0) {
-					console.warn('⚠️ 未获取到任何标签ID,资源将不包含标签')
-				} else {
-					console.log('✅ 最终获取到的标签ID列表:', tagIds)
-				}
+				
 				
 				// 调用后端API添加资源
 				const url = `${baseUrl}/my-resource/add?currentUserId=${this.currentUserId}`
-				console.log('添加资源请求URL:', url)
-				console.log('添加资源数据:', JSON.stringify(resourceData, null, 2))
-				console.log('标签ID列表:', tagIds)
+			
 				
 				const [error, res] = await uni.request({
 					url: url,
@@ -565,7 +536,7 @@ export default {
 				uni.hideLoading()
 				
 				if (error) {
-					console.error('添加到我的资源失败:', error)
+				
 					uni.showToast({
 						title: '添加失败,请重试',
 						icon: 'none'
@@ -582,7 +553,7 @@ export default {
 					// 发送刷新事件,通知我的资源页面刷新列表
 					uni.$emit('refreshResourceList')
 				} else {
-					console.error('添加到我的资源失败:', res.data.message)
+					
 					uni.showToast({
 						title: res.data.message || '添加失败',
 						icon: 'none',
@@ -591,7 +562,7 @@ export default {
 				}
 			} catch (e) {
 				uni.hideLoading()
-				console.error('添加到我的资源异常:', e)
+				
 				uni.showToast({
 					title: '添加异常,请稍后重试',
 					icon: 'none'
@@ -614,7 +585,7 @@ export default {
 		// 获取择偶要求(支持驼峰和下划线格式)
 		getMateSelectionCriteria(resource) {
 			if (!resource) {
-				console.warn('getMateSelectionCriteria: resource为空')
+			
 				return ''
 			}
 			
@@ -633,20 +604,13 @@ export default {
 			// 检查是否是纯数字(11位)或包含****的脱敏格式
 			const phonePattern = /^(\d{3}\*{4}\d{4}|\d{11})$/
 			if (phonePattern.test(criteria)) {
-				console.warn('⚠️ 择偶要求字段包含电话号码格式,返回空字符串', {
-					criteria: criteria,
-					phone: resource.phone,
-					'resource完整对象': resource
-				})
+				
 				return ''
 			}
 			
 			// 如果择偶要求等于电话号码(未脱敏),也返回空
 			if (criteria === resource.phone || criteria === (resource.phone || '').replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')) {
-				console.warn('⚠️ 择偶要求等于电话号码,返回空字符串', {
-					criteria: criteria,
-					phone: resource.phone
-				})
+				
 				return ''
 			}
 			

+ 6 - 6
LiangZhiYUMao/pages/matchmaker-workbench/ranking.vue

@@ -91,12 +91,12 @@
 				<view class="tabbar-icon"></view>
 				<text class="tabbar-text">排行榜</text>
 			</view>
-			<view class="tabbar-item message" @click="navigateToMessage">
+			<!-- <view class="tabbar-item message" @click="navigateToMessage">
 				<view class="tabbar-icon">
 					<view v-if="unreadCount > 0" class="badge">{{ unreadCount }}</view>
 				</view>
 				<text class="tabbar-text">消息</text>
-			</view>
+			</view> -->
 			<view class="tabbar-item mine" @click="navigateToMine">
 				<view class="tabbar-icon"></view>
 				<text class="tabbar-text">我的</text>
@@ -154,7 +154,7 @@ export default {
 						limit: 20,
 						userId: this.userId
 					})
-					console.log('API原始返回数据:', JSON.stringify(res))
+				
 					
 					let dataList = []
 					if (res && Array.isArray(res)) {
@@ -167,9 +167,9 @@ export default {
 					}
 					
 					this.rankingList = dataList.map(item => this.formatMatchmaker(item))
-					console.log('格式化后的排行榜数据:', JSON.stringify(this.rankingList.slice(0, 3)))
+					
 				} catch (e) {
-					console.error('加载排行榜数据失败:', e)
+			
 					uni.showToast({
 						title: '加载失败',
 						icon: 'none'
@@ -232,7 +232,7 @@ export default {
 						})
 					}
 				} catch (e) {
-					console.error('点赞失败:', e)
+					
 					uni.showToast({
 						title: e.message || '点赞失败',
 						icon: 'none'

+ 53 - 86
LiangZhiYUMao/pages/matchmaker-workbench/resource-input.vue

@@ -282,7 +282,7 @@ export default {
 			// 确保selectedCategoryId是数字类型
 			const selectedId = parseInt(this.selectedCategoryId)
 			if (isNaN(selectedId)) {
-				console.warn('selectedCategoryId不是有效数字:', this.selectedCategoryId)
+				
 				return []
 			}
 			
@@ -321,13 +321,13 @@ export default {
 			}
 		}
 		this.currentUserId = rawUserId
-		console.log('当前登录用户ID:', this.currentUserId)
+	
 		
 		// 检查是否为编辑模式
 		if (options && options.resourceId) {
 			this.resourceId = parseInt(options.resourceId)
 			this.isEditMode = true
-			console.log('编辑模式,资源ID:', this.resourceId)
+			
 			// 加载资源详情
 			this.loadResourceDetail()
 		}
@@ -351,7 +351,7 @@ export default {
 			try {
 				uni.showLoading({ title: '加载中...' })
 				const baseUrl = process.env.NODE_ENV === 'development' 
-					? 'http://localhost:8083/api'  // 开发环境 - 通过网关
+					? 'https://api.zhongruanke.cn/api'  // 开发环境 - 通过网关
 					: 'https://your-domain.com/api'  // 生产环境
 				
 				const [error, res] = await uni.request({
@@ -362,7 +362,7 @@ export default {
 				uni.hideLoading()
 				
 				if (error) {
-					console.error('加载资源详情失败:', error)
+					
 					uni.showToast({
 						title: '加载资源详情失败',
 						icon: 'none'
@@ -374,7 +374,7 @@ export default {
 					// 检查返回的code
 					if (res.data.code === 200 && res.data.data) {
 						const resource = res.data.data
-						console.log('资源详情:', resource)
+					
 						
 						// 填充表单数据
 						this.formData.name = resource.name || ''
@@ -452,7 +452,7 @@ export default {
 				}
 			} catch (e) {
 				uni.hideLoading()
-				console.error('加载资源详情异常:', e)
+			
 				uni.showToast({
 					title: '加载资源详情失败',
 					icon: 'none'
@@ -511,7 +511,7 @@ export default {
 			
 			try {
 				const baseUrl = process.env.NODE_ENV === 'development' 
-					? 'http://localhost:8083/api'
+					? 'https://api.zhongruanke.cn/api'
 					: 'https://your-domain.com/api'
 				
 				// 调用获取资源标签ID列表的接口
@@ -521,7 +521,7 @@ export default {
 				})
 				
 				if (error) {
-					console.error('加载资源标签失败:', error)
+				
 					return
 				}
 				
@@ -529,17 +529,17 @@ export default {
 					// 后端直接返回标签ID列表
 					const tagIds = res.data.data || []
 					this.selectedTagIds = tagIds.filter(id => id !== null && id !== undefined)
-					console.log('资源标签ID列表:', this.selectedTagIds)
+					
 				}
 			} catch (e) {
-				console.error('加载资源标签异常:', e)
+			
 			}
 		},
 		// 加载标签分类列表
 		async loadCategories() {
 			try {
 				const baseUrl = process.env.NODE_ENV === 'development' 
-					? 'http://localhost:8083/api'  // 开发环境 - 通过网关
+					? 'https://api.zhongruanke.cn/api'  // 开发环境 - 通过网关
 					: 'https://your-domain.com/api'  // 生产环境
 				
 				const [error, res] = await uni.request({
@@ -549,7 +549,7 @@ export default {
 				})
 				
 				if (error) {
-					console.error('加载标签分类失败:', error)
+					
 					return
 				}
 				
@@ -562,7 +562,7 @@ export default {
 						sortOrder: category.sortOrder || category.sort_order,
 						status: category.status
 					}))
-					console.log('标签分类列表加载成功:', this.categoryList)
+				
 					
 					// 如果还没有选中分类,默认选中职业分类(category_id = 1)
 					if (this.selectedCategoryId === null || this.selectedCategoryId === undefined) {
@@ -572,18 +572,18 @@ export default {
 						)
 						if (occupationCategory) {
 							this.selectedCategoryId = occupationCategory.id
-							console.log('默认选中职业分类,ID:', this.selectedCategoryId)
+						
 						} else if (this.categoryList.length > 0) {
 							// 如果找不到职业分类,选中第一个分类
 							this.selectedCategoryId = this.categoryList[0].id
-							console.log('默认选中第一个分类,ID:', this.selectedCategoryId)
+							
 						}
 					}
 				} else {
-					console.error('加载标签分类失败:', res.data.message)
+					
 				}
 			} catch (e) {
-				console.error('加载标签分类异常:', e)
+				
 			}
 		},
 		// 加载标签列表
@@ -591,7 +591,7 @@ export default {
 			try {
 				this.isLoadingTags = true
 				const baseUrl = process.env.NODE_ENV === 'development' 
-					? 'http://localhost:8083/api'  // 开发环境 - 通过网关
+					? 'https://api.zhongruanke.cn/api'  // 开发环境 - 通过网关
 					: 'https://your-domain.com/api'  // 生产环境
 				
 				const [error, res] = await uni.request({
@@ -601,7 +601,7 @@ export default {
 				})
 				
 				if (error) {
-					console.error('加载标签失败:', error)
+					
 					return
 				}
 				
@@ -614,16 +614,11 @@ export default {
 							: (tag.categoryId !== null && tag.categoryId !== undefined ? tag.categoryId : null)
 						return categoryId !== null && categoryId !== undefined
 					})
-					console.log('标签列表加载成功,数量:', this.tagList.length)
-					if (this.tagList.length > 0) {
-						console.log('第一条标签数据:', this.tagList[0])
-						console.log('第一条标签的category_id:', this.tagList[0].category_id, '类型:', typeof this.tagList[0].category_id)
-					}
-				} else {
-					console.error('加载标签失败:', res.data.message)
-				}
+					
+					
+				} 
 			} catch (e) {
-				console.error('加载标签异常:', e)
+				
 			} finally {
 				this.isLoadingTags = false
 			}
@@ -631,26 +626,18 @@ export default {
 		// 选择分类
 		selectCategory(categoryId) {
 			this.selectedCategoryId = categoryId
-			console.log('=== 选择分类 ===')
-			console.log('分类ID:', categoryId, '类型:', typeof categoryId)
-			console.log('标签总数:', this.tagList.length)
+		
 			
 			// 使用$nextTick确保DOM更新后再输出
 			this.$nextTick(() => {
-				console.log('筛选后的标签数量:', this.filteredTagList.length)
+				
 				if (this.filteredTagList.length > 0) {
-					console.log('筛选后的标签名称:', this.filteredTagList.map(t => t.name || t.tag_name || t.tagName))
+					
 				} else {
-					console.warn('没有找到匹配的标签!')
+					
 					// 调试:查看前几条标签的category_id
 					if (this.tagList.length > 0) {
-						console.log('前3条标签的category_id:', 
-							this.tagList.slice(0, 3).map(t => ({
-								name: t.name || t.tag_name,
-								category_id: t.category_id,
-								categoryId: t.categoryId
-							}))
-						)
+						
 					}
 				}
 			})
@@ -665,12 +652,12 @@ export default {
 				// 未选中,添加到选中列表
 				this.selectedTagIds.push(tagId)
 			}
-			console.log('选中的标签ID:', this.selectedTagIds)
+			
 		},
 		onGenderChange(e) {
 			this.genderIndex = parseInt(e.detail.value) || 0
 			this.formData.gender = this.genderIndex + 1 // 1-男,2-女
-			console.log('性别选择 - genderIndex:', this.genderIndex, 'formData.gender:', this.formData.gender)
+			
 		},
 		onConstellationChange(e) {
 			this.constellationIndex = e.detail.value
@@ -681,7 +668,7 @@ export default {
 			// 0-未婚,1-离异,2-丧偶
 			// 直接使用索引值作为marrStatus的值
 			this.formData.marrStatus = this.maritalStatusIndex
-			console.log('婚姻状态选择:', this.maritalStatusIndex, '对应值:', this.formData.marrStatus, '选项:', this.maritalStatusOptions[this.maritalStatusIndex])
+			
 		},
 		onDiplomaChange(e) {
 			this.diplomaIndex = e.detail.value
@@ -794,25 +781,19 @@ export default {
 				}
 				
 				// 调试:打印原始值
-				console.log('=== 提交前的原始数据 ===')
-				console.log('formData.marrStatus:', this.formData.marrStatus, '类型:', typeof this.formData.marrStatus)
-				console.log('maritalStatusIndex:', this.maritalStatusIndex, '类型:', typeof this.maritalStatusIndex)
-				console.log('formData.backupPhone:', this.formData.backupPhone, '类型:', typeof this.formData.backupPhone)
-				console.log('formData.mateSelectionCriteria:', this.formData.mateSelectionCriteria, '类型:', typeof this.formData.mateSelectionCriteria)
+				
 				
 				// 确定婚姻状态的值:优先使用formData.marrStatus,如果没有则使用maritalStatusIndex
 				let marrStatusValue = null
 				if (this.formData.marrStatus !== null && this.formData.marrStatus !== undefined && this.formData.marrStatus !== 'undefined' && this.formData.marrStatus !== 'null' && this.formData.marrStatus !== '') {
 					const parsed = parseInt(this.formData.marrStatus)
 					marrStatusValue = isNaN(parsed) ? null : parsed
-					console.log('婚姻状态处理: formData.marrStatus ->', marrStatusValue)
+					
 				} else if (this.maritalStatusIndex !== null && this.maritalStatusIndex !== undefined && this.maritalStatusIndex >= 0) {
 					const parsed = parseInt(this.maritalStatusIndex)
 					marrStatusValue = isNaN(parsed) ? null : parsed
-					console.log('婚姻状态处理: maritalStatusIndex ->', marrStatusValue)
-				} else {
-					console.log('婚姻状态处理: 未找到有效值')
-				}
+					
+				} 
 				
 				// 处理备用手机号:保留有效值,空字符串转为null
 				let backupPhoneValue = null
@@ -821,13 +802,9 @@ export default {
 					const trimmed = String(backupPhoneRaw).trim()
 					if (trimmed !== '' && trimmed !== 'undefined' && trimmed !== 'null') {
 						backupPhoneValue = trimmed
-						console.log('备用手机号处理: 保留值 ->', backupPhoneValue)
-					} else {
-						console.log('备用手机号处理: 空值,转为null')
-					}
-				} else {
-					console.log('备用手机号处理: 原始值为null/undefined')
-				}
+					
+					} 
+				} 
 				
 				// 处理择偶标准:保留有效值,空字符串转为null
 				let mateSelectionCriteriaValue = null
@@ -836,13 +813,9 @@ export default {
 					const trimmed = String(mateSelectionCriteriaRaw).trim()
 					if (trimmed !== '' && trimmed !== 'undefined' && trimmed !== 'null') {
 						mateSelectionCriteriaValue = trimmed
-						console.log('择偶标准处理: 保留值 ->', mateSelectionCriteriaValue)
-					} else {
-						console.log('择偶标准处理: 空值,转为null')
-					}
-				} else {
-					console.log('择偶标准处理: 原始值为null/undefined')
-				}
+						
+					} 
+				} 
 				
 				// 辅助函数:安全地将值转换为整数,无效值返回null
 				const safeParseInt = (value) => {
@@ -890,15 +863,11 @@ export default {
 					tagIds: this.selectedTagIds.length > 0 ? this.selectedTagIds : null
 				}
 				
-				console.log('提交数据 - 婚姻状态:', submitData.marrStatus, 'maritalStatusIndex:', this.maritalStatusIndex, 'formData.marrStatus:', this.formData.marrStatus, '选项:', submitData.marrStatus !== null ? this.maritalStatusOptions[submitData.marrStatus] : '未选择')
-				console.log('提交数据 - 备用手机号:', submitData.backupPhone, '类型:', typeof submitData.backupPhone)
-				console.log('提交数据 - 择偶标准:', submitData.mateSelectionCriteria, '类型:', typeof submitData.mateSelectionCriteria)
-				console.log('提交数据 - 标签ID列表:', submitData.tagIds)
-				console.log('完整提交数据:', JSON.stringify(submitData, null, 2))
+				
 
 				// 调用后端接口(通过网关)
 				const baseUrl = process.env.NODE_ENV === 'development' 
-					? 'http://localhost:8083/api'  // 开发环境 - 通过网关
+					? 'https://api.zhongruanke.cn/api'  // 开发环境 - 通过网关
 					: 'https://your-domain.com/api'  // 生产环境
 				
 				// 检查手机号是否已存在(检查整个my_resource表,不限制红娘)
@@ -926,7 +895,7 @@ export default {
 					})
 					
 					if (checkError) {
-						console.error('检查手机号失败:', checkError)
+					
 						uni.hideLoading()
 						uni.showToast({
 							title: '检查手机号失败,请重试',
@@ -972,7 +941,7 @@ export default {
 					url = `${baseUrl}/my-resource/update/${this.resourceId}`
 					method = 'PUT'
 					successMessage = '修改成功'
-					console.log('编辑模式 - 更新接口URL:', url, 'resourceId:', this.resourceId)
+					
 				} else {
 					// 新增模式:调用添加接口
 					url = `${baseUrl}/my-resource/add`
@@ -984,10 +953,9 @@ export default {
 							url += `?currentUserId=${userId}`
 						}
 					}
-					console.log('新增模式 - 添加接口URL:', url)
+					
 				}
 				
-				console.log('提交请求 - URL:', url, 'Method:', method, 'isEditMode:', this.isEditMode, 'resourceId:', this.resourceId)
 				
 				const res = await uni.request({
 					url: url,
@@ -1074,7 +1042,7 @@ export default {
 				}
 			} catch (error) {
 				uni.hideLoading()
-				console.error('提交失败:', error)
+			
 				uni.showToast({
 					title: '提交失败,请稍后重试',
 					icon: 'none'
@@ -1108,7 +1076,6 @@ export default {
 					await this.loadAddressCities(0)
 				}
 			} catch (e) {
-				console.error('加载住址省份失败:', e)
 			}
 		},
 		// 加载住址城市列表
@@ -1127,7 +1094,7 @@ export default {
 					this.addressMultiArray[2] = []
 				}
 			} catch (e) {
-				console.error('加载住址城市失败:', e)
+			
 				this.addressCities = []
 				this.addressMultiArray[1] = []
 				this.addressMultiArray[2] = []
@@ -1143,7 +1110,7 @@ export default {
 				this.addressAreas = areas || []
 				this.addressMultiArray[2] = this.addressAreas.map(a => a.name)
 			} catch (e) {
-				console.error('加载住址区域失败:', e)
+			
 				this.addressAreas = []
 				this.addressMultiArray[2] = []
 			}
@@ -1198,7 +1165,7 @@ export default {
 					await this.loadDomicileCities(0)
 				}
 			} catch (e) {
-				console.error('加载户籍地省份失败:', e)
+				
 			}
 		},
 		// 加载户籍地城市列表
@@ -1217,7 +1184,7 @@ export default {
 					this.domicileMultiArray[2] = []
 				}
 			} catch (e) {
-				console.error('加载户籍地城市失败:', e)
+				
 				this.domicileCities = []
 				this.domicileMultiArray[1] = []
 				this.domicileMultiArray[2] = []
@@ -1233,7 +1200,7 @@ export default {
 				this.domicileAreas = areas || []
 				this.domicileMultiArray[2] = this.domicileAreas.map(a => a.name)
 			} catch (e) {
-				console.error('加载户籍地区域失败:', e)
+				
 				this.domicileAreas = []
 				this.domicileMultiArray[2] = []
 			}

+ 14 - 17
LiangZhiYUMao/pages/matchmaker-workbench/sign-in.vue

@@ -146,7 +146,7 @@ export default {
 						uni.setStorageSync('userInfo', userInfo)
 					}
 				} catch (e) {
-					console.error('获取红娘信息失败:', e)
+				
 				}
 			}
 			
@@ -173,43 +173,40 @@ export default {
 				
 				// 获取本月所有签到日期
 				const checkinInfoRes = await api.matchmaker.checkinInfo(this.makerId, this.currentYear, this.currentMonth)
-				console.log('签到信息API响应:', JSON.stringify(checkinInfoRes, null, 2))
+			
 				let checkinInfo = checkinInfoRes
 				if (checkinInfoRes && checkinInfoRes.data) {
 					checkinInfo = checkinInfoRes.data
 				}
-				console.log('处理后的签到信息:', JSON.stringify(checkinInfo, null, 2))
-				
+			
 				// 获取已签到日期列表
 				this.signedDates = checkinInfo.checkedDates || []
-				console.log('已签到日期列表:', JSON.stringify(this.signedDates, null, 2))
-				console.log('已签到日期数量:', this.signedDates.length)
 				
 				// 检查今日签到状态
 				const statusRes = await api.matchmaker.checkinStatus(this.makerId)
-				console.log('签到状态API响应:', statusRes)
+				
 				let statusData = statusRes
 				if (statusRes && statusRes.data !== undefined) {
 					statusData = statusRes.data
 				}
 				this.isSigned = statusData === true || statusData?.isCheckedIn === true || statusData?.checked === true
-				console.log('今日签到状态:', this.isSigned)
+			
 				
 				// 更新日历,显示所有已签到日期
 				this.generateCalendar()
 			} catch (e) {
-				console.error('加载签到数据失败:', e)
+				
 			}
 		},
 		generateCalendar() {
-			console.log('开始生成日历,已签到日期:', this.signedDates)
+			
 			const year = this.currentYear
 			const month = this.currentMonth
-			console.log('当前年月:', year, month)
+			
 			
 			// 更新月份显示文本
 			this.currentMonthText = `${year}年${month}月`
-			console.log('月份显示文本:', this.currentMonthText)
+			
 			
 			// 获取当月第一天是星期几
 			const firstDay = new Date(year, month - 1, 1).getDay()
@@ -217,12 +214,12 @@ export default {
 			const daysInMonth = new Date(year, month, 0).getDate()
 			// 获取上月天数
 			const prevMonthDays = new Date(year, month - 1, 0).getDate()
-			console.log('日历参数: 第一天星期几:', firstDay, '当月天数:', daysInMonth, '上月天数:', prevMonthDays)
+		
 			
 			// 获取今天的日期字符串
 			const today = new Date()
 			const todayStr = this.formatDate(today)
-			console.log('今天日期:', todayStr)
+			
 			
 			const days = []
 			
@@ -242,7 +239,7 @@ export default {
 				const dateStr = this.formatDate(date)
 				const isToday = dateStr === todayStr
 				const isSigned = this.signedDates.includes(dateStr)
-				console.log('生成日期:', dateStr, '是否已签到:', isSigned, '是否今天:', isToday)
+				
 				
 				days.push({
 					day: i,
@@ -264,7 +261,7 @@ export default {
 			}
 			
 			this.calendarDays = days
-			console.log('生成的日历数据:', this.calendarDays)
+			
 		},
 		// 格式化日期为YYYY-MM-DD
 		formatDate(date) {
@@ -317,7 +314,7 @@ export default {
 					icon: 'success'
 				})
 			} catch (e) {
-				console.error('签到失败:', e)
+			
 				// 如果是已签到的错误,更新状态
 				if (e.message && e.message.includes('已签到')) {
 					this.isSigned = true

+ 21 - 22
LiangZhiYUMao/pages/matchmaker-workbench/success-case-upload.vue

@@ -228,18 +228,18 @@ export default {
 				if (userInfo && userInfo.userId) {
 					// 通过userId获取红娘信息
 					const matchmakerInfo = await api.matchmaker.getByUserId(userInfo.userId)
-					console.log('红娘信息:', matchmakerInfo)
+				
 					if (matchmakerInfo) {
 						// 兼容不同字段名
 						this.matchmakerId = matchmakerInfo.matchmakerId || matchmakerInfo.matchmaker_id || null
-						console.log('获取到红娘ID:', this.matchmakerId)
+						
 					}
 					if (!this.matchmakerId) {
 						uni.showToast({ title: '未找到红娘信息', icon: 'none' })
 					}
 				}
 			} catch (e) {
-				console.error('获取红娘信息失败', e)
+				
 				uni.showToast({ title: '获取红娘信息失败', icon: 'none' })
 			}
 		},
@@ -248,7 +248,7 @@ export default {
 		async loadResubmitData(id) {
 			try {
 				const res = await api.successCaseUpload.getAuditRecordDetail(id)
-				console.log('回显数据:', res)
+				
 				if (res) {
 					// 回显表单数据
 					this.formData.maleRealName = res.maleRealName || ''
@@ -290,7 +290,7 @@ export default {
 					}
 				}
 			} catch (e) {
-				console.error('加载回显数据失败', e)
+			
 				uni.showToast({ title: '加载数据失败', icon: 'none' })
 			}
 		},
@@ -304,15 +304,15 @@ export default {
 			try {
 				// 加载男方用户列表(只查询已注册用户,user_id不为空)
 				const maleRes = await api.myResource.getRegisteredDropdown(this.matchmakerId, 1)
-				console.log('男方资源返回:', maleRes)
+				
 				this.maleUsers = Array.isArray(maleRes) ? maleRes : (maleRes?.data || [])
 				
 				// 加载女方用户列表(只查询已注册用户,user_id不为空)
 				const femaleRes = await api.myResource.getRegisteredDropdown(this.matchmakerId, 2)
-				console.log('女方资源返回:', femaleRes)
+				
 				this.femaleUsers = Array.isArray(femaleRes) ? femaleRes : (femaleRes?.data || [])
 			} catch (e) {
-				console.error('加载资源列表失败', e)
+			
 			}
 		},
 		
@@ -362,7 +362,7 @@ export default {
 				// 如果关键词为空,重新加载当前性别的完整列表
 				if (!this.searchKeyword || !this.searchKeyword.trim()) {
 					const res = await api.myResource.getRegisteredDropdown(this.matchmakerId, this.pickerGender)
-					console.log('重新加载资源列表:', res)
+					
 					const users = Array.isArray(res) ? res : (res?.data || [])
 					if (this.pickerGender === 1) {
 						this.maleUsers = users
@@ -374,7 +374,7 @@ export default {
 				
 				// 使用已注册用户搜索接口(只返回user_id不为空的资源)
 				const res = await api.myResource.searchRegistered(this.matchmakerId, this.searchKeyword.trim(), this.pickerGender)
-				console.log('搜索资源返回:', res)
+				
 				const users = Array.isArray(res) ? res : (res?.data || [])
 				if (this.pickerGender === 1) {
 					this.maleUsers = users
@@ -382,7 +382,7 @@ export default {
 					this.femaleUsers = users
 				}
 			} catch (e) {
-				console.error('搜索资源失败', e)
+				
 			}
 		},
 		
@@ -395,11 +395,10 @@ export default {
 					sourceType: ['album', 'camera']
 				})
 				
-				console.log('选择图片返回 err:', err)
-				console.log('选择图片返回 res:', res)
+			
 				
 				if (err) {
-					console.error('选择图片失败', err)
+					
 					return
 				}
 				
@@ -407,31 +406,31 @@ export default {
 					uni.showLoading({ title: '上传中...' })
 					
 					for (const tempPath of res.tempFilePaths) {
-						console.log('准备上传图片:', tempPath)
+					
 						try {
 							const uploadRes = await this.uploadImage(tempPath)
-							console.log('上传结果:', uploadRes)
+							
 							if (uploadRes) {
 								this.proofImages.push(uploadRes)
 							}
 						} catch (e) {
-							console.error('上传图片失败', e)
+							
 							uni.showToast({ title: '图片上传失败', icon: 'none' })
 						}
 					}
 					
 					uni.hideLoading()
-					console.log('当前图片列表:', this.proofImages)
+					
 				}
 			} catch (e) {
-				console.error('选择图片异常', e)
+				
 			}
 		},
 		
 		async uploadImage(tempPath) {
 			return new Promise((resolve, reject) => {
 				uni.uploadFile({
-					url: 'http://localhost:8083/api/success-case-upload/upload-image',
+					url: 'https://api.zhongruanke.cn/api/success-case-upload/upload-image',
 					filePath: tempPath,
 					name: 'file',
 					success: (res) => {
@@ -504,7 +503,7 @@ export default {
 				}
 				
 				const res = await api.successCaseUpload.submit(submitData)
-				console.log('提交结果:', res)
+			
 				
 				// request函数成功时返回的是data字段的内容(这里是id)
 				// 如果能走到这里说明请求成功了
@@ -517,7 +516,7 @@ export default {
 					uni.showToast({ title: '提交失败', icon: 'none' })
 				}
 			} catch (e) {
-				console.error('提交失败', e)
+				
 				uni.showToast({ title: '提交失败,请稍后重试', icon: 'none' })
 			} finally {
 				this.submitting = false

+ 2 - 2
LiangZhiYUMao/pages/matchmaker-workbench/system-messages.vue

@@ -80,7 +80,7 @@ export default {
         this.hasMore = this.list.length < total
         this.pageNum++
       } catch (e) {
-        console.log('红娘系统通知加载失败', e)
+       
       } finally {
         this.loading = false
       }
@@ -98,7 +98,7 @@ export default {
         })
         uni.showToast({ title: '已全部标记为已读', icon: 'success' })
       } catch (e) {
-        console.log('一键已读失败', e)
+        
         uni.showToast({ title: '操作失败,请稍后重试', icon: 'none' })
       }
     },

+ 12 - 12
LiangZhiYUMao/pages/matchmakers/detail.vue

@@ -194,14 +194,14 @@ export default {
 	},
 
 	onLoad(options) {
-		console.log('红娘详情页接收到的参数:', options)
+		
 		if (options.id) {
 			const parsedId = parseInt(options.id)
-			console.log('解析后的红娘ID:', parsedId)
+			
 			
 			// 检查解析后的ID是否有效
 			if (isNaN(parsedId)) {
-				console.error('红娘ID解析失败,原始值:', options.id)
+				
 				uni.showToast({
 					title: 'ID参数无效',
 					icon: 'none'
@@ -215,7 +215,7 @@ export default {
 			this.matchmakerId = parsedId
 			this.loadMatchmakerDetail()
 		} else {
-			console.error('未接收到红娘ID参数')
+			
 			uni.showToast({
 				title: '参数错误',
 				icon: 'none'
@@ -235,10 +235,10 @@ export default {
 			
 			try {
 				const result = await api.matchmaker.getDetail(this.matchmakerId)
-				console.log(result)
+				
 				this.matchmaker = result
 			} catch (error) {
-				console.error('加载红娘详情失败:', error)
+				
 				uni.showToast({
 					title: '加载失败,请重试',
 					icon: 'none'
@@ -254,10 +254,10 @@ export default {
 		 * 图片加载成功处理
 		 */
 		handleImageLoad(item) {
-			console.log(item)
+			
 			// 防御性检查:确保item存在且是对象
 			if (!item || typeof item !== 'object') {
-				console.warn('handleImageLoad: item参数无效', item)
+				
 				return
 			}
 			this.$set(item, 'imageLoadError', false)
@@ -344,7 +344,7 @@ export default {
 				if (avatarUrl.startsWith('http')) {
 					// 检查是否是无效的placeholder URL
 					if (avatarUrl.includes('placeholder')) {
-						console.log('检测到placeholder URL,使用默认头像')
+					
 						return this.defaultAvatar
 					}
 					return avatarUrl
@@ -374,14 +374,14 @@ export default {
 		 * 图片加载错误处理
 		 */
 		handleImageError(item) {
-			console.log(item)
+			
 			// 防御性检查:确保item存在且是对象
 			if (!item || typeof item !== 'object') {
-				console.warn('handleImageError: item参数无效', item)
+				
 				return
 			}
 			
-			console.log('头像加载失败:', item.real_name, item.avatar_url)
+		
 			this.$set(item, 'imageLoadError', true)
 			this.$set(item, 'imageLoaded', false)
 		},

+ 14 - 18
LiangZhiYUMao/pages/matchmakers/list.vue

@@ -182,24 +182,20 @@ export default {
 					params.matchmakerType = this.filterType
 				}
 				
-				console.log('红娘列表查询参数:', params)
+				
 				
 				const result = await api.matchmaker.getList(params)
 				
 				if (result && result.records) {
-					// 日志输出:检查返回数据格式
-					console.log('红娘列表API返回数据:', result)
-					console.log('第一个红娘数据:', result.records[0])
-					
-					// 数据格式检查:确保每个红娘都有有效的ID
+				
 					const validRecords = result.records.map(item => {
 						// 如果matchmakerId不存在,尝试其他可能的ID字段
 						if (!item.matchmakerId && item.id) {
-							console.warn('使用id字段作为matchmakerId:', item.id)
+						
 							item.matchmakerId = item.id
 						}
 						if (!item.matchmakerId && item.matchmaker_id) {
-							console.warn('使用matchmaker_id字段作为matchmakerId:', item.matchmaker_id)
+							
 							item.matchmakerId = item.matchmaker_id
 						}
 						return item
@@ -219,7 +215,7 @@ export default {
 					}
 				}
 			} catch (error) {
-				console.error('加载红娘列表失败:', error)
+				
 				uni.showToast({
 					title: '加载失败,请重试',
 					icon: 'none'
@@ -246,7 +242,7 @@ export default {
 			if (this.filterType === type) return
 			
 			this.filterType = type
-			console.log(type)
+			
 			this.loadMatchmakerList()
 		},
 
@@ -256,7 +252,7 @@ export default {
 		goToDetail(matchmakerId) {
 			// 添加防御性检查
 			if (!matchmakerId || matchmakerId === 'undefined' || matchmakerId === 'null') {
-				console.error('红娘ID无效:', matchmakerId)
+				
 				uni.showToast({
 					title: '红娘信息错误',
 					icon: 'none'
@@ -264,7 +260,7 @@ export default {
 				return
 			}
 			
-			console.log('跳转到红娘详情,ID:', matchmakerId)
+			
 			uni.navigateTo({
 				url: `/pages/matchmakers/detail?id=${matchmakerId}`
 			})
@@ -313,7 +309,7 @@ export default {
 				if (avatarUrl.startsWith('http')) {
 					// 检查是否是无效的placeholder URL
 					if (avatarUrl.includes('placeholder')) {
-						console.log('检测到placeholder URL,使用默认头像')
+						
 						return this.defaultAvatar
 					}
 					return avatarUrl
@@ -345,10 +341,10 @@ export default {
 		 * 图片加载成功处理
 		 */
 		handleImageLoad(item) {
-			console.log(item)
+			
 			// 防御性检查:确保item存在且是对象
 			if (!item || typeof item !== 'object') {
-				console.warn('handleImageLoad: item参数无效', item)
+				
 				return
 			}
 			this.$set(item, 'imageLoadError', false)
@@ -359,14 +355,14 @@ export default {
 		 * 图片加载错误处理
 		 */
 		handleImageError(item) {
-			console.log(item)
+			
 			// 防御性检查:确保item存在且是对象
 			if (!item || typeof item !== 'object') {
-				console.warn('handleImageError: item参数无效', item)
+				
 				return
 			}
 			
-			console.log('头像加载失败:', item.real_name, item.avatar_url)
+			
 			this.$set(item, 'imageLoadError', true)
 			this.$set(item, 'imageLoaded', false)
 		},

+ 72 - 180
LiangZhiYUMao/pages/mine/index.vue

@@ -230,11 +230,11 @@
         <text class="tabbar-icon">👍</text>
         <text class="tabbar-text">推荐</text>
       </view>
-      <view class="tabbar-item" @click="switchTab('message')">
+     <!-- <view class="tabbar-item" @click="switchTab('message')">
         <text class="tabbar-icon">💬</text>
         <text class="tabbar-text">消息</text>
         <view v-if="unreadCount > 0" class="tabbar-badge">{{ unreadCount }}</view>
-      </view>
+      </view> -->
       <view class="tabbar-item active" @click="switchTab('mine')">
         <text class="tabbar-icon">👤</text>
         <text class="tabbar-text">我的</text>
@@ -250,7 +250,7 @@ export default {
   data() {
     return {
       // 网关地址
-      gatewayURL: 'http://localhost:8083',
+      gatewayURL: 'https://api.zhongruanke.cn',
 
       // 用户ID(如果没有登录,默认为1)
       currentUserId: null,
@@ -300,7 +300,7 @@ export default {
     }
   },
   onLoad() {
-    console.log('=== 我的页面加载开始 ===')
+   
 
     // 立即检查登录状态
     const token = uni.getStorageSync('token')
@@ -308,7 +308,7 @@ export default {
 
     if (!token || !userInfo) {
       // 未登录,立即强制跳转到登录页
-      console.log('❌ 未登录,强制跳转到登录页')
+     
       uni.showModal({
         title: '需要登录',
         content: '请先登录后查看个人信息',
@@ -336,15 +336,14 @@ export default {
   },
 
   onShow() {
-    console.log('=== 我的页面显示 ===')
-
+   
     // 检查登录状态
     const token = uni.getStorageSync('token')
     const userInfo = uni.getStorageSync('userInfo')
 
     if (!token || !userInfo) {
       // 未登录,直接跳转(不显示弹窗,因为onLoad已经显示过了)
-      console.log('❌ 未登录,跳转到登录页')
+     
       uni.navigateTo({
         url: '/pages/page3/page3'
       })
@@ -357,22 +356,17 @@ export default {
   methods: {
     // 同步登录状态并更新页面数据
     syncLoginStatus() {
-      console.log('=== 同步登录状态 ===')
+    
 
       // 获取最新的登录信息
       const token = uni.getStorageSync('token')
       const userInfo = uni.getStorageSync('userInfo')
       const userId = uni.getStorageSync('userId')
 
-      console.log('最新登录状态:')
-      console.log('- token存在:', !!token)
-      console.log('- userInfo存在:', !!userInfo)
-      console.log('- userId:', userId)
+      
 
       if (token && userInfo && userId) {
-        // 已登录状态 - 立即使用存储的用户信息更新页面
-        console.log('✅ 检测到登录状态,立即更新页面数据')
-
+        
         this.currentUserId = parseInt(userId)
 
         // 直接使用存储的用户信息更新页面
@@ -391,7 +385,7 @@ export default {
           isVip: false
         }
 
-        console.log('✅ 页面用户信息已更新:', this.userInfo.nickname)
+      
 
         // 强制页面刷新
         this.$forceUpdate()
@@ -408,8 +402,7 @@ export default {
         this.loadUserInfo()
 
       } else {
-        // 未登录状态 - 设置空白用户信息
-        console.log('❌ 未检测到登录状态')
+       
         this.currentUserId = null
 
         // 设置未登录状态的用户信息
@@ -504,18 +497,17 @@ export default {
         return
       }
 
-      console.log('加载用户信息,用户ID:', this.currentUserId)
-
+     
       // 获取用户基本信息
       uni.request({
         url: this.gatewayURL + '/api/user/info?userId=' + this.currentUserId,
         method: 'GET',
         success: (res) => {
-          console.log('用户信息API响应:', res.data)
+        
 
           if (res.data && res.data.code === 200) {
             const data = res.data.data
-            console.log('✅ API返回用户数据:', data)
+            
 
             // 更新用户信息
             this.userInfo = {
@@ -553,7 +545,7 @@ export default {
               authenticityScore: data.authenticityScore
             }
 
-            console.log('✅ 用户信息更新完成:', this.userInfo.nickname)
+           
 
             // 强制页面更新
             this.$forceUpdate()
@@ -683,11 +675,12 @@ export default {
       try {
         // 检查用户是否为红娘
         const matchmakerStatusRes = await api.user.getMatchmakerStatus(this.userInfo.userId)
-        console.log('用户红娘状态:', matchmakerStatusRes)
+     
+	 console.log(matchmakerStatusRes)
+        
+        if (matchmakerStatusRes && matchmakerStatusRes.isMatchmaker == 1) {
+        
         
-        if (matchmakerStatusRes && matchmakerStatusRes.isMatchmaker) {
-          // 是红娘,使用红娘签到接口
-          console.log('用户是红娘,使用红娘签到接口')
           
           // 获取当前年月
           const today = new Date()
@@ -696,12 +689,12 @@ export default {
           
           // 调用红娘签到信息接口
           const checkinInfoRes = await api.matchmaker.checkinInfo(
-            matchmakerStatusRes.matchmakerId, 
+            this.userInfo.userId, 
             year, 
             month
           )
           
-          console.log('红娘签到信息:', checkinInfoRes)
+       
           
           // 更新签到数据
           this.checkinData = {
@@ -721,8 +714,7 @@ export default {
             { day: 30, icon: '🏆', reward: '积分+50', received: checkinInfoRes.continuousDays >= 30, isCurrent: checkinInfoRes.continuousDays >= 14 && checkinInfoRes.continuousDays < 30 }
           ]
         } else {
-          // 不是红娘,普通用户签到功能暂未实现
-          console.log('用户不是红娘,普通用户签到功能暂未实现')
+       
         }
       } catch (err) {
         console.error('加载签到信息失败:', err)
@@ -775,13 +767,7 @@ export default {
       
       this.calendarDays = days
       
-      console.log('日历生成完成:', {
-        month: this.currentMonth,
-        firstDay: firstDay,
-        daysInMonth: daysInMonth,
-        totalDays: days.length,
-        todayStr: todayStr
-      })
+    
     },
     // 格式化日期
     formatDate(date) {
@@ -817,11 +803,11 @@ export default {
       try {
         // 检查用户是否为红娘
         const matchmakerStatusRes = await api.user.getMatchmakerStatus(this.userInfo.userId)
-        console.log('用户红娘状态:', matchmakerStatusRes)
+        
         
         if (matchmakerStatusRes && matchmakerStatusRes.isMatchmaker) {
           // 是红娘,使用红娘签到接口
-          console.log('用户是红娘,使用红娘签到接口')
+         
           
           // 调用红娘签到接口,直接使用userId作为makerId
           const signRes = await api.matchmaker.doCheckin(this.userInfo.userId)
@@ -852,8 +838,7 @@ export default {
           // 重新加载签到信息,确保数据最新
           await this.loadCheckinInfo()
         } else {
-          // 不是红娘,普通用户签到功能暂未实现
-          console.log('用户不是红娘,普通用户签到功能暂未实现')
+         
           uni.showToast({
             title: '功能开发中,敬请期待',
             icon: 'none'
@@ -882,18 +867,15 @@ export default {
       })
     },
     goToPage(page) {
-      console.log('=== goToPage 被调用 ===')
-      console.log('页面参数:', page)
-      console.log('当前用户ID:', this.currentUserId)
+     
 
       try {
         if (page === 'basicInfo') {
-          console.log('✅ 跳转到基本资料页面')
-          // 跳转到基本资料页面
+         
           uni.navigateTo({
             url: '/pages/profile/index',
             success: () => {
-              console.log('✅ 基本资料页面跳转成功')
+             
             },
             fail: (err) => {
               console.error('❌ 基本资料页面跳转失败:', err)
@@ -904,12 +886,12 @@ export default {
             }
           })
         } else if (page === 'verifyRealName') {
-          console.log('✅ 跳转到实名认证页面')
+         
           // 跳转到实名认证页面
           uni.navigateTo({
             url: '/pages/settings/id-verification',
             success: () => {
-              console.log('✅ 实名认证页面跳转成功')
+            
             },
             fail: (err) => {
               console.error('❌ 实名认证页面跳转失败:', err)
@@ -920,12 +902,12 @@ export default {
             }
           })
         } else if (page === 'verifyEducation') {
-          console.log('✅ 跳转到学历认证页面')
+         
           // 跳转到实名认证页面
           uni.navigateTo({
             url: '/pages/settings/id-verification',
             success: () => {
-              console.log('✅ 学历认证页面跳转成功')
+             
             },
             fail: (err) => {
               console.error('❌ 学历认证页面跳转失败:', err)
@@ -936,12 +918,12 @@ export default {
             }
           })
         } else if (page === 'partTimeMatchmaker') {
-          console.log('✅ 跳转到兼职红娘页面')
+          
           // 跳转到兼职红娘页面
           uni.navigateTo({
             url: '/pages/part-time-matchmaker/index',
             success: () => {
-              console.log('✅ 兼职红娘页面跳转成功')
+              
             },
             fail: (err) => {
               console.error('❌ 兼职红娘页面跳转失败:', err)
@@ -952,12 +934,12 @@ export default {
             }
           })
         } else if (page === 'blacklist') {
-          console.log('✅ 跳转到黑名单页面')
+         
           // 跳转到黑名单页面
           uni.navigateTo({
             url: '/pages/blacklist/index',
             success: () => {
-              console.log('✅ 黑名单页面跳转成功')
+              
             },
             fail: (err) => {
               console.error('❌ 黑名单页面跳转失败:', err)
@@ -968,12 +950,12 @@ export default {
             }
           })
         } else if (page === 'partnerRequirement') {
-          console.log('✅ 跳转到对象要求页面')
+          
           // 跳转到对象要求页面
           uni.navigateTo({
             url: '/pages/partner-requirement/index',
             success: () => {
-              console.log('✅ 对象要求页面跳转成功')
+            
             },
             fail: (err) => {
               console.error('❌ 对象要求页面跳转失败:', err)
@@ -984,12 +966,11 @@ export default {
             }
           })
         } else if (page === 'feedback') {
-          console.log('✅ 跳转到用户反馈页面')
-          // 跳转到用户反馈页面
+         
           uni.navigateTo({
             url: '/pages/feedback/index',
             success: () => {
-              console.log('✅ 用户反馈页面跳转成功')
+            
             },
             fail: (err) => {
               console.error('❌ 用户反馈页面跳转失败:', err)
@@ -1000,12 +981,11 @@ export default {
             }
           })
         } else if (page === 'settings') {
-          console.log('✅ 跳转到设置页面')
-          // 跳转到设置页面
+         
           uni.navigateTo({
             url: '/pages/settings/index',
             success: () => {
-              console.log('✅ 设置页面跳转成功')
+           
             },
             fail: (err) => {
               console.error('❌ 设置页面跳转失败:', err)
@@ -1016,30 +996,13 @@ export default {
             }
           })
         }
-            // 	else if (page === 'customize') {
-            // 		console.log('✅ 跳转到私人定制页面')
-            // 		// 跳转到私人定制页面
-            // 		uni.navigateTo({
-            // 			url: '/pages/customize/index',
-            // 			success: () => {
-            // 				console.log('✅ 私人定制页面跳转成功')
-            // 			},
-            // 			fail: (err) => {
-            // 				console.error('❌ 私人定制页面跳转失败:', err)
-            // 				uni.showToast({
-            // 					title: '页面跳转失败',
-            // 					icon: 'none'
-            // 				})
-            // 			}
-            // 		})
-        // }
+         
         else if (page === 'part-time-matchmaker') {
-          console.log('✅ 跳转到加入红娘页面')
-          // 跳转到加入红娘页面
+          
           uni.navigateTo({
             url: '/pages/part-time-matchmaker/index',
             success: () => {
-              console.log('✅ 加入红娘页面跳转成功')
+             
             },
             fail: (err) => {
               console.error('❌ 加入红娘页面跳转失败:', err)
@@ -1050,12 +1013,11 @@ export default {
             }
           })
         } else if (page === 'myActivity') {
-          console.log('✅ 跳转到我的活动页面')
-          // 跳转到我的活动页面
+         
           uni.navigateTo({
             url: '/pages/mine/my-activities',
             success: () => {
-              console.log('✅ 我的活动页面跳转成功')
+            
             },
             fail: (err) => {
               console.error('❌ 我的活动页面跳转失败:', err)
@@ -1066,12 +1028,11 @@ export default {
             }
           })
         } else if (page === 'myDynamics') {
-          console.log('✅ 跳转到我的动态页面')
-          // 跳转到我的动态页面
+          
           uni.navigateTo({
             url: '/pages/mine/my-dynamics',
             success: () => {
-              console.log('✅ 我的动态页面跳转成功')
+              
             },
             fail: (err) => {
               console.error('❌ 我的动态页面跳转失败:', err)
@@ -1082,7 +1043,7 @@ export default {
             }
           })
         } else {
-          console.log('⚠️ 未知页面类型:', page)
+          
           uni.showToast({
             title: '功能开发中',
             icon: 'none'
@@ -1102,7 +1063,7 @@ export default {
       const tabPages = {
         index: '/pages/index/index',
         plaza: '/pages/plaza/index',
-        recommend: '/pages/recommend/index',
+        recommend: '/subpkg-message/index/index',
         message: '/pages/message/index'
       }
 
@@ -1115,7 +1076,7 @@ export default {
 
     // 处理退出登录
     handleLogout() {
-      console.log('点击退出登录按钮')
+     
 
       uni.showModal({
         title: '退出登录',
@@ -1125,18 +1086,16 @@ export default {
         confirmText: '确定',
         success: (res) => {
           if (res.confirm) {
-            console.log('用户确认退出登录')
+            
             this.executeLogout()
-          } else {
-            console.log('用户取消退出登录')
-          }
+          } 
         }
       })
     },
 
     // 执行退出登录(最可靠的方式)
     executeLogout() {
-      console.log('=== 执行退出登录 ===')
+    
 
       // 立即显示加载状态
       uni.showLoading({
@@ -1147,13 +1106,13 @@ export default {
       // 延迟执行,确保UI更新
       setTimeout(() => {
         try {
-          console.log('步骤1: 断开WebSocket连接')
+          
           // 断开在线状态WebSocket
           try {
             const timPresenceManager = require('@/utils/tim-presence-manager.js').default;
             if (timPresenceManager) {
               timPresenceManager.disconnect();
-              console.log('✅ 在线状态WebSocket已断开');
+              
             }
           } catch (error) {
             console.error('❌ 断开在线状态WebSocket失败:', error);
@@ -1164,13 +1123,13 @@ export default {
             const timManager = require('@/utils/tim-manager.js').default;
             if (timManager && timManager.isLogin) {
               timManager.logout();
-              console.log('✅ TIM已登出');
+              
             }
           } catch (error) {
             console.error('❌ TIM登出失败:', error);
           }
 
-          console.log('步骤2: 清除登录数据')
+         
 
           // 方法1: 逐个清除
           uni.removeStorageSync('token')
@@ -1178,18 +1137,18 @@ export default {
           uni.removeStorageSync('userId')
           uni.removeStorageSync('rememberedAccount')
 
-          console.log('步骤3: 验证数据清除')
+         
           const remainToken = uni.getStorageSync('token')
           const remainUser = uni.getStorageSync('userInfo')
-          console.log('清除后检查 - token:', remainToken, 'userInfo:', remainUser)
+         
 
           // 如果还有残留数据,使用强制清除
           if (remainToken || remainUser) {
-            console.log('检测到残留数据,执行强制清除')
+           
             uni.clearStorageSync()
           }
 
-          console.log('步骤4: 重置页面状态')
+        
           this.currentUserId = null
           this.userInfo = {
             userId: null,
@@ -1207,7 +1166,7 @@ export default {
 
           // 延迟跳转
           setTimeout(() => {
-            console.log('步骤5: 跳转到登录页面')
+           
             uni.reLaunch({
               url: '/pages/page3/page3'
             })
@@ -1232,7 +1191,7 @@ export default {
     // 设置测试用户数据(基于数据库真实数据)
     // ⚠️ 已弃用:此方法仅供调试使用,正常流程不再调用测试数据
     setTestUserData() {
-      console.log('=== 设置测试用户数据 ===')
+      
       console.warn('⚠️ 警告:正在使用测试数据,这不应该在生产环境中发生')
 
       // 根据当前用户ID设置对应的数据库用户信息
@@ -1240,77 +1199,11 @@ export default {
 
       let userData = {}
 
-      switch (userId) {
-        case 1:
-          userData = {
-            userId: 1,
-            nickname: '小明',
-            avatar: 'https://example.com/avatar1.jpg',
-            phone: '138****8001',
-            email: 'user1@example.com',
-            gender: 1,
-            genderText: '男',
-            birthDate: '1990-05-05',
-            age: 34,
-            isVerified: true,
-            profileProgress: 80,
-            isVip: false
-          }
-          break
-        case 2:
-          userData = {
-            userId: 2,
-            nickname: '小红',
-            avatar: 'https://example.com/avatar2.jpg',
-            phone: '138****8002',
-            email: 'user2@example.com',
-            gender: 2,
-            genderText: '女',
-            birthDate: '1992-08-22',
-            age: 32,
-            isVerified: true,
-            profileProgress: 90,
-            isVip: true
-          }
-          break
-        case 3:
-          userData = {
-            userId: 3,
-            nickname: '用户5718',
-            avatar: 'https://via.placeholder.com/100?text=用户',
-            phone: '188****5718',
-            email: '',
-            gender: 0,
-            genderText: '未知',
-            birthDate: null,
-            age: null,
-            isVerified: false,
-            profileProgress: 30,
-            isVip: false
-          }
-          break
-        default:
-          userData = {
-            userId: userId,
-            nickname: '测试用户',
-            avatar: 'https://via.placeholder.com/100?text=测试',
-            phone: '',
-            email: '',
-            gender: 0,
-            genderText: '未知',
-            birthDate: null,
-            age: null,
-            isVerified: false,
-            profileProgress: 20,
-            isVip: false
-          }
-      }
-
+     
       // 设置用户信息
       this.userInfo = userData
 
-      console.log('✅ 测试用户数据设置完成:', this.userInfo.nickname)
-
+     
       // 设置统计数据
       this.stats = {
         myConnection: Math.floor(Math.random() * 10),
@@ -1329,11 +1222,10 @@ export default {
 
     // 处理VIP购买成功事件
     handleVipPurchased() {
-      console.log('=== 收到VIP购买成功通知 ===')
-
+     
       // 延迟刷新,确保后端数据已更新
       setTimeout(() => {
-        console.log('开始刷新用户信息...')
+        
         this.loadUserInfo()
       }, 500)
     }

+ 9 - 11
LiangZhiYUMao/pages/mine/my-activities.vue

@@ -101,7 +101,7 @@ export default {
 		async loadMyActivities() {
 			try {
 				const userInfo = uni.getStorageSync('userInfo')
-				console.log('userInfo:', userInfo)
+			
 				
 				if (!userInfo || !userInfo.userId) {
 					console.warn('用户未登录')
@@ -112,10 +112,10 @@ export default {
 					return
 				}
 				
-				const baseUrl = 'http://localhost:8083' // 本地开发
+				const baseUrl = 'https://api.zhongruanke.cn' // 本地开发
 				// const baseUrl = 'http://115.190.125.125:8083' // 生产环境
 				
-				console.log('开始查询我的活动, userId:', userInfo.userId)
+				
 				
 				// 获取已报名的活动(status=1)
 				const [error1, registeredRes] = await uni.request({
@@ -123,14 +123,14 @@ export default {
 					method: 'GET'
 				})
 				
-				console.log('已报名活动响应:', registeredRes)
+			
 				
 				if (error1) {
 					console.error('查询已报名活动失败:', error1)
 				}
 				
 				if (registeredRes && registeredRes.data && registeredRes.data.code === 200) {
-					console.log('已报名活动数据:', registeredRes.data.data)
+					
 					this.registeredActivities = (registeredRes.data.data || []).map(item => ({
 						id: item.id,
 						activityId: item.activityId,
@@ -153,7 +153,7 @@ export default {
 					method: 'GET'
 				})
 				
-				console.log('已参加活动响应:', joinedRes)
+				
 				
 				if (error2) {
 					console.error('查询已参加活动失败:', error2)
@@ -247,18 +247,16 @@ export default {
 					if (res.confirm) {
 						try {
 							const userInfo = uni.getStorageSync('userInfo')
-							const baseUrl = 'http://localhost:8083'
+							const baseUrl = 'https://api.zhongruanke.cn'
+							
 							
-							console.log('取消报名, activity:', activity)
-							console.log('userId:', userInfo.userId)
 							
 							const [error, result] = await uni.request({
 								url: `${baseUrl}/api/activity-registration/cancel?id=${activity.id}&userId=${userInfo.userId}`,
 								method: 'PUT'
 							})
 							
-							console.log('取消报名响应:', result)
-							console.log('取消报名错误:', error)
+							
 							
 							if (error) {
 								console.error('取消报名请求失败:', error)

+ 9 - 9
LiangZhiYUMao/pages/mine/my-dynamics.vue

@@ -368,17 +368,17 @@ export default {
       
       if (this.activeSubTab === 'like') {
         // 获取用户点赞的动态列表
-        console.log('开始加载点赞列表,userId:', userInfo.userId);
+       
         api.dynamic.getLikedList(userInfo.userId, 1, 10).then(res => {
-          console.log('点赞列表API返回数据:', res);
+        
           if (res) {
             // 处理返回数据,支持多种可能的数据结构
             const records = res.records || res.list || (Array.isArray(res) ? res : []);
             this.interactionList = records || [];
-            console.log('设置点赞列表,数量:', this.interactionList.length);
+           
           } else {
             this.interactionList = [];
-            console.log('点赞列表返回数据为空');
+           
           }
         }).catch(err => {
           console.error('获取用户点赞列表失败:', err);
@@ -390,17 +390,17 @@ export default {
         });
       } else if (this.activeSubTab === 'collect') {
         // 获取用户收藏的动态列表
-        console.log('开始加载收藏列表,userId:', userInfo.userId);
+     
         api.dynamic.getFavoritesList(userInfo.userId, 1, 10).then(res => {
-          console.log('收藏列表API返回数据:', res);
+         
           if (res) {
             // 处理返回数据,支持多种可能的数据结构
             const records = res.records || res.list || (Array.isArray(res) ? res : []);
             this.interactionList = records || [];
-            console.log('设置收藏列表,数量:', this.interactionList.length);
+           
           } else {
             this.interactionList = [];
-            console.log('收藏列表返回数据为空');
+            
           }
         }).catch(err => {
           console.error('获取用户收藏列表失败:', err);
@@ -506,7 +506,7 @@ export default {
         longPressActions: {
           itemList: ['保存图片'],
           success: function(data) {
-            console.log('长按图片操作结果:', data);
+            
           },
           fail: function(err) {
             console.error('长按图片操作失败:', err);

+ 7 - 16
LiangZhiYUMao/pages/page3/page3.vue

@@ -58,8 +58,7 @@ export default {
       this.zheshow = !this.zheshow
     },
     loset(Logon_Credentials) {
-      console.log('=== 开始微信登录流程 ===')
-      console.log('用户登录信息:', Logon_Credentials)
+      
 
       // 获取微信登录code
       uni.login({
@@ -70,8 +69,6 @@ export default {
               ? String(Logon_Credentials.code).trim()
               : null;
 
-          console.log('微信登录code:', loginRes.code)
-          console.log('手机号code:', phoneCode || '未提供')
 
           // ✅ 一次性调用微信登录接口,无需用户提供头像和昵称
           const loginParams = {
@@ -90,12 +87,6 @@ export default {
               throw new Error('微信登录返回数据异常')
             }
 
-            console.log('✅ 微信登录成功,用户ID:', user.userId)
-            console.log('✅ 微信登录成功')
-            console.log('用户ID:', user.userId)
-            console.log('昵称:', user.nickname)
-            console.log('头像:', user.avatarUrl ? '已设置' : '未设置')
-            console.log('手机号:', user.phone || '未设置')
             
             uni.setStorageSync("userId", user.userId);
 
@@ -106,7 +97,7 @@ export default {
             uni.showToast({title: '登录成功', icon: 'success'})
 
             // ✅ 初始化 TIM 和 WebSocket
-            console.log('🚀 登录成功,开始初始化 TIM 和 WebSocket...')
+          
             
             // 延迟一下,确保全局方法已挂载
             await new Promise(resolve => setTimeout(resolve, 200))
@@ -115,7 +106,7 @@ export default {
               const app = getApp()
               if (app && app.globalData && app.globalData.initGlobalTIM) {
                 await app.globalData.initGlobalTIM()
-                console.log('✅ TIM 和 WebSocket 初始化完成')
+               
               } else {
                 console.warn('⚠️ 全局 initGlobalTIM 方法不存在,尝试直接导入')
                 // 如果全局方法不存在,直接导入 tim-manager
@@ -127,22 +118,22 @@ export default {
                   const SDKAppID = 1600109674
                   if (!timManager.tim) {
                     timManager.init(SDKAppID)
-                    console.log('✅ TIM SDK 初始化完成')
+                  
                   }
                   
                   const res = await uni.request({
-                    url: `http://localhost:8083/api/im/getUserSig?userId=${user.userId}`,
+                    url: `https://api.zhongruanke.cn/api/im/getUserSig?userId=${user.userId}`,
                     method: 'GET'
                   })
                   
                   if (res[1].data.code === 200) {
                     const userSig = res[1].data.data.userSig
                     await timManager.login(String(user.userId), userSig)
-                    console.log('✅ TIM 登录成功')
+                  
                     
                     // 初始化 WebSocket
                     await timPresenceManager.init(String(user.userId))
-                    console.log('✅ WebSocket 初始化完成')
+                  
                   }
                 }
               }

+ 10 - 21
LiangZhiYUMao/pages/part-time-matchmaker/index.vue

@@ -222,7 +222,7 @@
 			// 检查申请状态
 			async checkApplyStatus() {
 				try {
-					console.log('=== 开始检查申请状态 ===')
+					
 					
 					// 获取用户ID
 					const userId = await userAuth.checkLoginStatus({
@@ -231,22 +231,19 @@
 					})
 					
 					if (!userId) {
-						console.log('用户未登录,保持默认按钮状态')
+						
 						return
 					}
 					
-					console.log('当前用户ID:', userId)
+					
 					
 					// 查询申请状态
 					const result = await api.matchmaker.getApplyStatus(userId)
-					console.log('申请状态查询结果:', result)
 					
 					if (result && result.hasApplied) {
 						this.applyStatus = result.status
 						this.updateButtonState(result.status)
-					} else {
-						console.log('用户未申请过,保持默认状态')
-					}
+					} 
 				} catch (error) {
 					console.error('查询申请状态失败:', error)
 					// 查询失败不影响页面显示,保持默认状态
@@ -255,7 +252,7 @@
 			
 			// 根据status更新按钮状态
 			updateButtonState(status) {
-				console.log('更新按钮状态,status:', status)
+				
 				
 				if (status === 2) {
 					// 审核中
@@ -275,7 +272,7 @@
 					this.buttonDisabled = false
 				}
 				
-				console.log('按钮文字:', this.buttonText, '是否禁用:', this.buttonDisabled)
+				
 			},
 			
 			// 省市区相关方法
@@ -564,19 +561,15 @@
 				}
 				
 				// 检查登录状态并获取用户ID
-				console.log('=== 开始检查登录状态 ===')
+				
 				const userId = await userAuth.checkLoginStatus({
 					requireLogin: true,
 					allowTestUser: false,
 					redirectUrl: '/pages/part-time-matchmaker/index'
 				})
 				
-				console.log('获取到的userId:', userId)
-				
-				if (!userId) {
-					console.log('用户未登录或登录信息异常')
-					return
-				}
+		
+			
 				
 				uni.showModal({
 					title: '提交申请',
@@ -602,11 +595,7 @@
 									introduction: this.formData.introduction
 								}
 								
-								console.log('=== 提交红娘申请 ===')
-								console.log('userId类型:', typeof userId)
-								console.log('userId值:', userId)
-								console.log('完整提交数据:', JSON.stringify(submitData, null, 2))
-								
+							
 								// 调用后端接口提交申请
 								await api.matchmaker.submitApply(submitData)
 								

+ 1 - 1
LiangZhiYUMao/pages/partner-requirement/index.vue

@@ -138,7 +138,7 @@
 	export default {
 		data() {
 			return {
-				gatewayURL: 'http://localhost:8083',
+				gatewayURL: 'https://api.zhongruanke.cn',
 				currentUserId: null,
 				isEditing: false,
 				

+ 9 - 5
LiangZhiYUMao/pages/plaza/index.vue

@@ -150,11 +150,11 @@
 				<text class="tabbar-icon">👍</text>
 				<text class="tabbar-text">推荐</text>
 			</view>
-			<view class="tabbar-item" @click="switchTab('message')">
+			<!-- <view class="tabbar-item" @click="switchTab('message')">
 				<text class="tabbar-icon">💬</text>
 				<text class="tabbar-text">消息</text>
 				<view v-if="unreadCount > 0" class="tabbar-badge">{{ unreadCount }}</view>
-			</view>
+			</view> -->
 			<view class="tabbar-item" @click="switchTab('mine')">
 				<text class="tabbar-icon">👤</text>
 				<text class="tabbar-text">我的</text>
@@ -178,7 +178,7 @@ export default {
 			showMenu: false, // 显示举报菜单
 			selectedDynamic: null, // 选中的动态
 			currentUserId: uni.getStorageInfoSync("userId"), // 当前用户ID,实际应从存储获取
-			defaultAvatar: 'https://via.placeholder.com/100x100.png?text=头像',
+			defaultAvatar: 'http://via.placeholder.com/100x100.png?text=头像',
 			likingMap: {},  // 记录正在点赞的动态ID,防止重复点击
 			favoritingMap: {}  // 记录正在收藏的动态ID,防止重复点击
 		}
@@ -459,8 +459,12 @@ export default {
 		
 		// 跳转到发布页
 		goToPublish() {
+			 console.log('点击了发布按钮');
 			uni.navigateTo({
-				url: '/pages/plaza/publish'
+				url: '/pages/plaza/publish',
+				   fail: (err) => {
+				          console.error('跳转失败:', err);
+				        }
 			})
 		},
 		
@@ -539,7 +543,7 @@ export default {
 			const tabPages = {
 				index: '/pages/index/index',
 				recommend: '/pages/recommend/index',
-				message: '/pages/message/index',
+				message: '/subpkg-message/index/index',
 				mine: '/pages/mine/index'
 			}
 			

+ 3 - 8
LiangZhiYUMao/pages/plaza/publish.vue

@@ -107,7 +107,7 @@ export default {
         
 		isImage(url) { 
 			if (!url || typeof url !== 'string') return false
-			console.log('检查文件类型:', url)
+		
 			
 			// 1. 检查文件扩展名
 			const hasImageExtension = /(\.png|\.jpg|\.jpeg|\.gif|\.webp|\.bmp)$/i.test(url)
@@ -124,13 +124,8 @@ export default {
 			                       /(\.png|\.jpg|\.jpeg|\.gif|\.webp|\.bmp)(\?|$)/i.test(url)
 			
 			const result = hasImageExtension || isTempImagePath || isMinioImageUrl
-			console.log('文件类型检查结果:', {
-				url: url,
-				hasImageExtension,
-				isTempImagePath,
-				isMinioImageUrl,
-				result
-			})
+			
+			console.log(result)
 			
 			return result
 		},

+ 40 - 67
LiangZhiYUMao/pages/profile/index.vue

@@ -302,7 +302,7 @@
 	export default {
 		data() {
 			return {
-				gatewayURL: 'http://localhost:8083',
+				gatewayURL: 'https://api.zhongruanke.cn',
 				currentUserId: null,
 				isEditing: false,
 				defaultAvatar: 'https://via.placeholder.com/150',
@@ -410,16 +410,14 @@
 		// 获取登录用户ID - 使用userAuth工具类
 		this.currentUserId = userAuth.getUserId()
 		
-		console.log('=== 个人资料页面 ===')
-		console.log('用户ID:', this.currentUserId)
-		console.log('用户ID类型:', typeof this.currentUserId)
+		
 		
 		// 检查是否已登录(userId为1也是合法的测试用户)
 		if (this.currentUserId === null || this.currentUserId === undefined || this.currentUserId === 0) {
-			console.log('未登录,检查登录状态')
+			
 			this.checkLoginStatus()
 		} else {
-			console.log('已登录,用户ID:', this.currentUserId)
+			
 			// 加载省市区数据
 			this.loadAreaData()
 			// 加载用户资料
@@ -451,7 +449,7 @@
 					sourceType: [sourceType],
 					success: (res) => {
 						const tempFilePath = res.tempFilePaths[0]
-						console.log('选择的图片路径:', tempFilePath)
+					
 						// 上传图片
 						this.uploadAvatar(tempFilePath)
 					},
@@ -467,10 +465,7 @@
 			
 			// 上传头像
 			uploadAvatar(filePath) {
-				console.log('=== 开始上传头像 ===')
-				console.log('文件路径:', filePath)
-				console.log('上传URL:', this.gatewayURL + '/api/avatar/upload')
-				console.log('用户ID:', this.currentUserId)
+				
 				
 				uni.showLoading({
 					title: '上传中...',
@@ -488,8 +483,7 @@
 					},
 					success: (uploadRes) => {
 						uni.hideLoading()
-						console.log('上传响应:', uploadRes)
-						console.log('状态码:', uploadRes.statusCode)
+						
 						
 						// 检查HTTP状态码
 						if (uploadRes.statusCode !== 200) {
@@ -504,10 +498,9 @@
 						
 						try {
 							const result = JSON.parse(uploadRes.data)
-							console.log('解析后的结果:', result)
 							
 							if (result.code === 200) {
-								console.log('✅ 头像上传成功:', result.data)
+								
 								
 								// 更新头像URL
 								this.profile.avatar = result.data
@@ -517,7 +510,7 @@
 								if (userInfo) {
 									userInfo.avatarUrl = result.data
 									uni.setStorageSync('userInfo', userInfo)
-									console.log('已更新本地缓存')
+									
 								}
 								
 								uni.showToast({
@@ -573,9 +566,9 @@
 				
 				// 监听上传进度
 				uploadTask.onProgressUpdate((res) => {
-					console.log('上传进度:', res.progress + '%')
+					
 					if (res.progress % 20 === 0 || res.progress > 90) {
-						console.log(`已上传 ${res.totalBytesSent}/${res.totalBytesExpectedToSend} 字节`)
+						
 					}
 				})
 			},
@@ -632,17 +625,10 @@
 					method: 'GET',
 					success: async (res) => {
 						uni.hideLoading()
-						console.log('=== 用户资料加载 ===')
-						console.log('完整响应:', res.data)
+						
 						
 					if (res.data && res.data.code === 200) {
-						console.log('原始salaryRange:', res.data.data.salaryRange)
-						console.log('完整返回数据:', JSON.stringify(res.data.data, null, 2))
-						console.log('省市区ID:', {
-							provinceId: res.data.data.provinceId,
-							cityId: res.data.data.cityId,
-							areaId: res.data.data.areaId
-						})
+						
 						
 						// 确保省市区ID正确赋值(处理可能的字段名不匹配)
 						const profileData = { ...res.data.data }
@@ -659,18 +645,14 @@
 						}
 						
 						this.profile = { ...this.profile, ...profileData }
-						console.log('合并后的profile:', {
-							provinceId: this.profile.provinceId,
-							cityId: this.profile.cityId,
-							areaId: this.profile.areaId
-						})
+						
 						
 						// 先加载省市区数据,然后再初始化索引和显示
 						await this.loadAreaData()
 						
 						// 如果有省市区ID,加载对应的城市和区域数据,并初始化选择器索引
 						if (this.profile.provinceId || this.profile.cityId || this.profile.areaId) {
-							console.log('开始加载已保存的省市区数据...')
+							
 							// 先加载省份对应的城市
 							if (this.profile.provinceId) {
 								await this.loadCitiesForProvince(this.profile.provinceId)
@@ -817,15 +799,12 @@
 				this.profile.educationLevel = parseInt(e.detail.value) + 1
 			},
 			onSalaryChange(e) {
-				console.log('=== 薪资选择变化 ===')
-				console.log('选择的索引:', e.detail.value, typeof e.detail.value)
-				console.log('对应的薪资选项:', this.salaryOptions[e.detail.value])
+			
 				
 				// 将字符串转换为数字,避免字符串拼接问题
 				this.profile.salaryRange = parseInt(e.detail.value) + 1
 				
-				console.log('更新后的salaryRange:', this.profile.salaryRange, typeof this.profile.salaryRange)
-				console.log('更新后显示的文本:', this.getSalaryText())
+				
 			},
 			onMaritalChange(e) {
 				// 将字符串转换为数字
@@ -848,10 +827,10 @@
 			// 加载省市区数据
 			async loadAreaData() {
 				try {
-					console.log('开始加载省份数据...')
+					
 					// 加载省份列表
 					const provinceRes = await api.area.getProvinces()
-					console.log('省份数据返回:', provinceRes)
+					
 					
 					// api.js 已经处理了数据格式,直接使用返回的数组
 					if (Array.isArray(provinceRes)) {
@@ -865,7 +844,7 @@
 					}
 					
 					this.multiAreaData[0] = this.provinceList
-					console.log('省份列表:', this.provinceList)
+				
 					
 					// 如果有已选择的省份,加载对应的城市
 					if (this.profile.provinceId) {
@@ -888,9 +867,9 @@
 				if (!provinceId) return
 				
 				try {
-					console.log('加载城市数据,省份ID:', provinceId)
+					
 					const cityRes = await api.area.getCities(provinceId)
-					console.log('城市数据返回:', cityRes)
+				
 					
 					// api.js 已经处理了数据格式,直接使用返回的数组
 					if (Array.isArray(cityRes)) {
@@ -904,7 +883,7 @@
 					}
 					
 					this.multiAreaData[1] = this.cityList
-					console.log('城市列表:', this.cityList)
+				
 					
 					// 如果有已选择的城市,加载对应的区域
 					if (this.profile.cityId) {
@@ -930,9 +909,9 @@
 				if (!cityId) return
 				
 				try {
-					console.log('加载区域数据,城市ID:', cityId)
+					
 					const areaRes = await api.area.getAreas(cityId)
-					console.log('区域数据返回:', areaRes)
+					
 					
 					// api.js 已经处理了数据格式,直接使用返回的数组
 					if (Array.isArray(areaRes)) {
@@ -946,7 +925,7 @@
 					}
 					
 					this.multiAreaData[2] = this.areaList
-					console.log('区域列表:', this.areaList)
+					
 				} catch (e) {
 					console.error('加载区域失败:', e)
 					this.areaList = []
@@ -1064,22 +1043,21 @@
 			// 初始化省市区选择器索引(根据已保存的ID)
 			async initAreaIndex() {
 				if (!this.profile.provinceId) {
-					console.log('没有省份ID,跳过初始化')
+					
 					return
 				}
 				
-				console.log('开始初始化省市区索引,当前省份ID:', this.profile.provinceId)
-				console.log('省份列表长度:', this.provinceList.length)
+				
 				
 				// 如果省份列表还没加载,先加载
 				if (this.provinceList.length === 0) {
-					console.log('省份列表为空,先加载数据')
+					
 					await this.loadAreaData()
 				}
 				
 				// 查找省份索引
 				const provinceIndex = this.provinceList.findIndex(p => p.id === this.profile.provinceId)
-				console.log('找到的省份索引:', provinceIndex, '省份ID:', this.profile.provinceId)
+				
 				
 				if (provinceIndex >= 0) {
 					this.multiAreaIndex[0] = provinceIndex
@@ -1092,7 +1070,7 @@
 					
 					if (this.profile.cityId) {
 						const cityIndex = this.cityList.findIndex(c => c.id === this.profile.cityId)
-						console.log('找到的城市索引:', cityIndex, '城市ID:', this.profile.cityId)
+					
 						if (cityIndex >= 0) {
 							this.multiAreaIndex[1] = cityIndex
 							
@@ -1104,7 +1082,7 @@
 							
 							if (this.profile.areaId) {
 								const areaIndex = this.areaList.findIndex(a => a.id === this.profile.areaId)
-								console.log('找到的区域索引:', areaIndex, '区域ID:', this.profile.areaId)
+								
 								if (areaIndex >= 0) {
 									this.multiAreaIndex[2] = areaIndex
 								}
@@ -1116,7 +1094,7 @@
 					this.$forceUpdate()
 				} else {
 					console.warn('未找到省份索引,省份ID:', this.profile.provinceId)
-					console.log('当前省份列表:', this.provinceList.map(p => ({ id: p.id, name: p.name })))
+				
 				}
 			},
 			
@@ -1280,11 +1258,7 @@
 					areaId: this.profile.areaId || null
 				}
 				
-				console.log('保存省市区数据:', {
-					provinceId: submitData.provinceId,
-					cityId: submitData.cityId,
-					areaId: submitData.areaId
-				})
+				
 				
 				uni.request({
 					url: this.gatewayURL + '/api/user/profile',
@@ -1292,7 +1266,7 @@
 					data: submitData,
 					success: (res) => {
 						uni.hideLoading()
-						console.log('保存响应:', res.data)
+						
 						
 						if (res.data && res.data.code === 200) {
 							uni.showToast({
@@ -1308,14 +1282,14 @@
 								// 更新性别信息
 								if (submitData.gender !== undefined && submitData.gender !== null) {
 									storedUserInfo.gender = submitData.gender;
-									console.log('更新storage中的性别信息:', submitData.gender);
+									
 								}
 								// 更新其他可能变化的字段
 								if (submitData.birthDate) {
 									storedUserInfo.birthDate = submitData.birthDate;
 								}
 								uni.setStorageSync('userInfo', storedUserInfo);
-								console.log('已更新storage中的userInfo');
+								
 							}
 							
 							// 重新加载资料
@@ -1383,15 +1357,14 @@
 			performGoBack() {
 				// 检查页面栈
 				const pages = getCurrentPages()
-				console.log('当前页面栈长度:', pages.length)
-				console.log('页面栈:', pages.map(p => p.route))
+				
 				
 				if (pages.length > 1) {
 					// 有上一页,正常返回
 					uni.navigateBack({
 						delta: 1,
 						success: () => {
-							console.log('返回成功')
+						
 						},
 						fail: (err) => {
 							console.error('返回失败:', err)
@@ -1414,7 +1387,7 @@
 					})
 				} else {
 					// 没有上一页,直接跳转到我的页面
-					console.log('页面栈只有一页,跳转到我的页面')
+					
 					uni.navigateTo({
 						url: '/pages/mine/index'
 					})

+ 28 - 39
LiangZhiYUMao/pages/recommend/index.vue

@@ -235,10 +235,10 @@
 				<text class="tabbar-icon">👍</text>
 				<text class="tabbar-text">推荐</text>
 			</view>
-			<view class="tabbar-item" @click="switchTab('message')">
+			<!-- <view class="tabbar-item" @click="switchTab('message')">
 				<text class="tabbar-icon">💬</text>
 				<text class="tabbar-text">消息</text>
-			</view>
+			</view> -->
 			<view class="tabbar-item" @click="switchTab('mine')">
 				<text class="tabbar-icon">👤</text>
 				<text class="tabbar-text">我的</text>
@@ -316,15 +316,12 @@ export default {
 	
 	// 页面显示时重新加载用户信息和推荐列表
 	async onShow() {
-		console.log('推荐页面显示,重新加载用户信息和推荐列表');
-		// 重新加载当前用户信息(可能在其他页面修改了性别)
+		
 		const genderChanged = await this.loadCurrentUserInfo();
 		
 		// 如果性别发生变化,或者列表为空,则刷新推荐列表
 		if (genderChanged || this.list.length === 0) {
-			console.log('性别发生变化或列表为空,刷新推荐列表');
-			console.log('当前用户性别:', this.currentUserGender);
-			// 性别变化时,清空已显示列表,重新开始
+			
 			if (genderChanged) {
 				this.shownUserIds = [];
 			}
@@ -345,7 +342,7 @@ export default {
 					
 					if (storedUserInfo && storedUserInfo.gender !== undefined && storedUserInfo.gender !== null) {
 						this.currentUserGender = parseInt(storedUserInfo.gender);
-						console.log('从storage获取当前用户性别:', this.currentUserGender);
+						
 					}
 					
 					// 总是从API获取最新的用户信息,确保性别信息是最新的
@@ -354,7 +351,7 @@ export default {
 						if (userInfo && userInfo.gender !== undefined && userInfo.gender !== null) {
 							const newGender = parseInt(userInfo.gender);
 							if (newGender !== this.currentUserGender) {
-								console.log('检测到性别变化:', '旧性别:', this.currentUserGender, '新性别:', newGender);
+								
 								this.currentUserGender = newGender;
 								// 更新storage中的用户信息
 								if (storedUserInfo) {
@@ -363,7 +360,7 @@ export default {
 								}
 							} else {
 								this.currentUserGender = newGender;
-								console.log('从API获取当前用户性别:', this.currentUserGender);
+							
 							}
 						}
 					} catch (e) {
@@ -374,9 +371,7 @@ export default {
 						}
 					}
 					
-					console.log('最终当前用户ID:', this.currentUserId, '性别:', this.currentUserGender);
-					
-					// 返回性别是否发生变化
+				
 					return oldGender !== this.currentUserGender;
 				}
 				return false;
@@ -390,11 +385,11 @@ export default {
 			this.currentTab = tab
 			if (tab === 'recommend') {
 				// 保持在当前推荐页面,刷新推荐列表
-				console.log('切换到推荐页面')
+				
 				this.refresh(false)
 			} else if (tab === 'match') {
 				// 跳转到匹配页面
-				console.log('切换到在线匹配')
+				
 				uni.navigateTo({ 
 					url: '/pages/match/index',
 					fail: () => {
@@ -412,7 +407,7 @@ export default {
 			const tabPages = {
 				index: '/pages/index/index',
 				plaza: '/pages/plaza/index',
-				message: '/pages/message/index',
+				message: '/subpkg-message/index/index',
 				mine: '/pages/mine/index'
 			}
 			if (tabPages[tab]) {
@@ -429,7 +424,7 @@ export default {
 				
         const userId = this.currentUserId || parseInt(uni.getStorageSync('userId') || '1');
         
-        console.log('刷新推荐列表 - 当前用户ID:', userId, '性别:', this.currentUserGender, '换一批:', isChangeBatch);
+        
         
         // 如果没有筛选,走默认接口;有筛选,调用 search
         if (!this.hasFilter()) {
@@ -437,7 +432,7 @@ export default {
           let excludeIdsParam = '';
           if (isChangeBatch && this.shownUserIds.length > 0) {
             excludeIdsParam = this.shownUserIds.join(',');
-            console.log('换一批 - 排除已显示的用户ID:', excludeIdsParam);
+           
           }
           
           // 每页显示10个推荐用户
@@ -447,11 +442,11 @@ export default {
           }
           
           const data = await api.recommend.getUsers(params);
-          console.log('推荐接口返回数据数量:', data ? data.length : 0, '数据:', data);
+          
           
           // 如果换一批时返回的数据为空或很少,说明所有用户都显示过了,重新开始
           if (isChangeBatch && (!data || data.length === 0)) {
-            console.log('所有用户都已显示过,重新开始');
+           
             this.shownUserIds = []; // 清空已显示列表
             // 重新获取,不排除任何用户
             const newData = await api.recommend.getUsers({ userId, oppoOnly: 1, limit: 10 });
@@ -505,13 +500,13 @@ export default {
 		  for (const it of (data || [])) { 
 		    // 过滤:排除当前用户和未完善性别信息的用户
 		    if (!it.userId || it.userId === userId || !it.gender || it.gender === 0) {
-		      console.log('过滤用户:', it.userId, '原因: 当前用户或性别未完善');
+		     
 		      continue;
 		    }
 		    // 如果当前用户性别已设置,只保留异性
 		    if (this.currentUserGender && this.currentUserGender !== 0) {
 		      if (it.gender === this.currentUserGender) {
-		        console.log('过滤用户:', it.userId, '原因: 同性用户, 当前用户性别:', this.currentUserGender, '推荐用户性别:', it.gender);
+		      
 		        continue; // 排除同性
 		      }
 		    }
@@ -525,12 +520,12 @@ export default {
 		    } 
 		  }
 		  
-		  console.log('过滤后的推荐列表数量:', merged.length, '已显示用户总数:', this.shownUserIds.length);
+		
 		  this.list = merged.map(it=>({ ...it, avatarUrl: this.getSafeAvatar(it.avatarUrl) }));
 		},
 		// 换一批功能
 		changeBatch() {
-			console.log('点击换一批,当前已显示用户数:', this.shownUserIds.length);
+			
 			this.refresh(true);
 		},
 		openFilter(){ this.ensureAreaData(); this.$refs.filterPopup.open('bottom') },
@@ -772,11 +767,7 @@ export default {
 			const targetUserName = user.nickname || '用户';
 			const targetUserAvatar = user.avatarUrl || 'http://115.190.125.125:9001/static-images/close.png';
 
-			console.log('准备打开聊天,参数:', {
-				targetUserId,
-				targetUserName,
-				targetUserAvatar
-			});
+			
 
 			// 先导入用户到腾讯云IM(防止消息发送失败)
 			uni.showLoading({ title: '准备中...' });
@@ -785,13 +776,11 @@ export default {
 				// 获取当前用户ID
 				const currentUserId = uni.getStorageSync('userId');
 
-				console.log('📥 开始导入用户到TIM...');
-				console.log('   - 当前用户:', currentUserId);
-				console.log('   - 目标用户:', targetUserId);
+				
 
 				// 导入当前用户
 				await uni.request({
-					url: 'http://localhost:8083/api/im/importUser',
+					url: 'https://api.zhongruanke.cn/api/im/importUser',
 					method: 'POST',
 					data: {
 						userId: String(currentUserId),
@@ -804,7 +793,7 @@ export default {
 
 				// 导入目标用户
 				await uni.request({
-					url: 'http://localhost:8083/api/im/importUser',
+					url: 'https://api.zhongruanke.cn/api/im/importUser',
 					method: 'POST',
 					data: {
 						userId: String(targetUserId),
@@ -815,7 +804,7 @@ export default {
 					}
 				});
 
-				console.log('✅ 用户导入完成');
+			
 
 				// 等待一小段时间确保导入生效
 				await new Promise(resolve => setTimeout(resolve, 500));
@@ -824,7 +813,7 @@ export default {
 
 				// 跳转到聊天页面
 				uni.navigateTo({
-					url: `/pages/message/chat?targetUserId=${targetUserId}&targetUserName=${encodeURIComponent(targetUserName)}&targetUserAvatar=${encodeURIComponent(targetUserAvatar)}`
+					url: `/subpkg-message/chat/chat?targetUserId=${targetUserId}&targetUserName=${encodeURIComponent(targetUserName)}&targetUserAvatar=${encodeURIComponent(targetUserAvatar)}`
 				});
 
 			} catch (error) {
@@ -875,7 +864,7 @@ export default {
 		},
 		// 显示用户详情
 		async showUserDetail(user) {
-			console.log('showUserDetail 被调用,user:', user)
+			
 
 			if (!user || !user.userId) {
 				console.error('用户信息无效:', user)
@@ -921,9 +910,9 @@ export default {
 			// 加载用户详情
 			try {
 				uni.showLoading({ title: '加载中...' })
-				console.log('开始请求用户详情,userId:', userId)
+				
 				const detail = await api.user.getDetailInfo(userId)
-				console.log('获取到的用户详情:', detail)
+			
 
 				if (detail) {
 					// 确保photos是数组,如果没有photos但有avatar,使用avatar

+ 2 - 3
LiangZhiYUMao/pages/recommend/user-detail.vue

@@ -239,8 +239,7 @@ export default {
 					currentUserId: currentUserId ? parseInt(currentUserId) : null
 				}
 				const result = await api.dynamic.getUserDynamics(this.userId, params)
-				console.log('用户动态API返回:', result)
-				
+						
 				// 处理PageResult格式:{ records: [], total: 0, current: 1, size: 10 }
 				let list = []
 				let total = 0
@@ -281,7 +280,7 @@ export default {
 				
 				this.dynamicList = list
 				this.totalDynamics = total
-				console.log('处理后的动态列表:', this.dynamicList)
+				
 			} catch (e) {
 				console.error('获取用户动态失败:', e)
 				uni.showToast({

+ 6 - 9
LiangZhiYUMao/pages/recommend/user-dynamics.vue

@@ -122,7 +122,7 @@ export default {
 					currentUserId: currentUserId ? parseInt(currentUserId) : null
 				}
 				const result = await api.dynamic.getUserDynamics(this.userId, params)
-				console.log('用户动态API返回:', result)
+				
 				
 				// 处理PageResult格式:{ records: [], total: 0, current: 1, size: 10 }
 				let list = []
@@ -204,15 +204,12 @@ export default {
 		
 		// 查看动态详情
 		viewDynamicDetail(item, index) {
-			console.log('=== 点击动态详情 ===')
-			console.log('传入的 item:', item)
-			console.log('传入的 index:', index)
-			console.log('dynamicList:', this.dynamicList)
+			
 			
 			// 如果 item 无效,尝试从列表中根据索引获取
 			if (!item && typeof index === 'number' && this.dynamicList && this.dynamicList[index]) {
 				item = this.dynamicList[index]
-				console.log('从列表中获取 item:', item)
+				
 			}
 			
 			if (!item) {
@@ -226,7 +223,7 @@ export default {
 			
 			// 尝试多种可能的字段名
 			const dynamicId = item.dynamicId || item.id || item.dynamic_id
-			console.log('提取的 dynamicId:', dynamicId)
+		
 			
 			if (!dynamicId) {
 				console.error('动态ID无效,item 内容:', item)
@@ -238,11 +235,11 @@ export default {
 			}
 			
 			const url = `/pages/plaza/detail?dynamicId=${dynamicId}`
-			console.log('准备跳转, url:', url)
+			
 			uni.navigateTo({
 				url: url,
 				success: (res) => {
-					console.log('跳转成功:', res)
+				
 				},
 				fail: (err) => {
 					console.error('跳转失败:', err)

+ 2 - 2
LiangZhiYUMao/pages/settings/about.vue

@@ -46,7 +46,7 @@
 export default {
   methods: {
     navigateToAgreement(type) {
-      console.log(`跳转到${type}协议页面`)
+      
     },
     showWithdrawConfirm() {
       uni.showModal({
@@ -54,7 +54,7 @@ export default {
         content: '您确定要撤回同意协议吗?',
         success: (res) => {
           if (res.confirm) {
-            console.log('用户确认撤回同意协议')
+           
           }
         }
       })

+ 4 - 9
LiangZhiYUMao/pages/settings/index.vue

@@ -127,7 +127,7 @@
 			},
 			
 		goToPage(page) {
-			console.log('跳转页面:', page)
+			
 			
 			if (page === 'bindIdCard') {
 				// 跳转到身份证绑定页面
@@ -135,12 +135,7 @@
 					url: '/pages/settings/id-verification'
 				})
 			} 
-			// else if (page === 'bindPhone') {
-			// 	// 跳转到手机号绑定页面
-			// 	uni.navigateTo({
-			// 		url: '/pages/settings/phone-binding'
-			// 	})
-			// } 
+			
 			else if (page === 'about') {
 				// 跳转到关于我们页面
 				uni.navigateTo({
@@ -166,7 +161,7 @@
 								const timPresenceManager = require('@/utils/tim-presence-manager.js').default;
 								if (timPresenceManager) {
 									timPresenceManager.disconnect();
-									console.log('✅ 在线状态WebSocket已断开');
+									
 								}
 							} catch (error) {
 								console.error('❌ 断开在线状态WebSocket失败:', error);
@@ -177,7 +172,7 @@
 								const timManager = require('@/utils/tim-manager.js').default;
 								if (timManager && timManager.isLogin) {
 									timManager.logout();
-									console.log('✅ TIM已登出');
+									
 								}
 							} catch (error) {
 								console.error('❌ TIM登出失败:', error);

+ 3 - 4
LiangZhiYUMao/pages/success-case/detail.vue

@@ -125,7 +125,6 @@
 							marriageDate: data.marriageDate || data.marriage_date || '',
 							matchmakerName: data.matchmakerName || data.matchmaker_name || ''
 						}
-						console.log('案例详情加载成功:', this.caseDetail)
 						
 						// 如果有照片数据,处理字段映射
 						if (data.images && data.images.length > 0) {
@@ -133,7 +132,7 @@
 								...img,
 								imageUrl: img.imageUrl || img.image_url || DEFAULT_IMAGES.couple
 							}))
-							console.log('照片加载成功:', this.images)
+							
 						}
 						
 						// 案例详情加载成功后,再加载时间线
@@ -159,9 +158,9 @@
 							eventDate: item.eventDate || item.event_date || '',
 							eventDescription: item.eventDescription || item.event_description || ''
 						}))
-						console.log('时间线加载成功:', this.timeline)
+						
 					} else {
-						console.log('该案例暂无时间线数据')
+						
 						this.timeline = []
 					}
 				} catch (error) {

+ 8 - 13
LiangZhiYUMao/pages/success-case/list.vue

@@ -84,8 +84,7 @@
 		},
 
 		onLoad() {
-			console.log('成功案例列表页面加载')
-			console.log('默认案例数据:', this.caseList.length)
+			
 			
 			// 数据健康检查
 			this.checkDataHealth()
@@ -107,7 +106,7 @@
 				this.loading = true
 
 				try {
-					console.log('尝试加载成功案例API数据...')
+					
 					const data = await api.successCase.getList({
 						pageNum: this.pageNum,
 						pageSize: this.pageSize
@@ -122,17 +121,17 @@
 							this.caseList = [...this.caseList, ...data]
 						}
 						this.hasMore = data.length >= this.pageSize
-						console.log('API数据加载成功:', data.length, '条')
+						
 					} else {
 						this.hasMore = false
-						console.log('API返回数据为空,使用默认数据')
+						
 					}
 				} catch (error) {
 					console.error('加载成功案例失败:', error)
 					
 					// API失败时,如果是第一页且当前列表为空,保留默认数据
 					if (this.pageNum === 1 && this.caseList.length === 0) {
-						console.log('API失败,保留默认数据')
+						
 						uni.showToast({
 							title: '使用示例数据',
 							icon: 'none'
@@ -161,11 +160,11 @@
 
 			// 跳转到详情
 			goToDetail(caseNo) {
-				console.log('跳转到案例详情, caseNo:', caseNo)
+			
 				uni.navigateTo({
 					url: `/pages/success-case/detail?caseNo=${caseNo}`,
 					success: () => {
-						console.log('跳转成功')
+						
 					},
 					fail: (err) => {
 						console.error('跳转失败:', err)
@@ -179,7 +178,7 @@
 
 			// 返回
 			goBack() {
-				console.log('返回上一页')
+				
 				uni.navigateBack({
 					fail: () => {
 						// 返回失败时跳转首页
@@ -192,10 +191,6 @@
 			
 			// 数据健康检查
 			checkDataHealth() {
-				console.log('=== 成功案例列表页面数据健康检查 ===')
-				console.log('caseList长度:', this.caseList.length)
-				console.log('DEFAULT_IMAGES:', this.DEFAULT_IMAGES)
-				console.log('第一个案例:', this.caseList[0])
 				
 				// 确保每个案例都有必要的字段
 				this.caseList.forEach((item, index) => {

+ 3 - 3
LiangZhiYUMao/pages/today-recommend/index.vue

@@ -113,9 +113,9 @@
 		},
 
 		onLoad() {
-			console.log('今日推荐页面加载')
+		
 			this.currentUserId = userAuth.getUserId()
-			console.log('当前用户ID:', this.currentUserId)
+			
 
 			// 加载今日推荐
 			this.loadTodayRecommend()
@@ -344,7 +344,7 @@
 
 			// 处理打招呼
 			handleChat(user) {
-				console.log('打招呼:', user.nickname)
+			
 
 				const greetings = [
 					'你好,很高兴认识你!',

+ 4 - 8
LiangZhiYUMao/pages/vip/index.vue

@@ -71,7 +71,7 @@
 	export default {
 		data() {
 			return {
-				gatewayURL: 'http://localhost:8083',
+				gatewayURL: 'https://api.zhongruanke.cn',
 				currentUserId: null,
 				selectedPackage: null, // 默认不选中任何套餐
 				isVip: false,
@@ -115,11 +115,7 @@
 		onLoad() {
 			// 获取登录用户ID - 使用修复后的工具类
 			this.currentUserId = userAuth.getUserId()
-			console.log('=== VIP页面调试信息 ===')
-			console.log('获取到的用户ID:', this.currentUserId)
-			console.log('存储的userId:', uni.getStorageSync('userId'))
-			console.log('存储的userInfo:', uni.getStorageSync('userInfo'))
-			console.log('存储的token:', uni.getStorageSync('token'))
+		
 			
 			// 加载VIP信息
 			this.loadVipInfo()
@@ -145,7 +141,7 @@
 					method: 'GET',
 					data: params,
 					success: (res) => {
-						console.log('VIP信息:', res.data)
+						
 						
 						if (res.data && res.data.code === 200) {
 							const data = res.data.data
@@ -292,7 +288,7 @@
 								// 返回上一页
 								uni.navigateBack({
 									success: () => {
-										console.log('✅ 返回个人页面')
+										
 									}
 								})
 							}, 2000)

+ 0 - 27
LiangZhiYUMao/project.private.config.json

@@ -1,27 +0,0 @@
-{
-  "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
-  "projectname": "LiangZhiYUMao",
-  "setting": {
-    "compileHotReLoad": true,
-    "urlCheck": false,
-    "showES6CompileOption": false,
-    "checkInvalidKey": true,
-    "autoAudits": false,
-    "coverView": true,
-    "lazyloadPlaceholderEnable": false,
-    "skylineRenderEnable": false,
-    "preloadBackgroundData": false,
-    "useApiHook": true,
-    "useApiHostProcess": true,
-    "showShadowRootInWxmlPanel": true,
-    "useStaticServer": false,
-    "useLanDebug": false,
-    "ignoreDevUnusedFiles": true,
-    "bigPackageSizeSupport": true
-  },
-  "localSetting": {
-    "urlCheck": false
-  },
-  "libVersion": "3.10.2",
-  "condition": {}
-}

+ 10 - 10
LiangZhiYUMao/pages/message/chat.vue → LiangZhiYUMao/subpkg-message/chat/chat.vue

@@ -622,7 +622,7 @@ export default {
         
         // 导入当前用户(确保userId是字符串)
         const currentUserRes = await uni.request({
-          url: 'http://localhost:8083/api/im/importUser',
+          url: 'https://api.zhongruanke.cn/api/im/importUser',
           method: 'POST',
           data: {
             userId: String(this.userId),
@@ -637,7 +637,7 @@ export default {
         
         // 导入目标用户(确保userId是字符串)
         const targetUserRes = await uni.request({
-          url: 'http://localhost:8083/api/im/importUser',
+          url: 'https://api.zhongruanke.cn/api/im/importUser',
           method: 'POST',
           data: {
             userId: String(this.targetUserId),
@@ -662,7 +662,7 @@ export default {
     async getUserSig() {
       try {
         const [err, res] = await uni.request({
-          url: 'http://localhost:8083/api/im/getUserSig',
+          url: 'https://api.zhongruanke.cn/api/im/getUserSig',
           method: 'GET',
           data: {
             userId: this.userId
@@ -992,7 +992,7 @@ export default {
     async checkIsBlockedByTarget() {
       try {
         const [err, res] = await uni.request({
-          url: 'http://localhost:8083/api/chatfriend/checkBlock',
+          url: 'https://api.zhongruanke.cn/api/chatfriend/checkBlock',
           method: 'POST',
           data: {
             userId: this.userId,       // 自己的ID
@@ -1142,7 +1142,7 @@ export default {
       if (!isMatchmakerChat) {
         try {
           const checkRes = await uni.request({
-            url: 'http://localhost:8083/api/chat/checkMessage',
+            url: 'https://api.zhongruanke.cn/api/chat/checkMessage',
             method: 'POST',
             data: {
               userId: String(this.userId),
@@ -1369,7 +1369,7 @@ export default {
         
         // 调用后端同步接口
         const res = await uni.request({
-          url: 'http://localhost:8083/api/chat/syncTIMMessage',
+          url: 'https://api.zhongruanke.cn/api/chat/syncTIMMessage',
           method: 'POST',
           data: syncData,
           header: {
@@ -2154,7 +2154,7 @@ export default {
         
         // 使用uni.uploadFile上传到后端MinIO接口
         const [err, res] = await uni.uploadFile({
-          url: 'http://localhost:8083/api/voice/upload',
+          url: 'https://api.zhongruanke.cn/api/voice/upload',
           filePath: this.voiceTempPath,
           name: 'file',
           header: {
@@ -2403,7 +2403,7 @@ export default {
 			async updateMessageCount() {
 			  try {
 			    const [err, res] = await uni.request({
-			      url: 'http://localhost:8083/api/chat/updateMessageCount',
+			      url: 'https://api.zhongruanke.cn/api/chat/updateMessageCount',
 			      method: 'get',
 			      data: {
 			        userId: this.userId ,// 已在onLoad中初始化的当前用户ID
@@ -2437,7 +2437,7 @@ export default {
 		        
 		        // 调用后端拉黑接口(根据实际接口调整)
 		        const [err, res] = await uni.request({
-		          url: 'http://localhost:8083/api/chatfriend/block',
+		          url: 'https://api.zhongruanke.cn/api/chatfriend/block',
 		          method: 'POST',
 		          data: {
 		            userId: this.userId,
@@ -2514,7 +2514,7 @@ export default {
 		    async checkOnlineStatus() {
 		      try {
 		        const [err, res] = await uni.request({
-		          url: 'http://localhost:8083/api/online/checkStatus',
+		          url: 'https://api.zhongruanke.cn/api/online/checkStatus',
 		          method: 'GET',
 		          data: {
 		            userId: this.targetUserId

+ 9 - 9
LiangZhiYUMao/pages/message/index.vue → LiangZhiYUMao/subpkg-message/index/index.vue

@@ -169,13 +169,13 @@
         <text class="tabbar-icon">👍</text>
         <text class="tabbar-text">推荐</text>
       </view>
-      <view class="tabbar-item active">
+     <!-- <view class="tabbar-item active">
         <text class="tabbar-icon">💬</text>
         <text class="tabbar-text">消息</text>
         <view v-if="totalUnread > 0" class="tab-badge">
           {{ totalUnread > 99 ? '99+' : totalUnread }}
         </view>
-      </view>
+      </view> -->
       <view class="tabbar-item" @click="switchTab('mine')">
         <text class="tabbar-icon">👤</text>
         <text class="tabbar-text">我的</text>
@@ -518,7 +518,7 @@ export default {
     async importUser() {
       try {
         await uni.request({
-          url: 'http://localhost:8083/api/im/importUser',
+          url: 'https://api.zhongruanke.cn/api/im/importUser',
           method: 'POST',
           data: {
             userId: String(this.userId)
@@ -537,7 +537,7 @@ export default {
     async getUserSig() {
       try {
         const res = await uni.request({
-          url: `http://localhost:8083/api/im/getUserSig?userId=${this.userId}`,
+          url: `https://api.zhongruanke.cn/api/im/getUserSig?userId=${this.userId}`,
           method: 'GET'
         });
         
@@ -682,7 +682,7 @@ export default {
         console.log('🔄 加载拉黑用户列表,用户ID:', this.userId);
         
         const res = await uni.request({
-          url: 'http://localhost:8083/api/chatfriend/getBlacklist', // 替换为你的后端接口
+          url: 'https://api.zhongruanke.cn/api/chatfriend/getBlacklist', // 替换为你的后端接口
           method: 'GET',
           data: {
             userId: this.userId
@@ -739,7 +739,7 @@ export default {
         // 1. 批量查询普通用户
         if (normalUserIds.length > 0) {
           const userRes = await uni.request({
-            url: 'http://localhost:8083/api/user/batch',
+            url: 'https://api.zhongruanke.cn/api/user/batch',
             method: 'GET',
             data: {
               userIds: normalUserIds.join(',')
@@ -955,7 +955,7 @@ export default {
     },
 
     openSystemMessages() {
-      uni.navigateTo({ url: '/pages/message/system' });
+      uni.navigateTo({ url: '/subpkg-message/system/system' });
     },
     
     /**
@@ -975,7 +975,7 @@ export default {
      */
     openChat(conversation) {
       uni.navigateTo({
-        url: `/pages/message/chat?targetUserId=${conversation.targetUserId}&targetUserName=${conversation.targetUserName}&targetUserAvatar=${conversation.targetUserAvatar || ''}`
+        url: `/subpkg-message/chat/chat?targetUserId=${conversation.targetUserId}&targetUserName=${conversation.targetUserName}&targetUserAvatar=${conversation.targetUserAvatar || ''}`
       });
     },
     
@@ -1319,7 +1319,7 @@ export default {
       for (const conv of this.conversations) {
         try {
           const [err, res] = await uni.request({
-            url: 'http://localhost:8083/api/online/checkStatus',
+            url: 'https://api.zhongruanke.cn/api/online/checkStatus',
             method: 'GET',
             data: {
               userId: conv.targetUserId

+ 0 - 0
LiangZhiYUMao/pages/message/system.vue → LiangZhiYUMao/subpkg-message/system/system.vue


+ 8 - 10
LiangZhiYUMao/utils/api.js

@@ -5,8 +5,8 @@
 // 开发环境和生产环境的 API 基础地址
 // 所有请求通过网关转发
 const BASE_URL = process.env.NODE_ENV === 'development' 
-  ? 'http://localhost:8083/api'  // 开发环境 - 通过网关
-  : 'https://your-domain.com/api'  // 生产环境
+  ? 'https://api.zhongruanke.cn/api'  // 开发环境 - 通过网关
+  : 'https://api.zhongruanke.cn/api'  // 生产环境
 
 /**
  * 封装 uni.request
@@ -27,7 +27,7 @@ const request = (options) => {
       header: headers,
       dataType: 'json',
       success: (res) => {
-        console.log('API请求成功:', options.url, '状态码:', res.statusCode, '返回数据:', res.data)
+        
         if (res.statusCode === 200) {
           // 根据后端约定的数据格式处理
           if (res.data.code === 200 || res.data.code === 0 || res.data.success) {
@@ -169,14 +169,14 @@ export default {
 
     // 微信登录(直连 login 服务)
     wechatLogin: (data) => request({
-      url: 'http://localhost:8087/api/login/wechat/login',
+      url: 'https://api.zhongruanke.cn/api/login/wechat/login',
       method: 'POST',
       data: data  // ✅ 传递完整的登录数据对象(包含code, nickname, avatarUrl, phoneCode)
     }),
 
     // 获取微信手机号(直连 login 服务)
     wechatPhone: (code) => request({
-      url: 'http://localhost:8087/api/login/wechat/phone',
+      url: 'https://api.zhongruanke.cn/api/login/wechat/phone',
       method: 'POST',
       data: { code }
     })
@@ -760,21 +760,19 @@ export default {
     // 单个文件上传方法
     uploadSingle: (filePath) => {
       return new Promise((resolve, reject) => {
-        console.log('开始上传文件:', filePath)
-        console.log('上传URL:', BASE_URL + '/dynamic/publish/upload')
+    
 
         uni.uploadFile({
           url: BASE_URL + '/dynamic/publish/upload',
           filePath: filePath,
           name: 'file',
           success: (res) => {
-            console.log('上传响应:', res)
+           
             try {
               const data = JSON.parse(res.data)
-              console.log('解析后的响应数据:', data)
+              
 
               if (data.code === 200 || data.code === 0 || data.success) {
-                console.log('上传成功,返回URL:', data.data)
                 resolve(data.data)
               } else {
                 console.error('上传失败,服务器返回错误:', data)

+ 13 - 23
LiangZhiYUMao/utils/bazi.js

@@ -748,7 +748,7 @@ function selectBestAPI() {
 		.sort((a, b) => a.config.PRIORITY - b.config.PRIORITY)
 	
 	if (sortedAPIs.length === 0) {
-		console.log('⚠️ 没有已配置的API,使用本地算法')
+		
 		return null
 	}
 	
@@ -777,21 +777,19 @@ export async function getBaziFromAPI(birthDate, hour) {
 	
 	for (let attempt = 0; attempt < maxRetries + 1; attempt++) {
 		try {
-			console.log(`🔍 尝试调用专业八字API (第${attempt + 1}次)`)
-			console.log('出生时间:', birthDate, '时辰:', hour)
+			
 			
 			// 智能选择API
 			const selectedAPI = selectBestAPI()
 			if (!selectedAPI) {
-				console.log('⚠️ 没有可用的专业API,使用本地算法')
+				
 				return null
 			}
 			
-			console.log(`📡 选中API: ${selectedAPI.name}`, selectedAPI.config.DESCRIPTION)
 			
 			const result = await callSpecificAPI(selectedAPI, birthDate, hour)
 			if (result) {
-				console.log(`✅ ${selectedAPI.name} 调用成功`)
+				
 				return {
 					...result,
 					apiProvider: selectedAPI.name,
@@ -801,8 +799,7 @@ export async function getBaziFromAPI(birthDate, hour) {
 			
 			// 如果启用自动故障转移,尝试下一个API
 			if (settings.AUTO_FAILOVER && attempt < maxRetries) {
-				console.log(`⚠️ ${selectedAPI.name} 调用失败,尝试故障转移`)
-				// 临时禁用当前API,下次循环会选择下一个
+			
 				const index = settings.ENABLED_APIS.indexOf(selectedAPI.name)
 				if (index > -1) {
 					settings.ENABLED_APIS.splice(index, 1)
@@ -813,7 +810,7 @@ export async function getBaziFromAPI(birthDate, hour) {
 		} catch (error) {
 			console.error(`❌ API调用异常 (尝试${attempt + 1}):`, error)
 			if (attempt === maxRetries) {
-				console.log('🔄 所有API均失败,降级到本地算法')
+				
 				return null
 			}
 		}
@@ -890,12 +887,6 @@ async function callSpecificAPI(selectedAPI, birthDate, hour) {
 			return null
 	}
 	
-	console.log('📡 API请求地址:', url)
-	console.log('📡 请求参数:', { 
-		...params, 
-		[name === 'JISU_API' ? 'appkey' : 'key']: params.appkey || params.key ? 
-			`${(params.appkey || params.key).slice(0, 8)}...` : '未设置' 
-	})
 	
 	// 发送请求
 	const response = await new Promise((resolve, reject) => {
@@ -915,8 +906,7 @@ async function callSpecificAPI(selectedAPI, birthDate, hour) {
 			header: headers,
 			timeout: BAZI_API_CONFIG.SETTINGS.TIMEOUT || 10000,
 			success: (res) => {
-				console.log('📡 API响应状态:', res.statusCode)
-				console.log('📡 API响应数据:', res.data)
+				
 				resolve(res)
 			},
 			fail: (err) => {
@@ -949,7 +939,7 @@ function parseAPIResponse(apiName, response) {
 			if (data.status === 0 && data.result) {
 				result = data.result
 				// 极速数据API返回的是完整的八字排盘数据
-				console.log('✅ 极速数据返回完整八字排盘信息')
+				
 			}
 			break
 			
@@ -968,7 +958,7 @@ function parseAPIResponse(apiName, response) {
 	}
 	
 	if (!result) {
-		console.log('⚠️ API返回数据格式异常')
+		
 		return null
 	}
 	
@@ -1088,7 +1078,7 @@ export async function calculateEnhancedBaZi(birthDate, hour) {
 	try {
 		// 1. 先计算本地结果
 		localResult = calculateBaZi(birthDate, hour)
-		console.log('✅ 本地八字计算完成')
+		
 		
 		// 2. 尝试获取API结果
 		if (BAZI_API_CONFIG.SETTINGS.ENABLE_VALIDATION) {
@@ -1097,12 +1087,12 @@ export async function calculateEnhancedBaZi(birthDate, hour) {
 		
 		// 3. 结果对比和融合
 		if (apiResult) {
-			console.log('🔍 开始对比API与本地算法结果')
+			
 			
 			const comparison = compareBaziResults(localResult, apiResult)
 			
 			if (comparison.accuracy >= 0.8) {
-				console.log('✅ 本地算法准确度高,使用本地结果')
+				
 				localResult.validation = {
 					status: 'verified',
 					accuracy: comparison.accuracy,
@@ -1110,7 +1100,7 @@ export async function calculateEnhancedBaZi(birthDate, hour) {
 					differences: comparison.differences
 				}
 			} else {
-				console.log('⚠️ 发现差异,使用API结果并标记')
+				
 				const enhancedResult = mergeApiAndLocalResults(apiResult, localResult)
 				enhancedResult.validation = {
 					status: 'api_corrected',

+ 2 - 2
LiangZhiYUMao/utils/chat-api.js

@@ -2,7 +2,7 @@
  * 聊天相关API接口封装
  */
 
-const CHAT_BASE_URL = 'http://localhost:8083/api/chat';
+const CHAT_BASE_URL = 'https://api.zhongruanke.cn/api/chat';
 
 /**
  * 统一的聊天请求封装
@@ -105,7 +105,7 @@ export function checkOnlineStatus(userId) {
 export function uploadChatMedia(filePath) {
   return new Promise((resolve, reject) => {
     uni.uploadFile({
-      url: 'http://localhost:8083/api/upload',  // 使用homePage服务的上传接口
+      url: 'https://api.zhongruanke.cn/api/upload',  // 使用homePage服务的上传接口
       filePath: filePath,
       name: 'file',
       success: (res) => {

+ 23 - 42
LiangZhiYUMao/utils/constellation.js

@@ -258,20 +258,14 @@ export function getAllConstellations() {
  */
 export async function getConstellationFortuneFromAPI(constellation) {
 	try {
-		console.log('🔍 尝试调用天行数据星座运势API')
-		console.log('星座:', constellation)
-		console.log('API Key:', TIANAPI_CONFIG.API_KEY ? `${TIANAPI_CONFIG.API_KEY.slice(0, 8)}...` : '未配置')
+	
 		
 		if (!TIANAPI_CONFIG.API_KEY) {
-			console.log('⚠️ API Key未配置,使用本地数据')
+		
 			return null
 		}
 		
-		// 检查是否为示例Key
-		if (TIANAPI_CONFIG.API_KEY === '23e38be1fddb7c6aee4ea3e4294c6b4a') {
-			console.log('⚠️ 检测到示例API Key,尝试调用(可能会失败)')
-			console.log('💡 请到 https://www.tianapi.com 申请真实的API Key')
-		}
+		
 		
 		// 星座名称映射 (天行数据可能需要英文或特定格式)
 		const constellationMap = {
@@ -291,7 +285,7 @@ export async function getConstellationFortuneFromAPI(constellation) {
 		
 		const englishName = constellationMap[constellation]
 		if (!englishName) {
-			console.log('❌ 星座名称映射失败:', constellation)
+		
 			return null
 		}
 		
@@ -301,9 +295,7 @@ export async function getConstellationFortuneFromAPI(constellation) {
 			astro: englishName
 		}
 		
-		console.log('📡 API请求地址:', url)
-		console.log('📡 请求参数:', { ...params, key: params.key ? `${params.key.slice(0, 8)}...` : '未设置' })
-		
+	
 		const response = await new Promise((resolve, reject) => {
 			uni.request({
 				url: url,
@@ -311,8 +303,7 @@ export async function getConstellationFortuneFromAPI(constellation) {
 				method: 'GET',
 				timeout: 10000,
 				success: (res) => {
-					console.log('📡 API响应状态:', res.statusCode)
-					console.log('📡 API响应数据:', res.data)
+					
 					resolve(res)
 				},
 				fail: (err) => {
@@ -322,12 +313,12 @@ export async function getConstellationFortuneFromAPI(constellation) {
 			})
 		})
 		
-		console.log('✅ 请求完成,状态码:', response.statusCode)
+		
 		
 		if (response.statusCode === 200 && response.data && response.data.code === 200) {
 			const result = response.data.result
 			if (result && result.list && result.list.length > 0) {
-				console.log('✅ 成功获取API星座运势数据')
+				
 				
 				// 解析天行数据API返回的格式
 				const apiData = {}
@@ -373,12 +364,12 @@ export async function getConstellationFortuneFromAPI(constellation) {
 			}
 		}
 		
-		console.log('⚠️ API返回数据格式异常,使用本地数据')
+		
 		return null
 		
 	} catch (error) {
 		console.error('❌ 星座运势API调用异常:', error)
-		console.log('🔄 降级到本地数据')
+		
 		return null
 	}
 }
@@ -513,12 +504,12 @@ export async function getConstellationFortune(constellation) {
 		const apiResult = await getConstellationFortuneFromAPI(constellation)
 		
 		if (apiResult) {
-			console.log('✅ 使用API星座运势数据')
+			
 			return apiResult
 		}
 		
 		// API失败,使用本地数据
-		console.log('🔄 使用本地星座运势数据')
+		
 		return generateLocalConstellationFortune(constellation)
 		
 	} catch (error) {
@@ -567,20 +558,14 @@ export function generateConstellationMatch(constellation) {
  */
 export async function getConstellationMatchFromAPI(constellation1, constellation2) {
 	try {
-		console.log('🔍 尝试调用天行数据星座配对API')
-		console.log('星座1:', constellation1, '星座2:', constellation2)
-		console.log('API Key:', TIANAPI_CONFIG.API_KEY ? `${TIANAPI_CONFIG.API_KEY.slice(0, 8)}...` : '未配置')
+		
 		
 		if (!TIANAPI_CONFIG.API_KEY) {
-			console.log('⚠️ API Key未配置,使用本地数据')
+			
 			return null
 		}
 		
-		// 检查是否为示例Key
-		if (TIANAPI_CONFIG.API_KEY === '23e38be1fddb7c6aee4ea3e4294c6b4a') {
-			console.log('⚠️ 检测到示例API Key,尝试调用(可能会失败)')
-			console.log('💡 请到 https://www.tianapi.com 申请真实的API Key')
-		}
+		
 		
 		// 星座名称处理(去掉"座"字)
 		const me = constellation1.replace('座', '')
@@ -593,8 +578,7 @@ export async function getConstellationMatchFromAPI(constellation1, constellation
 			he: he
 		}
 		
-		console.log('📡 API请求地址:', url)
-		console.log('📡 请求参数:', { ...params, key: params.key ? `${params.key.slice(0, 8)}...` : '未设置' })
+		
 		
 		const response = await new Promise((resolve, reject) => {
 			uni.request({
@@ -603,8 +587,7 @@ export async function getConstellationMatchFromAPI(constellation1, constellation
 				method: 'GET',
 				timeout: 10000,
 				success: (res) => {
-					console.log('📡 API响应状态:', res.statusCode)
-					console.log('📡 API响应数据:', res.data)
+					
 					resolve(res)
 				},
 				fail: (err) => {
@@ -614,12 +597,12 @@ export async function getConstellationMatchFromAPI(constellation1, constellation
 			})
 		})
 		
-		console.log('✅ 请求完成,状态码:', response.statusCode)
+	
 		
 		if (response.statusCode === 200 && response.data && response.data.code === 200) {
 			const result = response.data.result
 			if (result && (result.title || result.content)) {
-				console.log('✅ 成功获取API星座配对数据')
+			
 				
 				// 解析天行数据API返回的格式
 				return {
@@ -634,12 +617,12 @@ export async function getConstellationMatchFromAPI(constellation1, constellation
 			}
 		}
 		
-		console.log('⚠️ API返回数据格式异常,使用本地数据')
+		
 		return null
 		
 	} catch (error) {
 		console.error('❌ 星座配对API调用异常:', error)
-		console.log('🔄 降级到本地数据')
+		
 		return null
 	}
 }
@@ -656,13 +639,11 @@ export async function getDetailedConstellationMatch(constellation1, constellatio
 		const apiResult = await getConstellationMatchFromAPI(constellation1, constellation2)
 		
 		if (apiResult) {
-			console.log('✅ 使用API星座配对数据')
-			// 将API数据转换为统一格式
+			
 			return convertAPIDataToStandardFormat(constellation1, constellation2, apiResult)
 		}
 		
-		// API失败,使用本地数据
-		console.log('🔄 使用本地星座配对数据')
+		
 		return getLocalConstellationMatch(constellation1, constellation2)
 		
 	} catch (error) {

+ 102 - 79
LiangZhiYUMao/utils/tim-manager.js

@@ -6,11 +6,14 @@ class TIMManager {
     this.isLogin = false;
     this.userId = null;
     this.messageCallbacks = [];
-    this.messageReadCallbacks = []; // 🔥 添加已读回执回调列表
+    this.messageReadCallbacks = [];
+    // 新增:缓存 store 实例,避免重复获取
+    this.store = null;
   }
 
   /**
    * 初始化 TIM SDK
+   * @param {Number} sdkAppID - 腾讯云 IM 的 SDKAppID
    */
   init(sdkAppID) {
     // 创建 SDK 实例
@@ -24,7 +27,81 @@ class TIMManager {
     // 注册监听事件
     this.registerEvents();
 
-    console.log('✅ TIM SDK 初始化完成');
+    // 初始化时提前尝试获取 store(提升后续获取成功率)
+    this.initStore();
+  }
+
+  /**
+   * 初始化 store 实例(核心修复:提前获取+缓存)
+   */
+  initStore() {
+    try {
+      // 方式1:从全局 App 实例获取
+      const app = getApp();
+      if (app && app.$store) {
+        this.store = app.$store;
+        console.log('✅ 从全局 App 获取 store 成功');
+        return;
+      }
+
+      // 方式2:直接导入 store(备用方案,注意路径正确性)
+      const storeModule = require('../store/index.js');
+      if (storeModule && storeModule.default) {
+        this.store = storeModule.default;
+        console.log('✅ 直接导入 store 成功');
+        return;
+      }
+
+      console.warn('⚠️ 初始化时未获取到 store,将在需要时重试');
+    } catch (error) {
+      console.warn('⚠️ 初始化 store 失败:', error.message);
+    }
+  }
+
+  /**
+   * 安全获取 store 实例(带重试逻辑)
+   * @returns {Promise<Object>} store 实例
+   */
+  async getStoreSafely() {
+    // 缓存中有则直接返回
+    if (this.store) {
+      return this.store;
+    }
+
+    // 无缓存时,重试获取(最多等 3 秒,每 100ms 检查一次)
+    return new Promise((resolve, reject) => {
+      let retryCount = 0;
+      const maxRetry = 30; // 30 * 100ms = 3 秒
+      const timer = setInterval(() => {
+        retryCount++;
+
+        // 尝试从全局 App 获取
+        const app = getApp();
+        if (app && app.$store) {
+          clearInterval(timer);
+          this.store = app.$store;
+          resolve(this.store);
+          return;
+        }
+
+        // 尝试直接导入
+        try {
+          const storeModule = require('../store/index.js');
+          if (storeModule && storeModule.default) {
+            clearInterval(timer);
+            this.store = storeModule.default;
+            resolve(this.store);
+            return;
+          }
+        } catch (e) {}
+
+        // 超过重试次数
+        if (retryCount >= maxRetry) {
+          clearInterval(timer);
+          reject(new Error('获取 store 超时(3秒)'));
+        }
+      }, 100);
+    });
   }
 
   /**
@@ -40,10 +117,10 @@ class TIMManager {
     // 收到新消息
     this.tim.on(TIM.EVENT.MESSAGE_RECEIVED, this.onMessageReceived.bind(this));
     
-    // 会话列表更新
+    // 会话列表更新(核心修复)
     this.tim.on(TIM.EVENT.CONVERSATION_LIST_UPDATED, this.onConversationListUpdated.bind(this));
     
-    // 🔥 消息已读回执(对方已读我发送的消息)
+    // 消息已读回执(对方已读我发送的消息)
     this.tim.on(TIM.EVENT.MESSAGE_READ_BY_PEER, this.onMessageReadByPeer.bind(this));
     
     // 被踢下线
@@ -57,7 +134,6 @@ class TIMManager {
    * SDK Ready
    */
   onSdkReady() {
-    console.log('✅ TIM SDK Ready');
     this.isLogin = true;
   }
 
@@ -65,7 +141,6 @@ class TIMManager {
    * SDK Not Ready
    */
   onSdkNotReady() {
-    console.log('⚠️ TIM SDK Not Ready');
     this.isLogin = false;
   }
 
@@ -74,8 +149,7 @@ class TIMManager {
    */
   onMessageReceived(event) {
     const messageList = event.data;
-    console.log('📥 收到新消息:', messageList.length, '条');
-    
+  
     // 同步接收到的消息到MySQL(双重保障)
     messageList.forEach(message => {
       this.syncReceivedMessageToMySQL(message);
@@ -186,7 +260,7 @@ class TIMManager {
       
       // 调用后端同步接口(V2版本,支持红娘消息)
       const res = await uni.request({
-        url: 'http://localhost:8083/api/chat/syncTIMMessageV2',
+        url: 'https://api.zhongruanke.cn/api/chat/syncTIMMessageV2',
         method: 'POST',
         data: syncData,
         header: {
@@ -196,7 +270,6 @@ class TIMManager {
       
       if (res[1].data.code === 200) {
         const msgType = res[1].data.type === 'matchmaker' ? '红娘消息' : '用户消息';
-        console.log(`✅ 接收消息已同步到MySQL (${msgType}):`, timMessage.ID);
       }
     } catch (error) {
       console.error('❌ 同步接收消息失败:', error);
@@ -208,10 +281,6 @@ class TIMManager {
    * 消息已读回执(对方已读我发送的消息)
    */
   onMessageReadByPeer(event) {
-    console.log('=== 📖 [全局] 收到已读回执事件 MESSAGE_READ_BY_PEER ===');
-    console.log('   - 触发时间:', new Date().toLocaleString());
-    console.log('   - 事件数据:', JSON.stringify(event.data));
-    
     // 触发所有已读回执回调
     this.messageReadCallbacks.forEach(callback => {
       try {
@@ -223,11 +292,9 @@ class TIMManager {
   }
 
   /**
-   * 会话列表更新
+   * 会话列表更新(核心修复:异步安全获取 store)
    */
-  onConversationListUpdated(event) {
-    console.log('📋 会话列表更新:', event.data.length, '个');
-    
+  async onConversationListUpdated(event) {
     // 计算总未读数
     const conversationList = event.data;
     let totalUnread = 0;
@@ -236,36 +303,20 @@ class TIMManager {
       totalUnread += conversation.unreadCount || 0;
     });
     
-    console.log('📊 总未读消息数:', totalUnread);
-    
-    // 更新到全局状态(Vuex)- 多种方式确保更新成功
     try {
-      // 方式1: 使用 getApp() 获取全局实例
-      const app = getApp();
-      if (app && app.$store) {
-        app.$store.dispatch('updateTotalUnread', totalUnread);
-        console.log('✅ 已更新全局未读数到 Vuex (getApp):', totalUnread);
-      } else {
-        console.warn('⚠️ getApp() 未获取到 $store');
-      }
-      
-      // 方式2: 直接导入 store(备用方案)
-      try {
-        const store = require('../store/index.js').default;
-        if (store) {
-          store.dispatch('updateTotalUnread', totalUnread);
-          console.log('✅ 已更新全局未读数到 Vuex (require):', totalUnread);
-        }
-      } catch (e) {
-        console.warn('⚠️ require store 失败:', e.message);
+      // 核心修复:异步安全获取 store
+      const store = await this.getStoreSafely();
+      if (store) {
+        await store.dispatch('updateTotalUnread', totalUnread);
+        console.log('✅ 全局未读数更新成功:', totalUnread);
       }
       
-      // 方式3: 触发自定义事件,通知所有页面
+      // 兜底方案:触发自定义事件,确保页面能收到更新
       uni.$emit('conversationUnreadUpdate', totalUnread);
-      console.log('✅ 已触发 conversationUnreadUpdate 事件:', totalUnread);
-      
     } catch (error) {
-      console.error('❌ 更新全局未读数失败:', error);
+      console.error('❌ 更新全局未读数失败:', error.message);
+      // 即使失败,仍触发自定义事件
+      uni.$emit('conversationUnreadUpdate', totalUnread);
     }
   }
 
@@ -273,7 +324,6 @@ class TIMManager {
    * 被踢下线
    */
   onKickedOut(event) {
-    console.log('❌ 被踢下线:', event.data.type);
     uni.showModal({
       title: '下线通知',
       content: '您的账号在其他设备登录',
@@ -284,23 +334,18 @@ class TIMManager {
   /**
    * 网络状态变化
    */
-  onNetStateChange(event) {
-    console.log('🌐 网络状态:', event.data.state);
-  }
+  onNetStateChange(event) {}
 
   /**
    * 登录
    */
   async login(userID, userSig) {
     try {
-      console.log('📱 开始登录 TIM, userID:', userID);
-      
       const res = await this.tim.login({
         userID: String(userID),
         userSig: userSig
       });
       
-      console.log('✅ TIM 登录成功');
       this.userId = userID;
       return res;
     } catch (error) {
@@ -315,7 +360,7 @@ class TIMManager {
   async logout() {
     try {
       await this.tim.logout();
-      console.log('✅ TIM 登出成功');
+      
       this.isLogin = false;
       this.userId = null;
     } catch (error) {
@@ -341,11 +386,6 @@ class TIMManager {
       
       const toUserIdStr = String(toUserId);
       
-      console.log('📤 准备发送消息:');
-      console.log('   - 发送者ID:', this.userId, '(类型:', typeof this.userId, ')');
-      console.log('   - 接收者ID:', toUserIdStr, '(类型:', typeof toUserIdStr, ')');
-      console.log('   - 消息内容:', text);
-      
       // 创建文本消息
       const message = this.tim.createTextMessage({
         to: toUserIdStr,
@@ -355,16 +395,11 @@ class TIMManager {
         }
       });
 
-      console.log('📤 消息已创建,准备发送...');
-
       // 发送消息
       const res = await this.tim.sendMessage(message);
-      console.log('✅ 消息发送成功:', res.data.message);
       
       return res.data.message;
     } catch (error) {
-      console.error('❌ 消息发送失败:', error);
-      console.error('   - 错误详情:', error.message || error);
       console.error('   - 错误代码:', error.code || 'N/A');
       throw error;
     }
@@ -381,13 +416,11 @@ class TIMManager {
         payload: {
           file: filePath
         },
-        onProgress: (percent) => {
-          console.log('📊 上传进度:', percent);
-        }
+        onProgress: (percent) => {}
       });
 
       const res = await this.tim.sendMessage(message);
-      console.log('✅ 图片发送成功');
+      
       return res.data.message;
     } catch (error) {
       console.error('❌ 图片发送失败:', error);
@@ -404,12 +437,6 @@ class TIMManager {
    */
   async sendVoiceMessage(toUserId, voiceUrl, duration, fileSize) {
     try {
-      console.log('🎤 准备发送语音消息:');
-      console.log('   - 接收者ID:', toUserId);
-      console.log('   - 语音URL:', voiceUrl);
-      console.log('   - 时长:', duration, '秒');
-      console.log('   - 文件大小:', fileSize, '字节');
-
       // 使用自定义消息发送语音信息
       const message = this.tim.createCustomMessage({
         to: String(toUserId),
@@ -427,7 +454,7 @@ class TIMManager {
       });
 
       const res = await this.tim.sendMessage(message);
-      console.log('✅ 语音发送成功');
+      
       return res.data.message;
     } catch (error) {
       console.error('❌ 语音发送失败:', error);
@@ -441,7 +468,7 @@ class TIMManager {
   async getConversationList() {
     try {
       const res = await this.tim.getConversationList();
-      console.log('📋 会话列表:', res.data.conversationList.length, '个');
+      
       return res.data.conversationList;
     } catch (error) {
       console.error('❌ 获取会话列表失败:', error);
@@ -458,7 +485,7 @@ class TIMManager {
         conversationID: conversationID,
         count: count
       });
-      console.log('💬 聊天记录:', res.data.messageList.length, '条');
+      
       return res.data.messageList;
     } catch (error) {
       console.error('❌ 获取聊天记录失败:', error);
@@ -472,7 +499,6 @@ class TIMManager {
   async setMessageRead(conversationID) {
     try {
       await this.tim.setMessageRead({ conversationID });
-      console.log('✅ 消息已读');
     } catch (error) {
       console.error('❌ 设置已读失败:', error);
     }
@@ -484,7 +510,6 @@ class TIMManager {
   async revokeMessage(message) {
     try {
       await this.tim.revokeMessage(message);
-      console.log('✅ 消息已撤回');
     } catch (error) {
       console.error('❌ 撤回失败:', error);
       throw error;
@@ -513,7 +538,6 @@ class TIMManager {
    */
   onMessageRead(callback) {
     this.messageReadCallbacks.push(callback);
-    console.log('✅ 已注册已读回执回调,当前回调数:', this.messageReadCallbacks.length);
   }
 
   /**
@@ -523,7 +547,6 @@ class TIMManager {
     const index = this.messageReadCallbacks.indexOf(callback);
     if (index > -1) {
       this.messageReadCallbacks.splice(index, 1);
-      console.log('✅ 已移除已读回执回调,剩余回调数:', this.messageReadCallbacks.length);
     }
   }
 
@@ -544,4 +567,4 @@ class TIMManager {
 
 // 导出单例
 const timManager = new TIMManager();
-export default timManager;
+export default timManager;

+ 38 - 87
LiangZhiYUMao/utils/tim-presence-manager.js

@@ -20,7 +20,7 @@ class TIMPresenceManager {
     this.userId = null;
     this.statusCallbacks = new Map(); // 存储状态变化回调
     this.onlineStatusCache = new Map(); // 缓存在线状态
-    this.wsUrl = 'ws://localhost:8083/ws/chat';
+    this.wsUrl = 'wss://ws.zhongruanke.cn/ws/chat';
     
     // TIM 状态监听器引用(用于清理)
     this.timStatusListener = null;
@@ -43,18 +43,12 @@ class TIMPresenceManager {
   async init(userId) {
     this.userId = userId;
     
-    if (DEBUG_WS) {
-      console.log('?? ========== 初始化 tim-presence-manager ==========');
-      console.log('?? 用户ID:', userId);
-      console.log('?? WebSocket URL:', this.wsUrl);
-    }
+  
     
-    // 连接 WebSocket(接收服务端推送的状态变更)
-    if (DEBUG_WS) console.log('?? 开始连接 WebSocket...');
+   
     this.connectWebSocket();
     
-    console.log('✅ tim-presence-manager 初始化完成(WebSocket连接中...)');
-    console.log('================================================');
+  
   }
   
   /**
@@ -63,11 +57,7 @@ class TIMPresenceManager {
   connectWebSocket() {
     try {
       const wsUrl = `${this.wsUrl}?userId=${this.userId}`;
-      if (DEBUG_WS) {
-        console.log('?? 准备连接 WebSocket:', wsUrl);
-        console.log('   当前用户ID:', this.userId);
-        console.log('   WebSocket URL:', wsUrl);
-      }
+      
       
       // 先关闭旧连接
       if (this.ws) {
@@ -81,7 +71,7 @@ class TIMPresenceManager {
       this.ws = uni.connectSocket({
         url: wsUrl,
         success: () => {
-          if (DEBUG_WS) console.log('✅ WebSocket连接请求已发送成功');
+       
         },
         fail: (err) => {
           console.error('❌ WebSocket连接请求发送失败:', err);
@@ -92,13 +82,7 @@ class TIMPresenceManager {
       
       // 使用 SocketTask 对象的监听器(推荐方式)
       this.ws.onOpen((res) => {
-        if (DEBUG_WS) {
-          console.log('?? ========== WebSocket 连接成功 ==========');
-          console.log('   响应数据:', res);
-          console.log('   用户ID:', this.userId);
-          console.log('   连接URL:', wsUrl);
-          console.log('==========================================');
-        }
+       
         
         this.isConnected = true;
         this.reconnectCount = 0; // 重置重连计数
@@ -120,18 +104,13 @@ class TIMPresenceManager {
       
       // 监听消息
       this.ws.onMessage((res) => {
-        if (DEBUG_WS) console.log('?? 收到WebSocket消息:', res.data);
+        
         this.handleMessage(res.data);
       });
       
       // 监听错误
       this.ws.onError((err) => {
-        console.error('❌ ========== WebSocket 错误 ==========');
-        console.error('   错误信息:', err);
-        console.error('   错误详情:', JSON.stringify(err));
-        console.error('   用户ID:', this.userId);
-        console.error('   连接URL:', wsUrl);
-        console.error('======================================');
+    
         
         this.isConnected = false;
         
@@ -145,14 +124,7 @@ class TIMPresenceManager {
       
       // 监听关闭
       this.ws.onClose((res) => {
-        if (DEBUG_WS) {
-          console.log('?? ========== WebSocket 连接关闭 ==========');
-          console.log('   关闭信息:', res);
-          console.log('   关闭码:', res?.code);
-          console.log('   关闭原因:', res?.reason);
-          console.log('   用户ID:', this.userId);
-          console.log('=========================================');
-        }
+       
         
         this.isConnected = false;
         this.stopHeartbeat();
@@ -184,7 +156,7 @@ class TIMPresenceManager {
     
     // 监听 IM 连接状态变化
     this.timConnectListener = (event) => {
-      if (DEBUG_WS) console.log('?? TIM 连接状态变更:', event.data.state);
+     
       
       let imStatus = 'offline';
       
@@ -204,7 +176,7 @@ class TIMPresenceManager {
     };
     
     timManager.tim.on(TIM.EVENT.NET_STATE_CHANGE, this.timConnectListener);
-    if (DEBUG_WS) console.log('✅ 已监听 TIM 连接状态变更');
+  
   }
   
   /**
@@ -220,27 +192,23 @@ class TIMPresenceManager {
     
     // 监听用户状态更新事件
     this.timStatusListener = (event) => {
-      console.log('=== ?? 收到 TIM 用户状态更新事件 ===');
-      console.log('   - 事件数据:', JSON.stringify(event.data, null, 2));
+     
       
       const { userStatusList } = event.data;
       
       if (userStatusList && userStatusList.length > 0) {
-        console.log(`   - 状态变更用户数: ${userStatusList.length}`);
+      
         
         userStatusList.forEach(item => {
           const userId = item.userID;
-          console.log(`   - 用户 ${userId}:`);
-          console.log(`     原始状态类型: ${item.statusType}`);
-          console.log(`     USER_STATUS_ONLINE: ${TIM.TYPES.USER_STATUS_ONLINE}`);
-          console.log(`     USER_STATUS_OFFLINE: ${TIM.TYPES.USER_STATUS_OFFLINE}`);
+        
           
           const status = item.statusType === TIM.TYPES.USER_STATUS_ONLINE ? 'online' : 'offline';
-          console.log(`     判断结果: ${status}`);
+      
           
           // 更新本地缓存
           this.onlineStatusCache.set(String(userId), status === 'online');
-          console.log(`     已更新缓存: ${status === 'online'}`);
+         
           
           // 通知状态变化
           this.notifyStatusChange(String(userId), status);
@@ -251,12 +219,11 @@ class TIMPresenceManager {
       } else {
         console.warn('   ⚠️ userStatusList 为空或不存在');
       }
-      console.log('=== 状态更新处理完成 ===');
+    
     };
     
     timManager.tim.on(TIM.EVENT.USER_STATUS_UPDATED, this.timStatusListener);
-    console.log('✅ 已监听 TIM 用户状态更新事件');
-    console.log('   - 事件名称:', TIM.EVENT.USER_STATUS_UPDATED);
+   
   }
   
   /**
@@ -290,7 +257,7 @@ class TIMPresenceManager {
       timestamp: Date.now()
     });
     
-    console.log(`?? 已上报 IM 状态: ${status}`);
+  
   }
   
   /**
@@ -322,35 +289,27 @@ class TIMPresenceManager {
       console.warn('   - timManager.isLogin:', timManager.isLogin);
       
       // 使用 HTTP 轮询作为备用方案
-      console.log('?? 启用 HTTP 轮询备用方案');
+     
       this.startHttpPolling(userIdList);
       return;
     }
     
-    console.log('?? 开始订阅用户状态...');
-    console.log('   - 订阅用户列表:', userIdList);
-    console.log('   - TIM SDK 版本:', timManager.tim.VERSION);
-    
+
     try {
       const result = await timManager.tim.subscribeUserStatus({
         userIDList: userIdList.map(id => String(id))
       });
       
-      console.log('✅ 订阅用户状态成功!');
-      console.log('   - 完整结果:', JSON.stringify(result, null, 2));
+      
       
       // 订阅成功后,初始化这些用户的状态
       if (result.data && result.data.successUserList) {
-        console.log('?? 成功订阅的用户列表:', result.data.successUserList.length, '个');
+       
         
         result.data.successUserList.forEach(user => {
-          console.log(`   - 用户 ${user.userID}:`);
-          console.log(`     状态类型: ${user.statusType}`);
-          console.log(`     USER_STATUS_ONLINE 常量:`, timManager.tim.TIM.TYPES.USER_STATUS_ONLINE);
-          console.log(`     USER_STATUS_OFFLINE 常量:`, timManager.tim.TIM.TYPES.USER_STATUS_OFFLINE);
           
           const status = user.statusType === timManager.tim.TIM.TYPES.USER_STATUS_ONLINE ? 'online' : 'offline';
-          console.log(`     最终判断状态: ${status}`);
+          
           
           this.onlineStatusCache.set(String(user.userID), status === 'online');
           this.notifyStatusChange(String(user.userID), status);
@@ -364,13 +323,12 @@ class TIMPresenceManager {
       
       return result;
     } catch (error) {
-      console.error('❌ 订阅用户状态失败:', error);
-      console.error('   - 错误详情:', error.message);
+    
       console.error('   - 错误代码:', error.code);
       
       // 如果订阅失败,启用 HTTP 轮询备用方案
       if (error.code === 70402 || error.code === 70403) {
-        console.log('?? TIM 在线状态功能未开启,启用 HTTP 轮询备用方案');
+      
         this.startHttpPolling(userIdList);
       }
       
@@ -383,7 +341,7 @@ class TIMPresenceManager {
    * @param {Array<String>} userIdList 用户ID列表
    */
   startHttpPolling(userIdList) {
-    console.log('?? 启动 HTTP 轮询,间隔 30 秒');
+    
     
     // 立即查询一次
     this.pollUserStatus(userIdList);
@@ -401,7 +359,7 @@ class TIMPresenceManager {
     for (const userId of userIdList) {
       try {
         const [err, res] = await uni.request({
-          url: 'http://localhost:8083/api/online/checkStatus',
+          url: 'https://api.zhongruanke.cn/api/online/checkStatus',
           method: 'GET',
           data: { userId }
         });
@@ -429,7 +387,7 @@ class TIMPresenceManager {
     if (this.pollingTimer) {
       clearInterval(this.pollingTimer);
       this.pollingTimer = null;
-      console.log('?? 已停止 HTTP 轮询');
+    
     }
   }
   
@@ -446,7 +404,7 @@ class TIMPresenceManager {
       await timManager.tim.unsubscribeUserStatus({
         userIDList: userIdList.map(id => String(id))
       });
-      console.log('✅ 取消订阅用户状态成功');
+     
     } catch (error) {
       console.error('❌ 取消订阅用户状态失败:', error);
     }
@@ -462,7 +420,7 @@ class TIMPresenceManager {
       switch (message.type) {
         case 'pong':  // 改为小写,匹配后端
           // 心跳响应
-          console.log('?? 收到心跳响应');
+         
           break;
           
         case 'ONLINE':
@@ -499,14 +457,7 @@ class TIMPresenceManager {
     
     this.heartbeatTimer = setInterval(() => {
       if (this.isConnected) {
-        console.log('?? ========== 发送心跳PING ==========');
-        console.log('?? 用户ID:', this.userId);
-        console.log('?? WebSocket连接状态:', this.isConnected);
-        console.log('?? 发送消息:', {
-          type: 'ping',
-          fromUserId: this.userId,
-          timestamp: Date.now()
-        });
+     
         
         this.sendMessage({
           type: 'ping',  // 改为小写,匹配后端
@@ -514,7 +465,7 @@ class TIMPresenceManager {
           timestamp: Date.now()
         });
         
-        console.log('?? ====================================');
+    
       } else {
         console.warn('⚠️ WebSocket未连接,跳过心跳');
       }
@@ -589,7 +540,7 @@ class TIMPresenceManager {
    * 通知状态变化
    */
   notifyStatusChange(userId, status) {
-    console.log(`?? 用户 ${userId} 状态变更: ${status}`);
+    
     
     const callbacks = this.statusCallbacks.get(userId);
     if (callbacks && callbacks.length > 0) {
@@ -620,11 +571,11 @@ class TIMPresenceManager {
       return;
     }
     
-    console.log('?? 将在5秒后重连...');
+   
     this.reconnectTimer = setTimeout(() => {
       this.reconnectTimer = null;
       if (!this.isConnected && this.userId) {
-        console.log('?? 尝试重连...');
+       
         this.connectWebSocket();
       }
     }, this.reconnectInterval);
@@ -638,7 +589,7 @@ class TIMPresenceManager {
       return;
     }
     
-    console.log(`?? 发送队列中的 ${this.messageQueue.length} 条消息`);
+   
     
     while (this.messageQueue.length > 0) {
       const message = this.messageQueue.shift();

+ 11 - 19
LiangZhiYUMao/utils/userAuth.js

@@ -8,25 +8,21 @@ export default {
    * @returns {number|null} 用户ID或null
    */
   getUserId() {
-    console.log('=== userAuth.getUserId 方法调用 ===')
+  
     
     // 首先检查是否真的已登录(通过token和userInfo判断)
     const token = uni.getStorageSync('token')
     const userInfo = uni.getStorageSync('userInfo')
     const storedUserId = uni.getStorageSync('userId')
     
-    console.log('userAuth 登录状态检查:')
-    console.log('- token存在:', !!token)
-    console.log('- userInfo存在:', !!userInfo)
-    console.log('- storedUserId:', storedUserId)
-    console.log('- userInfo内容:', userInfo)
+   
     
     // 如果有token和userInfo,说明确实已登录
     if (token && userInfo) {
       // 1. 优先从直接存储的userId获取(包括ID为1的情况)
       if (storedUserId !== null && storedUserId !== undefined && storedUserId !== '') {
         const finalUserId = parseInt(storedUserId)
-        console.log('✅ userAuth已登录,从userId存储获取到用户ID:', finalUserId)
+       
         return finalUserId
       }
       
@@ -34,20 +30,20 @@ export default {
       const userIdFromInfo = userInfo.userId || userInfo.id || userInfo.user_id
       if (userIdFromInfo !== null && userIdFromInfo !== undefined) {
         const finalUserId = parseInt(userIdFromInfo)
-        console.log('✅ userAuth已登录,从userInfo获取到用户ID:', finalUserId)
+       
         // 同步更新userId存储
         uni.setStorageSync('userId', finalUserId)
         return finalUserId
       }
       
       // 3. 如果有登录信息但无法提取userId,使用默认值1
-      console.log('⚠️ userAuth有登录信息但无法提取userId,使用默认userId: 1')
+    
       uni.setStorageSync('userId', 1)
       return 1
     }
     
     // 4. 未登录状态
-    console.log('❌ userAuth未登录状态,返回null')
+  
     return null
   },
 
@@ -86,9 +82,7 @@ export default {
    * @param {object} userInfo - 用户信息
    */
   saveLoginInfo(token, userInfo) {
-    console.log('=== userAuth.saveLoginInfo ===')
-    console.log('token:', token)
-    console.log('userInfo:', userInfo)
+  
     
     // 保存token和用户信息
     uni.setStorageSync('token', token)
@@ -100,9 +94,7 @@ export default {
       // 确保userId是数字类型
       const finalUserId = parseInt(userId)
       uni.setStorageSync('userId', finalUserId)
-      console.log('✅ 登录信息保存成功')
-      console.log('- 原始userId:', userId, '(类型:', typeof userId, ')')
-      console.log('- 处理后userId:', finalUserId, '(类型:', typeof finalUserId, ')')
+      
     } else {
       console.warn('⚠️ 用户信息中未找到userId字段')
       console.warn('userInfo keys:', Object.keys(userInfo || {}))
@@ -117,7 +109,7 @@ export default {
     uni.removeStorageSync('userInfo')
     uni.removeStorageSync('userId')
     uni.removeStorageSync('rememberedAccount')
-    console.log('登录信息已清除')
+  
   },
 
   /**
@@ -165,7 +157,7 @@ export default {
     // 登录信息异常情况
     if (!userId || userId === 1) {
       if (allowTestUser && userId === 1) {
-        console.log('允许使用测试用户')
+      
         return 1
       }
 
@@ -183,7 +175,7 @@ export default {
               uni.navigateTo({ url: loginUrl })
               resolve(null)
             } else if (allowTestUser) {
-              console.log('用户选择使用测试账号')
+            
               resolve(1)
             } else {
               resolve(null)

+ 21 - 32
LiangZhiYUMao/utils/websocket.js

@@ -33,21 +33,21 @@ class WebSocketManager {
    * @param {Number} userId 用户ID
    * @param {String} baseUrl WebSocket服务地址
    */
-  connect(userId, baseUrl = 'ws://localhost:8083') {
+  connect(userId, baseUrl = 'ws://api.zhongruanke.cn') {
     if (this.isConnected) {
-      if (DEBUG_WS) console.log('WebSocket已连接');
+     
       return;
     }
 
     this.userId = userId;
     this.url = `${baseUrl}/ws/chat?userId=${userId}`;
     
-    if (DEBUG_WS) console.log('正在连接WebSocket...', this.url);
+  
 
     this.socket = uni.connectSocket({
       url: this.url,
       success: () => {
-        if (DEBUG_WS) console.log('WebSocket连接请求已发送');
+     
       },
       fail: (err) => {
         console.error('WebSocket连接失败', err);
@@ -57,7 +57,7 @@ class WebSocketManager {
 
     // 监听连接打开
     uni.onSocketOpen((res) => {
-      if (DEBUG_WS) console.log('WebSocket连接成功');
+     
       this.isConnected = true;
       this.reconnectCount = 0;
       
@@ -76,9 +76,9 @@ class WebSocketManager {
     // 监听消息接收
     uni.onSocketMessage((res) => {
       try {
-        if (DEBUG_WS) console.log('?? 收到原始WebSocket消息:', res.data);
+       
         const message = JSON.parse(res.data);
-        if (DEBUG_WS) console.log('?? 解析后的消息对象:', JSON.stringify(message, null, 2));
+       
         this.handleMessage(message);
       } catch (e) {
         console.error('❌ 解析消息失败', e);
@@ -88,7 +88,7 @@ class WebSocketManager {
 
     // 监听连接关闭
     uni.onSocketClose((res) => {
-      if (DEBUG_WS) console.log('WebSocket连接关闭', res);
+      
       this.isConnected = false;
       this.stopHeartbeat();
       
@@ -113,12 +113,12 @@ class WebSocketManager {
    * 处理接收到的消息
    */
   handleMessage(message) {
-    if (DEBUG_WS) console.log('收到消息', message);
+   
 
     switch (message.type) {
       case 'pong':
         // 心跳响应
-        console.log('收到pong');
+       
         break;
         
       case 'chat':
@@ -131,14 +131,9 @@ class WebSocketManager {
         break;
         
       case 'ack':
-        // 消息确认
-        if (DEBUG_WS) {
-          console.log('✅ 收到ACK消息!');
-          console.log('   messageId:', message.messageId);
-          console.log('   完整ACK消息:', JSON.stringify(message));
-        }
+       
         if (this.onMessageCallback) {
-          console.log('   正在调用onMessageCallback...');
+        
           this.onMessageCallback(message);
         } else {
           console.warn('   ⚠️ onMessageCallback未设置!');
@@ -167,8 +162,7 @@ class WebSocketManager {
         break;
         
       case 'online':
-        // 上线通知
-        if (DEBUG_WS) console.log('用户上线', message.fromUserId);
+      
         break;
         
       case 'error':
@@ -181,7 +175,7 @@ class WebSocketManager {
         break;
         
       default:
-        if (DEBUG_WS) console.log('未知消息类型', message.type);
+      
     }
   }
 
@@ -264,13 +258,10 @@ class WebSocketManager {
    * 发送数据到WebSocket
    */
   send(data) {
-    console.log('?? 准备发送WebSocket消息');
-    console.log('   消息类型:', data.type);
-    console.log('   isConnected:', this.isConnected);
-    console.log('   完整数据:', JSON.stringify(data, null, 2));
+  
     
     if (!this.isConnected) {
-      console.log('❌ WebSocket未连接,消息加入队列');
+    
       // 加入消息队列
       if (this.messageQueue.length < this.maxQueueSize) {
         this.messageQueue.push(data);
@@ -280,14 +271,12 @@ class WebSocketManager {
 
     try {
       const jsonStr = JSON.stringify(data);
-      console.log('?? JSON字符串长度:', jsonStr.length);
+
       
       uni.sendSocketMessage({
         data: jsonStr,
         success: () => {
-          console.log('✅ WebSocket消息已发送到服务器');
-          console.log('   消息类型:', data.type);
-          console.log('   messageId:', data.messageId || 'N/A');
+        
         },
         fail: (err) => {
           console.error('❌ WebSocket消息发送失败', err);
@@ -314,7 +303,7 @@ class WebSocketManager {
       return;
     }
 
-    console.log(`发送队列中的 ${this.messageQueue.length} 条消息`);
+   
     
     while (this.messageQueue.length > 0) {
       const message = this.messageQueue.shift();
@@ -353,7 +342,7 @@ class WebSocketManager {
    */
   reconnect() {
     if (this.reconnectCount >= this.maxReconnectCount) {
-      console.log('达到最大重连次数,停止重连');
+     
       uni.showToast({
         title: '连接失败,请检查网络',
         icon: 'none'
@@ -367,7 +356,7 @@ class WebSocketManager {
       30000  // 最大30秒
     );
 
-    console.log(`${delay}ms 后进行第 ${this.reconnectCount + 1} 次重连...`);
+    
 
     this.reconnectTimer = setTimeout(() => {
       this.reconnectCount++;

+ 17 - 142
LiangZhiYUMao/utils/zodiac-enhanced.js

@@ -11,12 +11,8 @@ import zodiacUtil from './zodiac.js'
  * @returns {Promise<Object>} 运势数据
  */
 export async function getZodiacFortuneFromAPI(zodiac) {
-	// ⚠️ 注意:天行数据的 /zodiac/index 是生肖配对接口,不是运势接口
-	// 该接口需要 me 和 he 两个参数,用于查询生肖配对关系
-	// 目前天行数据可能没有单独的生肖运势接口,因此直接使用本地数据
 	
-	console.log('ℹ️ 天行数据暂无生肖运势接口,使用本地数据')
-	console.log('📝 说明: /zodiac/index 是生肖配对接口,不是运势接口')
+	
 	
 	// 直接返回本地数据
 	return {
@@ -26,111 +22,7 @@ export async function getZodiacFortuneFromAPI(zodiac) {
 		updateTime: new Date().toLocaleString('zh-CN')
 	}
 	
-	/* 
-	// 保留代码供参考:如果找到正确的运势API,可以恢复使用
 	
-	// 验证配置
-	if (!validateConfig()) {
-		console.log('API Key未配置,使用本地数据')
-		return {
-			...zodiacUtil.getTodayFortune(zodiac),
-			source: 'local_no_config',
-			dataFrom: '本地数据(未配置API)'
-		}
-	}
-
-	try {
-		console.log('🔍 开始调用天行数据API...')
-		console.log('请求生肖:', zodiac)
-		
-		// 调用天行数据API(使用Promise包装以捕获所有错误)
-		const [error, response] = await uni.request({
-			url: `${TIANAPI_CONFIG.BASE_URL}${TIANAPI_CONFIG.ENDPOINTS.zodiacFortune}`,
-			method: 'GET',
-			data: {
-				key: TIANAPI_CONFIG.API_KEY,
-				name: zodiac
-			},
-			timeout: 8000 // 8秒超时,给网络更多时间
-		}).then(res => [null, res]).catch(err => [err, null])
-
-		// 如果请求本身失败(网络错误等)
-		if (error) {
-			console.error('❌ 网络请求失败:', error)
-			throw new Error(`网络错误: ${error.errMsg || error.message || '未知错误'}`)
-		}
-
-		console.log('📡 API响应状态码:', response.statusCode)
-		console.log('📡 API响应数据:', response.data)
-
-		// 检查HTTP响应状态
-		if (!response || response.statusCode !== 200) {
-			console.error('❌ HTTP状态码异常:', response?.statusCode)
-			throw new Error(`HTTP错误: ${response?.statusCode || '无响应'}`)
-		}
-
-		const data = response.data
-
-		// 检查数据格式
-		if (!data || typeof data !== 'object') {
-			console.error('❌ 响应数据格式错误:', data)
-			throw new Error('响应数据格式不正确')
-		}
-
-		// 检查API业务状态码
-		if (data.code !== 200) {
-			console.error('❌ API业务错误:', {
-				code: data.code,
-				msg: data.msg
-			})
-			throw new Error(data.msg || `API错误(code: ${data.code})`)
-		}
-
-		// 检查result字段
-		const result = data.result
-		if (!result) {
-			console.error('❌ 缺少result数据')
-			throw new Error('API返回数据不完整')
-		}
-
-		console.log('✅ API调用成功,数据:', result)
-
-		// 天行数据返回格式转换为我们的格式
-		return {
-			overall: result.summary || '平稳',
-			love: parseFortune(result.love_txt),
-			career: parseFortune(result.work_txt),
-			wealth: parseFortune(result.money_txt),
-			health: parseFortune(result.health_txt),
-			tips: `幸运颜色:${result.color || '未知'},幸运数字:${result.number || '未知'}。${result.general_txt || ''}`,
-			luckyColor: result.color || zodiacUtil.getZodiacInfo(zodiac).luckyColor,
-			luckyNumber: result.number || zodiacUtil.getZodiacInfo(zodiac).luckyNumber,
-			source: 'tianapi',
-			dataFrom: '天行数据专业API',
-			updateTime: new Date().toLocaleString('zh-CN')
-		}
-
-	} catch (error) {
-		console.error('❌ 获取API数据失败,降级到本地数据')
-		console.error('错误详情:', error)
-		console.error('错误消息:', error.message || error.errMsg || '未知错误')
-		
-		// 显示友好提示(不打断用户)
-		uni.showToast({
-			title: '使用本地数据',
-			icon: 'none',
-			duration: 1500
-		})
-
-		// 降级到本地数据
-		return {
-			...zodiacUtil.getTodayFortune(zodiac),
-			source: 'local_fallback',
-			dataFrom: '本地数据(API暂不可用)',
-			updateTime: new Date().toLocaleString('zh-CN')
-		}
-	}
-	*/
 }
 
 /**
@@ -140,21 +32,10 @@ export async function getZodiacFortuneFromAPI(zodiac) {
  * @returns {Promise<Object>} 配对结果
  */
 export async function getZodiacMatch(myZodiac, targetZodiac) {
-	// 验证配置
-	if (!validateConfig()) {
-		console.log('API Key未配置,无法使用配对功能')
-		return null
-	}
+	
 
 	try {
-		console.log('🔍 开始调用生肖配对API...')
-		console.log('我的生肖:', myZodiac, '对方生肖:', targetZodiac)
-		console.log('请求URL:', `${TIANAPI_CONFIG.BASE_URL}${TIANAPI_CONFIG.ENDPOINTS.zodiacMatch}`)
-		console.log('请求参数:', {
-			key: TIANAPI_CONFIG.API_KEY ? TIANAPI_CONFIG.API_KEY.substring(0, 8) + '...' : '未配置',
-			me: myZodiac,
-			he: targetZodiac
-		})
+		
 		
 		// 使用Promise包装uni.request以更好地处理错误
 		const response = await new Promise((resolve, reject) => {
@@ -168,7 +49,7 @@ export async function getZodiacMatch(myZodiac, targetZodiac) {
 				},
 				timeout: 10000,
 				success: (res) => {
-					console.log('🌐 网络请求成功,原始响应:', res)
+					
 					resolve(res)
 				},
 				fail: (err) => {
@@ -178,12 +59,7 @@ export async function getZodiacMatch(myZodiac, targetZodiac) {
 			})
 		})
 
-		console.log('📡 配对API完整响应:', {
-			statusCode: response.statusCode,
-			data: response.data,
-			header: response.header,
-			cookies: response.cookies
-		})
+		
 		
 		// 检查响应是否存在
 		if (!response) {
@@ -219,7 +95,7 @@ export async function getZodiacMatch(myZodiac, targetZodiac) {
 			throw new Error('API返回结果为空')
 		}
 
-		console.log('✅ 配对查询成功,数据:', result)
+		
 		return {
 			title: result.title || '配对分析',
 			malePerspective: result.mcontent || '',      // 男性视角
@@ -328,7 +204,7 @@ export async function testAPIConnection() {
 	}
 
 	try {
-		console.log('🧪 开始测试API连接...')
+		
 		const result = await getZodiacFortuneFromAPI('鼠')
 		
 		// 检查是否真的是API数据
@@ -358,7 +234,7 @@ export async function testAPIConnection() {
  * 🔧 网络连接诊断工具
  */
 export async function diagnoseNetwork() {
-	console.log('🔧 开始网络诊断...')
+	
 	
 	const diagnostics = {
 		timestamp: new Date().toLocaleString('zh-CN'),
@@ -372,7 +248,7 @@ export async function diagnoseNetwork() {
 	
 	// 测试1: 基础网络连接
 	try {
-		console.log('📡 测试基础网络连接...')
+	
 		const testResponse = await new Promise((resolve, reject) => {
 			uni.request({
 				url: 'https://www.baidu.com',
@@ -388,7 +264,7 @@ export async function diagnoseNetwork() {
 			statusCode: testResponse.statusCode,
 			message: '网络连接正常'
 		}
-		console.log('✅ 基础网络连接正常')
+		
 	} catch (error) {
 		diagnostics.tests.basicNetwork = {
 			success: false,
@@ -400,7 +276,7 @@ export async function diagnoseNetwork() {
 	
 	// 测试2: HTTPS协议测试
 	try {
-		console.log('🔒 测试HTTPS协议支持...')
+		
 		const httpsResponse = await new Promise((resolve, reject) => {
 			uni.request({
 				url: 'https://httpbin.org/get',
@@ -416,7 +292,7 @@ export async function diagnoseNetwork() {
 			statusCode: httpsResponse.statusCode,
 			message: 'HTTPS协议支持正常'
 		}
-		console.log('✅ HTTPS协议支持正常')
+	
 	} catch (error) {
 		diagnostics.tests.httpsSupport = {
 			success: false,
@@ -428,7 +304,7 @@ export async function diagnoseNetwork() {
 	
 	// 测试3: 天行数据域名连通性
 	try {
-		console.log('🌐 测试天行数据域名连通性...')
+		
 		const tianApiResponse = await new Promise((resolve, reject) => {
 			uni.request({
 				url: 'https://apis.tianapi.com',
@@ -444,7 +320,7 @@ export async function diagnoseNetwork() {
 			statusCode: tianApiResponse.statusCode,
 			message: '天行数据域名可访问'
 		}
-		console.log('✅ 天行数据域名可访问')
+	
 	} catch (error) {
 		diagnostics.tests.tianApiDomain = {
 			success: false,
@@ -461,7 +337,7 @@ export async function diagnoseNetwork() {
  * 详细的API诊断工具
  */
 export async function diagnoseAPI() {
-	console.log('🔧 开始API诊断...')
+	
 	
 	const diagnostics = {
 		config: {
@@ -476,7 +352,7 @@ export async function diagnoseAPI() {
 	
 	// 测试基础网络连接
 	try {
-		console.log('📡 测试网络连接...')
+		
 		const testUrl = `${TIANAPI_CONFIG.BASE_URL}${TIANAPI_CONFIG.ENDPOINTS.zodiac}`
 		diagnostics.network.testUrl = testUrl
 		
@@ -494,8 +370,7 @@ export async function diagnoseAPI() {
 		diagnostics.network.statusCode = response.statusCode
 		diagnostics.apiResponse = response.data
 		
-		console.log('✅ 网络连接成功')
-		console.log('响应:', response.data)
+	
 		
 	} catch (error) {
 		diagnostics.network.success = false

+ 0 - 556
LiangZhiYUMao/八字API配置助手.html

@@ -1,556 +0,0 @@
-<!DOCTYPE html>
-<html lang="zh-CN">
-<head>
-    <meta charset="UTF-8">
-    <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <title>八字API配置助手</title>
-    <style>
-        * {
-            margin: 0;
-            padding: 0;
-            box-sizing: border-box;
-        }
-        
-        body {
-            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
-            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
-            min-height: 100vh;
-            padding: 20px;
-        }
-        
-        .container {
-            max-width: 1200px;
-            margin: 0 auto;
-            background: rgba(255, 255, 255, 0.95);
-            border-radius: 16px;
-            padding: 30px;
-            box-shadow: 0 20px 40px rgba(0,0,0,0.1);
-        }
-        
-        .header {
-            text-align: center;
-            margin-bottom: 40px;
-        }
-        
-        .header h1 {
-            font-size: 2.5rem;
-            color: #333;
-            margin-bottom: 10px;
-        }
-        
-        .header p {
-            color: #666;
-            font-size: 1.1rem;
-        }
-        
-        .api-grid {
-            display: grid;
-            grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
-            gap: 20px;
-            margin-bottom: 40px;
-        }
-        
-        .api-card {
-            background: #fff;
-            border-radius: 12px;
-            padding: 25px;
-            box-shadow: 0 8px 16px rgba(0,0,0,0.1);
-            border: 2px solid transparent;
-            transition: all 0.3s ease;
-            cursor: pointer;
-        }
-        
-        .api-card:hover {
-            transform: translateY(-5px);
-            box-shadow: 0 15px 30px rgba(0,0,0,0.15);
-        }
-        
-        .api-card.selected {
-            border-color: #667eea;
-            background: linear-gradient(135deg, #f8f9ff 0%, #e8f0ff 100%);
-        }
-        
-        .api-card .title {
-            display: flex;
-            align-items: center;
-            margin-bottom: 15px;
-        }
-        
-        .api-card .icon {
-            font-size: 2rem;
-            margin-right: 12px;
-        }
-        
-        .api-card .name {
-            font-size: 1.3rem;
-            font-weight: bold;
-            color: #333;
-        }
-        
-        .api-card .badge {
-            margin-left: auto;
-            padding: 4px 12px;
-            border-radius: 20px;
-            font-size: 0.8rem;
-            color: #fff;
-        }
-        
-        .badge.recommended { background: #4CAF50; }
-        .badge.enterprise { background: #FF9800; }
-        .badge.free { background: #2196F3; }
-        
-        .api-info {
-            margin-bottom: 15px;
-        }
-        
-        .price {
-            font-size: 1.5rem;
-            font-weight: bold;
-            color: #667eea;
-            margin-bottom: 8px;
-        }
-        
-        .description {
-            color: #666;
-            margin-bottom: 15px;
-            line-height: 1.5;
-        }
-        
-        .features {
-            list-style: none;
-        }
-        
-        .features li {
-            display: flex;
-            align-items: center;
-            margin-bottom: 5px;
-            color: #555;
-        }
-        
-        .features li::before {
-            content: "✅";
-            margin-right: 8px;
-        }
-        
-        .pros-cons {
-            margin-top: 15px;
-            font-size: 0.9rem;
-        }
-        
-        .pros {
-            color: #4CAF50;
-            margin-bottom: 5px;
-        }
-        
-        .cons {
-            color: #FF5722;
-        }
-        
-        .config-section {
-            background: #f8f9fa;
-            border-radius: 12px;
-            padding: 30px;
-            margin-top: 30px;
-        }
-        
-        .config-section h2 {
-            color: #333;
-            margin-bottom: 20px;
-        }
-        
-        .form-group {
-            margin-bottom: 20px;
-        }
-        
-        .form-group label {
-            display: block;
-            font-weight: bold;
-            margin-bottom: 8px;
-            color: #555;
-        }
-        
-        .form-group input,
-        .form-group select {
-            width: 100%;
-            padding: 12px;
-            border: 2px solid #ddd;
-            border-radius: 8px;
-            font-size: 1rem;
-            transition: border-color 0.3s;
-        }
-        
-        .form-group input:focus,
-        .form-group select:focus {
-            outline: none;
-            border-color: #667eea;
-        }
-        
-        .generated-config {
-            background: #2d3748;
-            color: #e2e8f0;
-            padding: 20px;
-            border-radius: 8px;
-            font-family: 'Monaco', 'Menlo', monospace;
-            font-size: 0.9rem;
-            line-height: 1.5;
-            margin-top: 20px;
-            overflow-x: auto;
-        }
-        
-        .buttons {
-            text-align: center;
-            margin-top: 30px;
-        }
-        
-        .btn {
-            display: inline-block;
-            padding: 12px 30px;
-            margin: 0 10px;
-            border: none;
-            border-radius: 8px;
-            font-size: 1rem;
-            font-weight: bold;
-            cursor: pointer;
-            transition: all 0.3s;
-            text-decoration: none;
-        }
-        
-        .btn-primary {
-            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
-            color: #fff;
-        }
-        
-        .btn-primary:hover {
-            transform: translateY(-2px);
-            box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
-        }
-        
-        .btn-secondary {
-            background: #6c757d;
-            color: #fff;
-        }
-        
-        .tips {
-            background: #e8f4f8;
-            border-left: 4px solid #2196F3;
-            padding: 20px;
-            margin-top: 30px;
-            border-radius: 8px;
-        }
-        
-        .tips h3 {
-            color: #2196F3;
-            margin-bottom: 15px;
-        }
-        
-        .tips ul {
-            padding-left: 20px;
-        }
-        
-        .tips li {
-            margin-bottom: 8px;
-            line-height: 1.5;
-        }
-    </style>
-</head>
-<body>
-    <div class="container">
-        <div class="header">
-            <h1>🔮 八字API配置助手</h1>
-            <p>选择最适合您项目的专业八字API接口</p>
-        </div>
-        
-        <div class="api-grid">
-            <!-- 极速数据 -->
-            <div class="api-card" data-api="JISU_API">
-                <div class="title">
-                    <span class="icon">🥇</span>
-                    <span class="name">极速数据</span>
-                    <span class="badge recommended">推荐</span>
-                </div>
-                <div class="api-info">
-                    <div class="price">0.01元/次</div>
-                    <div class="description">性价比之王,新用户100次免费</div>
-                    <ul class="features">
-                        <li>精确四柱计算</li>
-                        <li>完整纳音五行</li>
-                        <li>节气准确对应</li>
-                        <li>响应速度快</li>
-                    </ul>
-                    <div class="pros-cons">
-                        <div class="pros">✅ 价格便宜,功能齐全</div>
-                        <div class="cons">❌ 高级分析功能较少</div>
-                    </div>
-                </div>
-            </div>
-            
-            <!-- 聚合数据 -->
-            <div class="api-card" data-api="JUHE_API">
-                <div class="title">
-                    <span class="icon">🏢</span>
-                    <span class="name">聚合数据</span>
-                    <span class="badge">全面</span>
-                </div>
-                <div class="api-info">
-                    <div class="price">0.02元/次</div>
-                    <div class="description">功能全面,分析详细</div>
-                    <ul class="features">
-                        <li>详细性格分析</li>
-                        <li>运势预测</li>
-                        <li>婚配建议</li>
-                        <li>事业指导</li>
-                    </ul>
-                    <div class="pros-cons">
-                        <div class="pros">✅ 分析内容丰富</div>
-                        <div class="cons">❌ 价格略高</div>
-                    </div>
-                </div>
-            </div>
-            
-            <!-- 阿里云市场 -->
-            <div class="api-card" data-api="ALIYUN_API">
-                <div class="title">
-                    <span class="icon">🌟</span>
-                    <span class="name">阿里云市场</span>
-                    <span class="badge enterprise">企业级</span>
-                </div>
-                <div class="api-info">
-                    <div class="price">0.015元/次</div>
-                    <div class="description">企业级稳定,技术支持好</div>
-                    <ul class="features">
-                        <li>99.9%可用性</li>
-                        <li>7x24技术支持</li>
-                        <li>SLA保障</li>
-                        <li>批量调用优化</li>
-                    </ul>
-                    <div class="pros-cons">
-                        <div class="pros">✅ 稳定可靠,支持好</div>
-                        <div class="cons">❌ 需要实名认证</div>
-                    </div>
-                </div>
-            </div>
-            
-            <!-- 开源方案 -->
-            <div class="api-card" data-api="OPEN_SOURCE">
-                <div class="title">
-                    <span class="icon">🆓</span>
-                    <span class="name">开源方案</span>
-                    <span class="badge free">免费</span>
-                </div>
-                <div class="api-info">
-                    <div class="price">0元</div>
-                    <div class="description">完全免费,功能基础</div>
-                    <ul class="features">
-                        <li>永久免费</li>
-                        <li>无调用限制</li>
-                        <li>代码可控</li>
-                        <li>离线使用</li>
-                    </ul>
-                    <div class="pros-cons">
-                        <div class="pros">✅ 零成本,可定制</div>
-                        <div class="cons">❌ 准确度相对较低</div>
-                    </div>
-                </div>
-            </div>
-        </div>
-        
-        <div class="config-section">
-            <h2>📝 配置生成器</h2>
-            
-            <div class="form-group">
-                <label for="selected-api">选择的API:</label>
-                <select id="selected-api">
-                    <option value="">请先选择上面的API卡片</option>
-                </select>
-            </div>
-            
-            <div class="form-group">
-                <label for="api-key">API Key:</label>
-                <input type="text" id="api-key" placeholder="请输入您的API Key">
-            </div>
-            
-            <div class="form-group">
-                <label for="strategy">选择策略:</label>
-                <select id="strategy">
-                    <option value="cost_first">成本优先</option>
-                    <option value="accuracy_first">准确度优先</option>
-                    <option value="speed_first">速度优先</option>
-                </select>
-            </div>
-            
-            <div class="form-group">
-                <label for="daily-budget">每日预算 (元):</label>
-                <input type="number" id="daily-budget" value="10" min="0" step="0.1">
-            </div>
-            
-            <div class="generated-config" id="generated-config">
-                <div style="color: #a0aec0;">// 请先选择API并填写配置信息</div>
-            </div>
-            
-            <div class="buttons">
-                <button class="btn btn-primary" onclick="generateConfig()">生成配置</button>
-                <button class="btn btn-secondary" onclick="copyConfig()">复制配置</button>
-            </div>
-        </div>
-        
-        <div class="tips">
-            <h3>💡 配置提示</h3>
-            <ul>
-                <li><strong>个人开发者</strong>:推荐选择极速数据,性价比最高</li>
-                <li><strong>小型企业</strong>:推荐聚合数据或阿里云市场</li>
-                <li><strong>大型企业</strong>:推荐阿里云市场,企业级支持</li>
-                <li><strong>预算有限</strong>:可以选择开源方案作为起步</li>
-                <li><strong>配置完成后</strong>:记得在小程序后台添加API域名到白名单</li>
-            </ul>
-        </div>
-    </div>
-    
-    <script>
-        const apiConfigs = {
-            JISU_API: {
-                name: '极速数据',
-                baseUrl: 'https://api.jisuapi.com',
-                endpoint: '/bazi/query',
-                keyParam: 'appkey',
-                domains: ['api.jisuapi.com']
-            },
-            JUHE_API: {
-                name: '聚合数据',
-                baseUrl: 'https://apis.juhe.cn',
-                endpoint: '/bazi/query',
-                keyParam: 'key',
-                domains: ['apis.juhe.cn']
-            },
-            ALIYUN_API: {
-                name: '阿里云市场',
-                baseUrl: 'https://xxxxxxx.market.alicloudapi.com',
-                endpoint: '/bazi',
-                keyParam: 'Authorization',
-                domains: ['*.market.alicloudapi.com']
-            },
-            OPEN_SOURCE: {
-                name: '开源方案',
-                baseUrl: 'local',
-                endpoint: 'lunar-javascript',
-                keyParam: 'none',
-                domains: []
-            }
-        }
-        
-        let selectedAPI = null;
-        
-        // API卡片点击事件
-        document.querySelectorAll('.api-card').forEach(card => {
-            card.addEventListener('click', () => {
-                // 移除其他选中状态
-                document.querySelectorAll('.api-card').forEach(c => c.classList.remove('selected'));
-                // 添加选中状态
-                card.classList.add('selected');
-                
-                selectedAPI = card.dataset.api;
-                const select = document.getElementById('selected-api');
-                select.innerHTML = `<option value="${selectedAPI}">${apiConfigs[selectedAPI].name}</option>`;
-                select.value = selectedAPI;
-                
-                generateConfig();
-            });
-        });
-        
-        // 生成配置代码
-        function generateConfig() {
-            if (!selectedAPI) {
-                document.getElementById('generated-config').innerHTML = 
-                    '<div style="color: #a0aec0;">// 请先选择API</div>';
-                return;
-            }
-            
-            const apiKey = document.getElementById('api-key').value || 'YOUR_API_KEY';
-            const strategy = document.getElementById('strategy').value;
-            const budget = document.getElementById('daily-budget').value;
-            
-            const config = apiConfigs[selectedAPI];
-            
-            let configCode = '';
-            
-            if (selectedAPI === 'OPEN_SOURCE') {
-                configCode = `// 开源方案配置 - lunar-javascript
-// 1. 安装依赖
-// npm install lunar-javascript
-
-// 2. 在页面中使用
-import { Solar } from 'lunar-javascript';
-
-// 八字计算示例
-function calculateBaziOpenSource(year, month, day, hour) {
-    const solar = Solar.fromYmdHms(year, month, day, hour, 0, 0);
-    const lunar = solar.getLunar();
-    const baZi = lunar.getEightChar();
-    
-    return {
-        year: baZi.getYear(),
-        month: baZi.getMonth(), 
-        day: baZi.getDay(),
-        hour: baZi.getTime(),
-        yearGanZhi: baZi.getYearInGanZhi(),
-        monthGanZhi: baZi.getMonthInGanZhi(),
-        dayGanZhi: baZi.getDayInGanZhi(),
-        hourGanZhi: baZi.getTimeInGanZhi()
-    };
-}`;
-            } else {
-                configCode = `// 配置文件:config/api-config.js
-export const BAZI_API_CONFIG = {
-    ${selectedAPI}: {
-        BASE_URL: '${config.baseUrl}',
-        API_KEY: '${apiKey}', // 请替换为您的真实API Key
-        ENDPOINTS: {
-            bazi: '${config.endpoint}'
-        },
-        PRIORITY: 1,
-        COST_PER_CALL: ${selectedAPI === 'JISU_API' ? '0.01' : selectedAPI === 'JUHE_API' ? '0.02' : '0.015'},
-        DESCRIPTION: '${config.name}'
-    },
-    
-    SETTINGS: {
-        ENABLE_VALIDATION: true,
-        AUTO_FAILOVER: true,
-        DAILY_BUDGET: ${budget},
-        STRATEGY: '${strategy}',
-        ENABLED_APIS: ['${selectedAPI}'],
-        TIMEOUT: 10000,
-        RETRY_COUNT: 2
-    }
-}
-
-// 小程序域名白名单配置
-// 需要在微信小程序后台添加以下域名:
-${config.domains.map(domain => `// ${domain}`).join('\n')}`;
-            }
-            
-            document.getElementById('generated-config').innerHTML = configCode;
-        }
-        
-        // 复制配置代码
-        function copyConfig() {
-            const configText = document.getElementById('generated-config').textContent;
-            navigator.clipboard.writeText(configText).then(() => {
-                alert('配置代码已复制到剪贴板!');
-            }).catch(() => {
-                // 降级方案
-                const textArea = document.createElement('textarea');
-                textArea.value = configText;
-                document.body.appendChild(textArea);
-                textArea.select();
-                document.execCommand('copy');
-                document.body.removeChild(textArea);
-                alert('配置代码已复制到剪贴板!');
-            });
-        }
-        
-        // 监听输入变化
-        document.getElementById('api-key').addEventListener('input', generateConfig);
-        document.getElementById('strategy').addEventListener('change', generateConfig);
-        document.getElementById('daily-budget').addEventListener('input', generateConfig);
-    </script>
-</body>
-</html>

+ 1 - 1
gateway/src/main/resources/application.yml

@@ -134,7 +134,7 @@ spring:
         - id: essential-route
           uri: http://localhost:1005
           predicates:
-            - Path=/api/user/**, /api/checkin/**, /api/vip/**, /api/activity-order/**, /api/activity-registration/**
+            - Path=/api/user/**, /api/checkin/**, /api/vip/**, /api/activity-order/**, /api/activity-registration/**, /api/avatar/**
           filters:
             - StripPrefix=0
         

+ 68 - 68
marriageAdmin-vue/src/config/api.js

@@ -4,46 +4,46 @@
 
 // API 基础地址配置
 // 开发环境使用Vite代理,生产环境使用实际地址
-export const API_BASE_URL = import.meta.env.DEV ? '' : 'http://admin.zhongruanke.cn'
+export const API_BASE_URL = import.meta.env.DEV ? '' : 'https:/api.zhongruanke.cn'
 
 // API 端点配置
 export const API_ENDPOINTS = {
   // 认证相关
-  LOGIN: '/api/admin/auth/login',
-  LOGOUT: '/api/admin/auth/logout',
-  GET_USER_INFO: '/api/admin/auth/userInfo',
+  LOGIN: '/admin/auth/login',
+  LOGOUT: '/admin/auth/logout',
+  GET_USER_INFO: '/admin/auth/userInfo',
   
   // 管理员管理
-  ADMIN_USER_LIST: '/api/admin/admin-user/list',
-  ADMIN_USER_DETAIL: '/api/admin/admin-user/detail',
-  ADMIN_USER_REGISTER: '/api/admin/admin-user/register',
-  ADMIN_USER_UPDATE: '/api/admin/admin-user/update',
-  ADMIN_USER_DELETE: '/api/admin/admin-user/delete',
-  ADMIN_USER_DISABLE: '/api/admin/admin-user/disable',
-  ADMIN_USER_ENABLE: '/api/admin/admin-user/enable',
-  ADMIN_USER_ROLES: '/api/admin/admin-user/roles',
-  ADMIN_USER_CURRENT_PROFILE: '/api/admin/admin-user/current-profile',
-  ADMIN_USER_UPDATE_CURRENT_PROFILE: '/api/admin/admin-user/current-profile',
-  ADMIN_USER_UPDATE_CURRENT_PASSWORD: '/api/admin/admin-user/current-password',
+  ADMIN_USER_LIST: '/admin/admin-user/list',
+  ADMIN_USER_DETAIL: '/admin/admin-user/detail',
+  ADMIN_USER_REGISTER: '/admin/admin-user/register',
+  ADMIN_USER_UPDATE: '/admin/admin-user/update',
+  ADMIN_USER_DELETE: '/admin/admin-user/delete',
+  ADMIN_USER_DISABLE: '/admin/admin-user/disable',
+  ADMIN_USER_ENABLE: '/admin/admin-user/enable',
+  ADMIN_USER_ROLES: '/admin/admin-user/roles',
+  ADMIN_USER_CURRENT_PROFILE: '/admin/admin-user/current-profile',
+  ADMIN_USER_UPDATE_CURRENT_PROFILE: '/admin/admin-user/current-profile',
+  ADMIN_USER_UPDATE_CURRENT_PASSWORD: '/admin/admin-user/current-password',
   
   // 轮播图管理
-  BANNER_LIST: '/api/admin/banner/list',
-  BANNER_DETAIL: '/api/admin/banner/detail',
-  BANNER_CREATE: '/api/admin/banner/create',
-  BANNER_UPDATE: '/api/admin/banner/update',
-  BANNER_DELETE: '/api/admin/banner/delete',
-  BANNER_UPLOAD: '/api/admin/banner/upload',
+  BANNER_LIST: '/admin/banner/list',
+  BANNER_DETAIL: '/admin/banner/detail',
+  BANNER_CREATE: '/admin/banner/create',
+  BANNER_UPDATE: '/admin/banner/update',
+  BANNER_DELETE: '/admin/banner/delete',
+  BANNER_UPLOAD: '/admin/banner/upload',
   
   // 活动管理
   ACTIVITY_LIST: '/api/activity/list',
   ACTIVITY_DETAIL: '/api/activity/detail',
-  ACTIVITY_CREATE: '/api/admin/activity/create',
-  ACTIVITY_UPDATE: '/api/admin/activity/update',
-  ACTIVITY_DELETE: '/api/admin/activity/delete',
-  ACTIVITY_REGISTRATIONS: '/api/admin/activity/registration/list',
-  ACTIVITY_REGISTRATION_STATS: '/api/admin/activity/registration/stats',
-  ACTIVITY_REGISTRATION_EXPORT: '/api/admin/activity/registration/export',
-  ACTIVITY_STATS: '/api/admin/activity/stats',
+  ACTIVITY_CREATE: '/admin/activity/create',
+  ACTIVITY_UPDATE: '/admin/activity/update',
+  ACTIVITY_DELETE: '/admin/activity/delete',
+  ACTIVITY_REGISTRATIONS: '/admin/activity/registration/list',
+  ACTIVITY_REGISTRATION_STATS: '/admin/activity/registration/stats',
+  ACTIVITY_REGISTRATION_EXPORT: '/admin/activity/registration/export',
+  ACTIVITY_STATS: '/admin/activity/stats',
   
   // 红娘管理
   MATCHMAKER_LIST: '/api/matchmaker/list',
@@ -52,33 +52,33 @@ export const API_ENDPOINTS = {
   MATCHMAKER_UPDATE: '/api/matchmaker/update',
   MATCHMAKER_DELETE: '/api/matchmaker/delete',
   MATCHMAKER_STATS: '/api/matchmaker/stats',
-  MATCHMAKER_EXPORT: '/api/admin/matchmaker/export',
-  MATCHMAKER_AUDIT_LIST: '/api/admin/marr-apply/list',
-  MATCHMAKER_AUDIT_APPROVE: '/api/admin/marr-apply/approve',
-  MATCHMAKER_AUDIT_BATCH_APPROVE: '/api/admin/marr-apply/batch-approve',
-  MATCHMAKER_AUDIT_DELETE: '/api/admin/marr-apply/delete',
-  SUCCESS_CASE_UPLOAD_LIST: '/api/admin/success-case-upload/list',
-  SUCCESS_CASE_UPLOAD_DETAIL: '/api/admin/success-case-upload',
-  SUCCESS_CASE_UPLOAD_APPROVE: '/api/admin/success-case-upload/approve',
-  SUCCESS_CASE_UPLOAD_REJECT: '/api/admin/success-case-upload/reject',
+  MATCHMAKER_EXPORT: '/admin/matchmaker/export',
+  MATCHMAKER_AUDIT_LIST: '/admin/marr-apply/list',
+  MATCHMAKER_AUDIT_APPROVE: '/admin/marr-apply/approve',
+  MATCHMAKER_AUDIT_BATCH_APPROVE: '/admin/marr-apply/batch-approve',
+  MATCHMAKER_AUDIT_DELETE: '/admin/marr-apply/delete',
+  SUCCESS_CASE_UPLOAD_LIST: '/admin/success-case-upload/list',
+  SUCCESS_CASE_UPLOAD_DETAIL: '/admin/success-case-upload',
+  SUCCESS_CASE_UPLOAD_APPROVE: '/admin/success-case-upload/approve',
+  SUCCESS_CASE_UPLOAD_REJECT: '/admin/success-case-upload/reject',
   
   // 积分订单管理
-  POINTS_ORDER_LIST: '/api/admin/points-order/list',
-  POINTS_ORDER_DETAIL: '/api/admin/points-order',
-  POINTS_ORDER_REVIEW: '/api/admin/points-order/review',
-  POINTS_ORDER_DELETE: '/api/admin/points-order',
+  POINTS_ORDER_LIST: '/admin/points-order/list',
+  POINTS_ORDER_DETAIL: '/admin/points-order',
+  POINTS_ORDER_REVIEW: '/admin/points-order/review',
+  POINTS_ORDER_DELETE: '/admin/points-order',
   
   // 线索管理
-  MY_RESOURCE_LIST: '/api/admin/my-resource/list',
-  MY_RESOURCE_DETAIL: '/api/admin/my-resource',
-  MY_RESOURCE_AUDIT: '/api/admin/my-resource',
+  MY_RESOURCE_LIST: '/admin/my-resource/list',
+  MY_RESOURCE_DETAIL: '/admin/my-resource',
+  MY_RESOURCE_AUDIT: '/admin/my-resource',
   
   // 课程管理
   COURSE_LIST: '/api/course/list',
   COURSE_DETAIL: '/api/course/detail',
-  COURSE_CREATE: '/api/course/api/admin/create',
-  COURSE_UPDATE: '/api/course/api/admin/update',
-  COURSE_DELETE: '/api/course/api/admin/delete',
+  COURSE_CREATE: '/api/course/admin/create',
+  COURSE_UPDATE: '/api/course/admin/update',
+  COURSE_DELETE: '/api/course/admin/delete',
   
   // 成功案例管理
   CASE_LIST: '/api/case/list',
@@ -89,36 +89,36 @@ export const API_ENDPOINTS = {
   CASE_TIMELINE: '/api/case/timeline',
   
   // 用户管理
-  USER_LIST: '/api/admin/user/list',
-  USER_DETAIL: '/api/admin/user/detail',
-  USER_UPDATE: '/api/admin/user/update',
-  USER_STATS: '/api/admin/user/stats',
-  USER_VIP_LIST: '/api/admin/user/vip/list',
-  USER_EXPORT: '/api/admin/user/export',
+  USER_LIST: '/admin/user/list',
+  USER_DETAIL: '/admin/user/detail',
+  USER_UPDATE: '/admin/user/update',
+  USER_STATS: '/admin/user/stats',
+  USER_VIP_LIST: '/admin/user/vip/list',
+  USER_EXPORT: '/admin/user/export',
   // VIP 与系统消息
-  USER_VIP_REMIND: '/api/admin/user/vip/remind',
+  USER_VIP_REMIND: '/admin/user/vip/remind',
   
   // 动态管理
-  DYNAMIC_LIST: '/api/admin/dynamic/list',
-  DYNAMIC_DETAIL: '/api/admin/dynamic/detail',
-  DYNAMIC_AUDIT: '/api/admin/dynamic/audit',
-  DYNAMIC_DELETE: '/api/admin/dynamic/delete',
+  DYNAMIC_LIST: '/admin/dynamic/list',
+  DYNAMIC_DETAIL: '/admin/dynamic/detail',
+  DYNAMIC_AUDIT: '/admin/dynamic/audit',
+  DYNAMIC_DELETE: '/admin/dynamic/delete',
 
   // 举报管理(管理端)
-  REPORT_LIST: '/api/admin/report/list',
-  REPORT_DETAIL: '/api/admin/report/detail',
-  REPORT_HANDLE: '/api/admin/report/handle',
+  REPORT_LIST: '/admin/report/list',
+  REPORT_DETAIL: '/admin/report/detail',
+  REPORT_HANDLE: '/admin/report/handle',
   
   // 数据统计
-  DASHBOARD_STATS: '/api/admin/dashboard/stats',
-  DASHBOARD_RECENT_ACTIVITIES: '/api/admin/dashboard/recent-activities',
-  DASHBOARD_USER_TREND: '/api/admin/dashboard/user-trend',
-  DASHBOARD_ACTIVITY_TREND: '/api/admin/dashboard/activity-trend',
-  DASHBOARD_REVENUE_TREND: '/api/admin/dashboard/revenue-trend',
+  DASHBOARD_STATS: '/admin/dashboard/stats',
+  DASHBOARD_RECENT_ACTIVITIES: '/admin/dashboard/recent-activities',
+  DASHBOARD_USER_TREND: '/admin/dashboard/user-trend',
+  DASHBOARD_ACTIVITY_TREND: '/admin/dashboard/activity-trend',
+  DASHBOARD_REVENUE_TREND: '/admin/dashboard/revenue-trend',
   
   // 文件上传
-  UPLOAD_IMAGE: '/api/admin/upload/image',
-  UPLOAD_FILE: '/api/admin/upload/file',
+  UPLOAD_IMAGE: '/admin/upload/image',
+  UPLOAD_FILE: '/admin/upload/file',
   
   // 城市管理
   CITY_LIST: '/api/recommend/area/cities',

+ 30 - 1
marriageAdmin-vue/src/views/activity/ActivityRegistrations.vue

@@ -241,7 +241,7 @@ const getCheckInStatusType = (status) => {
 // 签到
 const handleCheckIn = async (row) => {
   try {
-    const response = await request.post(`/admin/activity/check-in`, {
+    const response = await request.post(`/api/admin/activity/check-in`, {
       activityId: activityId.value,
       userId: row.userId
     })
@@ -257,6 +257,35 @@ const handleCheckIn = async (row) => {
   }
 }
 
+// 取消报名
+const handleCancelRegistration = async (row) => {
+  try {
+    await ElMessageBox.confirm('确定要取消此用户的报名吗?', '提示', {
+      confirmButtonText: '确定',
+      cancelButtonText: '取消',
+      type: 'warning'
+    })
+    
+    const response = await request.delete(`/api/admin/activity/cancel-registration`, {
+      params: {
+        activityId: activityId.value,
+        userId: row.userId
+      }
+    })
+    
+    if (response.code === 200) {
+      ElMessage.success('取消报名成功')
+      // 重新加载列表和统计数据
+      await loadRegistrationList()
+      await loadStats()
+    }
+  } catch (error) {
+    if (error !== 'cancel') {
+      console.error('取消报名失败:', error)
+    }
+  }
+}
+
 // 导出数据
 const handleExport = async () => {
   try {

+ 1 - 1
marriageAdmin-vue/src/views/report/ReportList.vue

@@ -596,7 +596,7 @@ const submitModerate = async () => {
   if (!moderateDialog.form.reason.trim()) return ElMessage.error('请填写处理原因')
   moderateDialog.loading = true
   try {
-    const res = await request.post('/api/dynamic/admin/moderate', null, {
+    const res = await request.post('/api/dynamic/api/admin/moderate', null, {
       params: { dynamicId: moderateDialog.form.dynamicId, action: moderateDialog.action, reason: moderateDialog.form.reason }
     })
     if (res.code === 200) {

+ 3 - 3
marriageAdmin-vue/✅ Dashboard所有问题修复总结.md

@@ -235,7 +235,7 @@ onMounted(async () => {
 这不是样式问题,可能原因:
 
 1. **后端 API 未返回数据**
-   - 检查 `/admin/dashboard/stats` 接口
+   - 检查 `/api/admin/dashboard/stats` 接口
    - 查看 Network 标签页的响应
 
 2. **数据库中没有数据**
@@ -251,8 +251,8 @@ onMounted(async () => {
 可能原因:
 
 1. **后端 API 返回错误**
-   - 检查 `/admin/dashboard/user-trend` 接口
-   - 检查 `/admin/dashboard/activity-stats` 接口
+   - 检查 `/api/admin/dashboard/user-trend` 接口
+   - 检查 `/api/admin/dashboard/activity-stats` 接口
 
 2. **数据格式不正确**
    - 后端应返回 `{ dates: [], counts: [] }` 格式

+ 2 - 2
marriageAdmin-vue/✅ Dashboard数据显示问题已修复.md

@@ -109,7 +109,7 @@
 统计数据通过后端 API 获取:
 ```javascript
 const loadStats = async () => {
-  const response = await request.get('/admin/dashboard/stats')
+  const response = await request.get('/api/admin/dashboard/stats')
   if (response.code === 200) {
     stats.value = {
       totalUsers: response.data.totalUsers || 0,
@@ -124,7 +124,7 @@ const loadStats = async () => {
 ### 如果数据仍然显示 0
 
 1. **检查后端 API**
-   - 确保 `/admin/dashboard/stats` 接口正常
+   - 确保 `/api/admin/dashboard/stats` 接口正常
    - 检查返回的数据格式
 
 2. **查看控制台**

+ 55 - 39
service/Essential/src/main/java/com/zhentao/controller/AvatarUploadController.java

@@ -1,17 +1,19 @@
 package com.zhentao.controller;
 
+import cn.hutool.core.lang.UUID;
 import com.zhentao.common.Result;
 import com.zhentao.service.UserService;
+import io.minio.BucketExistsArgs;
+import io.minio.MakeBucketArgs;
+import io.minio.MinioClient;
+import io.minio.PutObjectArgs;
+import io.minio.errors.MinioException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
-import java.io.File;
-import java.io.IOException;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
+import java.io.InputStream;
 
 /**
  * 头像上传控制器(本地文件存储)
@@ -22,12 +24,15 @@ public class AvatarUploadController {
     
     @Autowired
     private UserService userService;
-    
-    @Value("${avatar.upload.path}")
-    private String uploadPath;
-    
-    @Value("${avatar.url.prefix}")
+
+    @Value("${minio.bucket-name}")
+    private String minioBucketName;
+
+    @Value("https://api.zhongruanke.cn/minio/")
     private String urlPrefix;
+
+    @Autowired
+    private MinioClient minioClient;
     
     /**
      * 上传用户头像(本地文件存储)
@@ -39,68 +44,79 @@ public class AvatarUploadController {
     public Result<String> uploadAvatar(
             @RequestParam("file") MultipartFile file,
             @RequestParam("userId") Long userId) {
-        
-        System.out.println("=== 接收头像上传请求(本地存储)===");
+
+
+        System.out.println("=== 接收头像上传请求(MinIO 存储)===");
         System.out.println("用户ID: " + userId);
         System.out.println("文件名: " + file.getOriginalFilename());
         System.out.println("文件大小: " + file.getSize() + " bytes");
-        System.out.println("上传路径: " + uploadPath);
+        System.out.println("MinIO 桶名: " + minioBucketName);
         System.out.println("URL前缀: " + urlPrefix);
-        
+
         try {
-            // 1. 验证文件
+            // 1. 基础验证
             if (file.isEmpty()) {
                 return Result.error("文件不能为空");
             }
-            
+
             // 2. 验证文件类型
             String contentType = file.getContentType();
             if (contentType == null || !contentType.startsWith("image/")) {
                 return Result.error("只能上传图片文件");
             }
-            
+
             // 3. 验证文件大小(不超过5MB)
             long maxSize = 5 * 1024 * 1024; // 5MB
             if (file.getSize() > maxSize) {
                 return Result.error("图片大小不能超过5MB");
             }
-            
-            // 4. 生成唯一文件名
+
+            // 4. 生成唯一文件名(避免重复)
             String originalFilename = file.getOriginalFilename();
             String suffix = originalFilename.substring(originalFilename.lastIndexOf("."));
-            String fileName = "avatar_" + userId + "_" + System.currentTimeMillis() + suffix;
-            System.out.println("生成文件名: " + fileName);
-            
-            // 5. 确保上传目录存在
-            File uploadDir = new File(uploadPath);
-            if (!uploadDir.exists()) {
-                boolean created = uploadDir.mkdirs();
-                System.out.println("创建上传目录: " + uploadPath + ", 结果: " + created);
+            // 使用 UUID + 时间戳 增强唯一性,避免并发问题
+            String fileName = "avatar_" + userId + "_" + System.currentTimeMillis() + "_" + UUID.randomUUID() + suffix;
+            System.out.println("生成 MinIO 存储文件名: " + fileName);
+
+            // 5. 检查并创建 MinIO 桶(若不存在)
+            if (!minioClient.bucketExists(BucketExistsArgs.builder().bucket(minioBucketName).build())) {
+                minioClient.makeBucket(MakeBucketArgs.builder().bucket(minioBucketName).build());
+                System.out.println("创建 MinIO 桶: " + minioBucketName);
+            }
+
+            // 6. 上传文件到 MinIO
+            try (InputStream inputStream = file.getInputStream()) {
+                minioClient.putObject(
+                        PutObjectArgs.builder()
+                                .bucket(minioBucketName)          // 桶名
+                                .object(fileName)                  // 存储对象名(即文件名)
+                                .stream(inputStream, file.getSize(), -1) // 文件流 + 大小
+                                .contentType(contentType)          // 文件类型
+                                .build()
+                );
+                System.out.println("文件已上传至 MinIO: " + minioBucketName + "/" + fileName);
             }
-            
-            // 6. 保存文件到本地
-            Path filePath = Paths.get(uploadPath, fileName);
-            Files.write(filePath, file.getBytes());
-            System.out.println("文件已保存到: " + filePath.toAbsolutePath());
-            
+
             // 7. 生成访问URL
             String avatarUrl = urlPrefix + fileName;
             System.out.println("生成访问URL: " + avatarUrl);
-            
+
             // 8. 更新数据库中的头像URL
             boolean success = userService.updateAvatarUrl(userId, avatarUrl);
             if (!success) {
                 System.err.println("❌ 数据库更新失败");
+                // 可选:若数据库更新失败,删除 MinIO 中已上传的文件
+                // minioClient.removeObject(RemoveObjectArgs.builder().bucket(minioBucketName).object(fileName).build());
                 return Result.error("更新头像失败");
             }
-            
+
             System.out.println("✅ 头像上传成功!");
             return Result.success("头像上传成功", avatarUrl);
-            
-        } catch (IOException e) {
-            System.err.println("❌ 文件保存失败: " + e.getMessage());
+
+        } catch (MinioException e) {
+            System.err.println("❌ MinIO 操作失败: " + e.getMessage());
             e.printStackTrace();
-            return Result.error("文件保存失败: " + e.getMessage());
+            return Result.error("文件上传至 MinIO 失败: " + e.getMessage());
         } catch (Exception e) {
             System.err.println("❌ 上传失败: " + e.getMessage());
             e.printStackTrace();

+ 2 - 2
service/Essential/src/main/java/com/zhentao/service/impl/ActivityOrderServiceImpl.java

@@ -145,7 +145,7 @@ public class ActivityOrderServiceImpl implements ActivityOrderService {
         request.setBody("活动报名-" + activityName);
         request.setTotalFee(price.multiply(new BigDecimal("100")).intValue());
         request.setSpbillCreateIp("127.0.0.1");
-        request.setNotifyUrl("https://mini.workervip.com/api/activity-order/notify");
+        request.setNotifyUrl("https://api.zhongruanke.cn/api/activity-order/notify");
         request.setTradeType("JSAPI");
         request.setOpenid(user.getWechatOpenid());
         return request;
@@ -189,7 +189,7 @@ public class ActivityOrderServiceImpl implements ActivityOrderService {
         payConfig.setAppId(wxConfig.getAppId());
         payConfig.setMchId(wxConfig.getMchId());
         payConfig.setMchKey("7f633cbabd894b4d213bc6edffe3b119");
-        payConfig.setNotifyUrl("https://mini.workervip.com/api/activity-order/notify");
+        payConfig.setNotifyUrl("https://api.zhongruanke.cn/api/activity-order/notify");
         return payConfig;
     }
 }

+ 4 - 1
service/Essential/src/main/resources/application.yml

@@ -75,6 +75,9 @@ minio:
   accessKey: minioadmin
   secretKey: minioadmin123
   bucketName: dynamic-comments
+  accessKey_acater: minioadmin
+  secretKey_acater: minioadmin123
+  bucketName_acater: avatar-bucket
 
 # 头像本地存储配置
 avatar:
@@ -95,4 +98,4 @@ wx:
     mchId: 1727663839               # 替换为你的商户号
     privateKeyPath: /path/to/apiclient_key.pem  # 私钥文件路径
     apiV3Key: d82ce405f04a47de14382bef4180239d      # 替换为你的APIv3密钥
-    notifyUrl: https://your-domain.com/api/vip/pay/notify # 支付回调地址
+    notifyUrl: https://api.zhongruanke.cn/api/vip/pay/notify # 支付回调地址

+ 1 - 1
service/dynamic/src/main/java/com/zhentao/service/impl/MediaUploadServiceImpl.java

@@ -24,7 +24,7 @@ public class MediaUploadServiceImpl implements MediaUploadService {
     @Autowired
     private MinioClient minioClient;
 
-    @Value("${minio.endpoint}")
+    @Value("https://api.zhongruanke.cn/minio")
     private String endpoint;
 
     @Value("${minio.bucketName}")

+ 2 - 5
service/login/src/main/java/com/zhentao/controller/AuthCodeController.java

@@ -13,10 +13,7 @@ import com.zhentao.util.JwtUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
 import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import java.util.Date;
 import java.util.HashMap;
@@ -24,7 +21,7 @@ import java.util.Map;
 
 @RestController
 @RequestMapping("/api/login")
-//@CrossOrigin
+@CrossOrigin
 // 在 Redis 启用时加载该控制器;不依赖数据库
 @ConditionalOnProperty(prefix = "redis", name = "enabled", havingValue = "true", matchIfMissing = true)
 public class AuthCodeController {