xyncGroupHeader.blade.php 6.5 KB

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