|
@ -9,7 +9,9 @@ Page({ |
|
|
faCommentId: "", |
|
|
faCommentId: "", |
|
|
detailType: "issue", |
|
|
detailType: "issue", |
|
|
issueId: "", |
|
|
issueId: "", |
|
|
projectId: "" |
|
|
projectId: "", |
|
|
|
|
|
violationsCount: 0, //违规次数
|
|
|
|
|
|
isConReview: false |
|
|
}, |
|
|
}, |
|
|
onLoad (options) { |
|
|
onLoad (options) { |
|
|
if (options.detailType === "issue") { |
|
|
if (options.detailType === "issue") { |
|
@ -47,16 +49,19 @@ Page({ |
|
|
issueId: this.data.detailType === "issue" ? this.data.issueId : "", |
|
|
issueId: this.data.detailType === "issue" ? this.data.issueId : "", |
|
|
faCommentId: this.data.faCommentId, |
|
|
faCommentId: this.data.faCommentId, |
|
|
content: this.data.textareaValue, |
|
|
content: this.data.textareaValue, |
|
|
itemId: this.data.detailType === "project" ? this.data.projectId : "" |
|
|
itemId: this.data.detailType === "project" ? this.data.projectId : "", |
|
|
|
|
|
isConReview: this.data.isConReview |
|
|
} |
|
|
} |
|
|
wx.showLoading({ |
|
|
wx.showLoading({ |
|
|
title: "加载中..." |
|
|
title: "加载中..." |
|
|
}) |
|
|
}) |
|
|
|
|
|
let that = this |
|
|
if (this.data.faCommentId) { //评论 回复 回调
|
|
|
if (this.data.faCommentId) { //评论 回复 回调
|
|
|
if (this.data.detailType === "issue") { //议题
|
|
|
if (this.data.detailType === "issue") { //议题
|
|
|
issueComReply(para).then(res => { |
|
|
issueComReply(para).then(res => { |
|
|
wx.hideLoading() |
|
|
wx.hideLoading() |
|
|
console.log("评论或回复", res) |
|
|
console.log("评论或回复", res) |
|
|
|
|
|
if (res.code == 0) { |
|
|
wx.showToast({ |
|
|
wx.showToast({ |
|
|
title: "评论成功", |
|
|
title: "评论成功", |
|
|
icon: "none", |
|
|
icon: "none", |
|
@ -70,6 +75,36 @@ Page({ |
|
|
setTimeout(() => { |
|
|
setTimeout(() => { |
|
|
wx.navigateBack() |
|
|
wx.navigateBack() |
|
|
}, 500) |
|
|
}, 500) |
|
|
|
|
|
} else if (res.code == 533) { |
|
|
|
|
|
this.data.violationsCount++ |
|
|
|
|
|
if (this.data.violationsCount == 1){ |
|
|
|
|
|
wx.showToast({ |
|
|
|
|
|
title: res.msg, |
|
|
|
|
|
icon: "none", |
|
|
|
|
|
duration: 2000 |
|
|
|
|
|
}) |
|
|
|
|
|
} else if (this.data.violationsCount == 2) { |
|
|
|
|
|
wx.showModal({ |
|
|
|
|
|
title: '提示', |
|
|
|
|
|
content: '您提交的内容再次被判定为违规,您确定是否要提交?', |
|
|
|
|
|
success (res) { |
|
|
|
|
|
if (res.confirm) { |
|
|
|
|
|
console.log('用户点击确定') |
|
|
|
|
|
that.setData({ |
|
|
|
|
|
isConReview: true |
|
|
|
|
|
}) |
|
|
|
|
|
that.remarkOrReply() |
|
|
|
|
|
} else if (res.cancel) { |
|
|
|
|
|
console.log('用户点击取消') |
|
|
|
|
|
that.setData({ |
|
|
|
|
|
violationsCount: 0, |
|
|
|
|
|
isConReview: false |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
}).catch(err => { |
|
|
}).catch(err => { |
|
|
console.log(err) |
|
|
console.log(err) |
|
|
}) |
|
|
}) |
|
@ -77,6 +112,7 @@ Page({ |
|
|
itemComReply(para).then(res => { |
|
|
itemComReply(para).then(res => { |
|
|
wx.hideLoading() |
|
|
wx.hideLoading() |
|
|
console.log("评论或回复", res) |
|
|
console.log("评论或回复", res) |
|
|
|
|
|
if (res.code == 0) { |
|
|
wx.showToast({ |
|
|
wx.showToast({ |
|
|
title: "评论成功", |
|
|
title: "评论成功", |
|
|
icon: "none", |
|
|
icon: "none", |
|
@ -90,6 +126,36 @@ Page({ |
|
|
setTimeout(() => { |
|
|
setTimeout(() => { |
|
|
wx.navigateBack() |
|
|
wx.navigateBack() |
|
|
}, 500) |
|
|
}, 500) |
|
|
|
|
|
} else if (res.code == 533) { |
|
|
|
|
|
this.data.violationsCount++ |
|
|
|
|
|
if (this.data.violationsCount == 1){ |
|
|
|
|
|
wx.showToast({ |
|
|
|
|
|
title: res.msg, |
|
|
|
|
|
icon: "none", |
|
|
|
|
|
duration: 2000 |
|
|
|
|
|
}) |
|
|
|
|
|
} else if (this.data.violationsCount == 2) { |
|
|
|
|
|
wx.showModal({ |
|
|
|
|
|
title: '提示', |
|
|
|
|
|
content: '您提交的内容再次被判定为违规,您确定是否要提交?', |
|
|
|
|
|
success (res) { |
|
|
|
|
|
if (res.confirm) { |
|
|
|
|
|
console.log('用户点击确定') |
|
|
|
|
|
that.setData({ |
|
|
|
|
|
isConReview: true |
|
|
|
|
|
}) |
|
|
|
|
|
that.remarkOrReply() |
|
|
|
|
|
} else if (res.cancel) { |
|
|
|
|
|
console.log('用户点击取消') |
|
|
|
|
|
that.setData({ |
|
|
|
|
|
violationsCount: 0, |
|
|
|
|
|
isConReview: false |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
}).catch(err => { |
|
|
}).catch(err => { |
|
|
console.log(err) |
|
|
console.log(err) |
|
|
}) |
|
|
}) |
|
@ -99,6 +165,7 @@ Page({ |
|
|
issueCom(para).then(res => { |
|
|
issueCom(para).then(res => { |
|
|
wx.hideLoading() |
|
|
wx.hideLoading() |
|
|
console.log("评论或回复", res) |
|
|
console.log("评论或回复", res) |
|
|
|
|
|
if (res.code == 0) { |
|
|
wx.showToast({ |
|
|
wx.showToast({ |
|
|
title: "评论成功", |
|
|
title: "评论成功", |
|
|
icon: "none", |
|
|
icon: "none", |
|
@ -112,6 +179,36 @@ Page({ |
|
|
setTimeout(() => { |
|
|
setTimeout(() => { |
|
|
wx.navigateBack() |
|
|
wx.navigateBack() |
|
|
}, 500) |
|
|
}, 500) |
|
|
|
|
|
} else if (res.code == 533) { |
|
|
|
|
|
this.data.violationsCount++ |
|
|
|
|
|
if (this.data.violationsCount == 1){ |
|
|
|
|
|
wx.showToast({ |
|
|
|
|
|
title: res.msg, |
|
|
|
|
|
icon: "none", |
|
|
|
|
|
duration: 2000 |
|
|
|
|
|
}) |
|
|
|
|
|
} else if (this.data.violationsCount == 2) { |
|
|
|
|
|
wx.showModal({ |
|
|
|
|
|
title: '提示', |
|
|
|
|
|
content: '您提交的内容再次被判定为违规,您确定是否要提交?', |
|
|
|
|
|
success (res) { |
|
|
|
|
|
if (res.confirm) { |
|
|
|
|
|
console.log('用户点击确定') |
|
|
|
|
|
that.setData({ |
|
|
|
|
|
isConReview: true |
|
|
|
|
|
}) |
|
|
|
|
|
that.remarkOrReply() |
|
|
|
|
|
} else if (res.cancel) { |
|
|
|
|
|
console.log('用户点击取消') |
|
|
|
|
|
that.setData({ |
|
|
|
|
|
violationsCount: 0, |
|
|
|
|
|
isConReview: false |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
}).catch(err => { |
|
|
}).catch(err => { |
|
|
console.log(err) |
|
|
console.log(err) |
|
|
}) |
|
|
}) |
|
@ -119,6 +216,7 @@ Page({ |
|
|
itemCom(para).then(res => { |
|
|
itemCom(para).then(res => { |
|
|
wx.hideLoading() |
|
|
wx.hideLoading() |
|
|
console.log("评论或回复", res) |
|
|
console.log("评论或回复", res) |
|
|
|
|
|
if (res.code == 0) { |
|
|
wx.showToast({ |
|
|
wx.showToast({ |
|
|
title: "评论成功", |
|
|
title: "评论成功", |
|
|
icon: "none", |
|
|
icon: "none", |
|
@ -132,6 +230,36 @@ Page({ |
|
|
setTimeout(() => { |
|
|
setTimeout(() => { |
|
|
wx.navigateBack() |
|
|
wx.navigateBack() |
|
|
}, 500) |
|
|
}, 500) |
|
|
|
|
|
} else if (res.code == 533) { |
|
|
|
|
|
this.data.violationsCount++ |
|
|
|
|
|
if (this.data.violationsCount == 1){ |
|
|
|
|
|
wx.showToast({ |
|
|
|
|
|
title: res.msg, |
|
|
|
|
|
icon: "none", |
|
|
|
|
|
duration: 2000 |
|
|
|
|
|
}) |
|
|
|
|
|
} else if (this.data.violationsCount == 2) { |
|
|
|
|
|
wx.showModal({ |
|
|
|
|
|
title: '提示', |
|
|
|
|
|
content: '您提交的内容再次被判定为违规,您确定是否要提交?', |
|
|
|
|
|
success (res) { |
|
|
|
|
|
if (res.confirm) { |
|
|
|
|
|
console.log('用户点击确定') |
|
|
|
|
|
that.setData({ |
|
|
|
|
|
isConReview: true |
|
|
|
|
|
}) |
|
|
|
|
|
that.remarkOrReply() |
|
|
|
|
|
} else if (res.cancel) { |
|
|
|
|
|
console.log('用户点击取消') |
|
|
|
|
|
that.setData({ |
|
|
|
|
|
violationsCount: 0, |
|
|
|
|
|
isConReview: false |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
}).catch(err => { |
|
|
}).catch(err => { |
|
|
console.log(err) |
|
|
console.log(err) |
|
|
}) |
|
|
}) |
|
|