mess_admin.js
2.11 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
/**
* Created by Dell on 2018/9/5.
*/
/**
* 删除留言 ajax实现
* @param mid:留言ID
* @returns {boolean}
*/
function jumpDel(mid)
{
var delCon = confirm("确认删除该条留言?");
if (delCon === false) {
return false;
}
$.ajax({
url:'http://lys.com/wx5019b9c455ea9c81/Message/Apicp/Message/MessDel/Del/',
type:'post',
data:{
'mid':mid
},
dataType:'json',
success:function(data){
if (data['result'] == 1) {
alert("删除成功。");
console.log(data);
window.location.href = './list.php';
} else {
alert("删除失败。");
console.log('error:'+data);
return false;
}
},
error:function(e){
alert("ajax调用失败。");
console.log("error:"+e);
}
});
}
function jumdAudit(mid)
{
var status = 0;
if ($('#audit_2').prop('checked') != false) {
var reason = $('#reason').val();
if ( reason == '') {
alert('请填写驳回原因。');
return false;
}
status = $('#audit_2').val();
}
if ($('#audit_3').prop('checked') != false ) {
status = $('#audit_3').val();
}
if(status === 0){
alert('请选择是否通过审核。');
return false;
}
$.ajax({
url:'http://lys.com/wx5019b9c455ea9c81/Message/Apicp/Message/MessAudit/Audit/',
type:'post',
dataType:'json',
data:{
'mid':mid,
'status':status,
'reason':reason
},
success:function(data){
if(data['result'] == 1){
console.log(data);
alert('提交成功。');
window.location.href = './list.php';
return false;
}else{
alert('审核失败。');
console.log(data);
}
},
error:function(e){
alert('ajax调用失败。');
console.log('error:'+e);
}
});
}