k3GroupHeader.blade.php 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <div class="haomabox">
  2. <div class="waring" id="waringbox">
  3. <div class="flash"><i></i></div>
  4. 温馨提示:因网络问题,开奖结果会有延迟,所以您需要去喝杯咖啡等一会儿!
  5. </div>
  6. <div class="haomaqu" id="cqSsc">
  7. <div class="haomaqu_resetPar">
  8. <div class="haomaqul">
  9. <div class="haomaline">
  10. <div class="haomaimg">
  11. <img src="/Public/Home/stati/img/{$imgname}.png" alt="{$gamename}"/>
  12. </div>
  13. <div class="numberqu">
  14. <div class="nuberqutit">
  15. <span class="klsf">{$gamename}</span>第
  16. <span class="preDrawIssue" v-text="gameData.info_no||0"></span> 期开奖号码
  17. <input type="hidden" id="drawTime">
  18. </div>
  19. {literal}
  20. <div class="kajianhaoPar">
  21. <div class="kajianhaod" id="jnumber">
  22. <ul class="kajianhao">
  23. <li :class="'num'+x.number" v-for="x in codes"></li>
  24. </ul>
  25. </div>
  26. </div>
  27. {/literal}
  28. <div class="line drawCountDiv">已开<span class="drawCount"></span>期,还有<span class="sdrawCount"></span>期</div>
  29. </div>
  30. </div>
  31. </div>
  32. <div class="haomaqur">
  33. <div class="haomaqur_l">
  34. <div class="line linetit">距<span class="nextIssue" v-text="parseInt(gameData.info_no)+1||0"></span>期开奖仅有</div>
  35. <div class="line linetime" id="timebox">
  36. <div v-if="dao_time==0" class="opening opentyle" style="display: block">开奖中...</div>
  37. <div v-else class="cuttime">
  38. <span class="bgtime minute" v-text="dao_time>60?parseInt(dao_time / 60)>10?parseInt(dao_time / 60):'0'+parseInt(dao_time / 60):'00'">00</span>
  39. <span>分</span>
  40. <span class="bgtime second" v-text="dao_time>60?parseInt(dao_time % 60)>9?parseInt(dao_time % 60):'0'+parseInt(dao_time % 60):dao_time>9?dao_time:'0'+dao_time">00</span>
  41. <span>秒</span>
  42. </div>
  43. </div>
  44. </div>
  45. <div class="line soundId haomaqur_r">
  46. <div class="soundline ifSoundSet" id="ifSoundOpen"></div>
  47. <!--关闭铃声-->
  48. <div class="soundline soundSet" id="soundSet"></div>
  49. <!--设置铃声-->
  50. </div>
  51. <div class="line margt20" id="startVideo">
  52. <img src="/Public/Home/stati/img/k3v.jpg?v=2018961524" />
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. </div>
  58. <div class="haomaqu_resetSon">
  59. <div class="homaline2">
  60. <div class="margt30 li_td">
  61. <ul class="zoushimap">
  62. {foreach $menu as $m}
  63. <li {if $type == $m.code} class="checked" {/if}><a href="{$m.url}?game={$game}">{$m.title}</a></li>
  64. {/foreach}
  65. </ul>
  66. </div>
  67. </div>
  68. </div>
  69. {literal}
  70. <script>
  71. new Vue({
  72. el: '.haomaqu',
  73. data() {
  74. return {
  75. msg: 'Welcome to Your Vue.js App',
  76. gameType:'cqssc',
  77. gameData:[],
  78. nowGameData:'',//存储开奖号码
  79. dao_time:0,//倒计时
  80. kjTimer:'',
  81. isOpen:false, // 是否正在开奖
  82. }
  83. },
  84. watch: {
  85. dao_time(e){
  86. e===0?()=>{clearInterval(this.kjTimer),this.dao_time=0,this.preGame()}:null
  87. console.log('this.dao_timethis.dao_time',this.dao_time)
  88. }
  89. },
  90. computed: {
  91. codes(){
  92. let codes=this.nowGameData.split(','),newCodes=[];
  93. for (let x=0;x<codes.length;x++){
  94. newCodes.push({number:parseInt(codes[x])})
  95. }
  96. return newCodes
  97. },
  98. },
  99. created() {
  100. console.log(this.boxSelection());
  101. this.preGame();
  102. },
  103. mounted() {
  104. },
  105. methods: {
  106. boxSelection() {
  107. console.log(11)
  108. },
  109. preGame() {
  110. const gameType=this.request('game');
  111. $.ajax({
  112. url: '/api-gameCenter/preGame?game_name='+gameType,
  113. type: "GET",
  114. data: '',
  115. success: (r)=> {
  116. this.gameData=r.data,this.nowGameData=!!r.data.codes?r.data.codes:'1,2,3',this.nowGame();
  117. if(!!r.data.codes) this.cleaAnimate();
  118. },
  119. error: (r)=> {
  120. this.preGame()
  121. },
  122. });
  123. },
  124. nowGame() {
  125. const gameType=this.request('game');
  126. $.ajax({
  127. url: '/api-gameCenter/nowGame?game_name='+gameType,
  128. type: "GET",
  129. data: '',
  130. success:(r)=> {
  131. this.dao_time=r.data.dao_time;
  132. r.data.info_no==this.gameData.info_no?this.isOpen=true:this.isOpen=false;
  133. clearInterval(this.kjTimer)
  134. this.kjTimer=setInterval(()=>{
  135. this.dao_time>0?this.dao_time --:(clearInterval(this.kjTimer),this.dao_time=0,setTimeout(()=>{this.preGame()},1000))
  136. },1000)
  137. this.isOpen?(this.cleaAnimate(),this.animate()):this.cleaAnimate()
  138. },
  139. error: (data)=> {
  140. this.nowGame()
  141. },
  142. });
  143. },
  144. request(name) {
  145. const reg = new RegExp(`(^|&)${name}=([^&]*)(&|$)`, 'i'),
  146. r = window.location.search.substr(1).match(reg);
  147. return r !== null ? unescape(r[2]) : null;
  148. },
  149. animate(){
  150. animateMethod.kuai3Animate('#cqSsc');
  151. },
  152. cleaAnimate(){
  153. clearInterval(animateID['#cqSsc']); //清除动画
  154. delete animateID['#cqSsc'];
  155. },
  156. },
  157. destroyed() {
  158. }
  159. })
  160. </script>
  161. {/literal}