倒计时bug

跳转银行链接bug
UI_2022-02-10
e 3 years ago
parent 31907e5632
commit 4ebfcba9da
  1. 20
      src/pages/ass/list/index.vue
  2. 2
      src/pages/station/preview/index.vue

@ -202,6 +202,8 @@ export default {
assessmentId:'', assessmentId:'',
classId:'', classId:'',
stopTime:'', stopTime:'',
sss:1,
datassdata:0,
}; };
}, },
computed: { computed: {
@ -238,6 +240,7 @@ export default {
mounted() { mounted() {
// //
this.$once("hook:beforeDestroy", function() { this.$once("hook:beforeDestroy", function() {
this.sss = 0
clearInterval(this.ticker); clearInterval(this.ticker);
this.ticker = null; this.ticker = null;
}); });
@ -255,7 +258,6 @@ export default {
} else { } else {
if (countDown.status == 1){ if (countDown.status == 1){
this.$post(`${this.api.collectPaper}?id=${countDown.assessmentId}`).then(res => { this.$post(`${this.api.collectPaper}?id=${countDown.assessmentId}`).then(res => {
}) })
}else{ }else{
@ -264,6 +266,11 @@ export default {
} }
}, },
beginTimer() { beginTimer() {
this.ticker = setInterval(() => {
if(this.sss == 0){
this.ticker = null;
clearInterval(this.ticker);
}else{
for (let i = 0; i < this.listData.length; i++) { for (let i = 0; i < this.listData.length; i++) {
const ticker = setInterval(() => { const ticker = setInterval(() => {
const item = this.listData[i]; const item = this.listData[i];
@ -283,7 +290,8 @@ export default {
this.tickerArr.push(ticker) this.tickerArr.push(ticker)
} }
}
}, 1000);
// this.ticker = setInterval(() => { // this.ticker = setInterval(() => {
// for (let i = 0; i < this.listData.length; i++) { // for (let i = 0; i < this.listData.length; i++) {
// const item = this.listData[i]; // const item = this.listData[i];
@ -304,6 +312,7 @@ export default {
}, },
getData() { getData() {
this.listLoading = true; this.listLoading = true;
this.sss = 0
this.listData.splice(0); this.listData.splice(0);
if (this.ticker) { if (this.ticker) {
clearInterval(this.ticker); clearInterval(this.ticker);
@ -340,13 +349,17 @@ export default {
} }
} }
}); });
this.beginTimer(); this.sss = 1;
if(this.datassdata == 1){
this.beginTimer()
}
this.listLoading = false; this.listLoading = false;
}).catch(err => { }).catch(err => {
this.listLoading = false; this.listLoading = false;
}); });
}, },
initData() { initData() {
this.sss = 0
this.page = 1; this.page = 1;
this.getData(); this.getData();
}, },
@ -364,6 +377,7 @@ export default {
}, },
handleCurrentChange(val) { // handleCurrentChange(val) { //
this.page = val; this.page = val;
this.sss = 0
this.getData(); this.getData();
}, },
entry(row) { // entry(row) { //

@ -314,7 +314,7 @@ export default {
// href = `${host}bank/#/`; // href = `${host}bank/#/`;
let token = util.local.get(Setting.tokenKey); let token = util.local.get(Setting.tokenKey);
href = "http://39.108.250.202/banksystem/#/index/list?"+'token='+token+'&cid='+this.courseId+'&systemId='+this.assessmentList[0].systemId+"&projectId=&assessmentId=&classId=&stopTime="; href = "http://39.108.250.202/banksystem/#/index/list?"+'token='+token+'&cid='+this.courseId+'&systemId='+this.assessmentList[0].systemId+"&projectId=&assessmentId=&classId=&stopTime=";
// href = "http://http://192.168.31.254:8093/#/index/list?"+'token='+token+'&cid='+this.courseId+'&systemId='+this.assessmentList[0].systemId+"&projectId=&assessmentId=&classId=&stopTime="; // href = "http://192.168.31.254:8093/#/index/list?"+'token='+token+'&cid='+this.courseId+'&systemId='+this.assessmentList[0].systemId+"&projectId=&assessmentId=&classId=&stopTime=";
} else if (id == 21) { } else if (id == 21) {
window.open(`http://121.37.29.24:80/yyyflogin?userId=${this.userId}&userName=${userName}&userType=${roleId}&reqType=1&reqId=3989a0ad671849b99dcbdcc208782333&caseId=9681f86902314b10bc752909121f9ab9&authorization=87DIVy348Oxzj3ha&classId=1876&courserId=7ff5d4715b114b7398b6f26c20fac460`); window.open(`http://121.37.29.24:80/yyyflogin?userId=${this.userId}&userName=${userName}&userType=${roleId}&reqType=1&reqId=3989a0ad671849b99dcbdcc208782333&caseId=9681f86902314b10bc752909121f9ab9&authorization=87DIVy348Oxzj3ha&classId=1876&courserId=7ff5d4715b114b7398b6f26c20fac460`);
} else if (id == 22) { } else if (id == 22) {

Loading…
Cancel
Save