ck@123911.net 3 месяцев назад
Родитель
Сommit
3e00c5b747

+ 5 - 4
components/cc-comment/cc-comment.vue

@@ -157,8 +157,8 @@
 				let result = [];
 				let map = {};
 				newData.forEach((item, i) => {
-					item.owner = item.user_id === this.myInfo.user_id; // 是否为当前登陆用户 可以对自己的评论进行删除 不能回复
-					item.author = item.user_id === this.userInfo.user_id; // 是否为作者 显示标记
+					item.owner = item.user_id === this.myInfo.user_id; // 是否为当前登陆用户
+					item.author = item.user_id === this.userInfo.user_id; // 是否为作者
 					map[item.id] = item;
 				});
 				newData.forEach((item) => {
@@ -186,12 +186,13 @@
 				index2
 			}) {
 				let item = item2 || item1;
+				let that = this;
 				this.setLike(item);
 				this.$emit("likeFun", {
 					params: item
 				}, (res) => {
 					// 请求后端失败, 重置点赞
-					setLike(item);
+					that.setLike(item);
 				});
 			},
 			// 回复
@@ -473,7 +474,7 @@
 		font-size: 28rpx;
 
 		.children_item {
-			padding: 20rpx 30rpx;
+			padding: 10rpx 0rpx 10rpx 0rpx;
 			margin-top: 10rpx;
 			margin-left: 80rpx;
 			background-color: $uni-bg-color-grey;

+ 4 - 0
components/cc-comment/componets/common.vue

@@ -123,6 +123,7 @@ export default {
   .top {
     @extend .center;
     justify-content: space-between;
+    width: 100%;
     .top_left {
       display: flex;
       align-items: center;
@@ -144,6 +145,9 @@ export default {
     }
     .top_right {
       @extend .center;
+      margin-left: auto;
+      min-width: 60rpx;
+      justify-content: flex-end;
       .like_count {
         color: #8c8c8c;
         &.active {

+ 15 - 2
pages.json

@@ -1,5 +1,5 @@
 {
-	"pages": [ 
+	"pages": [
 
 		{
 			"path": "pages/index/index",
@@ -22,6 +22,19 @@
 				"navigationStyle": "custom",
 				"navigationBarBackgroundColor": "#ffffff"
 			}
+		}, {
+			"path": "pages/make/fabuArticle",
+			"style": {
+				"navigationBarTitleText": "发布文章",
+				"navigationStyle": "custom",
+				"navigationBarBackgroundColor": "#ffffff"
+			}
+		}, {
+			"path": "pages/make/manageArticle",
+			"style": {
+				"navigationBarTitleText": "管理",
+				"navigationBarBackgroundColor": "#ffffff"
+			}
 		}, {
 			"path": "pages/make/make2",
 			"style": {
@@ -184,7 +197,7 @@
 				"navigationBarBackgroundColor": "#ffffff"
 			}
 		}, {
-			"path": "pages/my/task",
+			"path": "pages/my/job",
 			"style": {
 				"navigationBarTitleText": "任务中心",
 				"navigationBarBackgroundColor": "#ffffff"

+ 187 - 33
pages/index/articleDetail.scss

@@ -1,7 +1,11 @@
+// 导入FontAwesome
+@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css');
+
 page {
 	background-color: #ffffff;
 	width: 100%;
-	height: 100vh;
+	color: #333;
+	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
 }
 .page {
 	background-color: #ffffff;
@@ -32,70 +36,154 @@ page {
 .topUser {
 	width:750rpx;
 	height:750rpx;
-	// display: flex;
-	// flex-direction: column;
-	// justify-content: flex-end;
-	// align-items: flex-end;
-	// padding-bottom: 136rpx;
 	position: relative;
+	overflow: hidden;
 	.home_image{
 		width: 100%;
 		height: 100%;
+		transition: transform 0.3s ease;
+		
+		&:active {
+			transform: scale(1.05);
+		}
+	}
+	.image-indicator {
+		position: absolute;
+		top: 30rpx;
+		right: 30rpx;
+		background-color: rgba(0, 0, 0, 0.5);
+		color: #fff;
+		padding: 8rpx 16rpx;
+		border-radius: 20rpx;
+		font-size: 24rpx;
 	}
 	.list {
 		position: absolute;
-		bottom: 10rpx;
+		bottom: 20rpx;
 		width:100%;
 		display: flex;
 		flex-direction: row;
-		justify-content: flex-start;
+		justify-content: center;
 		align-items: flex-end;
+		padding: 0 20rpx;
+		overflow-x: auto;
+		
+		&::-webkit-scrollbar {
+			display: none;
+		}
+		
 		.img {
-			width:84rpx;height:84rpx;margin-left: 20rpx;
+			width:84rpx;height:84rpx;margin: 0 10rpx;
+			transition: all 0.3s ease;
 			image {
 				width:84rpx;height:84rpx;border-radius: 16rpx;border: solid 4rpx #fff;
+				box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.2);
 			}
 		}
 		.active {
 			width:136rpx;height:136rpx;
 			image {
 				width:136rpx;height:136rpx;border-radius: 24rpx;border: solid 4rpx #fff;
+				box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.3);
 			}
 		}
 	}
 }
 .body {
-	width:750rpx;margin-top:-30rpx;
-	border-radius: 28rpx 28rpx 0 0;padding-top:30rpx;
+	width:750rpx;margin-top:-60rpx;
+	border-radius: 40rpx 40rpx 0 0;padding-top:30rpx;
 	display: flex;flex-direction: column;justify-content: flex-start;align-items: flex-start;
-	.item {
-		display: flex;flex-direction: column;justify-content: flex-start;align-items: flex-start;
-		padding:30rpx 50rpx;color:#333;
+	box-shadow: 0 -10rpx 20rpx rgba(0, 0, 0, 0.05);
+	position: relative;
+	z-index: 10;
+	.article-header {
+		display: flex;
+		flex-direction: column;
+		justify-content: flex-start;
+		align-items: flex-start;
+		padding: 40rpx 50rpx 20rpx;
+		width: 100%;
+		box-sizing: border-box;
+		
 		.title {
-			font-weight: bold;margin-bottom: 0rpx;
-			display: flex;flex-direction: row;justify-content: flex-start;align-items: center;
 			font-size: 40rpx;
+			font-weight: bold;
+			color: #222;
+			margin-bottom: 20rpx;
+			line-height: 1.4;
 		}
-		.title2 {
-			color:#959595;padding-top: 8rpx;
+		
+		.meta-info {
+			display: flex;
+			flex-direction: row;
+			flex-wrap: wrap;
+			color: #999;
+			font-size: 26rpx;
+			
+			.meta-item {
+				display: flex;
+				align-items: center;
+				margin-right: 30rpx;
+				margin-bottom: 10rpx;
+				
+				.meta-text {
+					margin-left: 8rpx;
+				}
+			}
 		}
+	}
+	.divider {
+		height: 1rpx;
+		background-color: #eee;
+		width: 650rpx;
+		margin: 10rpx auto 30rpx;
+	}
+	.article-content {
+		padding: 0 50rpx 40rpx;
+		width: 100%;
+		box-sizing: border-box;
+		
 		.content {
-			font-size: 32rpx;color:#999;
+			font-size: 32rpx;
+			color: #333;
+			line-height: 1.8;
+			text-align: justify;
 		}
 	}
-	.item2 {
-		width:100%;display: flex;flex-direction: row;justify-content: space-between;align-items: flex-start;
-		padding:10rpx 30rpx;color:#fff;
-		.left {
-			image {
-				width:136rpx;height:56rpx;
-			}
-		}
-		.more {
-			display: flex;flex-direction: row;justify-content: center;align-items: center;
-			font-size: 28rpx;color:#999;
-			image {
-				width:30rpx;
+	.article-footer {
+		width: 100%;
+		padding: 20rpx 0;
+		border-top: 1rpx solid #f0f0f0;
+		
+		.action-bar {
+			display: flex;
+			justify-content: space-around;
+			align-items: center;
+			
+			.action-item {
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				padding: 20rpx 0;
+				
+				.fa {
+					font-size: 40rpx;
+					color: #666;
+					margin-bottom: 10rpx;
+					
+					&.liked {
+						color: #ff5151;
+					}
+				}
+				
+				.action-text {
+					font-size: 24rpx;
+					color: #666;
+				}
+				
+				&:active {
+					opacity: 0.7;
+				}
 			}
 		}
 	}
@@ -286,4 +374,70 @@ page {
 	margin: 50rpx;
 	border-radius: 20rpx;
 	background-color: #2979ff;
-  }
+  }
+
+.font-awesome-import {
+	display: none;
+}
+
+.fa {
+	font-family: 'FontAwesome';
+	margin-right: 6rpx;
+}
+
+// 评论区域样式
+.comment-section {
+	background-color: #f8f8f8;
+	padding: 30rpx 0;
+	margin-top: 20rpx;
+	border-radius: 30rpx 30rpx 0 0;
+	
+	.section-header {
+		display: flex;
+		align-items: center;
+		padding: 0 30rpx 20rpx;
+		border-bottom: 1rpx solid #eee;
+		margin-bottom: 20rpx;
+		
+		.fa {
+			font-size: 36rpx;
+			color: #2979ff;
+		}
+		
+		.section-title {
+			font-size: 32rpx;
+			font-weight: bold;
+			margin: 0 10rpx;
+			color: #333;
+		}
+		
+		.comment-count {
+			font-size: 28rpx;
+			color: #999;
+		}
+	}
+	
+	.comment-button {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 650rpx;
+		height: 90rpx;
+		background-color: #2979ff;
+		color: #fff;
+		border-radius: 45rpx;
+		margin: 40rpx auto 20rpx;
+		font-size: 30rpx;
+		box-shadow: 0 4rpx 12rpx rgba(41, 121, 255, 0.3);
+		transition: all 0.3s ease;
+		
+		.fa {
+			margin-right: 10rpx;
+		}
+		
+		&:active {
+			transform: scale(0.97);
+			background-color: #2567db;
+		}
+	}
+}

+ 309 - 157
pages/index/articleDetail.vue

@@ -1,7 +1,19 @@
 <template>
 	<view class="page">
-		<view class="topUser">
+		<!-- 引入FontAwesome -->
+		<view>
+			<link rel="stylesheet"
+				href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
+		</view>
+
+		<!-- 文章头图区域 -->
+		<view class="topUser" v-if="articleInfo.type == 'user'">
 			<image :src="home_image" class="home_image" mode="aspectFill"></image>
+			<!-- 图片指示器 -->
+			<view class="image-indicator" v-if="image_list.length > 1">
+				<text>{{ selImg + 1 }}/{{ image_list.length }}</text>
+			</view>
+			<!-- 缩略图列表 -->
 			<view class="list">
 				<view class="img" :class="selImg==index?'active':''" v-for="(item,index) in image_list" :key="index"
 					@click="selPhoto(item,index)">
@@ -9,19 +21,62 @@
 				</view>
 			</view>
 		</view>
+
+		<!-- 文章内容区域 -->
 		<view class="body">
-			<view class="item">
+			<!-- 文章标题与元信息 -->
+			<view class="article-header">
 				<view class="title">
-					标题标题标题标题标题
+					{{ articleInfo.title || '暂无标题' }}
 				</view>
-				<view class="title2">
-					时间:2025-02-20
+				<view class="meta-info">
+					<view class="meta-item">
+						<text class="fa fa-calendar"></text>
+						<text class="meta-text">{{ articleInfo.create_time || '暂无时间' }}</text>
+					</view>
+					<view class="meta-item">
+						<text class="fa fa-eye"></text>
+						<text class="meta-text">{{ articleInfo.view_count || 0 }}次阅读</text>
+					</view>
+					<view class="meta-item" v-if="articleInfo.author">
+						<text class="fa fa-user"></text>
+						<text class="meta-text">{{ articleInfo.author }}</text>
+					</view>
 				</view>
 			</view>
-			<view class="item">
-				<view class="content">内容内容内容内容内容</view>
+
+			<!-- 内容分隔线 -->
+			<view class="divider"></view>
+
+			<!-- 文章内容 -->
+			<!-- <view class="article-content" v-if="articleInfo.type == 'user'">
+				<view class="content">{{ articleInfo.content || '暂无内容' }}</view>
+			</view> -->
+			<view class="article-content">
+				<view class="content">
+					<rich-text :nodes="content" style="font-size: 14px;"></rich-text>
+				</view>
 			</view>
 
+			<!-- 文章底部区域 -->
+			<view class="article-footer">
+				<view class="action-bar">
+					<view class="action-item" @tap="likeArticle">
+						<text class="fa" :class="articleInfo.is_like ? 'fa-thumbs-up liked' : 'fa-thumbs-o-up'"></text>
+						<text class="action-text">{{ articleInfo.like_count || 0 }}</text>
+					</view>
+					<view class="action-item" @tap="openComment">
+						<text class="fa fa-comment-o"></text>
+						<text class="action-text">{{ tableTotal || 0 }}</text>
+					</view>
+					<view class="action-item" @tap="shareArticle">
+						<text class="fa fa-share-alt"></text>
+						<text class="action-text">分享</text>
+					</view>
+				</view>
+			</view>
+
+			<!-- 空白占位 -->
 			<view class="list_info">
 				<view class="blankHeight"></view>
 			</view>
@@ -37,17 +92,51 @@
 
 		<previewImage ref="previewImage" :opacity="0.8" :circular="true" :imgs="imgs" :descs="descs"></previewImage>
 
-		<CComment ref="ccRef" :myInfo="myInfo" :userInfo="userInfo" :tableData="tableData" :tableTotal.sync="tableTotal"
-			:deleteMode="deleteMode" @likeFun="likeFun" @replyFun="replyFun" @deleteFun="deleteFun"></CComment>
-		<view class="btn" @tap="openComment">发表新评论</view>
+		<!-- 评论区域 -->
+		<view class="comment-section">
+			<view class="section-header">
+				<text class="fa fa-comments"></text>
+				<text class="section-title">评论区</text>
+				<text class="comment-count">({{ tableTotal }})</text>
+			</view>
+
+			<CComment ref="ccRef" :myInfo="myInfo" :userInfo="userInfo" :tableData="tableData"
+				:tableTotal.sync="tableTotal" :deleteMode="deleteMode" @likeFun="likeFun" @replyFun="replyFun"
+				@deleteFun="deleteFun"></CComment>
+
+			<view class="comment-button" @tap="openComment">
+				<text class="fa fa-pencil"></text>
+				<text>发表新评论</text>
+			</view>
+		</view>
+
 		<view class="thread2"></view>
 
 	</view>
 </template>
 
 <script>
+	import htmlParser from '../../common/html-parser'
 	import CComment from "@/components/cc-comment/cc-comment.vue";
 	import previewImage from '@/components/kxj-previewImage/kxj-previewImage.vue'; //引用插件
+	function parseImgs(nodes) {
+		nodes.forEach(node => {
+			if (
+				node.name === 'img' &&
+				node.attrs &&
+				node.attrs['data-img-size-val']
+			) {
+				const sizes = node.attrs['data-img-size-val'].split(',')
+				const width = uni.upx2px(720 * 0.9)
+				const height = parseInt(width * (sizes[1] / sizes[0]))
+				node.attrs.style = `width:${width};height:${height};`
+			}
+			if (Array.isArray(node.children)) {
+				parseImgs(node.children)
+			}
+		})
+		return nodes
+	}
 	export default {
 		components: {
 			previewImage,
@@ -56,7 +145,7 @@
 		data() {
 			return {
 				title: '',
-				userID: 0,
+				arcID: 0,
 				selImg: 0,
 				home_image: '',
 				myinfo: {},
@@ -66,7 +155,17 @@
 				descs: [],
 				list_wish: [],
 
-
+				// 添加文章信息字段
+				articleInfo: {
+					title: '',
+					content: '',
+					create_time: '',
+					images: '',
+					view_count: 0,
+					author: '',
+					like_count: 0,
+					is_like: false
+				},
 
 				myInfo: {
 					user_id: 1, // 用户id
@@ -83,71 +182,19 @@
 				// 评论总数
 				tableTotal: 4,
 				// 评论表
-				tableData: [{
-						id: 120, // 评论id
-						parent_id: null, // 评论父级的id
-						reply_id: null, // 被回复评论的id
-						reply_name: null, // 被回复人的名称
-						user_id: 2, // 用户id
-						user_name: "ikun", // 用户名
-						user_avatar: "https://pic1.zhimg.com/80/v2-a79071a705f55c5d88f6c74e6111fe84_720w.webp", // 用户头像地址
-						user_content: "唱,跳,rap,篮球", // 用户评论内容
-						is_like: false, // 用户是否点赞
-						like_count: 120, // 点赞数统计
-						create_time: "2025-02-19 09:16", // 创建时间
-					},
-					{
-						id: 130, // 评论id
-						parent_id: 120, // 评论父级的id
-						reply_id: 120, // 被回复评论的id
-						reply_name: "ikun", // 被回复人的名称
-						user_id: 3, // 用户id
-						user_name: "小黑子", // 用户名
-						user_avatar: "https://pic2.zhimg.com/80/v2-06eade66ec837713d765b1557bf20b25_720w.webp", // 用户头像地址
-						user_content: "姬霓太美~祝自己生日快乐~~", // 用户评论内容
-						is_like: false, // 用户是否点赞
-						like_count: 67, // 点赞数统计
-						create_time: "2025-03-07 00:06", // 创建时间
-					},
-					{
-						id: 140, // 评论id
-						parent_id: 120, // 评论父级的id
-						reply_id: 130, // 被回复评论的id
-						reply_name: "小黑子", // 被回复人的名称
-						user_id: 4, // 用户id
-						user_name: "守护宗主维护宗门", // 用户名
-						user_avatar: "https://pic3.zhimg.com/80/v2-244696a62fa750b8570cf56bfaa5b26a_720w.webp", // 用户头像地址
-						user_content: "你露出鸡脚了", // 用户评论内容
-						is_like: false, // 用户是否点赞
-						like_count: 16, // 点赞数统计
-						create_time: "2025-05-10 17:08", // 创建时间
-					},
-					{
-						id: 150, // 评论id
-						parent_id: null, // 评论父级的id
-						reply_id: null, // 被回复评论的id
-						reply_name: null, // 被回复人的名称
-						user_id: 5, // 用户id
-						user_name: "音乐制作人", // 用户名
-						user_avatar: "https://pic2.zhimg.com/80/v2-88ec6f8c6d3305122664dd18a28730e5_720w.webp", // 用户头像地址
-						user_content: "只因你太美baby 只因你太美baby 只因你实在是太美baby 只因你太美baby 迎面走来的你让我如此蠢蠢欲动 这种感觉我从未有 Cause I got a crush on you who you 你是我的 我是你的 谁 再多一眼看一眼就会爆炸 再近一点靠近点快被融化", // 用户评论内容
-						is_like: true, // 用户是否点赞
-						like_count: 8, // 点赞数统计
-						create_time: "2025-12-21 00:45", // 创建时间
-					},
-				],
+				tableData: [],
 
 
 			}
 		},
 		onLoad(parms) {
 			let self = this;
-			this.userID = parms.uid || 1069;
+			this.arcID = parms.id || 132;
 		},
 		onShow() {
 			uni.$emit('check_update');
 			this.loadData();
-			this.loadWishData();
+			this.loadCommentData();
 		},
 		methods: {
 			onLinqu(item) {
@@ -159,27 +206,6 @@
 				this.selImg = sel;
 				this.home_image = this.image_list[sel];
 			},
-			chatTA() {
-				// uni.navigateTo({
-				// 	url: '/pages/chat/detail?userID=1&nickName=' + encodeURIComponent("昵称") +
-				// 		"&conversationType=C2C"
-				// });
-				let conversationID = "";
-				let conversationType = "C2C";
-				let userID = "" + this.myinfo.userID;
-				let nickName = this.myinfo.nickname;
-
-				var jsonConversationID = encodeURIComponent(JSON.stringify(conversationID));
-				var jsonConversationType = encodeURIComponent(JSON.stringify(conversationType));
-
-				var jsonUserID = encodeURIComponent(JSON.stringify(userID));
-				var jsonNickName = encodeURIComponent(JSON.stringify(nickName));
-
-				uni.navigateTo({
-					url: "/pages/chat/detail?userID=" + jsonUserID + "&nickName=" + jsonNickName +
-						"&conversationID=" + jsonConversationID + "&conversationType=" + jsonConversationType
-				})
-			},
 			toArr(imgs) {
 				let arr = imgs.split("|");
 				return arr;
@@ -190,79 +216,83 @@
 				// 传入当前选中的图片地址或序号
 				return; //如需测试和uni原生预览差别可注释这两行
 			},
-			loadWishData() {
-				uni.request({
-					url: this.$apiHost + '/Wish/getMyList',
-					data: {
-						uuid: getApp().globalData.uuid,
-						userID: this.userID
-					},
-					header: {
-						'content-type': 'application/json'
-					},
-					success: (res) => {
-						console.log("res", res.data)
-						this.list_wish = res.data.list;
-					}
-				});
-			},
 			loadData() {
-				// console.log({
-				// 	uuid: getApp().globalData.uuid,
-				// 	skey: getApp().globalData.skey
-				// });
 				uni.request({
-					url: this.$apiHost + '/Member/getHomeInfo',
+					url: this.$apiHost + '/Article/getinfo',
 					data: {
 						uuid: getApp().globalData.uuid,
-						userID: this.userID
+						id: this.arcID
 					},
 					header: {
 						"content-type": "application/json",
 						'sign': getApp().globalData.headerSign
 					},
 					success: (res) => {
-						console.log("----:", res.data);
-						this.myinfo = res.data;
-						if (res.data.tags != "") {
-							this.tag_list = res.data.tags.split(",");
-						}
-						if (res.data.images != "") {
-							this.image_list = res.data.images.split(",");
-							this.home_image = this.image_list[0];
+						console.log("文章信息:", res.data);
+						if (res.data.success === "yes") {
+							// 更新文章信息
+							this.articleInfo = res.data.article;
+							const nodes = htmlParser(res.data.article.content);
+							// #ifdef APP-PLUS-NVUE
+							parseImgs(nodes)
+							// #endif
+							this.content = nodes
+
+							// 更新图片列表
+							if (res.data.article.images && res.data.article.images !== "") {
+								this.image_list = res.data.article.images.split(",");
+								this.home_image = this.image_list[0];
+							} else {
+								this.home_image = "../../static/home/avator.png";
+							}
+
+							// 更新标签列表
+							// if (res.data.data.tags && res.data.data.tags !== "") {
+							// 	this.tag_list = res.data.data.tags.split(",");
+							// }
 						} else {
-							this.home_image = "../../static/home/avator.png";
+							uni.showToast({
+								title: '获取文章信息失败',
+								icon: 'none'
+							});
 						}
 					},
 					complete: (com) => {
 						// uni.hideLoading();
 					},
 					fail: (e) => {
-						console.log("----e:", e);
+						console.log("请求失败:", e);
+						uni.showToast({
+							title: '网络请求失败',
+							icon: 'none'
+						});
 					}
 				});
 			},
-
-			ZhanTA(item, index) {
-				// this.list[index].is_like = 1;
-				// this.list[index].num_like++;
-				// return;
-				let that = this;
+			loadCommentData() {
 				uni.request({
-					url: this.$apiHost + '/Article/zanTA',
+					url: this.$apiHost + '/Article/getcomments',
 					data: {
 						uuid: getApp().globalData.uuid,
-						id: item.id
+						id: this.arcID,
+						page: 1,
+						limit: 10
 					},
 					header: {
 						"content-type": "application/json",
 						'sign': getApp().globalData.headerSign
 					},
 					success: (res) => {
-						console.log("----:", res.data);
+						console.log("评论列表:", res.data);
 						if (res.data.success == "yes") {
-							that.myinfo.article_list[index].is_like = 1;
-							that.myinfo.article_list[index].num_like++;
+							this.$set(this, 'tableData', res.data.list);
+							this.tableTotal = res.data.total;
+							console.log("tabddd", this.tableData)
+						} else {
+							uni.showToast({
+								title: '获取评论列表失败',
+								icon: 'none'
+							});
 						}
 					},
 					complete: (com) => {
@@ -286,7 +316,7 @@
 			}, callback) {
 				console.log("likeFun", params);
 				uni.request({
-					url: this.$apiHost + '/ArticleReply/zanTA',
+					url: this.$apiHost + '/Article/zanComment',
 					data: {
 						uuid: getApp().globalData.uuid,
 						id: params.id
@@ -307,6 +337,80 @@
 					}
 				});
 			},
+			// 文章点赞
+			likeArticle() {
+				uni.request({
+					url: this.$apiHost + '/Article/like',
+					data: {
+						uuid: getApp().globalData.uuid,
+						id: this.arcID
+					},
+					header: {
+						"content-type": "application/json",
+						'sign': getApp().globalData.headerSign
+					},
+					success: (res) => {
+						console.log("点赞结果:", res.data);
+						if (res.data.success === "yes") {
+							// 更新点赞状态
+							if (!this.articleInfo.is_like) {
+								this.articleInfo.like_count = (this.articleInfo.like_count || 0) + 1;
+								this.articleInfo.is_like = true;
+								uni.showToast({
+									title: '点赞成功',
+									icon: 'none'
+								});
+							}else {
+								this.articleInfo.like_count = (this.articleInfo.like_count || 0) - 1;
+								this.articleInfo.is_like = false;
+								uni.showToast({
+									title: '取消点赞',
+									icon: 'none'
+								});
+							}
+						} else {
+							uni.showToast({
+								title: '点赞失败',
+								icon: 'none'
+							});
+						}
+					},
+					fail: (e) => {
+						console.log("点赞失败:", e);
+						uni.showToast({
+							title: '网络请求失败',
+							icon: 'none'
+						});
+					}
+				});
+			},
+
+			// 分享文章
+			shareArticle() {
+				// 如果在微信小程序环境
+				if (uni.getSystemInfoSync().platform === 'mp-weixin') {
+					uni.showShareMenu({
+						withShareTicket: true,
+						menus: ['shareAppMessage', 'shareTimeline']
+					});
+				} else {
+					// 其他环境,如APP
+					uni.share({
+						provider: "weixin",
+						scene: "WXSceneSession",
+						type: 0,
+						title: this.articleInfo.title,
+						summary: this.articleInfo.content.substring(0, 40) + "...",
+						imageUrl: this.home_image,
+						success: function(res) {
+							console.log("分享成功:" + JSON.stringify(res));
+						},
+						fail: function(err) {
+							console.log("分享失败:" + JSON.stringify(err));
+						}
+					});
+				}
+			},
 			// 评论回调事件
 			replyFun({
 				params
@@ -322,12 +426,19 @@
 				// 	create_time: "刚刚", // 创建时间
 				// 	owner: true, // 是否为所有者 所有者可以进行删除 管理员默认true
 				// };
-				console.log("replyFun", params);
+				console.log("replyFun", {
+						uuid: getApp().globalData.uuid,
+						article_id: this.arcID, // 文章ID
+						content: params.user_content, // 评论内容
+						parent_id: params.parent_id || 0, // 父评论ID
+						reply_id: params.reply_id || 0, // 回复的评论ID
+						reply_name: params.reply_name || '' // 被回复人名称
+					});
 				uni.request({
-					url: this.$apiHost + '/ArticleReply/new',
+					url: this.$apiHost + '/Article/newComment',
 					data: {
 						uuid: getApp().globalData.uuid,
-						article_id: this.userID, // 文章ID
+						article_id: this.arcID, // 文章ID
 						content: params.user_content, // 评论内容
 						parent_id: params.parent_id || 0, // 父评论ID
 						reply_id: params.reply_id || 0, // 回复的评论ID
@@ -367,28 +478,45 @@
 					params,
 					mode
 				});
-				// 当请求成功, 调用callback执行评论删除;
-				// Demo如下:
-				// axios.post("http://xxx/delete", { ids: params, mode }).then((res) => {
-				//   if (res.code === 0) {
-				//     callback(res);
-				//   }
-				// });
-				switch (mode) {
-					case "bind":
-						// 逻辑: 调用接口进行评论内容修改 update
-						setTimeout(() => callback(), 500); // 目前为了展示效果, 直接执行callback
-						break;
-					case "only":
-						// 逻辑: 调用接口删除一个评论 delete
-						setTimeout(() => callback(), 500); // 目前为了展示效果, 直接执行callback
-						break;
-					default:
-						// all
-						// 逻辑: 调用接口删除多个评论 [delete]
-						setTimeout(() => callback(), 500); // 目前为了展示效果, 直接执行callback
-						break;
-				}
+				// 将params转换为逗号分隔的字符串
+				const idsString = Array.isArray(params) ? params.join(',') : params.toString();
+				
+				console.log("删除评论", idsString, mode)
+				uni.request({
+					url: this.$apiHost + '/Article/delComment',
+					data: {
+						uuid: getApp().globalData.uuid,
+						ids: idsString, // 将params转换为逗号分隔的字符串传递给ids
+						mode: mode
+					},
+					header: {
+						"content-type": "application/json",
+						'sign': getApp().globalData.headerSign
+					},
+					success: (res) => {
+						console.log("删除结果:", res.data);
+						if (res.data.success === "yes") {
+							callback(res);
+						}
+					},
+					fail: (e) => {
+					}
+				});
+				// switch (mode) {
+				// 	case "bind":
+				// 		// 逻辑: 调用接口进行评论内容修改 update
+				// 		setTimeout(() => callback(), 500); // 目前为了展示效果, 直接执行callback
+				// 		break;
+				// 	case "only":
+				// 		// 逻辑: 调用接口删除一个评论 delete
+				// 		setTimeout(() => callback(), 500); // 目前为了展示效果, 直接执行callback
+				// 		break;
+				// 	default:
+				// 		// all
+				// 		// 逻辑: 调用接口删除多个评论 [delete]
+				// 		setTimeout(() => callback(), 500); // 目前为了展示效果, 直接执行callback
+				// 		break;
+				// }
 			},
 
 
@@ -400,4 +528,28 @@
 
 <style scoped lang="scss">
 	@import 'articleDetail.scss';
+
+	/* 确保评论按钮样式 */
+	.comment-button {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 650rpx;
+		height: 90rpx;
+		background-color: #2979ff;
+		color: #fff;
+		border-radius: 45rpx;
+		margin: 40rpx auto 20rpx;
+		font-size: 30rpx;
+		box-shadow: 0 4rpx 12rpx rgba(41, 121, 255, 0.3);
+	}
+
+	.comment-button .fa {
+		margin-right: 10rpx;
+	}
+
+	.comment-button:active {
+		opacity: 0.9;
+		transform: scale(0.98);
+	}
 </style>

+ 47 - 2
pages/index/index.vue

@@ -102,7 +102,8 @@
 					<swiper class="hot-topics-swiper" :current="currentTopicPage" @change="handleTopicPageChange">
 						<swiper-item v-for="(page, pageIndex) in topicPages" :key="pageIndex">
 							<view class="hot-topics-list">
-								<view v-for="(topic, index) in page" :key="index" class="topic-item">
+								<view v-for="(topic, index) in page" :key="index" class="topic-item" 
+									@click="goToArticleDetail(topic.id)">
 									<text class="topic-index">{{ pageIndex * 5 + index + 1 }}</text>
 									<view class="topic-content">
 										<view class="topic-title-row">
@@ -146,7 +147,8 @@
 				<!-- 探索列表 - 热点新闻已经有现成的热搜资讯组件,只需添加新闻列表 -->
 				<view v-if="currentTab === 2 && newsList.length > 0" class="news-list">
 					<view class="news-grid">
-						<view class="news-item" v-for="(item, index) in newsList" :key="index">
+						<view class="news-item" v-for="(item, index) in newsList" :key="index"
+							@click="goToArticleDetail(item.id)">
 							<image class="news-image" :src="item.img_url || item.images" mode="aspectFill"></image>
 							<view class="news-title">{{item.title || '新闻标题'}}</view>
 							<view class="news-footer">
@@ -171,6 +173,11 @@
 		</z-paging>
 		<tabbar-vue :tabbars="tabbars" :currentIndex="0" ref="tabbar"></tabbar-vue>
 
+		<!-- 添加浮动按钮 -->
+		<view v-if="currentTab === 2" class="float-btn" @click="goToMake">
+			<image src="/static/icon/icon_add_black.png" class="float-btn-icon"></image>
+		</view>
+
 		<novice-guidance :step="step"></novice-guidance>
 	</view>
 </template>
@@ -551,6 +558,7 @@
 								// 将API返回的热点新闻转换为热搜资讯格式
 								this.hotTopics = this.hotNewsList.map((item, index) => {
 									return {
+										id: item.id,
 										title: item.title || '热门话题',
 										num_like: item.num_like || 0,
 										isHot: index % 2 === 0 // 偶数索引的设为热点
@@ -649,6 +657,23 @@
 					desc: item.desc || ''
 				}
 			},
+			goToArticleDetail(id) {
+				if (!id) {
+					uni.showToast({
+						title: '文章ID不存在',
+						icon: 'none'
+					});
+					return;
+				}
+				uni.navigateTo({
+					url: '/pages/index/articleDetail?id=' + id
+				});
+			},
+			goToMake() {
+				uni.navigateTo({
+					url: '/pages/make/make'
+				});
+			},
 		}
 	}
 </script>
@@ -914,4 +939,24 @@
 			}
 		}
 	}
+
+	.float-btn {
+		position: fixed;
+		right: 30rpx;
+		bottom: 120rpx;
+		width: 100rpx;
+		height: 100rpx;
+		background-color: #FFFFFF;
+		border-radius: 50%;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, 0.1);
+		z-index: 999;
+
+		.float-btn-icon {
+			width: 40rpx;
+			height: 40rpx;
+		}
+	}
 </style>

+ 256 - 0
pages/make/fabuArticle.scss

@@ -0,0 +1,256 @@
+page {
+  position: absolute;
+  left: 0;
+  top: 0;
+  width: 100%;
+  display: flex;
+  background-color: #f8f8f8;
+}
+
+.status_bar {
+  height: 44rpx;
+  width: 100%;
+}
+.page {
+  background-color: #f8f8f8;
+  display: flex;
+  flex-direction: column;
+	width:750rpx;
+}
+
+.nav-bar {
+  width: 750rpx;
+  height: 88rpx;
+  background-color: #fff;
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  justify-content: space-between;
+  padding: 0 10rpx;
+  box-sizing: border-box;
+  border-bottom: 0rpx solid #f0f0f0;
+
+  .left {
+    width: 120rpx;
+    .uni-btn-icon {
+      font-size: 50rpx;
+      color: #000;
+    }
+  }
+
+  .center {
+    flex: 1;
+    text-align: center;
+    font-size: 32rpx;
+    font-weight: bold;
+    color: #333;
+  }
+
+  .right {
+    display: flex;
+    align-items: center;
+    
+    .btn {
+      font-size: 28rpx;
+      color: #333;
+      margin-left: 30rpx;
+      
+      &:active {
+        opacity: 0.7;
+      }
+    }
+  }
+}
+
+/* 用户信息列表 */
+.user-list{
+	width:710rpx;
+	border-radius: 20rpx;
+	margin: 20rpx auto;
+	.agree {
+		width:100%;text-align: center;color:#959595;font-size: 22rpx;padding:20rpx 0;margin-top: 0rpx;padding-right: 50rpx;
+		display: flex;flex-direction: row;justify-content: flex-end;align-items: center;
+		.xy {
+			color:darkred;padding:0rpx 20rpx;
+		}
+		image {
+			width:32rpx;margin-right: 8rpx;
+		}
+	}
+	.tips {
+		display: flex;flex-direction: row;justify-content: space-between;
+		height: 90rpx;
+		.title {
+			display: flex;flex-direction: row;justify-content: center;height: 80rpx;line-height: 80rpx;font-weight: bold;font-size: 30rpx;
+			.line {
+				width:10rpx;height:24rpx;background-color: $base;line-height: 80rpx;margin: 28rpx 20rpx;
+			}
+		}
+		.more-content{
+			display: flex;flex-direction: row;height:100%;
+			align-items: center;
+			.item1 {
+				display: flex;justify-content: center;height:100%;flex-direction: row;line-height: 100%;align-items: center;align-self: center;
+				.switch {
+				}
+				.status {
+					color:#E54D42;
+				}
+				.btn {
+					width:160rpx;height:50rpx;margin: 0 20rpx;text-align: center;margin-left: 40rpx;
+					background-color: #39B54A;border-radius: 25rpx;color:#fff;font-size: 24rpx;line-height: 50rpx;
+				}
+			}
+		}
+		.beizu {
+			padding:10rpx 30rpx;color:#959595;
+		}
+	}
+	.content {
+		padding:10rpx 30rpx;
+		display: flex;flex-direction: column;justify-content: space-between;
+		.edit {
+			border:solid 1px #f0f0f0;border-radius: 10rpx;width:670rpx;height:80rpx;font-size: 30rpx;padding:10rpx;background-color: #fff;
+		}
+		.edit2 {
+			border:solid 1px #f0f0f0;background-color: #fff;
+			border-radius: 10rpx;
+			width:670rpx;
+			height:340rpx;
+			font-size: 30rpx;
+			padding: 10rpx;
+			box-sizing: border-box;
+		}
+		.item {
+			display: flex;flex-direction: row;justify-content: space-between;
+			border:solid 1px #f0f0f0;border-radius: 10rpx;width:730rpx;height:80rpx;align-items: center;
+			.left {
+				padding-left: 10rpx;width:168rpx;font-size: 28rpx;
+			}
+			.input {
+				width:570rpx;font-size: 28rpx;
+			}
+			.picker {
+				padding-left: 10rpx;width:120rpx;display: flex;flex-direction: row;justify-content: space-between;
+				.selimg {
+					width:24rpx;height:24rpx;margin-top: 4rpx;margin-left: 12rpx;
+				}
+			}
+			.edit3 {
+				border:solid 0px #f0f0f0;border-radius: 10rpx;width:730rpx;height:140rpx;font-size: 28rpx;padding:8rpx;
+			}
+		}
+		.item2 {
+			display: flex;flex-direction: row;justify-content: space-between;margin-top: 10rpx;
+			.item21 {
+				display: flex;flex-direction: row;justify-content: space-between;
+				border:solid 1px #f0f0f0;border-radius: 10rpx;width:360rpx;height:80rpx;align-items: center;
+				.left {
+					padding-left: 10rpx;width:120rpx;line-height: 60rpx;font-size: 28rpx;
+				}
+				.input {
+					width:360rpx;font-size: 28rpx;line-height: 60rpx;
+				}
+			}
+		}
+	}
+	.img {
+		width:100%;padding-left: 20rpx;
+		image {
+			width:710rpx;
+		}
+	}
+	.img_list {
+		display: flex;
+		width:100%;
+		padding:20rpx 40rpx;
+		flex-wrap: wrap;
+		.image {
+			display: flex;
+			width:200rpx;
+			height:200rpx;
+			position: relative;
+			margin: 10rpx;
+			box-sizing: border-box;
+			justify-content: center;
+			align-items: center;
+			background: rgba(120, 120, 120, 0.2);border-radius: 8rpx;
+			
+			.txt {
+				font-size: 120rpx;
+				color: #999;
+			}
+			
+			.upimg {
+				position: absolute;left:0;top:0;
+				width:100%;
+				height:100%;
+				border-radius: 8rpx;
+			}
+			
+			.del {
+				width:40rpx;
+				height:40rpx;
+				position: absolute;
+				right:-10rpx;
+				top:-10rpx;
+			}
+		}
+	}
+	.btn_list {
+		display: flex;flex-direction: row;align-items: center;justify-content: center;
+		.btn_sq {
+			width:300rpx;height:80rpx;background-color: #BF8669;border-radius: 4rpx;text-align: center;color:#fff;line-height: 80rpx;
+			font-size: 32rpx;margin:20rpx;
+		}
+		
+	}
+	.telbg {
+		width:750rpx;height:350rpx;display: flex;flex-direction: column;padding-left: 40rpx;padding-top: 120rpx;color:#fff;
+		background-color: #517456;font-size: 30rpx;
+		.tel {
+			font-size: 80rpx;color:#BF8669;
+		}
+	}
+	.img2 {
+		width:100%;padding-left: 0rpx;
+		image {
+			width:750rpx;
+		}
+	}
+
+}
+.footer {
+	position: fixed;bottom:0rpx;width:750rpx;height:120rpx;display: flex;flex-direction: row;justify-content: center;
+	background: #fff;
+	.btn {
+		width:690rpx;height:80rpx;background-color: #39B54A;border-radius: 40rpx;text-align: center;color:#fff;line-height: 80rpx;
+		font-size: 32rpx;
+	}
+}
+.foot-btn {
+	height: 80rpx;padding:60rpx;
+	button {
+		height: 80rpx;line-height: 80rpx;font-size: 28rpx;
+	}
+}
+.uni-textarea-placeholder {
+    color: #959595;
+    overflow: hidden;
+}
+.num_txt {
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    padding: 20rpx 30rpx;
+    
+    .num_input {
+        width: 120rpx;
+        height: 60rpx;
+        border: 1px solid $base;
+        border-radius: 10rpx;
+        margin: 0 20rpx;
+        text-align: center;
+        font-size: 28rpx;
+    }
+}

+ 375 - 0
pages/make/fabuArticle.vue

@@ -0,0 +1,375 @@
+<template>
+	<view class="page">
+		<view class="nav-bar">
+			<view class="left">
+				<view class="uni-btn-icon" @click="goBack">&#xe601;</view>
+			</view>
+			<view class="center">发表想法</view>
+			<view class="right">
+				<view class="btn" @click="onManage">管理</view>
+				<view class="btn" @click="onSubmit" v-if="id < 1">发布</view>
+				<view class="btn" @click="onSubmit" v-else>更新</view>
+			</view>
+		</view>
+		<view class="user-list">
+			<view class="content">
+				<input class="edit" v-model="ainfo.title" maxlength="20" placeholder="填写标题会有更多赞哦~" />
+			</view>
+			<view class="content">
+				<textarea class="edit2" v-model="ainfo.content" :maxlength="1000"
+					placeholder="美好的一天,写点什么吧..."></textarea>
+			</view>
+			<view class="agree">
+				<text>还可以输入<text class="xy">{{1000 - ainfo.content.length}}</text>字</text>
+			</view>
+
+			<view class="img_list">
+
+				<view class="image" v-for="(item,index) in img_list" :key="index">
+					<image class="upimg" :src="item" mode="aspectFill"></image>
+					<image class="del" src="../../static/del.svg" @click="delIt(index)"></image>
+				</view>
+				<view class="image" @click="upload('list')" v-if="img_list.length < 9">
+					<text class="txt">+</text>
+				</view>
+			</view>
+			<view style="display:flex;flex-direction: column;height:200rpx;"></view>
+		</view>
+
+
+
+	</view>
+</template>
+
+<script>
+	export default {
+		components: {},
+		data() {
+			return {
+				skey: '',
+				uinfo: {},
+				is_first: 0,
+				pid: 0,
+				sel: 0,
+				pop_sel: false,
+				cate: '',
+				cid: 0,
+				catename: '',
+				img2: '',
+				cateNames: [],
+				cate_list: [],
+				CateIndex: 0,
+				nameList1: [],
+				nameList2: [],
+				content: '',
+				cate: '',
+				ainfo: {
+					id: 0,
+					title: '',
+					content: '',
+					name: '',
+					telphone: '',
+					address: '',
+					contact: '',
+					num: '',
+				},
+				TypeArray: ['请选择', '线下服务', '电话咨询', '远程服务', '视频咨询', '其他服务'],
+				TypeIndex: 0,
+				TypeArray2: ['请选择', '次', '天', '小时', '分钟', '周', '月', '年', '单', '份'],
+				TypeIndex2: 0,
+				img_list: [],
+				img_list2: [],
+				img_list1: [],
+				visible: false,
+				maskCloseAble: true,
+				str: '',
+				defaultValue: '',
+				listData: [],
+				cateTag: [],
+				money: '',
+				item_gz: -1,
+				item_time: [],
+				item_dx: [],
+				is_top: false,
+				is_agree: 0,
+			}
+		},
+		onLoad(params) {
+			if (getApp().globalData.skey != "") {
+				this.skey = getApp().globalData.skey;
+			} else {
+				this.skey = params.skey || ''; //1234567xef
+			}
+			this.id = params.id || '117';
+			let that = this;
+			// this.getCate();
+			that.getInfo();
+			// this.getData();
+		},
+		onShow() {
+			let that = this;
+		},
+		methods: {
+			goBack() {
+				uni.navigateBack();
+			},
+			onManage() {
+				// 处理管理按钮点击
+				uni.redirectTo({
+					url: '/pages/make/manageArticle'
+				})
+			},
+			onPublish() {
+				this.onSubmit();
+			},
+			copyKd(item_data) {
+				if (item_data != "") {
+					uni.setClipboardData({
+						data: item_data, // e是需要设置的内容
+						success: function() {
+							uni.showToast({
+								title: '网址已复制',
+								icon: 'none'
+							})
+						}
+					})
+				}
+			},
+			agreeChk() {
+				if (this.is_agree == 0) {
+					this.is_agree = 1;
+				} else {
+					this.is_agree = 0;
+				}
+			},
+			showPicker() {
+				this.pop_sel = true;
+			},
+			open() {
+				this.visible = true
+			},
+			confirm(val) {
+				console.log(val)
+				this.defaultValue = val.code
+				this.ainfo.city = val.desc
+				this.visible = false
+			},
+			cancel() {
+				this.visible = false
+			},
+			delIt(ind) {
+				let arr = [];
+				if (this.img_list.length > 0) {
+					for (let i = 0; i < this.img_list.length; i++) {
+						if (i == ind) {} else {
+							arr.push(this.img_list[i]);
+						}
+					}
+					this.img_list = arr;
+				}
+			},
+			getInfo() {
+				var that = this;
+
+				uni.request({
+					url: this.$apiHost + '/Article/getinfo', //仅为示例,并非真实接口地址。
+					data: {
+						uuid: getApp().globalData.uuid,
+						id: this.id
+					},
+					header: {
+						'content-type': 'application/json' //自定义请求头信息
+					},
+					success: (res) => {
+						console.log("====", res.data);
+						this.ainfo = res.data.article;
+						that.img_list1 = [];
+						that.img_list = [];
+						that.img_list2 = [];
+						if (res.data.article.images.length > 1) {
+							let arr = res.data.article.images.split("|");
+							if (arr.length > 0) {
+								for (let i = 0; i < arr.length; i++) {
+									if (arr[i].length > 10) {
+										that.img_list.push(arr[i]);
+									}
+								}
+							}
+						}
+
+					}
+				});
+
+
+			},
+			checkField(str, tips) {
+				if (str.length < 2) {
+					uni.showToast({
+						title: tips,
+						icon: 'none'
+					});
+					return false;
+				}
+				return true;
+			},
+			onSubmit() {
+				console.log("skey", this.skey);
+				if (this.checkField(this.ainfo.title, "请输入名称") == false) {
+					return;
+				}
+				if (this.checkField(this.ainfo.content, "请输入具体内容") == false) {
+					return;
+				}
+				if (this.is_submit > 0) {
+					return;
+				}
+
+				let img_str = '';
+				if (this.img_list.length > 0) {
+					for (let i = 0; i < this.img_list.length; i++) {
+						img_str += this.img_list[i] + "|";
+					}
+				}
+				if (this.checkField(img_str, "请上传至少一张图片") == false) {
+					return;
+				}
+				let that = this;
+				this.is_submit = 1;
+				uni.request({
+					url: this.$apiHost + '/Article/add',
+					data: {
+						uuid: getApp().globalData.uuid,
+						id: this.ainfo.id,
+						title: this.ainfo.title,
+						content: this.ainfo.content,
+						img_list: img_str,
+
+					},
+					//data: formdata,   // 这里传入你的参数(json格式)
+					method: 'POST',
+					header: {
+						'Content-Type': 'application/x-www-form-urlencoded',
+						'sign': getApp().globalData.headerSign
+					},
+					dataType: 'json',
+					success: (res) => {
+						console.log("---", res.data);
+						uni.showToast({
+							title: res.data.str,
+							icon: 'none'
+						});
+						if (res.data.success == "yes") {
+							if (that.ainfo.id > 0) {
+								setTimeout(function() {
+									uni.navigateBack()
+								}, 500);
+							} else {
+								that.ainfo.title = '';
+								that.ainfo.content = '';
+								that.ainfo.num = '';
+								that.img_list = [];
+							}
+							// that.getInfo();
+							// setTimeout(function() {
+							// 	uni.redirectTo({
+							// 		url: '/pages/Work/detail_fuwu?skey=' + that.skey + '&id=' + res.data.tid
+							// 	});
+							// },2000);
+						} else {}
+						this.is_submit = 0;
+
+					},
+					fail: (err) => {
+						console.log('登录失败:', err);
+						this.is_submit = 0;
+					},
+					complete: (com) => {}
+				})
+			},
+			select(e) {
+				console.log('选择文件:', e)
+			},
+			upload(type) {
+				this.upload2(type)
+			},
+			upload2(type) {
+				console.log("----upload");
+				// this.$refs.files.upload();
+				// 图片选择上传upload() {
+
+				var _self = this;
+
+				// 图片选择,只支持一次选择一张图片
+
+				uni.chooseImage({
+					count: 1,
+					sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
+					sourceType: ['album', 'camera'], //从相册、相机选择
+					success: function(res) {
+						console.log('res:', res)
+						let filepath = "";
+						// #ifdef H5
+						filepath = res.tempFiles[0].path;
+						// #endif
+
+						// #ifdef APP-PLUS
+						filepath = res.tempFilePaths[0];
+						// #endif
+
+						_self.imglocal = filepath; //res.tempFilePaths[0]
+						const uploadTask = uni.uploadFile({
+							url: _self.$apiHost + '/Xweb/upload_img?skey=' + _self.skey, // post请求地址
+							filePath: filepath,
+							name: 'file', // 待确认
+							success: function(uploadFileRes) {
+								let resdata = JSON.parse(uploadFileRes.data)
+								console.log('Success1:', uploadFileRes);
+								if (resdata.success == 'no') {
+									uni.showToast({
+										title: resdata.str,
+										icon: 'none'
+									});
+									return;
+								}
+								if (resdata.code == 0) {
+									console.log('Success2:', resdata.data.path);
+									if (type == 'avatar') {
+										_self.img2 = resdata.data.path;
+									} else if (type == 'list') {
+										_self.img_list.push(resdata.data.path)
+										console.log('_self.img_list:', _self.img_list);
+									} else if (type == 'list2') {
+										_self.img_list2.push(resdata.data.path)
+									} else if (type == 'list1') {
+										_self.img_list1.push(resdata.data.path)
+									}
+								}
+							},
+							fail: function(uploadFileFail) {
+								console.log('Error:', uploadFileFail.data);
+							},
+							complete: () => {
+								console.log('Complete:');
+							}
+						});
+
+					},
+
+					error: function(e) {
+
+						console.log(e);
+
+					}
+
+				});
+
+
+			},
+
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	@import 'fabuArticle.scss';
+</style>

+ 356 - 0
pages/make/manageArticle.scss

@@ -0,0 +1,356 @@
+page {
+  position: absolute;
+  left: 0;
+  top: 0;
+  width: 100%;
+  display: flex;
+  background-color: #f8f8f8;
+}
+
+.status_bar {
+  height: 44rpx;
+  width: 100%;
+}
+.page {
+  background-color: #f8f8f8;
+  display: flex;
+  flex-direction: column;
+	width:750rpx;
+}
+
+.nav-bar {
+  width: 750rpx;
+  height: 88rpx;
+  background-color: #fff;
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  justify-content: space-between;
+  padding: 0 30rpx;
+  box-sizing: border-box;
+  border-bottom: 1rpx solid #f0f0f0;
+
+  .left {
+    width: 120rpx;
+    .uni-btn-icon {
+      font-size: 36rpx;
+      color: #333;
+    }
+  }
+
+  .center {
+    flex: 1;
+    text-align: center;
+    font-size: 32rpx;
+    font-weight: bold;
+    color: #333;
+  }
+
+  .right {
+    display: flex;
+    align-items: center;
+    
+    .btn {
+      font-size: 28rpx;
+      color: #333;
+      margin-left: 30rpx;
+      
+      &:active {
+        opacity: 0.7;
+      }
+    }
+  }
+}
+
+/* 用户信息列表 */
+.user-list{
+	width:710rpx;
+	border-radius: 20rpx;
+	margin: 20rpx auto;
+	.agree {
+		width:100%;text-align: center;color:#959595;font-size: 22rpx;padding:20rpx 0;margin-top: 0rpx;padding-right: 50rpx;
+		display: flex;flex-direction: row;justify-content: flex-end;align-items: center;
+		.xy {
+			color:darkred;padding:0rpx 20rpx;
+		}
+		image {
+			width:32rpx;margin-right: 8rpx;
+		}
+	}
+	.tips {
+		display: flex;flex-direction: row;justify-content: space-between;
+		height: 90rpx;
+		.title {
+			display: flex;flex-direction: row;justify-content: center;height: 80rpx;line-height: 80rpx;font-weight: bold;font-size: 30rpx;
+			.line {
+				width:10rpx;height:24rpx;background-color: $base;line-height: 80rpx;margin: 28rpx 20rpx;
+			}
+		}
+		.more-content{
+			display: flex;flex-direction: row;height:100%;
+			align-items: center;
+			.item1 {
+				display: flex;justify-content: center;height:100%;flex-direction: row;line-height: 100%;align-items: center;align-self: center;
+				.switch {
+				}
+				.status {
+					color:#E54D42;
+				}
+				.btn {
+					width:160rpx;height:50rpx;margin: 0 20rpx;text-align: center;margin-left: 40rpx;
+					background-color: #39B54A;border-radius: 25rpx;color:#fff;font-size: 24rpx;line-height: 50rpx;
+				}
+			}
+		}
+		.beizu {
+			padding:10rpx 30rpx;color:#959595;
+		}
+	}
+	.content {
+		padding:10rpx 30rpx;
+		display: flex;flex-direction: column;justify-content: space-between;
+		.edit {
+			border:solid 1px #f0f0f0;border-radius: 10rpx;width:670rpx;height:80rpx;font-size: 30rpx;padding:10rpx;
+		}
+		.edit2 {
+			border:solid 1px #f0f0f0;
+			border-radius: 10rpx;
+			width:670rpx;
+			height:340rpx;
+			font-size: 30rpx;
+			padding: 10rpx;
+			box-sizing: border-box;
+		}
+		.item {
+			display: flex;flex-direction: row;justify-content: space-between;
+			border:solid 1px #f0f0f0;border-radius: 10rpx;width:730rpx;height:80rpx;align-items: center;
+			.left {
+				padding-left: 10rpx;width:168rpx;font-size: 28rpx;
+			}
+			.input {
+				width:570rpx;font-size: 28rpx;
+			}
+			.picker {
+				padding-left: 10rpx;width:120rpx;display: flex;flex-direction: row;justify-content: space-between;
+				.selimg {
+					width:24rpx;height:24rpx;margin-top: 4rpx;margin-left: 12rpx;
+				}
+			}
+			.edit3 {
+				border:solid 0px #f0f0f0;border-radius: 10rpx;width:730rpx;height:140rpx;font-size: 28rpx;padding:8rpx;
+			}
+		}
+		.item2 {
+			display: flex;flex-direction: row;justify-content: space-between;margin-top: 10rpx;
+			.item21 {
+				display: flex;flex-direction: row;justify-content: space-between;
+				border:solid 1px #f0f0f0;border-radius: 10rpx;width:360rpx;height:80rpx;align-items: center;
+				.left {
+					padding-left: 10rpx;width:120rpx;line-height: 60rpx;font-size: 28rpx;
+				}
+				.input {
+					width:360rpx;font-size: 28rpx;line-height: 60rpx;
+				}
+			}
+		}
+	}
+	.img {
+		width:100%;padding-left: 20rpx;
+		image {
+			width:710rpx;
+		}
+	}
+	.img_list {
+		display: flex;
+		width:100%;
+		padding:20rpx 40rpx;
+		flex-wrap: wrap;
+		.image {
+			display: flex;
+			width:200rpx;
+			height:200rpx;
+			position: relative;
+			margin: 10rpx;
+			box-sizing: border-box;
+			justify-content: center;
+			align-items: center;
+			background: rgba(120, 120, 120, 0.2);border-radius: 8rpx;
+			
+			.txt {
+				font-size: 120rpx;
+				color: #999;
+			}
+			
+			.upimg {
+				position: absolute;left:0;top:0;
+				width:100%;
+				height:100%;
+				border-radius: 8rpx;
+			}
+			
+			.del {
+				width:40rpx;
+				height:40rpx;
+				position: absolute;
+				right:-10rpx;
+				top:-10rpx;
+			}
+		}
+	}
+	.btn_list {
+		display: flex;flex-direction: row;align-items: center;justify-content: center;
+		.btn_sq {
+			width:300rpx;height:80rpx;background-color: #BF8669;border-radius: 4rpx;text-align: center;color:#fff;line-height: 80rpx;
+			font-size: 32rpx;margin:20rpx;
+		}
+		
+	}
+	.telbg {
+		width:750rpx;height:350rpx;display: flex;flex-direction: column;padding-left: 40rpx;padding-top: 120rpx;color:#fff;
+		background-color: #517456;font-size: 30rpx;
+		.tel {
+			font-size: 80rpx;color:#BF8669;
+		}
+	}
+	.img2 {
+		width:100%;padding-left: 0rpx;
+		image {
+			width:750rpx;
+		}
+	}
+
+}
+.footer {
+	position: fixed;bottom:0rpx;width:750rpx;height:120rpx;display: flex;flex-direction: row;justify-content: center;
+	background: #fff;
+	.btn {
+		width:690rpx;height:80rpx;background-color: #39B54A;border-radius: 40rpx;text-align: center;color:#fff;line-height: 80rpx;
+		font-size: 32rpx;
+	}
+}
+.foot-btn {
+	height: 80rpx;padding:60rpx;
+	button {
+		height: 80rpx;line-height: 80rpx;font-size: 28rpx;
+	}
+}
+.uni-textarea-placeholder {
+    color: #959595;
+    overflow: hidden;
+}
+.num_txt {
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    padding: 20rpx 30rpx;
+    
+    .num_input {
+        width: 120rpx;
+        height: 60rpx;
+        border: 1px solid $base;
+        border-radius: 10rpx;
+        margin: 0 20rpx;
+        text-align: center;
+        font-size: 28rpx;
+    }
+}
+
+.list {
+  padding: 20rpx;
+  
+  .article-item {
+    background-color: #fff;
+    border-radius: 12rpx;
+    margin-bottom: 20rpx;
+    padding: 20rpx;
+    box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
+    
+    .article-content {
+      display: flex;
+      
+      .article-image {
+        width: 200rpx;
+        height: 200rpx;
+        border-radius: 8rpx;
+        margin-right: 20rpx;
+      }
+      
+      .article-info {
+        flex: 1;
+        display: flex;
+        flex-direction: column;
+        justify-content: space-between;
+        
+        .article-title {
+          font-size: 32rpx;
+          font-weight: bold;
+          color: #333;
+          margin-bottom: 10rpx;
+        }
+        
+        .article-desc {
+          font-size: 28rpx;
+          color: #666;
+          line-height: 1.4;
+          display: -webkit-box;
+          -webkit-box-orient: vertical;
+          -webkit-line-clamp: 2;
+          overflow: hidden;
+        }
+        
+        .article-meta {
+          display: flex;
+          justify-content: space-between;
+          align-items: center;
+          margin-top: 10rpx;
+          
+          .time {
+            font-size: 24rpx;
+            color: #999;
+          }
+          
+          .status {
+            font-size: 24rpx;
+            padding: 4rpx 12rpx;
+            border-radius: 4rpx;
+            
+            &.published {
+              background-color: #e8f5e9;
+              color: #39B54A;
+            }
+            
+            &.draft {
+              background-color: #f5f5f5;
+              color: #999;
+            }
+          }
+        }
+      }
+    }
+    
+    .article-actions {
+      display: flex;
+      justify-content: flex-end;
+      margin-top: 20rpx;
+      padding-top: 20rpx;
+      border-top: 1rpx solid #f0f0f0;
+      
+      .action-btn {
+        padding: 10rpx 30rpx;
+        font-size: 28rpx;
+        border-radius: 6rpx;
+        margin-left: 20rpx;
+        
+        &.edit {
+          background-color: #f0f0f0;
+          color: #666;
+        }
+        
+        &.delete {
+          background-color: #ffebee;
+          color: #e54d42;
+        }
+      }
+    }
+  }
+}

+ 146 - 0
pages/make/manageArticle.vue

@@ -0,0 +1,146 @@
+<template>
+	<view class="page">
+		<!-- <view class="nav-bar">
+			<view class="left">
+				<view class="uni-btn-icon" @click="goBack">&#xe601;</view>
+			</view>
+			<view class="center">管理</view>
+			<view class="right">
+				<view class="btn" @click="onManage">管理</view>
+				<view class="btn" @click="onSubmit">发布</view>
+			</view>
+		</view> -->
+
+		<view class="list">
+			<view class="article-item" v-for="(item, index) in articleList" :key="index">
+				<view class="article-content">
+					<image class="article-image" :src="item.image" mode="aspectFill"></image>
+					<view class="article-info">
+						<view class="article-title">{{item.title}}</view>
+						<view class="article-desc">{{item.content}}</view>
+						<view class="article-meta">
+							<text class="time">{{item.create_time}}</text>
+							<text class="status" :class="item.status === 1 ? 'published' : 'draft'">
+								{{item.status === 1 ? '已发布' : '待审核'}}
+							</text>
+						</view>
+					</view>
+				</view>
+				<view class="article-actions">
+					<view class="action-btn edit" @click="onEdit(item)">编辑</view>
+					<view class="action-btn delete" @click="onDelete(item)">删除</view>
+				</view>
+			</view>
+		</view>
+
+
+
+	</view>
+</template>
+
+<script>
+	export default {
+		components: {},
+		data() {
+			return {
+				skey: '',
+				uinfo: {},
+				articleList: [], // 文章列表数据
+			}
+		},
+		onLoad(params) {
+			if (getApp().globalData.skey != "") {
+				this.skey = getApp().globalData.skey;
+			} else {
+				this.skey = params.skey || ''; //1234567xef
+			}
+			this.id = params.id || '';
+			let that = this;
+			// this.getCate();
+			// that.getInfo();
+		},
+		onShow() {
+			let that = this;
+			this.getArticleList();
+		},
+		methods: {
+			goBack() {
+				uni.navigateBack();
+			},
+			onPublish() {
+				this.onSubmit();
+			},
+			getInfo() {
+
+
+			},
+			onEdit(item) {
+				uni.navigateTo({
+					url: `/pages/make/fabuArticle?id=${item.id}`
+				});
+			},
+
+			onDelete(item) {
+				uni.showModal({
+					title: '提示',
+					content: '确定要删除这篇文章吗?',
+					success: (res) => {
+						if (res.confirm) {
+							uni.request({
+								url: this.$apiHost + '/Article/doAct',
+								data: {
+									uuid: getApp().globalData.uuid,
+									act: 'del',
+									id: item.id
+								},
+								header: {
+									'content-type': 'application/json',
+									'sign': getApp().globalData.headerSign
+								},
+								success: (res) => {
+									if (res.data.success === 'yes') {
+										uni.showToast({
+											title: '删除成功',
+											icon: 'success'
+										});
+										// 重新获取列表
+										this.getArticleList();
+									} else {
+										uni.showToast({
+											title: res.data.str || '删除失败',
+											icon: 'none'
+										});
+									}
+								}
+							});
+						}
+					}
+				});
+			},
+
+			getArticleList() {
+				var that = this;
+
+				uni.request({
+					url: this.$apiHost + '/Article/getlist', //仅为示例,并非真实接口地址。
+					data: {
+						uuid: getApp().globalData.uuid,
+						type: "my"
+					},
+					header: {
+						'content-type': 'application/json',
+						'sign': getApp().globalData.headerSign
+					},
+					success: (res) => {
+						console.log("====", res.data);
+						that.articleList = res.data.list;
+					}
+				});
+			},
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	@import 'manageArticle.scss';
+</style>

+ 7 - 2
pages/my/task.scss → pages/my/job.scss

@@ -390,13 +390,13 @@ page {
 				.exchange-btn-large {
 					width: 100%;
 					height: 90rpx;
-					background-color: #DDDDDD;
+					background-color: #90d369;
 					border-radius: 45rpx;
 					display: flex;
 					justify-content: center;
 					align-items: center;
 					font-size: 32rpx;
-					color: #333;
+					color: #fff;
 					font-weight: bold;
 					margin-bottom: 20rpx;
 				}
@@ -588,6 +588,11 @@ page {
 			font-size: 32rpx;
 			color: #FFFFFF;
 			font-weight: bold;
+
+			&.sign-btn-disabled {
+				background-color: #CCCCCC;
+				color: #999999;
+			}
 		}
 	}
 }

+ 198 - 114
pages/my/task.vue → pages/my/job.vue

@@ -2,7 +2,7 @@
 	<view class="page">
 		<!-- 顶部黄色背景 -->
 		<view class="top-bg"></view>
-		
+
 		<!-- 内容区域 -->
 		<view class="content-area">
 			<!-- 彩豆余额展示区 -->
@@ -14,7 +14,7 @@
 					</view>
 					<view class="exchange-btn" @click="showExchangePopup">兑换</view>
 				</view>
-				<view class="bean-number">2560</view>
+				<view class="bean-number">{{num_gmd}}</view>
 			</view>
 
 			<!-- 星愿打卡区域 -->
@@ -23,7 +23,7 @@
 					<view class="card-title">初次见面礼</view>
 					<view class="card-desc">完善个人资料可得</view>
 					<view class="card-reward">奖励+100彩豆</view>
-					<view class="card-progress">80%</view>
+					<view class="card-progress">{{newer_bfb}}</view>
 				</view>
 				<view class="card yellow-card">
 					<view class="card-title">每日签到</view>
@@ -38,16 +38,16 @@
 					<text class="task-title">每日任务</text>
 					<text class="task-subtitle">获取免费彩豆</text>
 				</view>
-				
+
 				<!-- 任务项列表 -->
 				<view class="task-item" v-for="(item, index) in taskList" :key="index">
 					<view class="task-info">
 						<view class="task-name">{{item.name}}</view>
-						<view class="task-desc">{{item.desc}}</view>
+						<view class="task-desc">{{item.content}}</view>
 					</view>
-					<view class="task-reward">+{{item.reward}}彩豆</view>
-					<view class="task-btn" :class="{'task-completed': item.completed}" @click="claimReward(index)">
-						{{item.completed ? '已领取' : '领取'}}
+					<view class="task-reward">+{{item.num}}彩豆</view>
+					<view class="task-btn" :class="{'task-completed': item.status == 9}" @click="claimReward(index)">
+						{{item.status == 9 ? '已领取' : '领取'}}
 					</view>
 				</view>
 			</view>
@@ -62,19 +62,19 @@
 					<text class="available-balance">可用M币: 14500</text>
 					<text class="exchange-title">兑换彩豆</text>
 				</view>
-				
+
 				<!-- 兑换区域主体 -->
 				<view class="exchange-area">
 					<view class="exchange-title-area">
 						<text class="exchange-main-title">M币兑换彩豆数</text>
 						<text class="exchange-subtitle">兑换彩豆数必须是10的倍数</text>
 					</view>
-					
+
 					<view class="input-area">
 						<view class="bean-icon"></view>
 						<input type="number" class="exchange-input" placeholder="请输入兑换彩豆数量" v-model="exchangeAmount" />
 					</view>
-					
+
 					<!-- 操作按钮 -->
 					<view class="action-area">
 						<view class="exchange-btn-large" @click="confirmExchange">立即兑换彩豆</view>
@@ -83,7 +83,7 @@
 				</view>
 			</view>
 		</view>
-		
+
 		<!-- 签到弹窗 -->
 		<view class="sign-popup" v-if="showSign">
 			<view class="popup-mask" @click="hideSignPopup"></view>
@@ -95,9 +95,9 @@
 						<text class="sign-notify-text">签到消息提醒</text>
 						<switch class="sign-switch" color="#9C27B0" :checked="signNotify" @change="toggleSignNotify" />
 					</view>
-					<view class="sign-days-tag">已签到1天</view>
+					<view class="sign-days-tag">已签到{{signInfo.signDay}}天</view>
 				</view>
-				
+
 				<!-- VIP特权区域 -->
 				<view class="vip-area">
 					<view class="vip-left">
@@ -107,23 +107,27 @@
 						<text class="vip-offer">限时优惠 ></text>
 					</view>
 				</view>
-				
+
 				<!-- 签到奖励网格布局 -->
 				<view class="sign-grid">
 					<view class="sign-grid-item" v-for="(item, index) in signRewards" :key="index"
-						:class="{'sign-received': index === 0}">
+						:class="{'sign-received': index < signInfo.signDay || (index === signInfo.signDay - 1 && signInfo.isSigned)}">
 						<view class="sign-day-num">{{item.dayNum}}</view>
 						<view class="sign-item-img"></view>
 						<view class="sign-item-name">{{item.reward}}</view>
 						<view class="sign-vip-tag" v-if="item.isVip">VIP</view>
-						<view class="sign-received-mask" v-if="index === 0">
+						<view class="sign-received-mask" v-if="index < signInfo.signDay || (index === signInfo.signDay - 1 && signInfo.isSigned)">
 							<text class="received-text">已领取</text>
 						</view>
 					</view>
 				</view>
-				
+
 				<!-- 底部签到按钮 -->
-				<view class="sign-btn-large" @click="confirmSign">签到领取奖励</view>
+				<view class="sign-btn-large" 
+					:class="{'sign-btn-disabled': signInfo.isSigned}"
+					@click="confirmSign">
+					{{signInfo.isSigned ? '今日已签到' : '签到领取奖励'}}
+				</view>
 			</view>
 		</view>
 
@@ -140,66 +144,69 @@
 				title: '任务中心',
 				myinfo: {},
 				realname: '',
-				idcard: '',
+				num_gmd: 0,
+				newer_bfb: '',
 				beanBalance: 2560,
 				showExchange: false,
 				exchangeAmount: '',
 				mCoinBalance: 14500,
 				showSign: false,
 				signNotify: true,
-				signRewards: [
-					{ dayNum: '01', reward: '海浪*3天', isVip: false },
-					{ dayNum: '02', reward: '红玫瑰*3', isVip: false },
-					{ dayNum: '03', reward: '樱花*3', isVip: false },
-					{ dayNum: '04', reward: '星辰*7天', isVip: false },
-					{ dayNum: '05', reward: '红玫瑰*5', isVip: false },
-					{ dayNum: '06', reward: '樱花*5', isVip: true },
-					{ dayNum: '07', reward: '特别奖励', isVip: true }
-				],
-				taskList: [
+				signRewards: [{
+						dayNum: '01',
+						reward: '10彩豆',
+						isVip: false
+					},
+					{
+						dayNum: '02',
+						reward: '15彩豆',
+						isVip: false
+					},
 					{
-						name: '每日首次发布作品',
-						desc: '当日首次发布作品即可获得奖励',
-						reward: 20,
-						completed: false
+						dayNum: '03',
+						reward: '20彩豆',
+						isVip: false
 					},
 					{
-						name: '分享作品领彩豆',
-						desc: '分享作品到社交平台即可获得奖励',
-						reward: 20,
-						completed: false
+						dayNum: '04',
+						reward: '25彩豆',
+						isVip: false
 					},
 					{
-						name: '邀请好友领彩豆',
-						desc: '成功邀请一位好友注册',
-						reward: 50,
-						completed: false
+						dayNum: '05',
+						reward: '30彩豆',
+						isVip: false
 					},
 					{
-						name: '充值赠礼',
-						desc: '首次充值即可获得额外奖励',
-						reward: 30,
-						completed: false
+						dayNum: '06',
+						reward: '35彩豆',
+						isVip: true
 					},
 					{
-						name: '口碑缔造者',
-						desc: '给他人作品评论5次',
-						reward: 20,
-						completed: false
+						dayNum: '07',
+						reward: '50彩豆',
+						isVip: true
 					}
-				]
+				],
+				signInfo: {
+					signDay: 1,
+					isSigned: false,
+					reward: 0
+				},
+				taskList: []
 			}
 		},
 		onLoad() {
-			this.loadInfo();
+			this.loadData();
+			this.getSignInfo();
 		},
 		onShow() {},
 		methods: {
 			onBack() {},
 
-			loadInfo() {
+			loadData() {
 				uni.request({
-					url: this.$apiHost + '/My/idcheck',
+					url: this.$apiHost + '/Job/getlist',
 					data: {
 						uuid: getApp().globalData.uuid
 					},
@@ -209,7 +216,9 @@
 					},
 					success: (res) => {
 						console.log("----:", res.data);
-						this.myinfo = res.data;
+						this.num_gmd = res.data.num_gmd;
+						this.newer_bfb = res.data.newer_bfb;
+						this.taskList = res.data.list;
 					},
 					complete: (com) => {
 						// uni.hideLoading();
@@ -219,41 +228,106 @@
 					}
 				});
 			},
-			
+
+			// 获取签到信息
+			getSignInfo() {
+				uni.request({
+					url: this.$apiHost + '/User/sign7Day',
+					data: {
+						uuid: getApp().globalData.uuid,
+						action: 'get'
+					},
+					header: {
+						"content-type": "application/json",
+						'sign': getApp().globalData.headerSign
+					},
+					success: (res) => {
+						if(res.data.success === 'yes') {
+							this.signInfo = {
+								signDay: res.data.data.sign_day,
+								isSigned: res.data.data.is_signed,
+								reward: res.data.data.reward || 0
+							};
+						}
+					},
+					fail: (e) => {
+						console.log("获取签到信息失败:", e);
+					}
+				});
+			},
+
 			// 显示兑换弹窗
 			showExchangePopup() {
 				this.showExchange = true;
 			},
-			
+
 			// 隐藏兑换弹窗
 			hideExchangePopup() {
 				this.showExchange = false;
 			},
-			
+
 			// 显示签到弹窗
 			showSignPopup() {
 				this.showSign = true;
 			},
-			
+
 			// 隐藏签到弹窗
 			hideSignPopup() {
 				this.showSign = false;
 			},
-			
+
 			// 切换签到通知开关
 			toggleSignNotify(e) {
 				this.signNotify = e.detail.value;
 			},
-			
+
 			// 确认签到
 			confirmSign() {
-				uni.showToast({
-					title: "签到成功,获得今日奖励",
-					icon: 'none'
+				if(this.signInfo.isSigned) {
+					uni.showToast({
+						title: "今日已签到",
+						icon: 'none'
+					});
+					return;
+				}
+
+				uni.request({
+					url: this.$apiHost + '/User/sign7Day',
+					data: {
+						uuid: getApp().globalData.uuid,
+						action: 'sign'
+					},
+					header: {
+						"content-type": "application/json",
+						'sign': getApp().globalData.headerSign
+					},
+					success: (res) => {
+						if(res.data.success === 'yes') {
+							uni.showToast({
+								title: res.data.str,
+								icon: 'none'
+							});
+							// 更新签到信息
+							this.getSignInfo();
+							// 更新彩豆数量
+							this.loadData();
+						} else {
+							uni.showToast({
+								title: res.data.str,
+								icon: 'none'
+							});
+						}
+					},
+					fail: (e) => {
+						console.log("签到失败:", e);
+						uni.showToast({
+							title: "签到失败,请稍后重试",
+							icon: 'none'
+						});
+					}
 				});
-				this.hideSignPopup();
 			},
-			
+
 			// 确认兑换
 			confirmExchange() {
 				if (!this.exchangeAmount) {
@@ -263,9 +337,9 @@
 					});
 					return;
 				}
-				
+
 				const amount = parseInt(this.exchangeAmount);
-				
+
 				if (isNaN(amount) || amount <= 0) {
 					uni.showToast({
 						title: "请输入有效数量",
@@ -273,7 +347,7 @@
 					});
 					return;
 				}
-				
+
 				if (amount % 10 !== 0) {
 					uni.showToast({
 						title: "兑换数量必须是10的倍数",
@@ -281,57 +355,64 @@
 					});
 					return;
 				}
-				
-				// 模拟兑换处理
-				uni.showToast({
-					title: "兑换成功,获得" + amount + "彩豆",
-					icon: 'none'
+				let that = this;
+				uni.request({
+					url: this.$apiHost + '/User/gmdToGMM',
+					data: {
+						uuid: getApp().globalData.uuid,
+						num: amount
+					},
+					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') {
+							this.hideExchangePopup();
+							this.exchangeAmount = '';
+							setTimeout(function() {
+								that.loadData();
+							}, 900);
+						}
+					},
+					complete: (com) => {
+						// uni.hideLoading();
+					},
+					fail: (e) => {
+						console.log("----e:", e);
+					}
 				});
-				
-				this.beanBalance += amount;
-				this.hideExchangePopup();
-				this.exchangeAmount = '';
+
+				// // 模拟兑换处理
+				// uni.showToast({
+				// 	title: "兑换成功,获得" + amount + "彩豆",
+				// 	icon: 'none'
+				// });
+
+				// this.beanBalance += amount;
+				// this.hideExchangePopup();
+				// this.exchangeAmount = '';
 			},
-			
+
 			claimReward(index) {
-				if(this.taskList[index].completed) {
+				if (this.taskList[index].status == 9) {
 					uni.showToast({
 						title: "已领取该奖励",
 						icon: 'none'
 					});
 					return;
 				}
-				
-				// 模拟领取奖励
-				this.taskList[index].completed = true;
-				this.beanBalance += this.taskList[index].reward;
-				
-				uni.showToast({
-					title: "成功领取" + this.taskList[index].reward + "彩豆",
-					icon: 'none'
-				});
-			},
-			setSFZ() {
-				if (this.realname == '') {
-					uni.showToast({
-						title: "请填写姓名",
-						icon: 'none'
-					});
-					return;
-				}
-				if (this.idcard.length < 15) {
-					uni.showToast({
-						title: "请填写身份证号",
-						icon: 'none'
-					});
-					return;
-				}
+				let that = this;
 				uni.request({
-					url: this.$apiHost + '/My/setsfz',
+					url: this.$apiHost + '/Job/doAct',
 					data: {
 						uuid: getApp().globalData.uuid,
-						realname: this.realname,
-						idcard: this.idcard
+						id: this.taskList[index].id
 					},
 					header: {
 						"content-type": "application/json",
@@ -339,12 +420,14 @@
 					},
 					success: (res) => {
 						console.log("----:", res.data);
-						uni.showToast({
-							title: res.data.str,
-							icon: 'none'
-						})
 						if (res.data.success == 'yes') {
-							this.loadInfo();
+							uni.showToast({
+								title: res.data.str,
+								icon: 'none'
+							});
+							setTimeout(function() {
+								that.loadData();
+							}, 900);
 						}
 					},
 					complete: (com) => {
@@ -354,11 +437,12 @@
 						console.log("----e:", e);
 					}
 				});
+
 			},
 		}
 	}
 </script>
 
 <style scoped lang="scss">
-	@import 'task.scss';
+	@import 'job.scss';
 </style>

+ 1 - 0
static/del.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M840 288H688v-56c0-40-32-72-72-72h-208C368 160 336 192 336 232V288h-152c-12.8 0-24 11.2-24 24s11.2 24 24 24h656c12.8 0 24-11.2 24-24s-11.2-24-24-24zM384 288v-56c0-12.8 11.2-24 24-24h208c12.8 0 24 11.2 24 24V288H384zM758.4 384c-12.8 0-24 11.2-24 24v363.2c0 24-19.2 44.8-44.8 44.8H332.8c-24 0-44.8-19.2-44.8-44.8V408c0-12.8-11.2-24-24-24s-24 11.2-24 24v363.2c0 51.2 41.6 92.8 92.8 92.8h358.4c51.2 0 92.8-41.6 92.8-92.8V408c-1.6-12.8-12.8-24-25.6-24z" fill="#d81e06" /><path d="M444.8 744v-336c0-12.8-11.2-24-24-24s-24 11.2-24 24v336c0 12.8 11.2 24 24 24s24-11.2 24-24zM627.2 744v-336c0-12.8-11.2-24-24-24s-24 11.2-24 24v336c0 12.8 11.2 24 24 24s24-11.2 24-24z" fill="#d81e06" /></svg>

BIN
static/icon/icon_add_black.png