tip.html 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. {extend name="public/base_el"/}
  2. {block name="css"}
  3. <style>
  4. .title {margin-top:100px;}
  5. .title p{margin:10px auto;padding:0 20px;text-align: center;font-size:24px;font-weight: 700;}
  6. </style>
  7. {/block}
  8. {block name="body"}
  9. <div style="margin:100px auto; width:1200px;text-align: center;">
  10. <h1>比赛将在12月25日9点准时开始,距离开始还剩余{{second}}秒</h1>
  11. <h5 style="color:red;">若页面未自动刷新,请点击下方刷新按钮进入比赛</h5>
  12. <div style="margin: 100px 20px;text-align: center;">
  13. <el-button type="primary" size="large" @click="refresh">刷新</el-button>
  14. </div>
  15. </div>
  16. {/block}
  17. {block name="script"}
  18. <script>
  19. function v_setup() {
  20. let base = {};
  21. base.toStart = () => {
  22. location.href = "{:url('officer/answer')}"
  23. }
  24. base.second = Vue.ref({$second});
  25. let time = setInterval(function(){
  26. if (base.second.value == 0) {
  27. location.reload();
  28. clearInterval(time);
  29. return false;
  30. }
  31. base.second.value--;
  32. },1000);
  33. base.refresh = () => {
  34. location.reload();
  35. }
  36. return base;
  37. }
  38. </script>
  39. {/block}