|
@@ -264,8 +264,11 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
- doComment(item, comment) {
|
|
|
|
|
|
+ doComment(item, comment) {debugger
|
|
this.selectedComment = comment;
|
|
this.selectedComment = comment;
|
|
|
|
+ if(!this.selectedComment){
|
|
|
|
+ this.selectedComment.id = ''
|
|
|
|
+ }
|
|
this.selectedCircle = item;
|
|
this.selectedCircle = item;
|
|
if (comment != null && comment.userId == this.userInfo.id) {
|
|
if (comment != null && comment.userId == this.userInfo.id) {
|
|
this.show2 = true;
|
|
this.show2 = true;
|
|
@@ -277,27 +280,60 @@
|
|
},
|
|
},
|
|
|
|
|
|
async submitComment() {
|
|
async submitComment() {
|
|
- if (!this.commentValue) {
|
|
|
|
- uni.$u.toast('请输入内容');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- let params = {
|
|
|
|
- comment: this.commentValue,
|
|
|
|
- circleId: this.selectedCircle.id,
|
|
|
|
- circleUserId: this.selectedCircle.userId
|
|
|
|
- };
|
|
|
|
- if (this.selectedComment) {
|
|
|
|
- let tmp = {
|
|
|
|
- pid: this.selectedComment.id,
|
|
|
|
- comUserId: this.selectedComment.userId
|
|
|
|
- };
|
|
|
|
- params = uni.$u.deepMerge(params, tmp);
|
|
|
|
- }
|
|
|
|
- let res = await addComment(params);
|
|
|
|
- if (res) {
|
|
|
|
- uni.$u.toast('评论成功');
|
|
|
|
- this.getCircleDetail(this.selectedCircle.id, this.selectedCircle.index);
|
|
|
|
|
|
+ debugger
|
|
|
|
+ // if (!this.commentValue) {
|
|
|
|
+ // uni.$u.toast('请输入内容');
|
|
|
|
+ // return;
|
|
|
|
+ // }
|
|
|
|
+
|
|
|
|
+ this.formData = {
|
|
|
|
+ circleFriendsId: this.selectedCircle.id,
|
|
|
|
+ commonId: this.userInfo.id,
|
|
|
|
+ head: this.userInfo.head,
|
|
|
|
+ nickname: this.userInfo.nickname,
|
|
|
|
+ commentContent:this.commentValue,
|
|
|
|
+ commentId:this.selectedComment.id,
|
|
|
|
+ commentName:this.selectedComment.nickname,
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ this.formData.interactionFlag = 2
|
|
|
|
+ this.$request.baseRequest('admin.unimall.circleFriendsDetail', 'add', {
|
|
|
|
+ circleFriendsDetail: JSON.stringify(this.formData)
|
|
|
|
+ }, failres => {
|
|
|
|
+ console.log('res+++++', failres.errmsg)
|
|
|
|
+ uni.showToast({
|
|
|
|
+ icon: "none",
|
|
|
|
+ title: failres.errmsg,
|
|
|
|
+ duration: 3000
|
|
|
|
+ });
|
|
|
|
+ uni.hideLoading()
|
|
|
|
+ }).then(async res => {
|
|
|
|
+ console.log(res)
|
|
|
|
+ uni.showToast({
|
|
|
|
+ icon: "success",
|
|
|
|
+ title: '评论成功!',
|
|
|
|
+ duration: 2000
|
|
|
|
+ });
|
|
|
|
+ this.loadData()
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ // let params = {
|
|
|
|
+ // comment: this.commentValue,
|
|
|
|
+ // circleId: this.selectedCircle.id,
|
|
|
|
+ // circleUserId: this.selectedCircle.userId
|
|
|
|
+ // };
|
|
|
|
+ // if (this.selectedComment) {
|
|
|
|
+ // let tmp = {
|
|
|
|
+ // pid: this.selectedComment.id,
|
|
|
|
+ // comUserId: this.selectedComment.userId
|
|
|
|
+ // };
|
|
|
|
+ // params = uni.$u.deepMerge(params, tmp);
|
|
|
|
+ // }
|
|
|
|
+ // let res = await addComment(params);
|
|
|
|
+ // if (res) {
|
|
|
|
+ // uni.$u.toast('评论成功');
|
|
|
|
+ // this.getCircleDetail(this.selectedCircle.id, this.selectedCircle.index);
|
|
|
|
+ // }
|
|
},
|
|
},
|
|
|
|
|
|
sheetSelect(val) {
|
|
sheetSelect(val) {
|