Browse Source

兼容性

懒得勤快 5 years ago
parent
commit
1815bfb1fb

+ 5 - 17
src/Masuit.MyBlogs.Core/wwwroot/Scripts/global/article.js

@@ -310,26 +310,14 @@ function commentVoteBind() {
                     $(this).children("span.count").text(parseInt($(this).children("span.count").text())+1);
 					$(this).addClass("disabled");
 					this.disabled = true;
-					window.notie.alert({
-						type: 1,
-						text: data.Message,
-						time: 4
-					});
+					window.notie.alert({ type: 1, text: data.Message, time: 4 });
 				} else {
-					window.notie.alert({
-						type: 3,
-						text: data.Message,
-						time: 4
-					});
+					window.notie.alert({ type: 3, text: data.Message, time: 4 });
 				}
 			}
 		});
 	}, function() {
-        window.notie.alert({
-			type: 3,
-			text: "请求失败,请稍候再试!",
-			time: 4
-		});
+        window.notie.alert({ type: 3, text: "请求失败,请稍候再试!", time: 4 });
     });
 }
 
@@ -338,7 +326,7 @@ function bindVote() {
         window.post("/post/voteup", { id: $("#postId").val() }, function(data) {
 			if (data) {
 				if (data.Success) {
-					$(this).children()[1].innerText = parseInt($(this).children()[1].innerText) + 1;
+					$("#voteup span").text(parseInt($("#voteup span").text()) + 1);
 					$(this).addClass("disabled");
 					this.disabled = true;
 					window.notie.alert({
@@ -366,7 +354,7 @@ function bindVote() {
         window.post("/post/votedown", { id: $("#postId").val() }, function(data) {
 			if (data) {
 				if (data.Success) {
-					$(this).children()[1].innerText = parseInt($(this).children()[1].innerText) + 1;
+					$("#votedown span").text(parseInt($("#votedown span").text()) + 1);
 					$(this).addClass("disabled");
 					this.disabled = true;
 					window.notie.alert({

File diff suppressed because it is too large
+ 0 - 0
src/Masuit.MyBlogs.Core/wwwroot/Scripts/global/article.min.js


Some files were not shown because too many files changed in this diff