Просмотр исходного кода

图片已上传minio 可以进行真机测试

YH_0525 1 месяц назад
Родитель
Сommit
a8cb7dad4a

+ 2 - 2
LiangZhiYUMao/config/index.js

@@ -28,12 +28,12 @@ export const THEME_COLORS = {
 
 // 默认图片
 export const DEFAULT_IMAGES = {
-  avatar: '/static/default-avatar.svg',
+  avatar: 'http://115.190.125.125:9001/static-images/default-avatar.svg',
   banner: 'https://images.unsplash.com/photo-1522673607200-164d1b6ce486?w=750&h=360&fit=crop',
   couple: 'https://images.unsplash.com/photo-1516589178581-6cd7833ae3b2?w=520&h=360&fit=crop',
   activity: 'https://images.unsplash.com/photo-1511632765486-a01980e01a18?w=750&h=400&fit=crop',
   course: 'https://images.unsplash.com/photo-1522202176988-66273c2fd55f?w=750&h=400&fit=crop',
-  placeholder: '/static/default-avatar.svg'
+  placeholder: 'http://115.190.125.125:9001/static-images/default-avatar.svg'
 }
 
 // 活动类型

+ 4 - 4
LiangZhiYUMao/pages/activities/detail.vue

@@ -134,7 +134,7 @@
 			// 验证并修正图片URL
 			validateImageUrl(url) {
 				if (!url || url === 'null' || url === 'undefined') {
-					return DEFAULT_IMAGES.activity || '/static/default-activity.jpg'
+					return DEFAULT_IMAGES.activity || 'http://115.190.125.125:9001/static-images/login-bg.png'
 				}
 
 				let cleanedUrl = String(url).trim()
@@ -144,7 +144,7 @@
 				}
 
 				if (!cleanedUrl) {
-					return DEFAULT_IMAGES.activity || '/static/default-activity.jpg'
+					return DEFAULT_IMAGES.activity || 'http://115.190.125.125:9001/static-images/login-bg.png'
 				}
 				
 				// 如果是相对路径,添加协议和域名
@@ -158,7 +158,7 @@
 				}
 				
 				// 其他情况返回默认图片
-				return DEFAULT_IMAGES.activity || '/static/default-activity.jpg'
+				return DEFAULT_IMAGES.activity || 'http://115.190.125.125:9001/static-images/login-bg.png'
 			},
 
 			// 格式化时间
@@ -262,7 +262,7 @@
 			// 图片加载错误处理
 			handleImageError(e) {
 				console.warn('活动封面图片加载失败:', e)
-				this.activity.coverImage = DEFAULT_IMAGES.activity || '/static/default-activity.jpg'
+				this.activity.coverImage = DEFAULT_IMAGES.activity || 'http://115.190.125.125:9001/static-images/default-activity.jpg'
 			},
 
 			// 图片加载成功

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

