trend.vue 95 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362
  1. <template>
  2. <view >
  3. <view class="query-form" style="height:65px;top:0px;">
  4. <view class="menu">
  5. <block v-for="(item,index1) in toparr" :key="index1" >
  6. <view :class="index1==topselect?'current':''" @tap="change_num(index1)" >{{item}}</view>
  7. </block>
  8. </view>
  9. <view class="menu2">
  10. <view @tap="show_gamenav1()" style="float: left;padding-left: 10px;color: #2319dc;">{{gameshow['title']}}
  11. <uni-icons :type="gameico" style="color: #2319dc;display: inline-block;"/>
  12. </view>
  13. <view id="wanfa_title" style="display: inline-block;color: #2319dc" @tap="tapshowmenu()">{{wanfa_title}}</view>
  14. <input type="checkbox" name="checkbox2" value="checkbox" id="has_line" style="display:none ">
  15. <input type="checkbox" name="checkbox" value="checkbox" id="no_miss" checked="checked" style="display:none ">
  16. <view style="display: inline-block;float: right;width: 50px;text-align: center;color: #2319dc" @tap="tapshowmenu()">
  17. <uni-icons :type="showmenu?'gear-filled':'gear'" style="color: #2319dc;display: inline-block;"/>切换
  18. </view>
  19. </view>
  20. </view>
  21. <view :class="{'gamenav':true,'active':gamenav}">
  22. <view v-for="(m,index) in gametype" :key="index" >
  23. <view>{{m}}</view>
  24. <view>
  25. <block v-for="(game,index1) in gamelist" :key="index1" >
  26. <view v-if="game['type']==index && game['id']!=gameid" @tap="change_game(game['id'])">{{game['title']}}</view>
  27. <view v-if="game['type']==index && game['id']==gameid" class="active">{{game['title']}}</view>
  28. </block>
  29. </view>
  30. </view>
  31. </view>
  32. <scroll-view scroll-y="true" :class="{'showtabs':true,'active':showmenu}" :style="{'height':tableheight}">
  33. <block v-for="(item,key) in tabs_nav1" :key="key" >
  34. <view class="lines"> {{item}}</view>
  35. <view class="line-btn " >
  36. <block v-for="(item1,key1) in wei_arr[key]" :key="key1" >
  37. <view :class="wanfa_key1==key && wanfa_key2==key1?'item current':'item'" @tap="show_wanfa(key,key1);">{{item1}}</view>
  38. </block>
  39. </view>
  40. </block>
  41. <!-- #ifdef H5 -->
  42. <view style="height: 50px;"></view>
  43. <!-- #endif -->
  44. </scroll-view>
  45. <scroll-view scroll-y="true" id="tablebox" :scroll-top="scrollTop" @scroll="table_scroll" upper-threshold="50" @scrolltoupper="scrolltoupper" class="query-tablebox" :style="{'height':tableheight}">
  46. <table class="query-table" >
  47. <tr class="tr">
  48. <block v-for="(item1,key1) in LotteryHeadLines" :key="key1" >
  49. <th class="td">{{item1}}</th>
  50. </block>
  51. </tr>
  52. <tr class="tr" v-for="(item1,key1) in LotteryLines" :key="key1">
  53. <block v-for="(item2,key2) in item1" :key="key2" >
  54. <td ><view :class="item2.class">{{item2.value}}</view>
  55. <view class="times" v-if="wanfa_key1=='duohao' && item2.times>1">{{item2.times}}</view>
  56. </td>
  57. </block>
  58. </tr>
  59. <block v-for="(item1,key1) in LotteryBottomLines" :key="'info2-'+key1">
  60. <tr :class="bottomcolor(key1)">
  61. <block v-for="(item2,key2) in item1" :key="key2" >
  62. <td :class="item2.class"><view>{{item2.value}}</view>
  63. </td>
  64. </block>
  65. </tr>
  66. </block>
  67. </table>
  68. <block v-if="pagesum>1">
  69. <view class="pages" >
  70. <view @tap='next_page(-1)'>&lt;</view>
  71. <block v-for="(m,index) in pagenum" :key='index'>
  72. <view :class="{'active':m==page}" @tap="click_page(m)">{{m}}</view>
  73. </block>
  74. <view @tap='next_page(1)'>&gt;</view>
  75. </view>
  76. <view style="height: 20px;"></view>
  77. </block>
  78. <!-- #ifdef H5 -->
  79. <view style="height: 50px;"></view>
  80. <!-- #endif -->
  81. <canvas canvas-id="ballchart" v-if="ischart" class="canvas" :style="{'height':31*LotteryLines.length+'px'}"></canvas>
  82. </scroll-view>
  83. </view>
  84. </template>
  85. <script>
  86. import uniIcons from './uni-icons/uni-icons.vue'
  87. import http from '../library/http.js'
  88. export default {
  89. components: {
  90. uniIcons
  91. },
  92. props: {
  93. gamelist:{
  94. },
  95. lotterylist:{
  96. },
  97. gameid:{
  98. },
  99. gameshow:{
  100. },
  101. windowHeight:{
  102. }
  103. },
  104. data() {
  105. return {
  106. tableheight:"",
  107. gameico:'arrowdown',
  108. toparr:{'30':'30期','50':'50期','day0':'今日数据','day1':'昨日数据','day2':'前日数据'},
  109. topselect:'30',
  110. tabs_nav1:{'danhao':'单号走势','duohao':'多号走势','lhh':'龙虎和','dx':'大小走势','ds':'单双走势','5xhz':'五星和值','hz':'和值','kd':'跨度'},
  111. wei_arr:[],
  112. wanfa_key1:'danhao',
  113. wanfa_key2:'0',
  114. showmenu:false,
  115. historylist:[],
  116. LotteryHeadLines:[],
  117. LotteryLines:[],
  118. LotteryBottomLines:[],
  119. charttop:'96px',
  120. scrollTop:1200,
  121. wanfa_title:'',
  122. last_issue:"",
  123. lotteryTime1:null,
  124. lotteryTime2:null,
  125. gamenav:false,
  126. ischart:false,
  127. gametype:uni.getStorageSync('gametype'),
  128. listall:[],
  129. isscrolltop:false,
  130. page:1,
  131. pagesum:0,
  132. pagenum:[],
  133. pagebottom:10,
  134. }
  135. },
  136. computed:{
  137. },
  138. methods: {
  139. change_num(num){
  140. this.topselect=num;
  141. this.load_lottery(true);
  142. },
  143. change_game(id){
  144. this.$emit('change_game',id);
  145. // this.load_lottery(true);
  146. var that=this;
  147. setTimeout(function(){
  148. that.load_trend();
  149. },100)
  150. this.init_data(true);
  151. //this.load_trend();
  152. this.gamenav=false;
  153. },
  154. show_gamenav1(){
  155. this.gamenav=!this.gamenav;
  156. },
  157. tapshowmenu(){
  158. this.showmenu=!this.showmenu;
  159. },
  160. loadmethod(){
  161. this.tableheight="calc("+this.windowHeight+" - 65px)";
  162. var wei_arr=[];
  163. var type=this.gameshow.type;
  164. if(type=='ssc' || type=='ffc'){
  165. this.tabs_nav1={'danhao':'单号走势','duohao':'多号走势','lhh':'龙虎和','dx':'大小走势','ds':'单双走势','5xhz':'五星和值','hz':'和值','kd':'跨度'}
  166. wei_arr['danhao']={'0':'万位','1':'千位','2':'百位','3':'十位','4':'个位'};
  167. wei_arr['duohao']={'0-4':'五星','1-4':'后四','0-2':'前四','2-4':'后三','1-3':'中三','0-2':'前三','3-4':'后二','0-1':'前二'};
  168. wei_arr['dx']={'0-2':'万千百','2-4':'百十个'};
  169. wei_arr['ds']={'0-2':'万千百','2-4':'百十个'};
  170. wei_arr['5xhz']=['大小单双'];
  171. wei_arr['hz']=['各类'];
  172. wei_arr['kd']=['各类'];
  173. wei_arr['lhh']={'01-02':'万千 万百','03-04':'万十 万个','12-13':'千百 千十','14-23':'千个 百十','24-34':'百个 十个'};
  174. }
  175. else if(type=='11x5'){
  176. this.tabs_nav1={'danhao':'单号走势','duohao':'多号走势','dx':'大小走势','ds':'单双走势','hmds':'号码单双'}
  177. wei_arr['danhao']={'0':'第一名','1':'第二名','2':'第三名','3':'第四名','4':'第五名'};
  178. wei_arr['duohao']={'0-4':'五星','0-1':'前二','0-2':'前三'};
  179. wei_arr['dx']={'0-2':'一二三','2-4':'三四五'};
  180. wei_arr['ds']={'0-2':'一二三','2-4':'三四五'};
  181. wei_arr['hmds']=['个数比'];
  182. }
  183. else if(type=='pk10'){
  184. this.tabs_nav1={'danhao':'单号走势','duohao':'多号走势','dx':'大小走势','ds':'单双走势'}
  185. wei_arr['danhao']={'0':'第一名','1':'第二名','2':'第三名','3':'第四名','4':'第五名','5':'第六名','6':'第七名','7':'第八名','8':'第九名','9':'第十名'};
  186. wei_arr['duohao']={'0-1':'前二','0-2':'前三','0-4':'前五','5-9':'后五'};
  187. wei_arr['dx']={'0-2':'一二三'};
  188. wei_arr['ds']={'0-2':'一二三'};
  189. }
  190. else if(type=='k3'){
  191. this.tabs_nav1={'danhao':'单号走势','duohao':'多号走势','dx':'大小走势','ds':'单双走势','hzxt':'和值形态'}
  192. wei_arr['danhao']={'0':'一位','1':'二位','2':'三位'};
  193. wei_arr['duohao']={'0-2':'三码','0-1':'前二','1-2':'后二'};
  194. wei_arr['dx']={'0-2':'百十个'};
  195. wei_arr['ds']={'0-2':'百十个'};
  196. wei_arr['hzxt']=['三码'];
  197. }
  198. this.wei_arr=wei_arr;
  199. this.wanfa_key1='danhao'
  200. this.wanfa_key2='0'
  201. this.init_data(false);
  202. },
  203. init_data(type){
  204. this.set_wanfatitle();
  205. if(this.lotterylist.length<parseInt(this.topselect))
  206. this.historylist=this.lotterylist;
  207. else {
  208. for(var i=0;i<parseInt(this.topselect);i++){
  209. this.historylist.push(this.lotterylist[i]);
  210. }
  211. }
  212. var that=this;
  213. setTimeout(function(){
  214. that.load_lottery(type);
  215. },100)
  216. },
  217. set_wanfatitle(){
  218. var title='';
  219. for(var ii in this.tabs_nav1){
  220. if(ii==this.wanfa_key1) {
  221. title+=this.tabs_nav1[ii];
  222. break;
  223. }
  224. }
  225. for(var ii in this.wei_arr[this.wanfa_key1]){
  226. if(ii==this.wanfa_key2) {
  227. title+="_"+this.wei_arr[this.wanfa_key1][ii];
  228. break;
  229. }
  230. }
  231. this.wanfa_title=title;
  232. },
  233. show_wanfa(key,key1){
  234. this.wanfa_key1=key;
  235. this.wanfa_key2=key1;
  236. this.set_wanfatitle();
  237. this.showmenu=false;
  238. this.load_trend();
  239. },
  240. scrolltoupper(){
  241. // if(this.historylist.length<this.listall.length){
  242. // var len=this.listall.length-this.historylist.length;
  243. // if(len>50) len=50;
  244. // var from=this.historylist.length;
  245. // var historylist=[];
  246. // for(var i=from;i<from+len;i++){
  247. // historylist.push(this.listall[i]);
  248. // }
  249. // this.historylist=historylist;
  250. // this.isscrolltop=true;
  251. // }
  252. // else {
  253. // this.isscrolltop=false;
  254. // }
  255. this.next_page(1);
  256. },
  257. pagedata(){
  258. var from=(this.page-1)*100;
  259. var to=from+100;
  260. if(to>this.listall.length) to=this.listall.length;
  261. var historylist=[];
  262. for(var i=from;i<to;i++){
  263. historylist.push(this.listall[i]);
  264. }
  265. this.historylist=historylist;
  266. },
  267. click_page(num){
  268. if(num>0 && num<=this.pagesum && this.page!=num){
  269. this.page=num;
  270. this.pagedata();
  271. }
  272. },
  273. next_page(num){
  274. var page=this.page+num;
  275. this.click_page(page);
  276. },
  277. setpage() {
  278. var sum=this.pagesum;
  279. var page=this.page;
  280. var pagenum=[];
  281. var html="";
  282. if(page>4){
  283. var from=page-2;
  284. var to=page+2;
  285. }
  286. else {var from=1;
  287. var to=6;
  288. }
  289. if(to>sum) to=sum;
  290. if(from>2){
  291. pagenum.push(1);
  292. pagenum.push('...');
  293. }
  294. for(var i=from;i<=to;i++){
  295. pagenum.push(i);
  296. }
  297. if(to<sum-1) {
  298. pagenum.push('...');
  299. pagenum.push(sum);
  300. }
  301. this.pagenum=pagenum;
  302. },
  303. load_lottery(type){
  304. clearTimeout(this.lotteryTime1);
  305. clearTimeout(this.lotteryTime2);
  306. var pageSize=this.topselect;
  307. // console.log(this.gameid)
  308. http.setWait(type).get('index.php?act=lotterylist',{lotteryId:this.gameid,current:1,type:'trend',pageSize:pageSize,from:'app'}).then(res=>{
  309. this.listall=res.data.records;
  310. // console.log(this.listall)
  311. this.pagesum=Math.ceil(this.listall.length/100);
  312. this.page=1;
  313. this.pagedata();
  314. this.setpage();
  315. // if(res.data.records.length<=50)
  316. // this.historylist=res.data.records;
  317. // else{
  318. // var historylist=[];
  319. // for(var i=0;i<50;i++){
  320. // historylist.push( this.listall[i]);
  321. // }
  322. // this.historylist=historylist;
  323. // }
  324. //已开奖
  325. if(this.last_issue!=res.data.records[0].issueNo){
  326. this.last_issue=res.data.records[0].issueNo;
  327. // this.load_trend();
  328. // var that=this;
  329. // // console.log(1000*parseInt(res.data.records[0]['lastsecond']));
  330. // this.lotteryTime1=setTimeout(function(){
  331. // that.load_lottery(false);
  332. // // console.log('222')
  333. // },1000*parseInt(res.data.records[0]['lastsecond']))
  334. }
  335. else{
  336. // //未开奖 3秒监控
  337. // var that=this;
  338. // // clearTimeout(this.lotteryTime2);
  339. // this.lotteryTime2=clearTimeout(function(){
  340. // // console.log('lottery');
  341. // that.load_lottery(false);
  342. // },3000)
  343. }
  344. });
  345. },
  346. update_lottery(data){
  347. var that=this;
  348. if(data.length>0){
  349. for(var i=0;i<data.length;i++){
  350. var item=data[i];
  351. var gameitem=this.getgamebykey(item.gamekey);
  352. var id=gameitem.id;
  353. var data1=this.dataformat(item,gameitem);
  354. if(item.expect!=this.last_issue){
  355. if(id==this.gameid){
  356. this.last_issue=data1.issueNo;
  357. this.historylist.unshift(data1);
  358. this.historylist.splice(this.historylist.length-1,1);
  359. // this.load_trend();
  360. //console.log(this.historylist)
  361. }
  362. }
  363. }
  364. }
  365. },
  366. timestampToTime(timestamp) {
  367. var date = new Date(timestamp * 1000);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
  368. var Y = date.getFullYear() ;
  369. var M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1);
  370. var D = date.getDate();
  371. var h = date.getHours();
  372. var m = date.getMinutes();
  373. var s = date.getSeconds();
  374. if(D<10) D='0'+D;
  375. if(h<10) h='0'+h;
  376. if(m<10) m='0'+m;
  377. if(s<10) s='0'+s;
  378. return Y+'-'+M+'-'+D+' '+h+':'+m+':'+s;
  379. },
  380. dataformat(item,game){
  381. var data={};
  382. data.gametype=game.type;
  383. data.issueNo=item.expect;
  384. data.openCode=item.number;
  385. if(item.lasttime>parseInt((new Date()).getTime() / 1000))
  386. data.lastsecond=item.lastsecond - parseInt((new Date()).getTime() / 1000)
  387. else
  388. data.lastsecond=item.lasttime;
  389. data.predictedTime=this.timestampToTime(item.time);
  390. return data;
  391. },
  392. getgamebykey(gamekey){
  393. var key1=gamekey.toLowerCase();
  394. var key2=gamekey.toUpperCase();
  395. for(var i=0;i<this.gamelist.length;i++){
  396. if(this.gamelist[i].showkey==key1 || this.gamelist[i].showkey==key2){
  397. return this.gamelist[i];
  398. }
  399. }
  400. return false;
  401. },
  402. scrollToBottom: function() {
  403. if(this.isscrolltop==false){
  404. var that=this;
  405. setTimeout(function(){
  406. that.scrollTop= 32*(that.LotteryLines.length+5)
  407. },500)
  408. }
  409. },
  410. table_scroll(e){
  411. var top=96-e.detail.scrollTop;
  412. this.charttop=top+'px';
  413. },
  414. bottomcolor(num){
  415. // console.log(num)
  416. return "tr color"+num;
  417. },
  418. issue(num){
  419. if(num.indexOf('-')>-1){
  420. var issue=num.split('-');
  421. return issue[1];
  422. }
  423. else{
  424. return num.substr(num.length-3,3);
  425. }
  426. },
  427. //单号走势
  428. danhaoList(){
  429. this.LotteryHeadLines=[];
  430. this.LotteryHeadLines.push('期号');
  431. var type=this.gameshow.type;
  432. if(type=='ssc' || type=='ffc'){
  433. var min=0;
  434. var max=9;
  435. }
  436. else if(type=='pk10'){
  437. var min=1;
  438. var max=10;
  439. }
  440. else if(type=='11x5'){
  441. var min=1;
  442. var max=11;
  443. }
  444. else if(type=='k3'){
  445. var min=1;
  446. var max=6;
  447. }
  448. for(var i=min;i<=max;i++){
  449. this.LotteryHeadLines.push(i);
  450. }
  451. var countArray = new Array();
  452. var MaxNum = new Array();
  453. var MaxNumArray = new Array();
  454. var MaxLostNum = new Array();
  455. var strArray = new Array();
  456. var numArray = new Array();
  457. var wei_num=this.wanfa_key2;
  458. for (var j = min; j <= max; j++) {
  459. countArray[j] = 0;
  460. MaxNum[j] = 0;
  461. MaxNumArray[j] = 0;
  462. MaxLostNum[j] = 0;
  463. strArray[j] = 0;
  464. numArray[j] = 0;
  465. }
  466. var lines=[];
  467. for(var i=this.historylist.length-1;i>=0;i--){
  468. var item=this.historylist[i];
  469. var line=[];
  470. line.push({'class':'issue','value':this.issue(item['issueNo'])});
  471. var strArray2 = item['openCode'].split(',');
  472. var code= parseInt(strArray2[wei_num]);
  473. var num0 = min;
  474. while (num0 <= max) {
  475. if (num0 == code) {
  476. countArray[num0]++;
  477. numArray[num0] = -1;
  478. MaxNumArray[num0]++;
  479. if (MaxNum[num0] < MaxNumArray[num0])
  480. MaxNum[num0] = MaxNumArray[num0];
  481. }
  482. else {
  483. MaxNumArray[num0] = 0;
  484. numArray[num0]++;
  485. if (MaxLostNum[num0] < numArray[num0])
  486. MaxLostNum[num0] = numArray[num0];
  487. }
  488. if (num0 ==code) {
  489. line.push({'class':'ball','value':code});
  490. numArray[num0]++;
  491. }
  492. else {
  493. line.push({'class':'num','value':numArray[num0]});
  494. }
  495. num0++;
  496. }
  497. lines.push(line);
  498. }
  499. // console.log(lines);
  500. this.LotteryLines=lines;
  501. this.drawchart();
  502. this.ischart=true;
  503. var lists=new Array();
  504. var line=[{'class':'issue','value':'最大连出'}];
  505. var num0 = min;
  506. while (num0 <= max) {
  507. line.push({'class':'num','value':MaxNum[num0]});
  508. num0++;
  509. }
  510. lists.push(line);
  511. var line=[{'class':'issue','value':'最大遗漏'}];
  512. var num0 = min;
  513. while (num0 <= max) {
  514. line.push({'class':'num','value':MaxLostNum[num0]});
  515. num0++;
  516. }
  517. lists.push(line);
  518. var line=[{'class':'issue','value':'出现次数'}];
  519. var num0 = min;
  520. while (num0 <= max) {
  521. line.push({'class':'num','value':countArray[num0]});
  522. num0++;
  523. }
  524. lists.push(line);
  525. var line=[{'class':'issue','value':'平均遗漏'}];
  526. var num0 = min;
  527. while (num0 <= max) {
  528. if(countArray[num0]>0)
  529. var tt= (this.historylist.length-countArray[num0])/countArray[num0];
  530. else
  531. var tt= this.historylist.length;
  532. tt=parseInt(tt);
  533. line.push({'class':'num','value':tt});
  534. num0++;
  535. }
  536. lists.push(line);
  537. this.LotteryBottomLines=new Array();
  538. this.LotteryBottomLines=lists;
  539. this.scrollToBottom();
  540. },
  541. //多号走势
  542. duohaoList() {
  543. this.ischart=false;
  544. this.LotteryHeadLines=[];
  545. this.LotteryHeadLines.push('期号');
  546. var type=this.gameshow.type;
  547. if(type=='ssc' || type=='ffc'){
  548. var min=0;
  549. var max=9;
  550. }
  551. else if(type=='pk10'){
  552. var min=1;
  553. var max=10;
  554. }
  555. else if(type=='11x5'){
  556. var min=1;
  557. var max=11;
  558. }
  559. else if(type=='k3'){
  560. var min=1;
  561. var max=6;
  562. }
  563. for(var i=min;i<=max;i++){
  564. this.LotteryHeadLines.push(i);
  565. }
  566. var countArray = new Array();
  567. var MaxNum = new Array();
  568. var MaxNumArray = new Array();
  569. var MaxLostNum = new Array();
  570. var strArray = new Array();
  571. var numArray = new Array();
  572. var wei_num=this.wanfa_key2;
  573. for (var j = min; j <= max; j++) {
  574. countArray[j] = 0;
  575. MaxNum[j] = 0;
  576. MaxNumArray[j] = 0;
  577. MaxLostNum[j] = 0;
  578. strArray[j] = 0;
  579. numArray[j] = 0;
  580. }
  581. var wei_num = this.wanfa_key2.split('-');
  582. var wei_from = parseInt(wei_num[0]);
  583. var wei_to = parseInt(wei_num[1]);
  584. var lines=[];
  585. for(var i=this.historylist.length-1;i>=0;i--){
  586. var item=this.historylist[i];
  587. var line=[];
  588. // console.log(item);
  589. line.push({'class':'issue','value':this.issue(item['issueNo'])});
  590. var strArray2 = item['openCode'].split(',');
  591. var code= parseInt(strArray2[wei_num]);
  592. var num0 = min;
  593. strArray2 = this.Lot_New(strArray2,wei_from,wei_to);
  594. num0 = min;
  595. while (num0 <= max) {
  596. var temp = this.in_arr_num(strArray2, num0);
  597. if (temp>0) {
  598. countArray[num0]= countArray[num0]+temp;
  599. numArray[num0] = -1;
  600. MaxNumArray[num0]++;
  601. if (MaxNum[num0] < MaxNumArray[num0])
  602. MaxNum[num0] = MaxNumArray[num0];
  603. }
  604. else {
  605. MaxNumArray[num0] = 0;
  606. numArray[num0]++;
  607. if (MaxLostNum[num0] < numArray[num0])
  608. MaxLostNum[num0] = numArray[num0];
  609. }
  610. if (temp > 0) {
  611. // str3 += "<td class=\"charball td0\"><div class=\"ball01\">"+tt+ num0 + times_str+"</div></td>";
  612. line.push({'class':'ball','value': num0,'times':temp});
  613. numArray[num0]++;
  614. }
  615. else {
  616. line.push({'class':'num','value':numArray[num0]});
  617. // str3 += "<td class=\"wdh td0\"><div class=\"ball14\">" + numArray[num0] + "</div></td>";
  618. }
  619. num0++;
  620. }
  621. lines.push(line);
  622. }
  623. // console.log(lines);
  624. this.LotteryLines=lines;
  625. this.drawchart();
  626. var lists=new Array();
  627. var line=[{'class':'issue','value':'最大连出'}];
  628. var num0 = min;
  629. while (num0 <= max) {
  630. line.push({'class':'num','value':MaxNum[num0]});
  631. num0++;
  632. }
  633. lists.push(line);
  634. var line=[{'class':'issue','value':'最大遗漏'}];
  635. var num0 = min;
  636. while (num0 <= max) {
  637. line.push({'class':'num','value':MaxLostNum[num0]});
  638. num0++;
  639. }
  640. lists.push(line);
  641. var line=[{'class':'issue','value':'出现次数'}];
  642. var num0 = min;
  643. while (num0 <= max) {
  644. line.push({'class':'num','value':countArray[num0]});
  645. num0++;
  646. }
  647. lists.push(line);
  648. var line=[{'class':'issue','value':'平均遗漏'}];
  649. var num0 = min;
  650. while (num0 <= max) {
  651. if(countArray[num0]>0)
  652. var tt= (this.historylist.length-countArray[num0])/countArray[num0];
  653. else
  654. var tt= this.historylist.length;
  655. tt=parseInt(tt);
  656. line.push({'class':'num','value':tt});
  657. num0++;
  658. }
  659. lists.push(line);
  660. this.LotteryBottomLines=new Array();
  661. this.LotteryBottomLines=lists;
  662. this.scrollToBottom();
  663. },
  664. //龙虎走势
  665. lhhList(type) {
  666. this.ischart=false;
  667. var wei_num = this.wanfa_key2.split('-');
  668. var wei_from = wei_num[0];
  669. var wei_to = wei_num[1];
  670. var lines=[];
  671. var min = 0;
  672. var max = 5;
  673. var count = 10;
  674. var ballNum = 1;
  675. this.LotteryHeadLines=[];
  676. this.LotteryHeadLines.push('期号');
  677. var wanfa_title2='';
  678. for(var ii in this.wei_arr[this.wanfa_key1]){
  679. if(ii==this.wanfa_key2) {
  680. wanfa_title2= this.wei_arr[this.wanfa_key1][ii];
  681. break;
  682. }
  683. }
  684. for (var j = 0; j <2; j++) {
  685. this.LotteryHeadLines.push(wanfa_title2.substr(j,1));
  686. }
  687. this.LotteryHeadLines.push('龙');this.LotteryHeadLines.push('虎');this.LotteryHeadLines.push('和');
  688. for (var j = 3; j <5; j++) {
  689. this.LotteryHeadLines.push(wanfa_title2.substr(j,1));
  690. }
  691. this.LotteryHeadLines.push('龙');this.LotteryHeadLines.push('虎');this.LotteryHeadLines.push('和');
  692. var countArray = new Array();
  693. var MaxNum = new Array();
  694. var MaxNumArray = new Array();
  695. var MaxLostNum = new Array();
  696. var strArray = new Array();
  697. var numArray = new Array();
  698. for (var j = min; j <= max; j++) {
  699. countArray[j] = 0;
  700. MaxNum[j] = 0;
  701. MaxNumArray[j] = 0;
  702. MaxLostNum[j] = 0;
  703. strArray[j] = 0;
  704. numArray[j] = 0;
  705. }
  706. for(var i=this.historylist.length-1;i>=0;i--){
  707. var item=this.historylist[i];
  708. var line=[];
  709. var dt = item;
  710. var num0;
  711. var strArray2 = item['openCode'].split(',');
  712. line.push({'class':'issue','value':this.issue(item['issueNo'])});
  713. num0 = min;
  714. var showarr=new Array('龙','和','虎');
  715. var arr1= new Array(strArray2[parseInt(wei_from.substr(0,1))],strArray2[parseInt(wei_from.substr(1,1))]);
  716. for(var tt=0;tt<arr1.length;tt++){
  717. line.push({'class':'noborder','value':arr1[tt]});
  718. }
  719. var code1=parseInt(arr1[0]);
  720. var code2=parseInt(arr1[1]);
  721. for(var j=0;j<3;j++){
  722. num0=j;
  723. if((j%3==0 && code1>code2) || (j%3==1 && code1==code2) || (j%3==2 && code1<code2) ){
  724. var sta=1;
  725. var showname=showarr[j%3];
  726. }else sta=0;
  727. if (sta==1) {
  728. countArray[num0]++;
  729. numArray[num0] = -1;
  730. MaxNumArray[num0]++;
  731. if (MaxNum[num0] < MaxNumArray[num0])
  732. MaxNum[num0] = MaxNumArray[num0];
  733. line.push({'class':'numbg'+j%3,'value':showname});
  734. // str3 += "<td class='numbg"+j%3+"'>"+showname+"</td>";
  735. }
  736. else {
  737. MaxNumArray[num0] = 0;
  738. numArray[num0]++;
  739. if (MaxLostNum[num0] < numArray[num0])
  740. MaxLostNum[num0] = numArray[num0];
  741. // str3 += "<td class=\"wdh td0\">"+numArray[num0]+"</td>";
  742. line.push({'class':'noborder','value':numArray[num0]});
  743. }
  744. }
  745. var arr1= new Array(strArray2[parseInt(wei_to.substr(0,1))],strArray2[parseInt(wei_to.substr(1,1))]);
  746. for(var tt=0;tt<arr1.length;tt++){
  747. line.push({'class':'noborder','value':arr1[tt]});
  748. }
  749. var code1=parseInt(arr1[0]);
  750. var code2=parseInt(arr1[1]);
  751. for(var j=3;j<6;j++){
  752. num0=j;
  753. if((j%3==0 && code1>code2) || (j%3==1 && code1==code2) || (j%3==2 && code1<code2) ){
  754. var sta=1;
  755. var showname=showarr[j%3];
  756. }else sta=0;
  757. if (sta==1) {
  758. countArray[num0]++;
  759. numArray[num0] = -1;
  760. MaxNumArray[num0]++;
  761. if (MaxNum[num0] < MaxNumArray[num0])
  762. MaxNum[num0] = MaxNumArray[num0];
  763. line.push({'class':'numbg'+j%3,'value':showname});
  764. // str3 += "<td class='numbg"+j%3+"'>"+showname+"</td>";
  765. }
  766. else {
  767. MaxNumArray[num0] = 0;
  768. numArray[num0]++;
  769. if (MaxLostNum[num0] < numArray[num0])
  770. MaxLostNum[num0] = numArray[num0];
  771. // str3 += "<td class=\"wdh td0\">"+numArray[num0]+"</td>";
  772. line.push({'class':'noborder','value':numArray[num0]});
  773. }
  774. }
  775. lines.push(line);
  776. }
  777. // console.log(lines);
  778. this.LotteryLines=lines;
  779. var lists=new Array();
  780. var line=[{'class':'issue','value':'最大连出'}];
  781. line.push({'class':'num','value':''});
  782. line.push({'class':'num','value':''});
  783. var num0 = min;
  784. while (num0 <= max) {
  785. line.push({'class':'num','value':MaxNum[num0]});
  786. if(num0==2){
  787. line.push({'class':'num','value':''});
  788. line.push({'class':'num','value':''});
  789. }
  790. num0++;
  791. }
  792. lists.push(line);
  793. var line=[{'class':'issue','value':'最大遗漏'}];
  794. line.push({'class':'num','value':''});
  795. line.push({'class':'num','value':''});
  796. var num0 = min;
  797. while (num0 <= max) {
  798. line.push({'class':'num','value':MaxLostNum[num0]});
  799. if(num0==2){
  800. line.push({'class':'num','value':''});
  801. line.push({'class':'num','value':''});
  802. }
  803. num0++;
  804. }
  805. lists.push(line);
  806. var line=[{'class':'issue','value':'出现次数'}];
  807. line.push({'class':'num','value':''});
  808. line.push({'class':'num','value':''});
  809. var num0 = min;
  810. while (num0 <= max) {
  811. line.push({'class':'num','value':countArray[num0]});
  812. if(num0==2){
  813. line.push({'class':'num','value':''});
  814. line.push({'class':'num','value':''});
  815. }
  816. num0++;
  817. }
  818. lists.push(line);
  819. var line=[{'class':'issue','value':'平均遗漏'}];
  820. line.push({'class':'num','value':''});
  821. line.push({'class':'num','value':''});
  822. var num0 = min;
  823. while (num0 <= max) {
  824. if(countArray[num0]>0)
  825. var tt= (this.historylist.length-countArray[num0])/countArray[num0];
  826. else
  827. var tt= this.historylist.length;
  828. tt=parseInt(tt);
  829. line.push({'class':'num','value':tt});
  830. if(num0==2){
  831. line.push({'class':'num','value':''});
  832. line.push({'class':'num','value':''});
  833. }
  834. num0++;
  835. }
  836. lists.push(line);
  837. this.LotteryBottomLines=new Array();
  838. this.LotteryBottomLines=lists;
  839. this.scrollToBottom();
  840. },
  841. //大小单双
  842. dxList(type) {
  843. this.ischart=false;
  844. var wei_num = this.wanfa_key2.split('-');
  845. var wei_from = parseInt(wei_num[0]);
  846. var wei_to = parseInt(wei_num[1]);
  847. var min = 0;
  848. var max = 5;
  849. var count = 10;
  850. var ballNum = 1;
  851. this.LotteryHeadLines=[];
  852. this.LotteryHeadLines.push('期号');
  853. var gametype=this.gameshow.type;
  854. var type=this.wanfa_key1;
  855. var wanfa_title2='';
  856. for(var ii in this.wei_arr[this.wanfa_key1]){
  857. if(ii==this.wanfa_key2) {
  858. wanfa_title2= this.wei_arr[this.wanfa_key1][ii];
  859. break;
  860. }
  861. }
  862. for (var j = 0; j < wanfa_title2.length; j++) {
  863. this.LotteryHeadLines.push(wanfa_title2.substr(j,1));
  864. }
  865. for (var j = 0; j < wanfa_title2.length; j++) {
  866. this.LotteryHeadLines.push(wanfa_title2.substr(j,1));
  867. this.LotteryHeadLines.push('位');
  868. }
  869. var countArray = new Array();
  870. var MaxNum = new Array();
  871. var MaxNumArray = new Array();
  872. var MaxLostNum = new Array();
  873. var strArray = new Array();
  874. var numArray = new Array();
  875. for (var j = min; j <= max; j++) {
  876. countArray[j] = 0;
  877. MaxNum[j] = 0;
  878. MaxNumArray[j] = 0;
  879. MaxLostNum[j] = 0;
  880. strArray[j] = 0;
  881. numArray[j] = 0;
  882. }
  883. var lines=[];
  884. for(var i=this.historylist.length-1;i>=0;i--){
  885. var item=this.historylist[i];
  886. var line=[];
  887. var dt = item;
  888. var num0;
  889. var strArray2 = item['openCode'].split(',');
  890. line.push({'class':'issue','value':this.issue(item['issueNo'])});
  891. num0 = min;
  892. strArray2=this.Lot_New(strArray2,wei_from,wei_to);
  893. for(var tt=0;tt<strArray2.length;tt++){
  894. line.push({'class':'noborder','value':strArray2[tt]});
  895. //str3+="<td class='noborder'>"+strArray2[tt]+"</td>";
  896. }
  897. for(var j=0;j<3;j++){
  898. for(var k=0;k<2;k++){
  899. var code=parseInt(strArray2[j]);
  900. num0=2*j+k;
  901. if(k==0){
  902. if((type=='ds' && code%2==1) || (type=='dx' && (((gametype=='ssc' || gametype=='dp') && code>=5) || (gametype=='11x5'
  903. && code>=7)|| (gametype=='k3' && code>=4) || (gametype=='pk10' && code>=6))) ){
  904. var sta=1;
  905. if(type=='ds') var showname='单';
  906. else var showname='大';
  907. }else sta=0;
  908. }else{
  909. if((type=='ds' && code%2==0) || (type=='dx' && (((gametype=='ssc' || gametype=='dp') && code<5) || (gametype=='11x5'
  910. && code<7) || (gametype=='k3' && code<4)|| (gametype=='pk10' && code<6))) ){
  911. var sta=1;
  912. if(type=='ds') var showname='双';
  913. else var showname='小';
  914. }else sta=0;
  915. }
  916. if (sta==1) {
  917. countArray[num0]++;
  918. numArray[num0] = -1;
  919. MaxNumArray[num0]++;
  920. if (MaxNum[num0] < MaxNumArray[num0])
  921. MaxNum[num0] = MaxNumArray[num0];
  922. line.push({'class':'numbg'+k,'value':showname});
  923. //str3 += "<td class='numbg"+k+"'>"+showname+"</td>";
  924. }
  925. else {
  926. MaxNumArray[num0] = 0;
  927. numArray[num0]++;
  928. if (MaxLostNum[num0] < numArray[num0])
  929. MaxLostNum[num0] = numArray[num0];
  930. line.push({'class':'','value':numArray[num0]});
  931. // str3 += "<td class=\"wdh td0\">"+numArray[num0]+"</td>";
  932. }
  933. }
  934. }
  935. lines.push(line);
  936. }
  937. // console.log(lines);
  938. this.LotteryLines=lines;
  939. var lists=new Array();
  940. var line=[{'class':'issue','value':'最大连出'}];
  941. line.push({'class':'num','value':''});
  942. line.push({'class':'num','value':''});
  943. line.push({'class':'num','value':''});
  944. var num0 = min;
  945. while (num0 <= max) {
  946. line.push({'class':'num','value':MaxNum[num0]});
  947. num0++;
  948. }
  949. lists.push(line);
  950. var line=[{'class':'issue','value':'最大遗漏'}];
  951. line.push({'class':'num','value':''});
  952. line.push({'class':'num','value':''});
  953. line.push({'class':'num','value':''});
  954. var num0 = min;
  955. while (num0 <= max) {
  956. line.push({'class':'num','value':MaxLostNum[num0]});
  957. num0++;
  958. }
  959. lists.push(line);
  960. var line=[{'class':'issue','value':'出现次数'}];
  961. line.push({'class':'num','value':''});
  962. line.push({'class':'num','value':''});
  963. line.push({'class':'num','value':''});
  964. var num0 = min;
  965. while (num0 <= max) {
  966. line.push({'class':'num','value':countArray[num0]});
  967. num0++;
  968. }
  969. lists.push(line);
  970. var line=[{'class':'issue','value':'平均遗漏'}];
  971. line.push({'class':'num','value':''});
  972. line.push({'class':'num','value':''});
  973. line.push({'class':'num','value':''});
  974. var num0 = min;
  975. while (num0 <= max) {
  976. if(countArray[num0]>0)
  977. var tt= (this.historylist.length-countArray[num0])/countArray[num0];
  978. else
  979. var tt= this.historylist.length;
  980. tt=parseInt(tt);
  981. line.push({'class':'num','value':tt});
  982. num0++;
  983. }
  984. lists.push(line);
  985. this.LotteryBottomLines=new Array();
  986. this.LotteryBottomLines=lists;
  987. this.scrollToBottom();
  988. },
  989. //快三和值形态
  990. hzxtList() {
  991. this.ischart=false;
  992. this.LotteryHeadLines=[];
  993. this.LotteryHeadLines.push('期号');
  994. var min = 0;
  995. var max = 2;
  996. this.LotteryHeadLines.push('一');
  997. this.LotteryHeadLines.push('二');
  998. this.LotteryHeadLines.push('三');
  999. this.LotteryHeadLines.push('和值');
  1000. this.LotteryHeadLines.push('三同号');
  1001. this.LotteryHeadLines.push('三不同号');
  1002. this.LotteryHeadLines.push('二同号');
  1003. var countArray = new Array();
  1004. var MaxNum = new Array();
  1005. var MaxNumArray = new Array();
  1006. var MaxLostNum = new Array();
  1007. var strArray = new Array();
  1008. var numArray = new Array();
  1009. for (var j = min; j <= max; j++) {
  1010. countArray[j] = 0;
  1011. MaxNum[j] = 0;
  1012. MaxNumArray[j] = 0;
  1013. MaxLostNum[j] = 0;
  1014. strArray[j] = 0;
  1015. numArray[j] = 0;
  1016. }
  1017. var lines=[];
  1018. for(var i=this.historylist.length-1;i>=0;i--){
  1019. var line=[];
  1020. var item=this.historylist[i];
  1021. var strArray2 = item['openCode'].split(',');
  1022. line.push({'class':'issue','value':this.issue(item['issueNo'])});
  1023. num0 = min;
  1024. for(var tt=0;tt<strArray2.length;tt++){
  1025. line.push({'class':'noborder','value':strArray2[tt]});
  1026. }
  1027. var sum=this.arr_sum(strArray2);
  1028. line.push({'class':'numbg4','value':sum});
  1029. var showarr=new Array('三同号','三不同号','二同号');
  1030. for(var j=0;j<3;j++){
  1031. if(strArray2[0]==strArray2[1] && strArray2[1]==strArray2[2] ){
  1032. if(j==0) var sta=1;
  1033. else sta=0;
  1034. }else if(strArray2[0]!=strArray2[1] && strArray2[1]!=strArray2[2] && strArray2[0]!=strArray2[2]) {
  1035. if(j==1) var sta=1;
  1036. else sta=0;
  1037. }
  1038. else{
  1039. if(j==2) var sta=1;
  1040. else sta=0;
  1041. }
  1042. var showname=showarr[j];
  1043. num0=j;
  1044. if (sta==1) {
  1045. countArray[num0]++;
  1046. numArray[num0] = -1;
  1047. MaxNumArray[num0]++;
  1048. if (MaxNum[num0] < MaxNumArray[num0])
  1049. MaxNum[num0] = MaxNumArray[num0];
  1050. line.push({'class':'numbg'+j,'value':showname});
  1051. //str3 += "<td class='numbg"+j+"'>"+showname+"</td>";
  1052. }
  1053. else {
  1054. MaxNumArray[num0] = 0;
  1055. numArray[num0]++;
  1056. if (MaxLostNum[num0] < numArray[num0])
  1057. MaxLostNum[num0] = numArray[num0];
  1058. line.push({'class':'noborder','value':numArray[num0]});
  1059. }
  1060. num0++;
  1061. }
  1062. lines.push(line);
  1063. }
  1064. // console.log(lines);
  1065. this.LotteryLines=lines;
  1066. var lists=new Array();
  1067. var line=[{'class':'issue','value':'最大连出'}];
  1068. line.push({'class':'num','value':''});
  1069. line.push({'class':'num','value':''});
  1070. line.push({'class':'num','value':''});
  1071. line.push({'class':'num','value':''});
  1072. var num0 = min;
  1073. while (num0 <= max) {
  1074. line.push({'class':'num','value':MaxNum[num0]});
  1075. num0++;
  1076. }
  1077. lists.push(line);
  1078. var line=[{'class':'issue','value':'最大遗漏'}];
  1079. line.push({'class':'num','value':''});
  1080. line.push({'class':'num','value':''});
  1081. line.push({'class':'num','value':''});
  1082. line.push({'class':'num','value':''});
  1083. var num0 = min;
  1084. while (num0 <= max) {
  1085. line.push({'class':'num','value':MaxLostNum[num0]});
  1086. num0++;
  1087. }
  1088. lists.push(line);
  1089. var line=[{'class':'issue','value':'出现次数'}];
  1090. line.push({'class':'num','value':''});
  1091. line.push({'class':'num','value':''});
  1092. line.push({'class':'num','value':''});
  1093. line.push({'class':'num','value':''});
  1094. var num0 = min;
  1095. while (num0 <= max) {
  1096. line.push({'class':'num','value':countArray[num0]});
  1097. num0++;
  1098. }
  1099. lists.push(line);
  1100. var line=[{'class':'issue','value':'平均遗漏'}];
  1101. line.push({'class':'num','value':''});
  1102. line.push({'class':'num','value':''});
  1103. line.push({'class':'num','value':''});
  1104. line.push({'class':'num','value':''});
  1105. var num0 = min;
  1106. while (num0 <= max) {
  1107. if(countArray[num0]>0)
  1108. var tt= (this.historylist.length-countArray[num0])/countArray[num0];
  1109. else
  1110. var tt= this.historylist.length;
  1111. tt=parseInt(tt);
  1112. line.push({'class':'num','value':tt});
  1113. num0++;
  1114. }
  1115. lists.push(line);
  1116. this.LotteryBottomLines=new Array();
  1117. this.LotteryBottomLines=lists;
  1118. this.scrollToBottom();
  1119. },
  1120. //11选5和值个数比
  1121. hmdsList() {
  1122. this.ischart=false;
  1123. this.LotteryHeadLines=[];
  1124. this.LotteryHeadLines.push('期号');
  1125. this.LotteryHeadLines.push('一');
  1126. this.LotteryHeadLines.push('二');
  1127. this.LotteryHeadLines.push('三');
  1128. this.LotteryHeadLines.push('四');
  1129. this.LotteryHeadLines.push('五');
  1130. this.LotteryHeadLines.push('5:0');
  1131. this.LotteryHeadLines.push('4:1');
  1132. this.LotteryHeadLines.push('3:2');
  1133. this.LotteryHeadLines.push('2:3');
  1134. this.LotteryHeadLines.push('1:4');
  1135. this.LotteryHeadLines.push('0:5');
  1136. var min = 0;
  1137. var max = 5;
  1138. var countArray = new Array();
  1139. var MaxNum = new Array();
  1140. var MaxNumArray = new Array();
  1141. var MaxLostNum = new Array();
  1142. var strArray = new Array();
  1143. var numArray = new Array();
  1144. for (var j = min; j <= max; j++) {
  1145. countArray[j] = 0;
  1146. MaxNum[j] = 0;
  1147. MaxNumArray[j] = 0;
  1148. MaxLostNum[j] = 0;
  1149. strArray[j] = 0;
  1150. numArray[j] = 0;
  1151. }
  1152. var lines=[];
  1153. for(var i=this.historylist.length-1;i>=0;i--){
  1154. var item=this.historylist[i];
  1155. var line=[];
  1156. var num0=min;
  1157. var strArray2 = item['openCode'].split(',');
  1158. line.push({'class':'issue','value':this.issue(item['issueNo'])});
  1159. for(var tt=0;tt<strArray2.length;tt++){
  1160. line.push({'class':'noborder','value':strArray2[tt]});
  1161. }
  1162. var showarr=new Array('5:0','4:1','3:2','2:3','1:4','0:5');
  1163. for(var j=0;j<6;j++){
  1164. var dan=0;
  1165. var shuang=0;
  1166. for(var tt=0;tt<strArray2.length;tt++){
  1167. if(strArray2[tt]%2==1) dan++;
  1168. else shuang++;
  1169. }
  1170. var code=showarr[j].split(':');
  1171. if(dan==parseInt(code[0])){
  1172. var sta=1;
  1173. var showname=showarr[j];
  1174. }else sta=0;
  1175. if (sta==1) {
  1176. countArray[num0]++;
  1177. numArray[num0] = -1;
  1178. MaxNumArray[num0]++;
  1179. if (MaxNum[num0] < MaxNumArray[num0])
  1180. MaxNum[num0] = MaxNumArray[num0];
  1181. line.push({'class':'numbg'+j,'value':showname});
  1182. }
  1183. else {
  1184. MaxNumArray[num0] = 0;
  1185. numArray[num0]++;
  1186. if (MaxLostNum[num0] < numArray[num0])
  1187. MaxLostNum[num0] = numArray[num0];
  1188. line.push({'class':'noborder','value':numArray[num0]});
  1189. }
  1190. num0++;
  1191. }
  1192. lines.push(line);
  1193. }
  1194. // console.log(lines);
  1195. this.LotteryLines=lines;
  1196. var lists=new Array();
  1197. var line=[{'class':'issue','value':'最大连出'}];
  1198. line.push({'class':'num','value':''});
  1199. line.push({'class':'num','value':''});
  1200. line.push({'class':'num','value':''});
  1201. line.push({'class':'num','value':''});
  1202. line.push({'class':'num','value':''});
  1203. var num0 = min;
  1204. while (num0 <= max) {
  1205. line.push({'class':'num','value':MaxNum[num0]});
  1206. num0++;
  1207. }
  1208. lists.push(line);
  1209. var line=[{'class':'issue','value':'最大遗漏'}];
  1210. line.push({'class':'num','value':''});
  1211. line.push({'class':'num','value':''});
  1212. line.push({'class':'num','value':''});
  1213. line.push({'class':'num','value':''});
  1214. line.push({'class':'num','value':''});
  1215. var num0 = min;
  1216. while (num0 <= max) {
  1217. line.push({'class':'num','value':MaxLostNum[num0]});
  1218. num0++;
  1219. }
  1220. lists.push(line);
  1221. var line=[{'class':'issue','value':'出现次数'}];
  1222. line.push({'class':'num','value':''});
  1223. line.push({'class':'num','value':''});
  1224. line.push({'class':'num','value':''});
  1225. line.push({'class':'num','value':''});
  1226. line.push({'class':'num','value':''});
  1227. var num0 = min;
  1228. while (num0 <= max) {
  1229. line.push({'class':'num','value':countArray[num0]});
  1230. num0++;
  1231. }
  1232. lists.push(line);
  1233. var line=[{'class':'issue','value':'平均遗漏'}];
  1234. line.push({'class':'num','value':''});
  1235. line.push({'class':'num','value':''});
  1236. line.push({'class':'num','value':''});
  1237. line.push({'class':'num','value':''});
  1238. line.push({'class':'num','value':''});
  1239. var num0 = min;
  1240. while (num0 <= max) {
  1241. if(countArray[num0]>0)
  1242. var tt= (this.historylist.length-countArray[num0])/countArray[num0];
  1243. else
  1244. var tt= this.historylist.length;
  1245. tt=parseInt(tt);
  1246. line.push({'class':'num','value':tt});
  1247. num0++;
  1248. }
  1249. lists.push(line);
  1250. this.LotteryBottomLines=new Array();
  1251. this.LotteryBottomLines=lists;
  1252. this.scrollToBottom();
  1253. },
  1254. //五星和值
  1255. hz5xList() {
  1256. this.ischart=false;
  1257. var LotteryHeadLines = "";
  1258. var LotteryLines = "";
  1259. var min = 0;
  1260. var max = 9;
  1261. min = 0;
  1262. max = 3;
  1263. this.LotteryHeadLines=[];
  1264. this.LotteryHeadLines.push('期号');
  1265. this.LotteryHeadLines.push('万');
  1266. this.LotteryHeadLines.push('千');
  1267. this.LotteryHeadLines.push('百');
  1268. this.LotteryHeadLines.push('十');
  1269. this.LotteryHeadLines.push('个');
  1270. this.LotteryHeadLines.push('和值');
  1271. this.LotteryHeadLines.push('大');
  1272. this.LotteryHeadLines.push('小');
  1273. this.LotteryHeadLines.push('单');
  1274. this.LotteryHeadLines.push('双');
  1275. var countArray = new Array();
  1276. var MaxNum = new Array();
  1277. var MaxNumArray = new Array();
  1278. var MaxLostNum = new Array();
  1279. var strArray = new Array();
  1280. var numArray = new Array();
  1281. for (var j = min; j <= max; j++) {
  1282. countArray[j] = 0;
  1283. MaxNum[j] = 0;
  1284. MaxNumArray[j] = 0;
  1285. MaxLostNum[j] = 0;
  1286. strArray[j] = 0;
  1287. numArray[j] = 0;
  1288. }
  1289. var lines=[];
  1290. for(var i=this.historylist.length-1;i>=0;i--){
  1291. var item=this.historylist[i];
  1292. var line=[];
  1293. var dt = item;
  1294. var num0;
  1295. var strArray2 = item['openCode'].split(',');
  1296. line.push({'class':'issue','value':this.issue(item['issueNo'])});
  1297. num0 = min;
  1298. for(var tt=0;tt<strArray2.length;tt++){
  1299. line.push({'class':'noborder','value':strArray2[tt]});
  1300. // str3+="<td class='noborder'>"+strArray2[tt]+"</td>";
  1301. }
  1302. var sum=this.arr_sum(strArray2);
  1303. line.push({'class':'numbg4','value':sum});
  1304. var showarr=new Array('大','小','单','双');
  1305. for(var j=0;j<4;j++){
  1306. var code=parseInt(strArray2[j]);
  1307. num0=j;
  1308. if((j==0 && code>5) || (j==1 && code<5) || (j==2 && code%2==1) || (j==3 && code%2==0) ){
  1309. var sta=1;
  1310. var showname=showarr[j];
  1311. }else sta=0;
  1312. if (sta==1) {
  1313. countArray[num0]++;
  1314. numArray[num0] = -1;
  1315. MaxNumArray[num0]++;
  1316. if (MaxNum[num0] < MaxNumArray[num0])
  1317. MaxNum[num0] = MaxNumArray[num0];
  1318. line.push({'class':'numbg'+j,'value':showname});
  1319. // str3 += "<td class='numbg"+j+"'>"+showname+"</td>";
  1320. }
  1321. else {
  1322. MaxNumArray[num0] = 0;
  1323. numArray[num0]++;
  1324. if (MaxLostNum[num0] < numArray[num0])
  1325. MaxLostNum[num0] = numArray[num0];
  1326. line.push({'class':'','value':numArray[num0]});
  1327. // str3 += "<td class=\"wdh td0\">"+numArray[num0]+"</td>";
  1328. }
  1329. }
  1330. lines.push(line);
  1331. }
  1332. // console.log(lines);
  1333. this.LotteryLines=lines;
  1334. var lists=new Array();
  1335. var line=[{'class':'issue','value':'最大连出'}];
  1336. for(var i=0;i<6;i++){
  1337. line.push({'class':'num','value':''});
  1338. }
  1339. var num0 = min;
  1340. while (num0 <= max) {
  1341. line.push({'class':'num','value':MaxNum[num0]});
  1342. num0++;
  1343. }
  1344. lists.push(line);
  1345. var line=[{'class':'issue','value':'最大遗漏'}];
  1346. for(var i=0;i<6;i++){
  1347. line.push({'class':'num','value':''});
  1348. }
  1349. var num0 = min;
  1350. while (num0 <= max) {
  1351. line.push({'class':'num','value':MaxLostNum[num0]});
  1352. num0++;
  1353. }
  1354. lists.push(line);
  1355. var line=[{'class':'issue','value':'出现次数'}];
  1356. for(var i=0;i<6;i++){
  1357. line.push({'class':'num','value':''});
  1358. }
  1359. var num0 = min;
  1360. while (num0 <= max) {
  1361. line.push({'class':'num','value':countArray[num0]});
  1362. num0++;
  1363. }
  1364. lists.push(line);
  1365. var line=[{'class':'issue','value':'平均遗漏'}];
  1366. for(var i=0;i<6;i++){
  1367. line.push({'class':'num','value':''});
  1368. }
  1369. var num0 = min;
  1370. while (num0 <= max) {
  1371. if(countArray[num0]>0)
  1372. var tt= (this.historylist.length-countArray[num0])/countArray[num0];
  1373. else
  1374. var tt= this.historylist.length;
  1375. tt=parseInt(tt);
  1376. line.push({'class':'num','value':tt});
  1377. num0++;
  1378. }
  1379. lists.push(line);
  1380. this.LotteryBottomLines=new Array();
  1381. this.LotteryBottomLines=lists;
  1382. this.scrollToBottom();
  1383. },
  1384. //和值跨度
  1385. hzList(type) {
  1386. this.ischart=false;
  1387. var min = 0;
  1388. var max = 9;
  1389. min = 0;
  1390. max = 3;
  1391. this.LotteryHeadLines=[];
  1392. this.LotteryHeadLines.push('期号');
  1393. this.LotteryHeadLines.push('万');
  1394. this.LotteryHeadLines.push('千');
  1395. this.LotteryHeadLines.push('百');
  1396. this.LotteryHeadLines.push('十');
  1397. this.LotteryHeadLines.push('个');
  1398. this.LotteryHeadLines.push('前二');
  1399. this.LotteryHeadLines.push('前三');
  1400. this.LotteryHeadLines.push('中三');
  1401. this.LotteryHeadLines.push('后三');
  1402. this.LotteryHeadLines.push('后二');
  1403. var type= this.wanfa_key1;
  1404. var lines=[];
  1405. for(var i=this.historylist.length-1;i>=0;i--){
  1406. var item=this.historylist[i];
  1407. var line=[];
  1408. var dt = item;
  1409. var num0;
  1410. var strArray2 = item['openCode'].split(',');
  1411. line.push({'class':'issue','value':this.issue(item['issueNo'])});
  1412. num0 = min;
  1413. for(var tt=0;tt<strArray2.length;tt++){
  1414. line.push({'class':'','value':strArray2[tt]});
  1415. }
  1416. var showarr=new Array('0-1','0-2','1-3','2-4','3-4');
  1417. for(var j=0;j<5;j++){
  1418. var weinum=showarr[j].split('-');
  1419. var codearr=this.Lot_New(strArray2,parseInt(weinum[0]),parseInt(weinum[1]));
  1420. if(type=='hz')
  1421. var sum=this.arr_sum(codearr);
  1422. else var sum=this.arr_kd(codearr);
  1423. //str3 += "<td class='numbg"+j+"'>"+sum+"</td>";
  1424. line.push({'class':'numbg'+j,'value':sum});
  1425. }
  1426. lines.push(line);
  1427. }
  1428. // console.log(lines);
  1429. this.LotteryLines=lines;
  1430. this.LotteryBottomLines=new Array();
  1431. },
  1432. arr_sum( arr ) {
  1433. var sum=0;
  1434. for(var i=0;i<arr.length;i++){
  1435. sum+=parseInt(arr[i]);
  1436. }
  1437. return sum;
  1438. },
  1439. arr_kd( arr ) {
  1440. var sum=0;
  1441. for(var i=0;i<arr.length-1;i++){
  1442. for(var j=i+1;j<arr.length;j++){
  1443. var cha=arr[i]-arr[j];
  1444. if(cha<0) cha=-cha;
  1445. if(cha>sum) sum=cha;
  1446. }
  1447. }
  1448. return sum;
  1449. },
  1450. Lot_New(arr,begin,to){
  1451. var arr11=Array();
  1452. for(var i=begin;i<to+1;i++){
  1453. arr11[arr11.length]=arr[i];
  1454. }
  1455. return arr11;
  1456. },
  1457. in_arr_num(arr,str) {
  1458. var num=0;
  1459. for(var i=0;i<arr.length;i++){
  1460. if(arr[i]==str) num++;
  1461. }
  1462. return num;
  1463. },
  1464. drawchart(){
  1465. var windowWidth= uni.getSystemInfoSync().windowWidth;
  1466. var type=this.gameshow.type;
  1467. if(type=='k3') var ballnum=6;
  1468. else if(type=='11x5') var ballnum=11;
  1469. else var ballnum=10;
  1470. var w=(windowWidth - 56)/ballnum;
  1471. var context = uni.createCanvasContext('ballchart',this);
  1472. var lineheight=31;
  1473. //#ifdef APP-PLUS
  1474. if(plus.os.name=='iOS')
  1475. var lineheight=31;
  1476. else var lineheight=30.5;
  1477. //#endif
  1478. context.setStrokeStyle("#5250ae")
  1479. context.setLineWidth(1)
  1480. context.clearRect(0,0,windowWidth,this.historylist.length*lineheight);
  1481. var num=0;
  1482. for(var i=this.historylist.length-1;i>=0;i--){
  1483. var item=this.historylist[i];
  1484. var strArray2 = item['openCode'].split(',');
  1485. var code=strArray2[this.wanfa_key2];
  1486. if(type!='ssc' && type!='ffc') code=parseInt(code)-1;
  1487. var y=lineheight*num+16;
  1488. var x=w*code+w/2;
  1489. if(num==0){
  1490. context.moveTo(x,y);
  1491. }
  1492. else{
  1493. context.lineTo(x,y);
  1494. }
  1495. num++;
  1496. }
  1497. setTimeout(function() { //必须延迟执行 不然H5不显示
  1498. context.stroke()
  1499. context.draw()
  1500. }, 200)
  1501. },
  1502. load_trend(){
  1503. if(this.wanfa_key1=='danhao') this.danhaoList();
  1504. if(this.wanfa_key1=='duohao') this.duohaoList();
  1505. if(this.wanfa_key1=='lhh') this.lhhList();
  1506. if(this.wanfa_key1=='ds' || this.wanfa_key1=='dx') this.dxList();
  1507. if(this.wanfa_key1=='5xhz') this.hz5xList();
  1508. if(this.wanfa_key1=='hz' || this.wanfa_key1=='kd') this.hzList();
  1509. if(this.wanfa_key1=='hmds') this.hmdsList();
  1510. if(this.wanfa_key1=='hzxt') this.hzxtList();
  1511. },
  1512. showdata(){
  1513. this.loadmethod();
  1514. // this.load_trend();
  1515. }
  1516. },
  1517. watch:{
  1518. historylist(){
  1519. this.load_trend();
  1520. } ,
  1521. gameid(){
  1522. this.historylist=this.lotterylist;
  1523. this.loadmethod();
  1524. }
  1525. },
  1526. created() {
  1527. this.showdata();
  1528. // #ifndef APP-PLUS
  1529. this.pagebottom='55'
  1530. // #endif
  1531. this.$socket.on('sendlottery', (res) => {
  1532. // console.log(res.data)
  1533. this.update_lottery(res.data)
  1534. })
  1535. },
  1536. destroyed() {
  1537. this.$socket.off('sendlottery');
  1538. }
  1539. }
  1540. </script>
  1541. <style>
  1542. .pages{
  1543. height: 35px;
  1544. line-height: 35px;
  1545. text-align: center;
  1546. font-size: 14px;
  1547. }
  1548. .pages > view{
  1549. display: inline-block;
  1550. height: 35px;
  1551. width: 34px;
  1552. line-height: 35px;
  1553. border: 1px #eee solid;
  1554. margin: 10px auto;
  1555. background-color: #fff;
  1556. }
  1557. .pages > view.active{
  1558. color:#fff;
  1559. border: 1px solid #2319DC;
  1560. background-color: #2319DC;
  1561. }
  1562. .canvas{
  1563. position: absolute;
  1564. top:32px;
  1565. left:56px;
  1566. width: calc(100% - 56px);
  1567. display: inline-block;
  1568. z-index: 1;
  1569. border: 0px #FF0000 solid;
  1570. }
  1571. .query-form
  1572. {
  1573. position: fixed;
  1574. top:-2px;
  1575. left: 0px;
  1576. width: 100%;
  1577. height:60px;
  1578. line-height: 30px;
  1579. display: inline-block;
  1580. background-color: #fff;
  1581. border-bottom: 1px #ccc solid;
  1582. z-index: 999999;
  1583. text-align: center;
  1584. }
  1585. .showtabs{
  1586. position: fixed;
  1587. top:65px;
  1588. left: 0px;
  1589. width: 100%;
  1590. line-height: 35px;
  1591. background-color: #fff;
  1592. z-index: 9999999;
  1593. text-align: center;
  1594. overflow-y: scroll;
  1595. -webkit-transform: translate(100vw,-50%);
  1596. -moz-transform: translate(100vw,-50%);
  1597. -ms-transform: translate(100vw,-50%);
  1598. transform: translate(100vw,-50%);
  1599. -webkit-transition: .5s;
  1600. -moz-transition: .5s;
  1601. -ms-transition: .5s;
  1602. transition: .5s;
  1603. font-size: 14px;
  1604. -webkit-overflow-scrolling: touch;
  1605. }
  1606. .showtabs.active{
  1607. transform: translate(0,0%);
  1608. }
  1609. .showtabs::-webkit-scrollbar{
  1610. display: none;
  1611. }
  1612. .showtabs .lines{
  1613. height:28;
  1614. line-height:28px;
  1615. background-color: #ccc;
  1616. color: #333;
  1617. text-align: left;padding-left: 10px;
  1618. clear: both;
  1619. margin-top: 0px;
  1620. }
  1621. .showtabs .line-btn{
  1622. clear: both;
  1623. display:inline-block;
  1624. padding:5px 0px;
  1625. width: 100%;
  1626. margin-bottom: 0px;
  1627. }
  1628. .showtabs .line-btn .item{
  1629. display: inline-block;
  1630. width: 80px;
  1631. margin: 5px 20px;
  1632. text-align: center;
  1633. border: 1px #ddd solid;
  1634. border-radius: 15px;
  1635. height:30px;
  1636. line-height:30px;
  1637. }
  1638. .showtabs .line-btn .item:nth-child(3n+1){
  1639. float: left;
  1640. }
  1641. .showtabs .line-btn .item:nth-child(3n+2){
  1642. float: left;
  1643. }
  1644. .showtabs .line-btn .item:nth-child(3n){
  1645. float: right;
  1646. }
  1647. .showtabs .line-btn .item.current{
  1648. background-color: #5250ae;
  1649. color: #fff;
  1650. }
  1651. .query-form .menu{
  1652. height: 30px;
  1653. line-height: 30px;
  1654. }
  1655. .query-form .menu view{
  1656. display: inline-block;
  1657. height:25px;
  1658. line-height: 25px;
  1659. width: 60px;
  1660. text-align: center;
  1661. border:1px solid #5250ae;
  1662. border-radius: 5px;
  1663. color: #5250ae;
  1664. background-color: #fff;
  1665. font-size: 12px;
  1666. margin: 0 2px;
  1667. vertical-align:middle;
  1668. }
  1669. .query-form .menu view.current{
  1670. background-color: #5250ae;
  1671. color: #fff;
  1672. }
  1673. .query-form .menu2{
  1674. height: 30px;
  1675. line-height: 30px;
  1676. font-size: 28upx;
  1677. margin-top: 10upx;
  1678. }
  1679. .query-form .lab, .query-form .ipt, .query-form select, .query-form .to, .query-form .btn, .query-form .query-date
  1680. {
  1681. float: left;
  1682. margin-right: 10px;
  1683. margin-bottom: 10px;
  1684. }
  1685. .query-form .ipt, .query-form select
  1686. {
  1687. border: 1px solid #e7eaeb;
  1688. }
  1689. .query-form .ipt
  1690. {
  1691. width: 100px;
  1692. height: 24px;
  1693. padding: 2px 9px;
  1694. }
  1695. .query-form .lab, .query-form .to
  1696. {
  1697. height: 30px;
  1698. line-height: 30px;
  1699. overflow: hidden;
  1700. }
  1701. .query-form .query-date
  1702. {
  1703. position: relative;
  1704. }
  1705. .query-form .query-date .ipt
  1706. {
  1707. margin-right: 0;
  1708. margin-bottom: 0;
  1709. }
  1710. .query-form select
  1711. {
  1712. width: 100px;
  1713. height: 30px;
  1714. padding-left: 5px;
  1715. }
  1716. .query-form .btn-query
  1717. {
  1718. width: 60px;
  1719. height: 30px;
  1720. margin-right: 5px;
  1721. border-radius: 3px;
  1722. color: #fff;
  1723. background-color: #fba026;
  1724. }
  1725. .query-form .btn-query2
  1726. {
  1727. width: 60px;
  1728. height: 30px;
  1729. line-height: 30px;
  1730. margin: auto 5px auto 0px;
  1731. border-radius: 3px;
  1732. color: #fff;
  1733. background-color: #fba026;
  1734. }
  1735. .query-form .time-range
  1736. {
  1737. float: left;
  1738. }
  1739. .query-form .time-range li
  1740. {
  1741. float: left;
  1742. width: 88px;
  1743. height: 28px;
  1744. line-height: 28px;
  1745. margin-right: 10px;
  1746. border: 1px solid #e7eaeb;
  1747. text-align: center;
  1748. color: #999;
  1749. cursor: pointer;
  1750. }
  1751. .query-form .time-range .selected
  1752. {
  1753. color: #fff;
  1754. border-color: #fba026;
  1755. background-color: #fba026;
  1756. }
  1757. .query-tablebox{
  1758. overflow-y: scroll;
  1759. -webkit-overflow-scrolling: touch;
  1760. overflow-x: hidden;
  1761. position: fixed;
  1762. top:65px;
  1763. left:0px;
  1764. width: 100%;;
  1765. display: inline-block;
  1766. z-index: 2;
  1767. }
  1768. .query-table
  1769. {
  1770. width: 100%;
  1771. max-width: 100%;
  1772. border-spacing: 0;
  1773. border-collapse: collapse;
  1774. text-align: center;
  1775. display: table;
  1776. table-layout: fixed;
  1777. font-size: 12px;
  1778. line-height: 30px;;
  1779. }
  1780. .query-table th, .query-table td {
  1781. height: 30px;
  1782. line-height: 30px;
  1783. padding: 0px 0px !important;
  1784. margin: 0px 0px !important;
  1785. text-align: center;
  1786. border: 1px solid #ddd;
  1787. }
  1788. .query-table tr th:first-child, .query-table tr td:first-child{
  1789. width: 55px;;
  1790. }
  1791. .query-table th {
  1792. background-color: #f2f2f2;
  1793. }
  1794. .query-table td.num{
  1795. color: #ccc;
  1796. }
  1797. .query-table td{
  1798. position: relative;
  1799. }
  1800. .query-table td .ball
  1801. {
  1802. position: absolute;
  1803. z-index: 100;
  1804. left: calc(50% -16px);
  1805. top:0px;
  1806. color: #FFF;
  1807. font-size: 12px;
  1808. color: #fff;
  1809. background: -webkit-linear-gradient(#5250ae,#702dfe);
  1810. background: -moz-linear-gradient(#262732,#702dfe);
  1811. background: -o-linear-gradient(#5250ae,#702dfe);
  1812. background: linear-gradient(#5250ae,#702dfe);
  1813. border-radius: 50%;
  1814. width: 24px;
  1815. height: 24px;
  1816. line-height: 24px;
  1817. display: inline-block;
  1818. margin: 0 auto;
  1819. position:relative ;
  1820. }
  1821. .query-table td .times{
  1822. position: absolute;
  1823. top:0px;
  1824. right:0px;
  1825. background-color: #1d830d;
  1826. color: #fff;
  1827. border-radius: 50%;
  1828. width: 16px;
  1829. height: 16px;
  1830. line-height: 16px;
  1831. text-align: center;
  1832. z-index: 101;
  1833. font-size:20upx;
  1834. ;
  1835. }
  1836. .color1 td,.color1 view{
  1837. color:#872db1;
  1838. }
  1839. .color2 td,.color2 view{
  1840. color:#4b87d0;
  1841. }
  1842. .color3 td,.color3 view{
  1843. color:#409940;
  1844. }
  1845. .color0 td,.color0 view{
  1846. color:#ed6e08;
  1847. }
  1848. .numbg0,.numbg5{
  1849. background-color: #7b9ce3;
  1850. color:#fff;
  1851. }
  1852. .numbg1{
  1853. background-color: #3fc7b5;
  1854. color:#fff;
  1855. }
  1856. .numbg2{
  1857. background-color: #98b658;
  1858. color:#fff;
  1859. }
  1860. .numbg3{
  1861. background-color: #cc9f33;
  1862. color:#fff;
  1863. }
  1864. .numbg4{
  1865. background-color: #179d69;
  1866. color:#fff;
  1867. }
  1868. .noborder{
  1869. border-right: 0px !important;
  1870. border-left: 0px !important;
  1871. }
  1872. .f12{
  1873. font-size: 12px;
  1874. line-height: 14px !important;
  1875. }
  1876. .gamenav{
  1877. position: fixed;
  1878. top:65px;
  1879. left: 0px;
  1880. width: calc(100% - 10px);
  1881. z-index:5;
  1882. background-color: rgba(0,0,0,0.8);
  1883. line-height: 35px;
  1884. padding: 5px 5px;
  1885. transform: translate(0,-100vh);
  1886. transition: .5s;
  1887. border-bottom-right-radius: 8px;
  1888. border-bottom-left-radius: 8px;
  1889. }
  1890. .gamenav.active{
  1891. transform: translate(0,0);
  1892. }
  1893. .gamenav > view{
  1894. display: table;
  1895. table-layout: fixed;
  1896. color: #fff;
  1897. width: 100%;
  1898. margin: 5px auto;
  1899. }
  1900. .gamenav > view > view{
  1901. display: table-cell;
  1902. text-align: left;
  1903. }
  1904. .gamenav > view > view:first-child{
  1905. width: 60px;
  1906. text-align: right;
  1907. padding-right: 5px;
  1908. font-size: 14px;
  1909. }
  1910. .gamenav > view > view:last-child {
  1911. line-height: 30px;
  1912. }
  1913. .gamenav > view > view:last-child > view{
  1914. display:inline-block ;
  1915. margin: 0px 5px;
  1916. background: #ffffff;
  1917. font-size: 12px;
  1918. color: #000;
  1919. height: 20px;
  1920. line-height: 20px;
  1921. width: 80px;
  1922. text-align: center;
  1923. border-radius: 10px;
  1924. }
  1925. .gamenav > view > view:last-child >view:hover,.gamenav > view > view:last-child >view.active{
  1926. text-decoration: underline;
  1927. color:#2319dc ;
  1928. }
  1929. </style>