|
|
|
@ -18,6 +18,7 @@ Component({ |
|
|
|
data: { |
|
|
|
messageTitle:"", |
|
|
|
messageDetail:"", |
|
|
|
messageTemp:"", |
|
|
|
files: [], |
|
|
|
// 所在街道
|
|
|
|
streets: [], |
|
|
|
@ -89,16 +90,16 @@ Component({ |
|
|
|
}) |
|
|
|
}, |
|
|
|
bindTextAreaInput(e) { |
|
|
|
if(this.data.messageDetail.length <= 200){ |
|
|
|
this.setData({ |
|
|
|
messageDetail: e.detail.value |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
console.log("bindTextAreaInput"); |
|
|
|
this.setData({ |
|
|
|
messageDetail: e.detail.value, |
|
|
|
}) |
|
|
|
if(e.detail.value.length>200){ |
|
|
|
wx.showToast({ |
|
|
|
title: '超过字数', |
|
|
|
icon: 'none', |
|
|
|
duration: 2000, |
|
|
|
}) |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
uplaodFile(files) { |
|
|
|
@ -143,29 +144,22 @@ Component({ |
|
|
|
}, |
|
|
|
|
|
|
|
submit() { |
|
|
|
if (this.data.messageDetail === ''){ |
|
|
|
if (this.data.messageDetail.length >200){ |
|
|
|
wx.showModal({ |
|
|
|
title: '提示', |
|
|
|
content: '请输入正文内容', |
|
|
|
showCancel:false |
|
|
|
content: '问题超过字数,请重新输入', |
|
|
|
showCancel:false, |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.data.messageDetail.length >200){ |
|
|
|
let th = this |
|
|
|
} |
|
|
|
if (this.data.messageDetail === ''){ |
|
|
|
wx.showModal({ |
|
|
|
title: '提示', |
|
|
|
content: '问题超过字数,请重新输入', |
|
|
|
showCancel:false, |
|
|
|
success: function (res) { |
|
|
|
console.log(res); |
|
|
|
setTimeout(function(){th.setData({ |
|
|
|
messageDetail: '' |
|
|
|
})},500) |
|
|
|
}, |
|
|
|
content: '请输入正文内容', |
|
|
|
showCancel:false |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
//判断是否选择街道
|
|
|
|
if (this.data.streetID === ''){ |
|
|
|
wx.showModal({ |
|
|
|
|