| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173 |
- <div class="haomabox">
- <div class="waring" id="waringbox">
- <div class="flash"><i></i></div>
- 温馨提示:因网络问题,开奖结果会有延迟,所以您需要去喝杯咖啡等一会儿!
- </div>
- <div class="haomaqu" id="cqSsc">
- <div class="haomaqu_resetPar">
- <div class="haomaqul">
- <div class="haomaline">
- <div class="haomaimg">
- <img src="/Public/Home/stati/img/{$imgname}.png" alt="{$gamename}"/>
- </div>
- <div class="numberqu">
- <div class="nuberqutit">
- <span class="klsf">{$gamename}</span>第
- <span class="preDrawIssue" v-text="gameData.info_no||0"></span> 期开奖号码
- <input type="hidden" id="drawTime">
- </div>
- {literal}
- <div class="kajianhaoPar">
- <div class="kajianhaod" id="jnumber">
- <ul class="kajianhao">
- <li :class="'num'+x.number" v-for="x in codes"></li>
- </ul>
- </div>
- </div>
- {/literal}
- <div class="line drawCountDiv">已开<span class="drawCount"></span>期,还有<span class="sdrawCount"></span>期</div>
- </div>
- </div>
- </div>
- <div class="haomaqur">
- <div class="haomaqur_l">
- <div class="line linetit">距<span class="nextIssue" v-text="parseInt(gameData.info_no)+1||0"></span>期开奖仅有</div>
- <div class="line linetime" id="timebox">
- <div v-if="dao_time==0" class="opening opentyle" style="display: block">开奖中...</div>
- <div v-else class="cuttime">
- <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>
- <span>分</span>
- <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>
- <span>秒</span>
- </div>
- </div>
- </div>
- <div class="line soundId haomaqur_r">
- <div class="soundline ifSoundSet" id="ifSoundOpen"></div>
- <!--关闭铃声-->
- <div class="soundline soundSet" id="soundSet"></div>
- <!--设置铃声-->
- </div>
- <div class="line margt20" id="startVideo">
- <img src="/Public/Home/stati/img/k3v.jpg?v=2018961524" />
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="haomaqu_resetSon">
- <div class="homaline2">
- <div class="margt30 li_td">
- <ul class="zoushimap">
- {foreach $menu as $m}
- <li {if $type == $m.code} class="checked" {/if}><a href="{$m.url}?game={$game}">{$m.title}</a></li>
- {/foreach}
- </ul>
- </div>
- </div>
- </div>
- {literal}
- <script>
- new Vue({
- el: '.haomaqu',
- data() {
- return {
- msg: 'Welcome to Your Vue.js App',
- gameType:'cqssc',
- gameData:[],
- nowGameData:'',//存储开奖号码
- dao_time:0,//倒计时
- kjTimer:'',
- isOpen:false, // 是否正在开奖
- }
- },
- watch: {
- dao_time(e){
- e===0?()=>{clearInterval(this.kjTimer),this.dao_time=0,this.preGame()}:null
- console.log('this.dao_timethis.dao_time',this.dao_time)
- }
- },
- computed: {
- codes(){
- let codes=this.nowGameData.split(','),newCodes=[];
- for (let x=0;x<codes.length;x++){
- newCodes.push({number:parseInt(codes[x])})
- }
- return newCodes
- },
- },
- created() {
- console.log(this.boxSelection());
- this.preGame();
- },
- mounted() {
- },
- methods: {
- boxSelection() {
- console.log(11)
- },
- preGame() {
- const gameType=this.request('game');
- $.ajax({
- url: '/api-gameCenter/preGame?game_name='+gameType,
- type: "GET",
- data: '',
- success: (r)=> {
- this.gameData=r.data,this.nowGameData=!!r.data.codes?r.data.codes:'1,2,3',this.nowGame();
- if(!!r.data.codes) this.cleaAnimate();
- },
- error: (r)=> {
- this.preGame()
- },
- });
- },
- nowGame() {
- const gameType=this.request('game');
- $.ajax({
- url: '/api-gameCenter/nowGame?game_name='+gameType,
- type: "GET",
- data: '',
- success:(r)=> {
- this.dao_time=r.data.dao_time;
- r.data.info_no==this.gameData.info_no?this.isOpen=true:this.isOpen=false;
- clearInterval(this.kjTimer)
- this.kjTimer=setInterval(()=>{
- this.dao_time>0?this.dao_time --:(clearInterval(this.kjTimer),this.dao_time=0,setTimeout(()=>{this.preGame()},1000))
- },1000)
- this.isOpen?(this.cleaAnimate(),this.animate()):this.cleaAnimate()
- },
- error: (data)=> {
- this.nowGame()
- },
- });
- },
- request(name) {
- const reg = new RegExp(`(^|&)${name}=([^&]*)(&|$)`, 'i'),
- r = window.location.search.substr(1).match(reg);
- return r !== null ? unescape(r[2]) : null;
- },
- animate(){
- animateMethod.kuai3Animate('#cqSsc');
- },
- cleaAnimate(){
- clearInterval(animateID['#cqSsc']); //清除动画
- delete animateID['#cqSsc'];
- },
- },
- destroyed() {
- }
- })
- </script>
- {/literal}
|