|
@@ -441,7 +441,7 @@
|
|
|
<span class="label label-primary">${rows[i].Location}</span>
|
|
|
</div>
|
|
|
<div class="pull-right">
|
|
|
- <span class="label label-success">${rows[i].Email}</span>
|
|
|
+ <span class="label label-success" onclick="bounceEmail('${rows[i].Email}')">${rows[i].Email}</span>
|
|
|
<span class="label label-warning">${rows[i].QQorWechat}</span>
|
|
|
</div><br/>
|
|
|
${loadComments(data.rows, Enumerable.From(data.rows).Where(c => c.ParentId === rows[i].Id).OrderBy(c => c.CommentDate).ToArray(), startfloor--)}
|
|
@@ -478,7 +478,7 @@
|
|
|
<span class="label label-primary">${item.Location}</span>
|
|
|
</div>
|
|
|
<div class="pull-right">
|
|
|
- <span class="label label-success">${item.Email}</span>
|
|
|
+ <span class="label label-success" onclick="bounceEmail('${item.Email}')">${item.Email}</span>
|
|
|
<span class="label label-primary">${item.QQorWechat}</span>
|
|
|
</div><br/>
|
|
|
${loadComments(data, Enumerable.From(data).Where(c => c.ParentId === item.Id).OrderBy(c => c.CommentDate), root, depth)}
|
|
@@ -493,35 +493,46 @@
|
|
|
swal(res.Message, "", res.Success ? "success" : "error");
|
|
|
getcomments();
|
|
|
}, () => {
|
|
|
- window.notie.alert({
|
|
|
- type: 3,
|
|
|
- text: "请求失败,请稍候再试!",
|
|
|
- time: 4
|
|
|
- });
|
|
|
- });
|
|
|
+ swal("操作失败,请稍候再试", "", "error");
|
|
|
+ });
|
|
|
}
|
|
|
+
|
|
|
+ function bounceEmail(email) {
|
|
|
+ swal({
|
|
|
+ title: "确定将这个邮箱添加到黑名单吗?",
|
|
|
+ showCancelButton: true,
|
|
|
+ confirmButtonColor: "#DD6B55",
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ showLoaderOnConfirm: true,
|
|
|
+ animation: true,
|
|
|
+ allowOutsideClick: false
|
|
|
+ }).then(function () {
|
|
|
+ window.post("/system/BounceEmail", { email: email }, function () {
|
|
|
+ swal("邮箱添加到黑名单成功", "", "success");
|
|
|
+ }, (e) => {
|
|
|
+ swal("操作失败,请稍候再试", "", "error");
|
|
|
+ });
|
|
|
+ }, function () { });
|
|
|
+ }
|
|
|
+
|
|
|
function del(id) {
|
|
|
- swal({
|
|
|
- title: '确定删除这条评论吗?',
|
|
|
- type: 'warning',
|
|
|
- showCancelButton: true,
|
|
|
- confirmButtonColor: '#3085d6',
|
|
|
- cancelButtonColor: '#d33',
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- preConfirm: function() {
|
|
|
- return new Promise(function (resolve) {
|
|
|
- window.post("/comment/delete", {
|
|
|
- id: id
|
|
|
- }, function (res) {
|
|
|
- resolve(res);
|
|
|
- }, (e) => reject(e));
|
|
|
- });
|
|
|
- },
|
|
|
- allowOutsideClick: false
|
|
|
- }).then(function(res) {
|
|
|
- swal(res.Message, "", res.Success ? "success" : "error");
|
|
|
- getcomments();
|
|
|
- });
|
|
|
+ swal({
|
|
|
+ title: "确定删除这条评论吗?",
|
|
|
+ showCancelButton: true,
|
|
|
+ confirmButtonColor: "#DD6B55",
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ showLoaderOnConfirm: true,
|
|
|
+ animation: true,
|
|
|
+ allowOutsideClick: false
|
|
|
+ }).then(function () {
|
|
|
+ $.post("/comment/delete", {
|
|
|
+ id: id
|
|
|
+ }, function (res) {
|
|
|
+ swal(res.Message, "", res.Success ? "success" : "error");
|
|
|
+ getcomments();
|
|
|
+ });
|
|
|
+ }, function () { });
|
|
|
}
|
|
|
</script>
|