@@ -628,7 +628,7 @@ onShow() {
 			// 验证和处理图片URL
 			validateImageUrl(url) {
 				if (!url || url === 'null' || url === 'undefined') {
-					return DEFAULT_IMAGES.activity || DEFAULT_IMAGES.banner || '/static/default-banner.jpg'
+					return DEFAULT_IMAGES.activity || DEFAULT_IMAGES.banner || 'http://115.190.125.125:9001/static-images/login-bg.png'
 				}
 
 				let cleanedUrl = String(url).trim()
@@ -638,7 +638,7 @@ onShow() {
 				}
 
 				if (!cleanedUrl) {
-					return DEFAULT_IMAGES.activity || DEFAULT_IMAGES.banner || '/static/default-banner.jpg'
+					return DEFAULT_IMAGES.activity || DEFAULT_IMAGES.banner || 'http://115.190.125.125:9001/static-images/login-bg.png'
 				}
 				
 				// 如果是相对路径,添加协议和域名
@@ -656,19 +656,19 @@ onShow() {
 				}
 				
 				// 其他情况返回默认图片
-				return DEFAULT_IMAGES.activity || DEFAULT_IMAGES.banner || '/static/default-banner.jpg'
+				return DEFAULT_IMAGES.activity || DEFAULT_IMAGES.banner || 'http://115.190.125.125:9001/static-images/login-bg.png'
 			},
 
 			getRomanticImage(index = 0) {
 				if (!this.romanticImages || this.romanticImages.length === 0) {
-					return DEFAULT_IMAGES.activity || DEFAULT_IMAGES.banner || '/static/default-banner.jpg'
+					return DEFAULT_IMAGES.activity || DEFAULT_IMAGES.banner || 'http://115.190.125.125:9001/static-images/login-bg.png'
 				}
 				const idx = Math.abs(Number(index) || 0) % this.romanticImages.length
 				return this.romanticImages[idx]
 			},
 
 			ensureRomanticCover(url, index = 0) {
-				if (!url || url === DEFAULT_IMAGES.activity || url === DEFAULT_IMAGES.banner || url === '/static/default-banner.jpg') {
+				if (!url || url === DEFAULT_IMAGES.activity || url === DEFAULT_IMAGES.banner || url === 'http://115.190.125.125:9001/static-images/login-bg.png') {
 					return this.getRomanticImage(index)
 				}
 				return url

+ 4 - 4
LiangZhiYUMao/pages/match/index.vue

@@ -83,7 +83,7 @@
 				<view class="success-score">匹配度:{{ matchScore }}%</view>
 				
 				<view class="matched-user-info">
-					<image class="user-avatar" :src="matchedUser.avatarUrl || '/static/default-avatar.svg'" mode="aspectFill"></image>
+					<image class="user-avatar" :src="matchedUser.avatarUrl || 'http://115.190.125.125:9001/static-images/default-avatar.svg'" mode="aspectFill"></image>
 					<view class="user-name">{{ matchedUser.nickname }}</view>
 					<view class="user-detail">{{ matchedUser.age }}岁 | {{ matchedUser.city }}</view>
 					<view class="user-interests">
@@ -450,7 +450,7 @@ export default {
 					nickname: matchedUserInfo.nickname || matchedUserInfo.name || '匹配用户',
 					age: matchedUserInfo.age || 0,
 					city: matchedUserInfo.city || '未知',
-					avatarUrl: matchedUserInfo.avatarUrl || matchedUserInfo.avatar_url || '/static/default-avatar.svg',
+					avatarUrl: matchedUserInfo.avatarUrl || matchedUserInfo.avatar_url || 'http://115.190.125.125:9001/static-images/default-avatar.svg',
 					interests: matchedUserInfo.interests || []
 				};
 			} else {
@@ -461,7 +461,7 @@ export default {
 					nickname: '匹配用户',
 					age: 0,
 					city: '未知',
-					avatarUrl: '/static/default-avatar.svg',
+					avatarUrl: 'http://115.190.125.125:9001/static-images/default-avatar.svg',
 					interests: []
 				};
 			}
@@ -479,7 +479,7 @@ export default {
 			// 跳转到聊天页面(修正参数名称)
 			const targetUserId = this.matchedUser.userId;
 			const targetUserName = encodeURIComponent(this.matchedUser.nickname || '用户');
-			const targetUserAvatar = encodeURIComponent(this.matchedUser.avatarUrl || '/static/default-avatar.svg');
+			const targetUserAvatar = encodeURIComponent(this.matchedUser.avatarUrl || 'http://115.190.125.125:9001/static-images/default-avatar.svg');
 			
 			uni.navigateTo({
 				url: `/pages/message/chat?targetUserId=${targetUserId}&targetUserName=${targetUserName}&targetUserAvatar=${targetUserAvatar}`

+ 1 - 1
LiangZhiYUMao/pages/message/index.vue

@@ -103,7 +103,7 @@
               <view class="avatar-wrapper">
                 <image 
                   class="avatar" 
-                  :src="conv.targetUserAvatar || '/static/default-avatar.svg'" 
+                  :src="conv.targetUserAvatar || 'http://115.190.125.125:9001/static-images/default-avatar.svg'" 
                   mode="aspectFill" 
                   lazy-load />
                 <view v-if="conv.isOnline" class="online-badge"></view>

+ 1 - 1
LiangZhiYUMao/pages/mine/my-activities.vue

@@ -26,7 +26,7 @@
 		<!-- 活动列表 -->
 		<view class="activities-list">
 			<view class="activity-card" v-for="activity in filteredActivities" :key="activity.id" @click="goToActivityDetail(activity)">
-				<image :src="activity.coverImage || '/static/default-banner.jpg'" class="activity-cover" mode="aspectFill"></image>
+				<image :src="activity.coverImage || 'http://115.190.125.125:9001/static-images/login-bg.png'" class="activity-cover" mode="aspectFill"></image>
 				<view class="activity-info">
 					<view class="activity-header">
 						<text class="activity-name">{{ activity.name }}</text>

+ 1 - 1
LiangZhiYUMao/pages/plaza/detail.vue

@@ -237,7 +237,7 @@ export default {
             commentImages: [],
 			scrollIntoView: '',
 			currentUserId: 1,
-			defaultAvatar: '/static/default-avatar.png',
+			defaultAvatar: 'http://115.190.125.125:9001/static-images/default-avatar.svg',
 			isLiking: false,  // 正在点赞中,防止重复点击
 			isFavoriting: false  // 正在收藏中,防止重复点击
 		}

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

@@ -89,7 +89,7 @@
 							<image
 								v-for="(photo, pIdx) in userDetail.photos"
 								:key="pIdx"
-								:src="photo || '/static/close.png'"
+								:src="photo || 'http://115.190.125.125:9001/static-images/close.png'"
 								class="photo-item"
 								mode="aspectFill"
 								@click="previewPhoto(pIdx)"
@@ -194,7 +194,7 @@
 			<view v-if="loading" class="skeleton">加载中...</view>
 			<view v-else>
 				<view v-for="(u, idx) in filteredList" :key="u.userId || idx" class="card">
-					<image :src="u.avatarUrl || '/static/close.png'" class="avatar" mode="aspectFill" @error="onImgErr(idx)"/>
+					<image :src="u.avatarUrl || 'http://115.190.125.125:9001/static-images/close.png'" class="avatar" mode="aspectFill" @error="onImgErr(idx)"/>
 					<view class="main" @click="showUserDetailByIndex(idx)">
 						<view class="row">
 							<text class="name">{{ u.nickname || '-' }}</text>
@@ -715,9 +715,9 @@ export default {
 			this.areaDisplayText = parts.length > 0 ? parts.join(' ') : '选择省市区'
 		},
 		getSafeAvatar(url){
-			if(!url) return '/static/close.png'
+			if(!url) return 'http://115.190.125.125:9001/static-images/close.png'
 			const u = String(url)
-			if(u.includes('example.com')) return '/static/close.png'
+			if(u.includes('example.com')) return 'http://115.190.125.125:9001/static-images/close.png'
 			return u
 		},
 		fmtScore(s){ return s ? Number(s).toFixed(1) : '0.0' },
@@ -770,7 +770,7 @@ export default {
 
 			const targetUserId = parseInt(user.userId);
 			const targetUserName = user.nickname || '用户';
-			const targetUserAvatar = user.avatarUrl || '/static/close.png';
+			const targetUserAvatar = user.avatarUrl || 'http://115.190.125.125:9001/static-images/close.png';
 
 			console.log('准备打开聊天,参数:', {
 				targetUserId,
@@ -848,7 +848,7 @@ export default {
 			}
 		},
 		onImgErr(idx){
-			this.$set(this.list[idx], 'avatarUrl', '/static/close.png')
+			this.$set(this.list[idx], 'avatarUrl', 'http://115.190.125.125:9001/static-images/close.png')
 		},
 		// 通过索引显示用户详情(跳转到新页面)
 		showUserDetailByIndex(index) {

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

@@ -13,7 +13,7 @@
 			<!-- 用户头像和基本信息 -->
 			<view class="user-header">
 				<image 
-					:src="userInfo.avatar || userInfo.avatarUrl || '/static/close.png'" 
+					:src="userInfo.avatar || userInfo.avatarUrl || 'http://115.190.125.125:9001/static-images/close.png'" 
 					class="user-avatar" 
 					mode="aspectFill"
 					@error="onAvatarError"
@@ -444,8 +444,8 @@ export default {
 		// 头像加载错误
 		onAvatarError() {
 			if (this.userInfo) {
-				this.userInfo.avatar = '/static/close.png'
-				this.userInfo.avatarUrl = '/static/close.png'
+				this.userInfo.avatar = 'http://115.190.125.125:9001/static-images/close.png'
+				this.userInfo.avatarUrl = 'http://115.190.125.125:9001/static-images/close.png'
 			}
 		},
 		

+ 1 - 1
LiangZhiYUMao/pages/success-case/detail.vue

@@ -11,7 +11,7 @@
 
 		<!-- 案例封面 -->
 		<view class="case-cover">
-			<image :src="caseDetail.imageUrl || DEFAULT_IMAGES.couple" class="cover-image" mode="aspectFill"></image>
+			<image src="https://img.zcool.cn/community/01c8f15cd8e8c6a801219c779e8c84.jpg" class="cover-image" mode="aspectFill"></image>
 			<view class="cover-mask">
 				<view class="success-badge">
 					<text class="badge-icon">✓</text>

BIN
LiangZhiYUMao/static/4checked.png


BIN
LiangZhiYUMao/static/4unchecked.png


BIN
LiangZhiYUMao/static/close.png


+ 0 - 31
LiangZhiYUMao/static/default-avatar.svg

@@ -1,31 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200">
-  <defs>
-    <linearGradient id="bgGrad" x1="0%" y1="0%" x2="100%" y2="100%">
-      <stop offset="0%" style="stop-color:#FFE5F1;stop-opacity:1" />
-      <stop offset="100%" style="stop-color:#FFECF3;stop-opacity:1" />
-    </linearGradient>
-    <linearGradient id="iconGrad" x1="0%" y1="0%" x2="100%" y2="100%">
-      <stop offset="0%" style="stop-color:#E91E63;stop-opacity:0.6" />
-      <stop offset="100%" style="stop-color:#FF6B9D;stop-opacity:0.4" />
-    </linearGradient>
-  </defs>
-  
-  <!-- 背景圆 -->
-  <circle cx="100" cy="100" r="100" fill="url(#bgGrad)" />
-  
-  <!-- 头像图标 -->
-  <!-- 头部 -->
-  <circle cx="100" cy="75" r="25" fill="url(#iconGrad)" />
-  
-  <!-- 身体 -->
-  <ellipse cx="100" cy="140" rx="40" ry="30" fill="url(#iconGrad)" />
-  
-  <!-- 装饰边框 -->
-  <circle cx="100" cy="100" r="98" fill="none" stroke="rgba(233, 30, 99, 0.2)" stroke-width="2" />
-</svg>
-
-
-
-
-
-

BIN
LiangZhiYUMao/static/icon.png


BIN
LiangZhiYUMao/static/login-bg.png


BIN
LiangZhiYUMao/static/logo.png


BIN
LiangZhiYUMao/static/logo111.png


BIN
LiangZhiYUMao/static/romance.zip


BIN
LiangZhiYUMao/static/voice-icon.png


BIN
LiangZhiYUMao/static/wechat-icon.png


+ 1 - 1
LiangZhiYUMao/utils/util.js

@@ -274,7 +274,7 @@ export const share = (options = {}) => {
   return {
     title: options.title || '遇见对的人,从这里开始',
     path: options.path || '/pages/index/index',
-    imageUrl: options.imageUrl || '/static/share-default.jpg'
+    imageUrl: options.imageUrl || 'http://115.190.125.125:9001/static-images/logo.png'
   }
 }