|
@@ -41,9 +41,12 @@ Component({
|
|
|
commenttext: "评论",
|
|
|
focusedCommentId: null,
|
|
|
isCommentFocused: false,
|
|
|
- noCommentCount:0,
|
|
|
+ noCommentCount: 0,
|
|
|
|
|
|
- showconfirm:false
|
|
|
+ showconfirm: false,
|
|
|
+
|
|
|
+ maxLength: 100,
|
|
|
+ showFull: false,
|
|
|
},
|
|
|
lifetimes: {
|
|
|
|
|
@@ -128,7 +131,7 @@ Component({
|
|
|
this.setData({
|
|
|
time
|
|
|
})
|
|
|
- console.log('时间',time);
|
|
|
+ console.log('时间', time);
|
|
|
this.showchick()
|
|
|
},
|
|
|
formatTime(timestamp) {
|
|
@@ -149,12 +152,12 @@ Component({
|
|
|
},
|
|
|
formatDate2(date1) {
|
|
|
date1 = new Date(date1);
|
|
|
-
|
|
|
+
|
|
|
|
|
|
const year1 = date1.getFullYear();
|
|
|
const month1 = date1.getMonth() + 1;
|
|
|
const day1 = date1.getDate();
|
|
|
-
|
|
|
+
|
|
|
|
|
|
return `${year1}/${month1}/${day1}`;
|
|
|
},
|
|
@@ -250,7 +253,7 @@ Component({
|
|
|
Momentquery.equalTo('isLiked', true);
|
|
|
let r = await Momentquery.find();
|
|
|
let chickList = r.map(item => item.toJSON());
|
|
|
- console.log('chickList',chickList);
|
|
|
+ console.log('chickList', chickList);
|
|
|
this.setData({
|
|
|
chickList
|
|
|
})
|
|
@@ -418,7 +421,7 @@ Component({
|
|
|
if (!this.data.isCommentFocused) {
|
|
|
const updatedCommentList = this.data.commentList.map(comment => ({
|
|
|
...comment,
|
|
|
- showdeletid: false ,
|
|
|
+ showdeletid: false,
|
|
|
}));
|
|
|
|
|
|
this.setData({
|
|
@@ -533,21 +536,34 @@ Component({
|
|
|
|
|
|
},
|
|
|
|
|
|
- showconfirm(){
|
|
|
+ showconfirm() {
|
|
|
this.setData({
|
|
|
- showconfirm:true
|
|
|
+ showconfirm: true
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- cancleconfirm(){
|
|
|
+ cancleconfirm() {
|
|
|
this.setData({
|
|
|
- showconfirm:false
|
|
|
+ showconfirm: false
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- clickconfirm(){
|
|
|
+ clickconfirm() {
|
|
|
console.log('删除了');
|
|
|
this.deletecircle()
|
|
|
- }
|
|
|
+ },
|
|
|
+
|
|
|
+ showFullContent() {
|
|
|
+ this.setData({
|
|
|
+ showFull: true
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+ showLessContent() {
|
|
|
+ this.setData({
|
|
|
+ showFull: false
|
|
|
+ });
|
|
|
+ },
|
|
|
}
|
|
|
})
|