Browse Source

项目详细下一个按钮和上一个按钮不显示弹窗

SanHQin 1 năm trước cách đây
mục cha
commit
d57a0fd003
1 tập tin đã thay đổi với 10 bổ sung10 xóa
  1. 10 10
      src/components/pages/race/eventCenter/anliDetail.vue

+ 10 - 10
src/components/pages/race/eventCenter/anliDetail.vue

@@ -2935,7 +2935,7 @@ export default {
         });
     },
 		async nextOne(){
-			if(this.tType == 1 || await this.addScore()){
+			if(this.tType == 1 || await this.addScore(false)){
 				const allScoreList = JSON.parse(sessionStorage.getItem("allScoreList"))
 				if(!allScoreList.length>0)return this.$message.info("没有了")
 				let nowIndex = allScoreList.findIndex(i=>i===this.aid);
@@ -2963,10 +2963,7 @@ export default {
 
 		},
 		async upperOne(){
-			console.log("=====================")
-			console.log(this.tType)
-			console.log("=====================")
-			if(this.tType == 1 || await this.addScore()){
+			if(this.tType == 1 || await this.addScore(false)){
 				const allScoreList = JSON.parse(sessionStorage.getItem("allScoreList"))
 				if(!allScoreList.length>0)return this.$message.info("没有了")
 				let nowIndex = allScoreList.findIndex(i=>i===this.aid);
@@ -2995,7 +2992,7 @@ export default {
 				
 			}
 		},
-    addScore() {
+    addScore(showInfo=true) {
 			return new Promise((resolve,reject)=>{
 				if (this.scoreDetail[0].scoreAll.first == "") {
       	  this.$message.error("请将信息填写完整");
@@ -3018,10 +3015,13 @@ export default {
       this.ajax
         .post(this.$store.state.api + "addScore", params)
         .then((res) => {
-          this.$message({
-            message: "评分成功",
-            type: "success",
-          });
+					if(showInfo){
+						this.$message({
+            	message: "评分成功",
+            	type: "success",
+          	});
+					}
+          
           this.scoreDetail = [
             {
               id: "",