Browse Source

南岸小程序评论

zwq 2 years ago
parent
commit
eb2d4c1ae7

+ 1 - 1
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/myCollection/myCollection.wxss

@@ -1,7 +1,7 @@
 /* pages/myCollection/myCollection.wxss */
 .title-text {
 	display: -webkit-box;
--webkit-line-clamp: 2; /*最多显示5行*/
+-webkit-line-clamp: 2;
 overflow: hidden;
 text-overflow: ellipsis;
 -webkit-box-orient: vertical;

+ 7 - 5
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/myComment/myComment.js

@@ -12,7 +12,8 @@ Page({
 	data: {
 		tab: 0,
 		item: 0,
-		commentList: []
+    putCommentList: [],
+    receiveCommentList: []
 	},
 
 	changeItem: function (e) {
@@ -37,7 +38,7 @@ Page({
 		}
 		// getComments(params).then(res => {
 		// 	this.setData({
-		// 		'commentList': res.data.dataList
+		// 		'putCommentList': res.data.dataList
 		// 	})
 		// })
 		const data = [{
@@ -47,18 +48,19 @@ Page({
 			"headerImg": "https://imagecdn.cqliving.com/images/app_4/cms/202105/2f6942bd99b36639a2a9f567b0e303ab14f10e63.jpg",
 			"content": "作者用心了,a了a了!",
 			"commentTime": "1分钟前",
-			"sourceTitle": "长江上游最大中心岛的生态蝶变"
+			"sourceTitle": "长江上游最大中心岛的生态蝶变!保护生态环境,人人有责!"
 		},{
 			"replyId": 3172672,
 			"userId": 18001130,
-			"userName": "Mr.",
+			"userName": "Mr.Caras",
 			"headerImg": "https://imagecdn.cqliving.com/images/app_4/cms/202105/2f6942bd99b36639a2a9f567b0e303ab14f10e63.jpg",
 			"content": "来人,把我30米大刀拿来给秀儿梳头发!",
 			"commentTime": "2022-1-1",
 			"sourceTitle": "且看汉武帝如何指江山,定乾坤"
 		}]
 		this.setData({
-			'commentList': data
+      'putCommentList': data,
+      'receiveCommentList': data
 		})
 	},
 

+ 18 - 0
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/myComment/myComment.wxss

@@ -15,4 +15,22 @@
 
 .tab-item.active {
   color: #1b2b42;
+}
+
+.title-text {
+	display: -webkit-box;
+-webkit-line-clamp: 1;
+overflow: hidden;
+text-overflow: ellipsis;
+-webkit-box-orient: vertical;
+word-break: break-all; /*强制英文单词自动换行*/
+}
+
+.content-text {
+	display: -webkit-box;
+-webkit-line-clamp: 5;
+overflow: hidden;
+text-overflow: ellipsis;
+-webkit-box-orient: vertical;
+word-break: break-all; /*强制英文单词自动换行*/
 }

+ 7 - 5
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/myComment/putComment.wxml

@@ -1,15 +1,17 @@
 <view style="width: 100%">
-	<view wx:for="{{ commentList }}" wx:for-item="item" wx:for-index="index" wx:for-key="index" style="width: 100%">
+	<view wx:for="{{ putCommentList }}" wx:for-item="item" wx:for-index="index" wx:key="index" style="width: 100%">
 		<view style="height: 90rpx;display: flex;align-items: center;justify-content: start;">
-			<image style="height:60rpx;width:60rpx;background-color: #ffddcc;border-radius: 50%;"></image>
+			<image style="height:60rpx;width:60rpx;background-color: #ffddcc;border-radius: 50%;" src="{{ item.headerImg}}"></image>
 			<view style="height:60rpx;font-size: 27rpx;color: #b4b4b4;padding-left: 20rpx;padding-bottom:8rpx;display: flex;flex-direction: column-reverse;">{{ item.userName }}</view>
 		</view>
 		<view style="display: flex;flex-direction: column;align-items: flex-start;justify-content: center;padding-left: 80rpx;width: 100%;">
 			<view style="display: flex;width: 100%;">
-				<view style="width:525rpx;padding-right: 2%;font-size: 27rpx;">{{ item.content }}</view>
-				<view style="display: flex;"><button style="font-size: 18rpx;">删除</button></view>
+				<view class="content-text" style="width:525rpx;padding-right: 2%;font-size: 27rpx;">{{ item.content }}</view>
+				<view style="display: flex;align-items: flex-start;">
+          <view style="font-size: 19rpx;padding: 8rpx;background-color: #ffffff;border: 2rpx solid #000000;border-radius: 10rpx;">删除</view>
+        </view>
 			</view>
-			<view style="display: flex;align-items: center;padding-left:10rpx;margin-top: 5rpx;height: 50rpx;width: 100%;font-size: 24rpx;color: #858585;background-color: #eeeeee;">{{ item.sourceTitle }}</view>
+			<view class="title-text" style="line-height: 50rpx;padding-left:10rpx;margin-top: 5rpx;width: 600rpx;height: 50rpx;font-size: 24rpx;color: #858585;background-color: #eeeeee;">{{ item.sourceTitle }}</view>
 			<view style="font-size: 20rpx;color: #b5b5b5;margin-top: 10rpx;">{{ item.commentTime }}</view>
 		</view>
 		<view style="height: 30rpx;border-bottom: 2rpx solid #11111130;"></view>

+ 19 - 1
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/myComment/receiveComment.wxml

@@ -1 +1,19 @@
-<view>收</view>
+<view style="width: 100%">
+	<view wx:for="{{ receiveCommentList }}" wx:for-item="item" wx:for-index="index" wx:key="index" style="width: 100%">
+		<view style="height: 90rpx;display: flex;align-items: center;justify-content: start;">
+			<image style="height:60rpx;width:60rpx;background-color: #ffddcc;border-radius: 50%;" src="{{ item.headerImg}}"></image>
+			<view style="height:60rpx;font-size: 27rpx;color: #b4b4b4;padding-left: 20rpx;padding-bottom:8rpx;display: flex;flex-direction: column-reverse;">{{ item.userName }}</view>
+		</view>
+		<view style="display: flex;flex-direction: column;align-items: flex-start;justify-content: center;padding-left: 80rpx;width: 100%;">
+			<view style="display: flex;width: 100%;">
+				<view class="content-text" style="width:525rpx;padding-right: 2%;font-size: 27rpx;">{{ item.content }}</view>
+				<view style="display: flex;align-items: flex-start;">
+          <view style="font-size: 19rpx;padding: 8rpx;background-color: #ffffff;border: 2rpx solid #000000;border-radius: 10rpx;">删除</view>
+        </view>
+			</view>
+			<view class="title-text" style="line-height: 50rpx;padding-left:10rpx;margin-top: 5rpx;width: 600rpx;height: 50rpx;font-size: 24rpx;color: #858585;background-color: #eeeeee;">{{ item.sourceTitle }}</view>
+			<view style="font-size: 20rpx;color: #b5b5b5;margin-top: 10rpx;">{{ item.commentTime }}</view>
+		</view>
+		<view style="height: 30rpx;border-bottom: 2rpx solid #11111130;"></view>
+	</view>
+</view>