Browse Source

回滚代码,只更改左邻右舍

integral
zhaoyongnian 5 years ago
parent
commit
cda81e6e97
  1. 39
      epdc-resident-mp-yushan/subpages/property/pages/replyOrRemark/replyOrRemark.js

39
epdc-resident-mp-yushan/subpages/property/pages/replyOrRemark/replyOrRemark.js

@ -1,6 +1,4 @@
import { // remarkOrReply, import { remarkOrReply } from '../../utils/api'
topicCom,
topicReply } from '../../utils/api'
Page({ Page({
data: { data: {
@ -46,26 +44,12 @@ Page({
wx.showLoading({ wx.showLoading({
title: '加载中' title: '加载中'
}) })
if (this.data.faCommentId.length > 0) { // 对评论进行回复 remarkOrReply(para).then(res => {
topicReply(para).then(res => {
wx.hideLoading() wx.hideLoading()
console.log("回复", res) console.log('评论或者回复', res)
wx.showToast({ wx.showToast({
title: "评论成功", title: '评论成功',
icon: "none", icon: 'none',
duration: 2000
})
wx.navigateBack()
}).catch(err => {
console.log(err)
})
}else{
topicCom(para).then(res => {
wx.hideLoading()
console.log("评论", res)
wx.showToast({
title: "评论成功",
icon: "none",
duration: 2000 duration: 2000
}) })
wx.navigateBack() wx.navigateBack()
@ -73,17 +57,4 @@ Page({
console.log(err) console.log(err)
}) })
} }
// remarkOrReply(para).then(res => {
// wx.hideLoading()
// console.log('评论或者回复', res)
// wx.showToast({
// title: '评论成功',
// icon: 'none',
// duration: 2000
// })
// wx.navigateBack()
// }).catch(err => {
// console.log(err)
// })
}
}) })
Loading…
Cancel
Save