...
|
...
|
@@ -60,27 +60,34 @@ |
|
|
$('#wordage').html(pattern);
|
|
|
}
|
|
|
);
|
|
|
var click_num = 0;
|
|
|
$('.btn_ping').click(function () {
|
|
|
var str_len = $('#wordtext').val().length;
|
|
|
if (str_len ==0) {
|
|
|
layer.msg('评价不能为空!')
|
|
|
} else {
|
|
|
$.ajax({
|
|
|
url: "{:url('pingjia_by_coach_do')}",
|
|
|
data: {
|
|
|
uid: {$uid},
|
|
|
yuyue_id: {$yuyue_id},
|
|
|
comment: $('#wordtext').val()
|
|
|
},
|
|
|
success: function (res) {
|
|
|
console.log(res);
|
|
|
if (res.code == '1') {
|
|
|
layer.msg(res.msg);
|
|
|
window.location.href="/user/profile/percenter";
|
|
|
if(click_num == 0){
|
|
|
click_num++;
|
|
|
var str_len = $('#wordtext').val().length;
|
|
|
if (str_len ==0) {
|
|
|
layer.msg('评价不能为空!')
|
|
|
} else {
|
|
|
$.ajax({
|
|
|
url: "{:url('pingjia_by_coach_do')}",
|
|
|
data: {
|
|
|
uid: {$uid},
|
|
|
yuyue_id: {$yuyue_id},
|
|
|
comment: $('#wordtext').val()
|
|
|
},
|
|
|
success: function (res) {
|
|
|
console.log(res);
|
|
|
if (res.code == '1') {
|
|
|
layer.msg(res.msg);
|
|
|
window.location.href="/user/profile/percenter";
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
}else{
|
|
|
layer.msg("请勿重复评价");
|
|
|
}
|
|
|
|
|
|
});
|
|
|
})(window, jQuery)
|
|
|
</script>
|
...
|
...
|
|