Parcourir la source

分享 与 创作灵体 接口待调试

XSXS il y a 2 mois
Parent
commit
1aadb59e1b
6 fichiers modifiés avec 1333 ajouts et 87 suppressions
  1. 21 0
      pages.json
  2. 308 0
      pages/my/feedback.vue
  3. 2 4
      pages/my/my.vue
  4. 82 35
      pages/my/myStar.scss
  5. 290 48
      pages/my/myStar.vue
  6. 630 0
      pages/my/userHomepage.vue

+ 21 - 0
pages.json

@@ -147,6 +147,20 @@
 					"bounce": "none"
 				}
 			}
+		},{
+			"path": "pages/my/userHomepage",
+			"style": {
+				"navigationBarTitleText": "我的",
+				"navigationBarBackgroundColor": "#ffffff",
+				"navigationStyle": "custom",
+				"h5": {
+					"titleNView": false,
+					"bounce": "none"
+				},
+				"app-plus": {
+					"bounce": "none"
+				}
+			}
 		}, {
 			"path": "pages/login/reg",
 			"style": {
@@ -350,6 +364,13 @@
 				"navigationBarTitleText" : "" ,
 				"navigationStyle": "custom"
 			}
+		},
+		{
+			"path" : "pages/my/feedback",
+			"style" : 
+			{
+				"navigationBarTitleText" : "意见与反馈"
+			}
 		}
 	],
 	"globalStyle": {

+ 308 - 0
pages/my/feedback.vue

@@ -0,0 +1,308 @@
+<template>
+	<view class="page">
+		<PageHeader title="意见与反馈" class="PageHeader">
+			<template slot="center"> </template>
+		</PageHeader>
+		<view class="feedback-container">
+			<!-- 问题描述区域 -->
+			<view class="description-area">
+				<view class="title">问题描述</view>
+				<textarea class="input-area" 
+					v-model="content" 
+					placeholder="请尽可能详细地描述您的反馈或问题"
+					:maxlength="200"
+					show-count
+				></textarea>
+				<view class="word-count">{{content.length}}/200</view>
+			</view>
+
+			<!-- 图片上传区域 -->
+			<view class="upload-area">
+				<view class="title">上传图片 <text class="subtitle">(最多5张,可选)</text></view>
+				<view class="tips">* 上传问题截图更好的帮助我们快速定位您反馈的问题</view>
+				<view class="tips" style="margin-bottom: 20rpx;">* 需要您授权相册权限</view>
+				<view class="image-list">
+					<view class="image-item" v-for="(item, index) in imgList" :key="index">
+						<image class="preview" :src="item" mode="aspectFill"></image>
+						<view class="delete-btn" @tap="deleteImage(index)">
+							<text class="fa fa-times"></text>
+						</view>
+					</view>
+					<view class="upload-btn" @tap="upload" v-if="imgList.length < 5">
+						<text class="fa fa-plus"></text>
+					</view>
+				</view>
+		
+			</view>
+
+			<!-- 提交按钮 -->
+			<view class="submit-btn" @tap="submitFeedback">
+				确认提交
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			content: '',
+			imgList: [],
+			skey: getApp().globalData.skey || ''
+		}
+	},
+	methods: {
+		// 上传图片
+		upload() {
+			if (this.imgList.length >= 5) {
+				uni.showToast({
+					title: '最多只能上传5张图片',
+					icon: 'none'
+				});
+				return;
+			}
+			
+			let that = this;
+			uni.chooseImage({
+				count: 5 - this.imgList.length,
+				sizeType: ['compressed'],
+				sourceType: ['album', 'camera'],
+				success: function(res) {
+					let tempFilePaths = [];
+					
+					// #ifdef H5
+					res.tempFiles.forEach(file => {
+						tempFilePaths.push(file.path);
+					});
+					// #endif
+					
+					// #ifdef APP-PLUS || MP
+					tempFilePaths = res.tempFilePaths;
+					// #endif
+					
+					for (let i = 0; i < tempFilePaths.length; i++) {
+						const uploadTask = uni.uploadFile({
+							url: that.$apiHost + '/Xweb/upload_img?skey=' + that.skey,
+							filePath: tempFilePaths[i],
+							name: 'file',
+							success: function(uploadFileRes) {
+								let resdata = JSON.parse(uploadFileRes.data);
+								if (resdata.success == 'yes') {
+									that.imgList.push(resdata.url);
+								} else {
+									uni.showToast({
+										title: resdata.str || '上传失败',
+										icon: 'none'
+									});
+								}
+							},
+							fail: function(err) {
+								console.error('上传失败:', err);
+								uni.showToast({
+									title: '图片上传失败',
+									icon: 'none'
+								});
+							}
+						});
+					}
+				}
+			});
+		},
+		
+		// 删除图片
+		deleteImage(index) {
+			this.imgList.splice(index, 1);
+		},
+		
+		// 提交反馈
+		submitFeedback() {
+			if (!this.content.trim()) {
+				uni.showToast({
+					title: '请输入问题描述',
+					icon: 'none'
+				});
+				return;
+			}
+			
+			let imgStr = this.imgList.join('|');
+			
+			uni.request({
+				url: this.$apiHost + '/Feedback/submit',
+				method: 'POST',
+				data: {
+					uuid: getApp().globalData.uuid,
+					content: this.content,
+					images: imgStr
+				},
+				header: {
+					'Content-Type': 'application/x-www-form-urlencoded',
+					'sign': getApp().globalData.headerSign
+				},
+				success: (res) => {
+					if (res.data.success === 'yes') {
+						uni.showToast({
+							title: '提交成功',
+							icon: 'success'
+						});
+						setTimeout(() => {
+							uni.navigateBack();
+						}, 1500);
+					} else {
+						uni.showToast({
+							title: res.data.str || '提交失败',
+							icon: 'none'
+						});
+					}
+				},
+				fail: (err) => {
+					console.error('提交失败:', err);
+					uni.showToast({
+						title: '网络错误,请稍后重试',
+						icon: 'none'
+					});
+				}
+			});
+		}
+	}
+}
+</script>
+
+<style lang="scss">
+// 导入FontAwesome
+@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css");
+.page {
+	min-height: 100vh;
+	background-color: #f8f8f8;
+	padding-bottom: env(safe-area-inset-bottom);
+}
+
+.feedback-container {
+	padding: 30rpx;
+	
+	.description-area {
+		background: #fff;
+		border-radius: 16rpx;
+		padding: 24rpx;
+		margin-bottom: 30rpx;
+		position: relative;
+		
+		.title {
+			font-size: 32rpx;
+			color: #333;
+			margin-bottom: 20rpx;
+		}
+		
+		.input-area {
+			width: 100%;
+			height: 300rpx;
+			font-size: 28rpx;
+			line-height: 1.6;
+			padding: 20rpx;
+			background: #f8f8f8;
+			border-radius: 12rpx;
+		}
+		
+		.word-count {
+			position: absolute;
+			right: 44rpx;
+			bottom: 44rpx;
+			font-size: 24rpx;
+			color: #999;
+		}
+	}
+	
+	.upload-area {
+		background: #fff;
+		border-radius: 16rpx;
+		padding: 24rpx;
+		margin-bottom: 30rpx;
+		
+		.title {
+			font-size: 32rpx;
+			color: #333;
+			margin-bottom: 20rpx;
+			
+			.subtitle {
+				font-size: 24rpx;
+				color: #999;
+			}
+		}
+		
+		.image-list {
+			display: flex;
+			flex-wrap: wrap;
+			gap: 16rpx;
+			margin-bottom: 20rpx;
+			
+			.image-item {
+				width: 200rpx;
+				height: 200rpx;
+				position: relative;
+				
+				.preview {
+					width: 100%;
+					height: 100%;
+					border-radius: 12rpx;
+				}
+				
+				.delete-btn {
+					position: absolute;
+					top: -16rpx;
+					right: -16rpx;
+					width: 40rpx;
+					height: 40rpx;
+					background: rgba(0,0,0,0.5);
+					border-radius: 50%;
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					
+					.fa {
+						color: #fff;
+						font-size: 24rpx;
+					}
+				}
+			}
+			
+			.upload-btn {
+				width: 200rpx;
+				height: 200rpx;
+				background: #f8f8f8;
+				border-radius: 12rpx;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				
+				.fa {
+					font-size: 48rpx;
+					color: #999;
+				}
+			}
+		}
+		
+		.tips {
+			font-size: 24rpx;
+			color: #999;
+			line-height: 1.6;
+		}
+	}
+	
+	.submit-btn {
+		width: 100%;
+		height: 88rpx;
+		background: #000;
+		border-radius: 44rpx;
+		color: #fff;
+		font-size: 32rpx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		margin-top: 60rpx;
+		
+		&:active {
+			opacity: 0.9;
+		}
+	}
+}
+</style> 

