710600d10dc3ceabe547e2fcd1b433c1.php
3.0 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:45:"themes/simpleboot3/user/comment/ping_stu.html";i:1533059587;}*/ ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="yes" name="apple-touch-fullscreen">
<meta name="viewport"
content="width=device-width, initial-scale=1,maximum-scale=1,maximum-scale=1, minimum-scale=1, user-scalable=no">
<title>点评学员</title>
<link rel="stylesheet" href="/static/css/common.css">
<link rel="stylesheet" href="/static/css/style.css">
<style>
.box {
overflow: hidden;
}
.ping_area {
width: 9.4133333333rem;
margin: 0 auto;
background-color: #fff;
margin-top: .267rem;
height: auto;
}
.ping_area #wordtext {
height: 3.46rem;
resize: none;
font-size: .4rem;
}
</style>
</head>
<body style="background-color: #f6f6f6">
<div class="box">
<div class="ping_area">
<textarea id="wordtext" placeholder="请输入该学员的学车情况"></textarea>
<em id="wordage">0/500字</em>
</div>
<div class="btn_ping">
<img src="/static/image/btn_ping.png"/>
</div>
</div>
<script type="text/javascript" src="/static/js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="/static/js/common.js"></script>
<script type="text/javascript" src="/static/js/layer/layer.js"></script>
<script>
(function (win, $) {
var limitNum = 0;
var pattern = limitNum + '/500字';
$('#wordage').html(pattern);
$('#wordtext').keyup(
function(){
var remain = $(this).val().length;
if(remain > 500){
pattern = "字数超过500个限制!";
}else{
pattern = remain + '/500字';
}
$('#wordage').html(pattern);
}
);
$('.btn_ping').click(function () {
var str_len = $('#wordtext').val().length;
if (str_len ==0) {
layer.msg('评价不能为空!')
} else {
$.ajax({
url: "<?php echo url('pingjia_by_coach_do'); ?>",
data: {
uid: <?php echo $uid; ?>,
yuyue_id: <?php echo $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";
}
}
});
}
});
})(window, jQuery)
</script>
</body>
</html>