Browse Source

no message

索隆 6 years ago
parent
commit
6b16f4d5e5
1 changed files with 3 additions and 3 deletions
  1. 3 3
      js/prediction.js

+ 3 - 3
js/prediction.js

@@ -20,12 +20,12 @@ function getList(page){
20 20
 pageGo = getList;
21 21
 
22 22
 function updateStatus(obj, id){
23
-	var status = $(obj).data("status"), statusTxt=status.toString().decode(0,'上架','-1','下架');
23
+	var $this = $(obj), status = $this.data("status"), statusTxt=status.toString().decode(0,'上架','-1','下架');
24 24
 	confirm("该预测将被禁用并在列表中"+statusTxt+",是否继续操作?",function(){
25 25
 		ajax(apiUrl+"forecast/frame",{"forecastId": id,"onFrame": status},function(res){
26 26
 			if(res.code == 1){
27
-				$(obj).text(statusTxt);
28
-				$(obj).attr("data-status", (status == -1 ? 0 : -1));
27
+				$this.text(statusTxt);
28
+				$this.attr("data-status", (status == -1 ? 0 : -1));
29 29
 			}
30 30
 		});
31 31
 	});