+ 2 - 4
pages/my/my.vue

@@ -130,7 +130,7 @@
             @click="firstLevelNavActiveSwitch(1)"
             >我的帖子
             <view class="indicator-triangle"> </view>
-          </view>
+          </view> 
         </view>
         <!-- 作品列表 -->
         <template v-if="firstLevelNavActive == 0">
@@ -409,9 +409,7 @@ export default {
     // 		}
     // 	})
     // }, 200);
-    setTimeout(() => {
-      this.clickShare();
-    });
+  
   },
   onShow() {
     uni.$emit("check_login", () => {});

+ 82 - 35
pages/my/myStar.scss

@@ -1,3 +1,6 @@
+// 导入FontAwesome
+@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css");
+
 .star-container {
   width: 100%;
   min-height: 100vh;
@@ -59,7 +62,7 @@
 
       .character-image {
         width: 100%;
-        height: 800rpx; // 调整角色图片高度
+        // height: 800rpx; // 调整角色图片高度
         object-fit: contain;
       }
     }
@@ -93,6 +96,7 @@
   from {
     transform: rotate(0deg);
   }
+
   to {
     transform: rotate(-360deg);
   }
@@ -103,14 +107,17 @@
     transform: translateY(0) scale(1);
     opacity: 1;
   }
+
   98% {
     transform: translateY(180rpx) scale(0.1);
     opacity: 0.2;
   }
+
   99% {
     transform: translateY(180rpx) scale(0.01);
     opacity: 0;
   }
