|
@@ -72,6 +72,14 @@
|
|
|
$('.entered-count').text($(this).val().length)
|
|
|
})
|
|
|
$('#submit').on('click',function (){
|
|
|
+ if ($('#textarea').val().length < 10) {
|
|
|
+ showToast('请至少填写10个字的反馈,谢谢')
|
|
|
+ $(this).attr("disabled","disabled")
|
|
|
+ setTimeout(function() {
|
|
|
+ $('#submit').removeAttr('disabled')
|
|
|
+ }, 2000)
|
|
|
+ return
|
|
|
+ }
|
|
|
$(this).attr("disabled","disabled")
|
|
|
let content=$("textarea").val()
|
|
|
let mold=$("[name='type']:checked").val()
|
|
@@ -79,9 +87,14 @@
|
|
|
{mold:mold,content:content},
|
|
|
function (res){
|
|
|
if(res.data){
|
|
|
- window.history.go(-1)
|
|
|
+ showToast('提交成功')
|
|
|
+ setTimeout(function() {
|
|
|
+ $('#submit').removeAttr('disabled')
|
|
|
+ $('#textarea').val('')
|
|
|
+ $('#account').prop('checked', 'checked')
|
|
|
+ }, 2000)
|
|
|
}else {
|
|
|
- alert(res.error_msg)
|
|
|
+ showToast(res.error_msg)
|
|
|
}
|
|
|
})
|
|
|
})
|