+
   100% {
     transform: translateY(0) scale(1);
     opacity: 0;
@@ -125,22 +132,26 @@
     #f2f6f2;
   padding: 30rpx;
   box-sizing: border-box;
+
   .reserveASeat {
     width: 100vh;
     height: calc(108rpx + var(--status-bar-height));
   }
+
   .PageHeader {
     background: url("../../static/me/cz_bg_top.png") no-repeat top center / 100%
         auto,
       #f2f6f2;
     background-position-y: var(--status-bar-height);
   }
+
   .form-group {
     margin-bottom: 20rpx;
     background: #fff;
     border-radius: 20rpx;
     padding: 20rpx;
     padding-bottom: 26rpx;
+
     .label {
       display: flex;
       align-items: center;
@@ -151,6 +162,7 @@
       font-size: 28rpx;
       color: #1f1f1f;
       font-family: "PingFang SC-Bold";
+
       .required {
         color: #ff4d4f;
         margin-right: 8rpx;
@@ -191,17 +203,20 @@
         font-size: 28rpx;
         color: #1f1f1f;
         font-family: "PingFang SC-Bold";
+
         image {
           width: 32rpx;
           height: 32rpx;
           margin-bottom: -5rpx;
           margin-right: 4rpx;
         }
+
         .other {
           image {
             margin-top: -8rpx;
           }
         }
+
         &.selected {
           background: #f7ffea;
           border-color: #7ebc00;
@@ -238,13 +253,13 @@
       width: 100%;
       white-space: nowrap;
     }
+
     .tags-container {
       display: inline-flex;
       padding: 20rpx 0;
       gap: 20rpx;
 
       .tag {
-      
         &.selected {
           background: #333;
           color: #fff;
@@ -281,9 +296,11 @@
   100% {
     transform: translateX(0);
   }
+
   25% {
     transform: translateX(-5rpx);
   }
+
   75% {
     transform: translateX(5rpx);
   }
@@ -292,13 +309,12 @@
 .character-info {
   width: 100%;
   min-height: 100vh;
-  background-color: #ffffff;
+  background-color: #f2f6f2;
   position: relative;
   padding-bottom: 120rpx;
 
   .info-container {
-    padding: 30rpx;
-
+    padding-bottom: 30rpx;
     .character-portrait {
       display: flex;
       flex-direction: column;
@@ -307,54 +323,82 @@
 
       .portrait-image {
         width: 100%;
-        height: 600rpx;
+        // height: 600rpx;
         object-fit: contain;
       }
+    }
+
+    .info-section {
+      padding: 0 20rpx;
 
       .character-name {
         font-size: 40rpx;
         font-weight: 600;
         color: #333;
-        margin-top: 20rpx;
-      }
-    }
+        margin-bottom: 20rpx;
+        height: 94rpx;
+        background: #ffffff;
+        border-radius: 20rpx;
+        display: flex;
+        align-items: center;
+        padding: 22rpx 32rpx;
+        font-weight: 400;
+        font-size: 36rpx;
+        font-family: PingFang SC-Bold;
+        color: #1f1f1f;
 
-    .info-section {
-      background: #f8f8f8;
-      border-radius: 20rpx;
-      padding: 30rpx;
+        image {
+          width: 32rpx;
+          height: 32rpx;
+          margin-bottom: -5rpx;
+          margin-left: 8rpx;
+        }
 
-      .section-title {
-        font-size: 32rpx;
-        font-weight: 500;
-        color: #333;
-        margin-bottom: 20rpx;
-        position: relative;
-        padding-left: 20rpx;
-
-        &::before {
-          content: "";
-          position: absolute;
-          left: 0;
-          top: 50%;
-          transform: translateY(-50%);
-          width: 6rpx;
-          height: 28rpx;
-          background: #9c27b0;
-          border-radius: 3rpx;
+        .other {
+          image {
+            margin-top: -8rpx;
+          }
         }
       }
 
+      background: #f2f6f2;
+      border-radius: 20rpx;
+      padding: 30rpx;
+
       .description-box {
         background: #ffffff;
         border-radius: 16rpx;
         padding: 24rpx;
         margin-bottom: 30rpx;
+        .description-title {
+          font-weight: 400;
+          font-size: 32rpx;
+          color: #1f1f1f;
+          font-family: "PingFang SC-Bold";
+          display: flex;
+          align-items: center;
+          justify-content: space-between;
+          padding-bottom: 20rpx;
+          .edit-button {
+            font-size: 24rpx;
+            color: #999;
+            display: flex;
+            align-items: center;
+            justify-content: center;
+            .fa{
+              color: #999 !important;
+              font-size: 36rpx;
+              margin-left: 10rpx;
+            }
+          }
+
+        }
 
         .description-text {
           font-size: 28rpx;
           color: #666;
           line-height: 1.6;
+          max-height: 280rpx;
         }
       }
 
@@ -362,15 +406,18 @@
         display: flex;
         flex-wrap: wrap;
         gap: 16rpx;
+        padding: 16rpx 0;
 
         .tag-item {
-          padding: 12rpx 24rpx;
-          background: #f0f0f0;
-          border-radius: 28rpx;
+          padding: 12rpx 18rpx 10rpx 18rpx; 
+          background: #fff;
+          border-radius: 12rpx;
+          border: 2rpx solid #E6E6E6;
           font-size: 24rpx;
           color: #666;
         }
       }
+      
     }
   }
 
@@ -380,7 +427,7 @@
     left: 40rpx;
     right: 40rpx;
     height: 98rpx;
-    background: linear-gradient(to right, #9c27b0, #7b1fa2);
+    background: #1f1f1f;
     border-radius: 49rpx;
     display: flex;
     align-items: center;

+ 290 - 48
pages/my/myStar.vue

@@ -1,10 +1,10 @@
 <template>
 	<view class="star-container">
-		<PageHeader title="" class="PageHeader" v-if="state == 1 && false">
+		<PageHeader title="" class="PageHeader" v-if="state == 1">
 			<template slot="center"> </template>
 		</PageHeader>
 		<!-- 星灵基因重组仓弹窗 -->
-		<view class="gender-popup" v-if="!noteContent && !showInfo && state == 0">
+		<view class="gender-popup" v-if="state == 0">
 			<NicknamePopup title="星灵基因重组仓" subtitle="" class="openContentPopUpWindow" ref="openContentPopUpWindow">
 				<template slot="content">
 					<uv-textarea v-model="noteContent" maxlength="200" count autoHeight
@@ -15,51 +15,24 @@
 		</view>
 
 		<!-- 加载动画区域 -->
-		<view class="loading-area" v-if="isLoading">
+		<view class="loading-area" v-if="state == 2">
 			<image src="../../static/me/loadAnimation.gif" mode="widthFix"></image>
 		</view>
 
 		<!-- 角色展示页面 -->
-		<view class="character-page" v-else-if="noteContent || true">
+		<view class="character-page" v-else-if="state == 1">
 			<view class="character-container">
-				<image :src="starImg||'https://e.zhichao.art/AI_images/b_3_92.png'" mode="aspectFit" class="character-image"></image>
+				<image :src="starImg || 'https://e.zhichao.art/AI_images/b_3_92.png'" mode="widthFix"
+					class="character-image">
+				</image>
 			</view>
 			<view class="bottom-button" @tap="goToSetProfile"> 设置星灵简介 </view>
 		</view>
 
-		<!-- 角色信息展示页面 -->
-		<view class="character-info" v-else-if="showInfo ">
-			<view class="info-container">
-				<!-- 角色立绘区域 -->
-				<view class="character-portrait">
-					<image :src="starInfo.image" mode="aspectFit" class="portrait-image"></image>
-					<text class="character-name">{{ starInfo.name }}</text>
-				</view>
-
-				<!-- 角色信息板块 -->
-				<view class="info-section">
-					<view class="section-title">关于Ta</view>
 
-					<!-- 人物简介 -->
-					<view class="description-box">
-						<text class="description-text">{{ starInfo.content }}</text>
-					</view>
-
-					<!-- 标签展示 -->
-					<view class="tags-box">
-						<view class="tag-item" v-for="tag in formData.tags" :key="tag">
-							{{ tag }}
-						</view>
-					</view>
-				</view>
-			</view>
-
-			<!-- 底部按钮 -->
-			<view class="join-button" @tap="handleJoin"> 入驻星球 </view>
-		</view>
 
 		<!-- 表单页面 -->
-		<view class="form-page" v-else-if="showForm">
+		<view class="form-page" v-else-if="state == 4">
 			<PageHeader title="设置星灵简介" class="PageHeader">
 				<template slot="center"> </template>
 			</PageHeader>
@@ -135,12 +108,70 @@
 			<view class="submit-button" @tap="submitStar"> 确定并提交 </view>
 		</view>
 
-		<!-- 收藏内容区域 -->
-		<view class="star-content" v-else>
-			<view class="star-list">
-				<!-- 这里放收藏列表内容 -->
+		<!-- 角色信息展示页面 -->
+		<view class="character-info" v-else-if="state == 5">
+
+			<view class="custom-navbar">
+				<view class="navbar-left" @click="goBack">
+					<text class="fa fa-angle-left" style="color: #000;"></text>
+				</view>
+
+				<view class="navbar-right" @click="showShare = true">
+					<text class="fa fa-ellipsis-h"></text>
+				</view>
 			</view>
+
+			<view class="info-container">
+				<!-- 角色立绘区域 -->
+				<view class="character-portrait">
+					<image :src="starInfo.image" mode="widthFix" class="portrait-image"></image>
+				</view>
+
+				<!-- 角色信息板块 -->
+				<view class="info-section">
+					<view class="character-name">
+						{{ starInfo.name }}
+						<image class="male" v-if="starInfo.sex == 0" src="../../static/me/wd_icon_nan.png"
+							mode="aspectFit">
+						</image>
+						<image class="female" v-else-if="starInfo.sex == 1" src="../../static/me/wd_icon_nv.png"
+							mode="aspectFit">
+						</image>
+						<image class="other" v-else src="../../static/me/wd_icon_qita.png" mode="aspectFit"></image>
+
+					</view>
+					<!-- <view class="section-title">关于Ta</view> -->
+
+					<!-- 人物简介 -->
+					<view class="description-box">
+						<view class="description-title">
+							<view>Ta的设定</view>
+							<view v-if="false" class="edit-button">编辑<text class="fa fa-angle-right"
+									style="color: #000;"></text></view>
+						</view>
+						<view class="description-text"> <text>{{ starInfo.content }}</text> </view>
+					</view>
+
+					<!-- 标签展示 -->
+					<view class="description-box">
+						<view class="description-title">
+							<view>人物标签</view>
+						</view>
+						<view class="tags-box"> 
+							<view class="tag-item" v-for="tag in starInfo.tags" :key="tag">
+								{{ tag }}
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+
+			<!-- 底部按钮 -->
+			<view class="join-button" @tap="handleJoin"> 入驻星球 </view>
 		</view>
+
+		<SharePopup :visible="showShare" :share-url="shareUrl" :share-title="shareTitle" :share-desc="shareDesc"
+			:share-img="shareImg" @close="showShare = false" />
 	</view>
 </template>
 
@@ -180,15 +211,38 @@ export default {
 			starImg: "",
 			noteContent: "",
 			starInfo: {},
-			state: 1,
+			state: 5, //0 是用户输入星灵基因重组仓的状态   1 是用户已经完成了匹星灵展示页面   2是用户匹配中加载的状态 3是匹配到了待点击进入设置界面 (根据其它字段判断是否失败)  4是用户设置星灵信息的页面  5是用户查看星灵信息的页面 待入驻 6是用户已经已经入驻星球了
 			sex: "",
 			selectTags: [],
+			info: {
+				"id": 0,
+				"sso_id": 0,
+				"image_id": 0,
+				"image": "",
+				"nickname": "",
+				"user_content": "",
+				"content": "",
+				"sex_id": 0,
+				"tags": "",
+				"status": 0
+			},
+			showShare: false,
+			shareUrl: "https://your-share-url.com",
+			shareTitle: "分享标题",
+			shareDesc: "分享描述",
+			shareImg: "https://your-share-image.com/image.jpg",
 		};
 	},
 	onLoad() {
 		this.getStar("get");
 	},
 	methods: {
+		// 返回上一页
+		goBack() {
+			uni.navigateBack({
+				delta: 1
+			});
+		},
 		confirmGender() {
 			if (!this.noteContent) return;
 			// this.selectedGender = this.noteContent;
@@ -256,6 +310,92 @@ export default {
 						}));
 					}
 					this.starInfo = res.data.info || {};
+					this.starInfo.tags = this.starInfo.tags.trim().split(",");
+					console.log("starInfo", this.starInfo);
+
+					this.formData.description = this.starInfo.content;
+					if (act == "make") {
+						// 模拟加载过程
+						setTimeout(() => {
+							that.isLoading = false;
+						}, 300);
+					}
+				},
+				fail: (err) => {
+					console.error("请求失败:", err);
+					// 显示错误提示
+					uni.showToast({
+						title: "网络请求失败,请重试",
+						icon: "none",
+						duration: 2000,
+					});
+
+					// 重置加载状态
+					if (act === "make") {
+						that.isLoading = false;
+					}
+
+					// 如果是网络超时,自动重试一次
+					if (err.errMsg.includes("timeout")) {
+						setTimeout(() => {
+							console.log("请求超时,正在重试...");
+							that.getStar(act);
+						}, 1000);
+					}
+				},
+				complete: () => {
+					// 确保在任何情况下都能重置加载状态
+					if (act === "make" && this.isLoading) {
+						this.isLoading = false;
+					}
+				},
+			});
+		},
+		// 提交用户 开始创建的命令
+		apiPeiStar() {
+			if (!this.noteContent) {
+				uni.showToast({
+					title: "请输入匹配条件",
+					icon: "none",
+				});
+				return;
+			}
+			uni.request({
+				url: this.$apiHost + "/AIpipei/start",
+				data: {
+					uuid: getApp().globalData.uuid,
+					content: this.noteContent,
+				},
+				header: {
+					"content-type": "application/json",
+					sign: getApp().globalData.headerSign,
+				},
+				// 设置60秒超时
+				timeout: 60000,
+				methods: "POST",
+				success: (res) => {
+					console.log("开始AI匹配", res.data);
+					state
+					if (res.data.have == 0) {
+						this.showInfo = false;
+						this.starImg = res.data.image;
+					} else {
+						//首次进来获取到了
+						this.showInfo = true;
+					}
+					this.openContentPopUpWindow();
+					if (res.data.success === "yes") {
+						this.starImg = res.data.image;
+					}
+					if (res.data.info && res.data.info.tags != "") {
+						let tags = res.data.info.tags.split(",");
+						this.predefinedTags = tags.map(tag => ({
+							text: tag,
+							value: tag
+						}));
+					}
+					this.starInfo = res.data.info || {};
+					this.starInfo.tags = this.starInfo.tags.trim().split(",");
 					console.log("starInfo", this.starInfo);
 
 					this.formData.description = this.starInfo.content;
@@ -296,20 +436,61 @@ export default {
 				},
 			});
 		},
+		// 查询Ai匹配信息
+		aIpipeiGetinfo(act) {
+			uni.request({
+				url: this.$apiHost + "/AIpipei/getinfo",
+				data: {
+					uuid: getApp().globalData.uuid,
+				},
+				header: {
+					"content-type": "application/json",
+					sign: getApp().globalData.headerSign,
+				},
+				// 设置60秒超时
+				timeout: 60000,
+				success: (res) => {
+					console.log("查询到生成信息", res.data);
+				},
+				fail: (err) => {
+					console.error("请求失败:", err);
+					// 显示错误提示
+					uni.showToast({
+						title: "网络请求失败,请重试",
+						icon: "none",
+						duration: 2000,
+					});
+					// 如果是网络超时,自动重试一次
+					if (err.errMsg.includes("timeout")) {
+						setTimeout(() => {
+							console.log("请求超时,正在重试...");
+							that.aIpipeiGetinfo(act);
+						}, 6000);
+					}
+				},
+				complete: () => {
+
+				},
+			});
+		},
+		// 保存表单信息
 		submitStar() {
+			this.formData.tags = this.selectTags.join(",");
+			this.state = 5
+			return
 			let that = this;
 			uni.showLoading({
 				mask: true,
 			});
 			uni.request({
-				url: this.$apiHost + "/Work/getStar",
+				url: this.$apiHost + "/AIpipei/save",
 				data: {
 					uuid: getApp().globalData.uuid,
 					sex: this.tempGender,
 					// noteContent: this.noteContent,
 					name: this.formData.nickname,
 					content: this.formData.description,
-					act: "submit",
+
 				},
 				header: {
 					"content-type": "application/json",
@@ -326,7 +507,7 @@ export default {
 					});
 					if (res.data.success === "yes") {
 						setTimeout(() => {
-							that.getStar("get");
+							that.aIpipeiGetinfo();
 						}, 300);
 					}
 				},
@@ -398,8 +579,8 @@ export default {
 
 	::v-deep.checklist-box {
 
-	 
-		border-radius: 16rpx;
+
+		border-radius: 16rpx !important;
 		border: 2rpx solid #1f1f1f !important;
 		background-color: #fff !important;
 		display: flex;
@@ -407,18 +588,79 @@ export default {
 		justify-content: center;
 
 		.checklist-text {
- 
+
 			font-size: 28rpx;
 			color: #1f1f1f;
 			font-family: "PingFang SC-Bold" !important;
 		}
-		&.is-checked{
+
+		&.is-checked {
 			background: #f7ffea !important;
 			border-color: #7ebc00 !important;
+
 			.checklist-text {
-			color:#1f1f1f !important;
+				color: #1f1f1f !important;
+			}
+		}
+	}
+}
+
+.star-container {
+
+	/* 自定义导航栏样式 */
+	.custom-navbar {
+		display: flex;
+		flex-direction: row;
+		align-items: center;
+		justify-content: space-between;
+		width: 100%;
+		height: 90rpx;
+		padding: 0 20rpx;
+		padding-top: var(--status-bar-height);
+		background-color: transparent;
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 100;
+		background: transparent;
+
+		&::before {
+			content: '';
+			position: absolute;
+			top: 0;
+			left: 0;
+			width: 100%;
+			height: var(--status-bar-height);
+			background-color: #fff;
+			z-index: -1;
+		}
+
+		.navbar-left {
+			width: 80rpx;
+			height: 80rpx;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			
+			.fa-angle-left {
+				font-size: 48rpx;
+				color: #333;
+			}
+		}
+
+		.navbar-right {
+			width: 80rpx;
+			height: 80rpx;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+
+			.fa-ellipsis-h {
+				font-size: 36rpx;
+				color: #333;
 			}
 		}
 	}
+
 }
 </style>

+ 630 - 0
pages/my/userHomepage.vue

@@ -0,0 +1,630 @@
+<template>
+  <view class="page">
+    <view class="topBody">
+      <view class="header">
+        <view class="card-box">
+          <view class="card-top">
+            <view class="top-box">
+              <view class="hello-box" @click="goBack">
+                <text class="fa fa-angle-left" style="color: #000; font-size: 55rpx;"></text>
+              </view>
+              <view class="settingBtn-box">
+                <image @click="clickShare()" src="@/static/me/wd_icon_fenxian.png" mode=""></image>
+              </view>
+            </view>
+            <view class="userinfo-box" >
+              <view class="userinfo-left">
+                <CircleAvatar class="avator" :src="myinfo.avator"></CircleAvatar>
+              </view>
+              <view class="userinfo-right">
+                <view class="nickname">
+                  <text class="one-omit">{{ myinfo.nickname }}</text>
+                  <image src="../../static/icon/wd_icon_nan.png" mode="widthFix" v-if="myinfo.sex_id == 1"></image>
+                  <image src="../../static/icon/wd_icon_nv.png" mode="widthFix" v-else-if="myinfo.sex_id == 2"></image>
+                  <view class="level">Lv{{ myinfo.my_level }}</view>
+                </view>
+                <view class="label">
+                  <view v-for="(item, index) in aihao_tags" :key="index + item">
+                    {{ item }}
+                  </view>
+                </view>
+              </view>
+            </view>
+            <view class="intro_row">
+              <block v-if="myinfo.content == ''">
+                <text class="intro_text two-omit">简介</text>
+              </block>
+              <uv-text v-else class="intro_text two-omit">
+                {{ myinfo.content }}
+              </uv-text>
+            </view>
+            <view class="bom">
+              <view class="follow_info" >
+                <view class="follow-box">
+                  <view class="num">{{ myinfo.num_attention }}</view>
+                  <view class="label">关注</view>
+                </view>
+                <view class="separator"></view>
+                <view class="follow-box">
+                  <view class="num">{{ myinfo.num_fans }}</view>
+                  <view class="label">粉丝</view>
+                </view>
+                <view class="separator"></view>
+                <view class="follow-box">
+                  <view class="num">{{ myinfo.num_like }}</view>
+                  <view class="label">获赞</view>
+                </view>
+              </view>
+              <view class="points-box">
+                <text class="followTheAuthor followTheAuthor1" v-if="1" @click="followTheAuthor(1)">+关注</text>
+                <text class="followTheAuthor followTheAuthor0" v-if="0" @click="followTheAuthor(0)">已关注</text>
+              </view>
+            </view>
+          </view>
+        </view>
+      </view>
+
+      <view class="myinfo">
+        <!-- 作品列表 -->
+        <view class="numlist1" v-if="activeTab === 0" style="margin-top: 30rpx">
+          <WorkItem v-for="(item, index) in worksList" :secrecy="true" :subtitle="true" :key="index" :item="item"
+            @click="goWork(item)" />
+        </view>
+      </view>
+    </view>
+
+    <!-- 确认框 -->
+    <CustomConfirm ref="customConfirm"></CustomConfirm>
+    <!-- 提示框 -->
+    <DialogBox ref="DialogBox"></DialogBox>
+
+    <!-- SharePopup组件 -->
+    <SharePopup :visible="showShare" :share-url="shareUrl" :share-title="shareTitle" :share-desc="shareDesc"
+      :share-img="shareImg" @close="showShare = false" />
+  </view>
+</template>
+
+<script>
+import tabbar from "@/mixins/tabbar";
+import CustomConfirm from "@/components/custome-confirm/customeConfirm.vue";
+import CircleAvatar from "@/components/CircleAvatar/CircleAvatar.vue";
+import WorkItem from "@/components/WorkItem/WorkItem.vue";
+import SharePopup from "@/components/SharePopup/SharePopup.vue";
+import DialogBox from "@/components/DialogBox/DialogBox.vue";
+
+export default {
+  components: {
+    CustomConfirm,
+    CircleAvatar,
+    WorkItem,
+    SharePopup,
+    DialogBox
+  },
+  mixins: [tabbar],
+  data() {
+    return {
+      firstLevelNavActive: 0,
+      myinfo: {
+        avator: "../../static/logo.png",
+        nickname: "王思思",
+        content: "",
+        sex_id: 1,
+        my_level: 1,
+        num_attention: 0,
+        num_fans: 0,
+        num_like: 0,
+        wxkf: ""
+      },
+      aihao_tags: [],
+      activeTab: 0,
+      offset: 0,
+      hasMore: true,
+      isLoading: false,
+      worksList: [],
+      showShare: false,
+      shareUrl: "https://your-share-url.com",
+      shareTitle: "分享标题",
+      shareDesc: "分享描述",
+      shareImg: "https://your-share-image.com/image.jpg",
+    };
+  },
+  onShow() {
+    uni.$emit("check_login", () => { });
+    this.offset = 0;
+    this.hasMore = true;
+    this.worksList = [];
+    this.loadInfo();
+    this.loadWorksList();
+  },
+  onReachBottom() {
+    if (this.hasMore && !this.isLoading) {
+      this.loadMoreWorks();
+    }
+  },
+  methods: {
+    // 关注作者
+    followTheAuthor(n) {
+      return
+      uni.request({
+        url: this.$apiHost + "/Member/attention",
+        data: {
+          uuid: getApp().globalData.uuid,
+          id: this.author.id,
+        },
+        header: {
+          "content-type": "application/json",
+          sign: getApp().globalData.headerSign,
+        },
+        success: (res) => {
+          console.log("点赞结果:", res.data);
+          uni.showToast({
+            title: res.data.str,
+            icon: "none",
+          });
+          if (res.data.success === "yes") {
+            console.log("关注结果:", res.data, n);
+            this.author.is_attention = n;
+          }
+        },
+        fail: (e) => {
+          console.log("关注失败:", e);
+          uni.showToast({
+            title: "网络请求失败",
+            icon: "none",
+          });
+        },
+      });
+    },
+    goBack() {
+      uni.navigateBack({
+        delta: 1,
+      });
+    },
+    clickShare(item) {
+      this.showShare = true;
+    },
+    goPage(page) {
+      if (page == "kefu") {
+        let that = this;
+        // #ifdef APP-PLUS
+        plus.share.getServices((res) => {
+          const wechat = res.find((i) => i.id === "weixin");
+          if (wechat) {
+            wechat.openCustomerServiceChat(
+              {
+                corpid: "wwbc06aa8311b6ac08",
+                url: that.myinfo.wxkf,
+              },
+              (src) => {
+                console.log("success:");
+              },
+              (err) => {
+                console.log("error:");
+              }
+            );
+          } else {
+            uni.showToast({
+              title: "没有检测到微信,请先安装",
+              icon: "error",
+            });
+          }
+        });
+        // #endif
+      } else if (page != "") {
+        uni.navigateTo({
+          url: page,
+        });
+      }
+    },
+    loadInfo() {
+      console.log({
+        uuid: getApp().globalData.uuid,
+        skey: getApp().globalData.skey,
+      });
+      uni.request({
+        url: this.$apiHost + "/User/getinfo",
+        data: {
+          uuid: getApp().globalData.uuid,
+          skey: getApp().globalData.skey,
+        },
+        header: {
+          "content-type": "application/json",
+          sign: getApp().globalData.headerSign,
+        },
+        success: (res) => {
+          console.log("----:", JSON.parse(JSON.stringify(res.data)));
+          if (res.data.need_login == "yes") {
+            uni.removeStorageSync("wapptoken");
+            uni.redirectTo({
+              url: "/pages/login/login",
+            });
+            return;
+          }
+          if (res.data.aihao) {
+            this.aihao_tags = res.data.aihao.split(",");
+          }
+          this.myinfo = res.data;
+        },
+        complete: (com) => {
+          // uni.hideLoading();
+        },
+        fail: (e) => {
+          console.log("----e:", e);
+        },
+      });
+    },
+    switchTab(index) {
+      this.activeTab = index;
+      this.offset = 0;
+      this.hasMore = true;
+      this.worksList = [];
+      this.loadWorksList();
+    },
+    loadWorksList() {
+      if (this.isLoading) return;
+      this.isLoading = true;
+
+      // 根据activeTab选择不同的API
+      let apiUrl = "";
+      if (this.firstLevelNavActive == 0) {
+        if (this.activeTab === 0) {
+          apiUrl = "/Work/getlist";
+        } else {
+          apiUrl = "/WorkAI/getMyQueueList";
+        }
+      } else if (this.firstLevelNavActive == 1) {
+        apiUrl = "/Article/getlist";
+      }
+      uni.request({
+        url: this.$apiHost + apiUrl,
+        data: {
+          uuid: getApp().globalData.uuid,
+          skey: getApp().globalData.skey,
+          type: "my", // 固定为my,表示获取自己的作品
+          offset: this.offset,
+          status: this.activeTab === 0 ? 1 : undefined, // 只有我的作品需要status参数
+        },
+        header: {
+          "content-type": "application/json",
+          sign: getApp().globalData.headerSign,
+        },
+        success: (res) => {
+          console.log("列表数据:", JSON.parse(JSON.stringify(res.data)));
+          if (res.data.success == "yes" && res.data.list) {
+            if (res.data.list.length > 0) {
+              this.worksList = [...this.worksList, ...res.data.list];
+              this.offset += res.data.list.length;
+            }
+
+            if (res.data.list.length < 20) {
+              this.hasMore = false;
+            }
+          } else {
+            this.hasMore = false;
+          }
+
+          // 只有在"我的作品"标签下才更新data_list
+          if (this.activeTab === 0) {
+            this.updateDataList();
+          }
+          console.log("作品列表数据:", this.worksList);
+        },
+        complete: () => {
+          this.isLoading = false;
+        },
+        fail: (e) => {
+          console.log("请求列表失败:", e);
+          this.isLoading = false;
+        },
+      });
+    },
+    firstLevelNavActiveSwitch(n) {
+      this.firstLevelNavActive = n;
+      this.offset = 0;
+      this.hasMore = true;
+      this.worksList = [];
+      if (this.firstLevelNavActive == 0) {
+        this.activeTab = 0;
+      }
+      this.loadWorksList();
+    },
+
+    loadMoreWorks() {
+      if (this.hasMore && !this.isLoading) {
+        this.loadWorksList();
+      }
+    },
+    updateDataList() {
+      this.data_list = this.worksList.map((item) => {
+        return {
+          url:
+            item.images || item.img_url || item.url || "../../static/logo.png",
+          title: item.title || item.description || "作品",
+          id: item.id,
+        };
+      });
+    },
+    goWork(item) {
+      uni.$emit("check_login", () => { });
+      // , //任务状态(1:排队中,3:生成失败,4:生成失败,9:创作完成)
+      if (this.activeTab == 0) {
+        uni.navigateTo({
+          url:
+            "/pages/makedetail/makeDetail?id=" +
+            item.queue_id +
+            "&queueId=" +
+            item.id,
+        });
+      } else {
+        if (item.status >= 9) {
+          uni.navigateTo({
+            url: "/pages/makedetail/makeDetail?id=" + item.id,
+          });
+        }
+        if (item.status < 9 && item.status != 3 && item.status != 4) {
+          var url = "";
+          if (item.task_type === 1) {
+            url = "/makedetail/makeImgDetail";
+          }
+          if (item.task_type === 2) {
+            url = "/makedetail/makeMusicDetail";
+          }
+          if (url) {
+            uni.navigateTo({
+              url: "/pages" + url + "?id=" + item.id,
+            });
+          }
+        }
+      }
+    },
+    navigateToFollow() {
+      uni.navigateTo({
+        url: "/pages/my/follow",
+      });
+    },
+  },
+};
+</script>
+
+<style scoped lang="scss">
+// 导入FontAwesome
+@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css");
+
+page {
+  background-color: #fff;
+  padding-top: var(--status-bar-height);
+  padding-bottom: 144rpx;
+}
+
+.page {
+  background-color: #fff;
+  width: 100%;
+  min-height: 100vh;
+}
+
+.topBody {
+  width: 750rpx;
+}
+
+.header {
+  padding: 20rpx;
+  padding-top: 48rpx;
+  background: linear-gradient(225deg, #cdff9f 0%, #acff5f 30%, #d0ffa5 100%);
+  min-height: 720rpx;
+  margin-bottom: -210rpx;
+
+  .card-box {
+    width: 100%;
+    min-height: 440rpx;
+    position: relative;
+    left: 0;
+    top: 0%;
+    overflow: hidden;
+
+    .card-top {
+      height: 435rpx;
+      width: 100%;
+      background: url("../../static/me/my-card-bg.png") top center / 100% auto,
+        #fff;
+      position: absolute;
+      top: 0%;
+      left: 0;
+      z-index: 5;
+      padding: 24rpx;
+      padding-top: 16rpx;
+      box-sizing: border-box;
+      border-radius: 25rpx;
+
+      .top-box {
+        display: flex;
+        justify-content: space-between;
+        padding-top: 8rpx;
+        background: url("../../static/me/car-top-bg-center.png") top center/ 146rpx 50rpx no-repeat;
+
+        .hello-box {
+          font-family: "CustomFont" !important;
+          font-size: 36rpx;
+          font-weight: 700;
+        }
+
+        .settingBtn-box {
+          width: 74rpx;
+          display: flex;
+          align-items: center;
+          justify-content: space-between;
+
+          image {
+            width: 64rpx;
+            height: 64rpx;
+          }
+        }
+      }
+
+      .userinfo-box {
+        min-height: 120rpx;
+        width: 100%;
+        display: flex;
+
+        .avator {
+          width: 120rpx;
+          height: 120rpx;
+          margin-right: 16rpx;
+        }
+
+        .userinfo-right {
+          .nickname {
+            font-weight: bold;
+            margin-bottom: 0rpx;
+            display: flex;
+            flex-direction: row;
+            justify-content: flex-start;
+            align-items: center;
+            display: flex;
+
+            >text {
+              max-width: 380rpx;
+              font-family: "PingFang SC-Bold";
+              font-weight: 400;
+              font-size: 36rpx;
+            }
+
+            image {
+              width: 36rpx;
+              margin-left: 8rpx;
+              margin-right: 10rpx;
+            }
+
+            .level {
+              font-weight: 400;
+              font-size: 20rpx;
+              font-family: "PingFang SC-Bold";
+              background: linear-gradient(360deg, #acf934 0%, #ffe439 100%);
+              border-radius: 8rpx;
+              padding: 2rpx 8rpx;
+            }
+          }
+
+          .label {
+            height: 55rpx;
+            height: 110rpx;
+            overflow: hidden;
+
+            >view {
+              color: #acf934;
+              font-family: "PingFang SC-Medium";
+              font-weight: 400;
+              font-size: 20rpx;
+              background: #1f1f1f;
+              border-radius: 6px 6px 6px 6px;
+              display: inline-block;
+              margin-left: 10rpx;
+              margin-bottom: 10rpx;
+              padding: 6rpx 16rpx;
+            }
+          }
+        }
+      }
+
+      .intro_row {
+        width: 100%;
+        margin-bottom: 20rpx;
+        display: flex;
+        align-items: center;
+
+        .intro_text {
+          color: #1f1f1f;
+          font-size: 28rpx;
+          font-family: "PingFang SC-Bold";
+          font-weight: 400;
+          padding-right: 0rpx;
+        }
+
+        .add_icon {
+          width: 28rpx;
+          margin-left: 10rpx;
+        }
+      }
+
+      .bom {
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+
+        .follow_info {
+          display: flex;
+          align-items: center;
+          justify-content: space-between;
+          width: 340rpx;
+
+          .follow-box {
+            display: flex;
+            flex-direction: column;
+            align-items: center;
+            justify-content: center;
+            text-align: center;
+          }
+
+          .num {
+            width: 100%;
+            font-size: 36rpx;
+            font-weight: bold;
+            color: #333;
+          }
+
+          .label {
+            width: 100%;
+            font-size: 28rpx;
+            color: #999;
+          }
+
+          .separator {
+            width: 2rpx;
+            height: 24rpx;
+            background-color: #e5e5e5;
+            margin: 0 30rpx;
+          }
+        }
+
+        .points-box {
+          display: flex;
+          justify-content: space-between;
+
+          .followTheAuthor {
+            padding: 6rpx 40rpx 8rpx 35rpx;
+            border-radius: 26rpx;
+            margin-right: 16rpx;
+            transition: all 0.6s;
+            border: 2rpx solid transparent;
+
+            &.followTheAuthor1 {
+              color: #acf934;
+              background: #1f1f1f;
+            }
+
+            &.followTheAuthor0 {
+              border: 2rpx solid #1f1f1f;
+              background: #fff;
+            }
+          }
+        }
+      }
+    }
+  }
+}
+
+.myinfo {
+  width: 100%;
+  display: flex;
+  flex-direction: column;
+  border-radius: 28rpx 28rpx 0 0;
+  padding: 24rpx 20rpx;
+  justify-content: flex-start;
+  box-sizing: border-box;
+  background: #fff;
+
+  .numlist1 {
+    display: grid;
+    grid-template-columns: repeat(2, 1fr);
+  }
+}
+</style>