gamelist.vue 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  1. <template>
  2. <view class="gameitem">
  3. <view><view class="issue">{{item.issueNo}}期</view><view class="time">{{item.predictedTime}}</view></view>
  4. <view>
  5. <view :class="ballclass" >
  6. <block v-for="(m1,index1) in number" :key="index1" >
  7. <view class="ball" v-if="gametype=='ssc' || gametype=='ffc' || gametype=='11x5'" >{{m1}}</view>
  8. <view :class="k3class(m1)" v-if="gametype=='k3'" ></view>
  9. <view :class="pk10class(m1)" v-if="gametype=='pk10'" >{{m1}}</view>
  10. </block>
  11. <view :class="SXclass" v-if="gametype=='ssc' || gametype=='ffc'" >组选{{SX}}</view>
  12. </view>
  13. </view>
  14. </view>
  15. </template>
  16. <script>
  17. export default {
  18. props: {
  19. item: {
  20. required: true
  21. },
  22. num:{
  23. type: Number,
  24. default: 1
  25. },
  26. isloading:{
  27. type: Number,
  28. default: 0
  29. }
  30. },
  31. data() {
  32. return {
  33. number:'',
  34. gametype:"",
  35. SX:"24",
  36. SXclass:"zx"
  37. }
  38. },
  39. computed:{
  40. ballclass(){
  41. if(this.item.isloading==1) {
  42. return "balls code_loading";
  43. }
  44. else return 'balls';
  45. }
  46. },
  47. methods: {
  48. k3class(num){
  49. return 'k3 num_'+num;
  50. },
  51. pk10class(num){
  52. return 'pk10 num_'+num;
  53. },
  54. showdata(){
  55. var ball='';
  56. this.gametype=this.item['gametype'];
  57. this.number=this.item['openCode'].split(',');
  58. if(this.gametype=='ffc' || this.gametype=='ssc') this.setsxnum();
  59. },
  60. setsxnum(){
  61. var number=this.number.toString().split(',');
  62. var arr1=[];
  63. for(var i=1;i<number.length;i++){
  64. var isin=0;
  65. if(i==1) arr1.push(number[i]);
  66. else{
  67. for(var j=0;j<arr1.length;j++){
  68. if(arr1[j]==number[i]){
  69. isin=1;
  70. break;
  71. }
  72. }
  73. if(isin==0) arr1.push(number[i]);
  74. }
  75. }
  76. var len=arr1.length;
  77. if(len==4) this.SX='24';
  78. else if(len==3) this.SX=12;
  79. else if(len==2) {
  80. this.SX=6;
  81. for(var j=0;j<arr1.length;j++){
  82. var times=0;
  83. for(var i=1;i<number.length;i++){
  84. if(arr1[j]==number[i]){
  85. times++;
  86. if(times==3){
  87. this.SX=4;
  88. break;
  89. }
  90. }
  91. }
  92. }
  93. }
  94. if(this.SX>0){
  95. this.SXclass="zx zx"+this.SX;
  96. }
  97. }
  98. },
  99. created() {
  100. this.showdata();
  101. },
  102. }
  103. </script>
  104. <style>
  105. .gameitem{
  106. padding: 5px 15px;
  107. border-bottom:1px dashed #5250ae;
  108. background-color: #fff;
  109. font-size: 14px;
  110. clear: both;
  111. display: inline-block;
  112. width: calc(100% - 30px);
  113. }
  114. .gameitem >view{
  115. width: 100%;
  116. clear: both;
  117. }
  118. .gameitem >view:first-child{
  119. height: 25px;
  120. line-height: 25px;
  121. }
  122. .gameitem .issue{
  123. display: inline-block;
  124. font-size: 16px;
  125. color: #333;
  126. float: left;
  127. }
  128. .gameitem .time{
  129. display: inline-block;
  130. font-size: 12px;
  131. color: #ccc;
  132. float: right;
  133. }
  134. .gameitem >view:nth-child(2){
  135. height: 40px;
  136. line-height: 40px;
  137. }
  138. .gameitem .balls view{
  139. display: inline-block;
  140. }
  141. .gameitem .balls .zx{
  142. float: right;
  143. }
  144. .gameitem .ball{
  145. display: inline-block;
  146. width: 28px;
  147. height: 28px;
  148. text-align: center;
  149. line-height: 28px;
  150. border-radius: 50%;
  151. background: -webkit-linear-gradient(#5250ae,#702dfe);
  152. background: -moz-linear-gradient(#262732,#702dfe);
  153. background: -o-linear-gradient(#5250ae,#702dfe);
  154. background: linear-gradient(#5250ae,#702dfe);
  155. margin-left: 20px;
  156. vertical-align: middle;
  157. color: #fff;
  158. font-size: 16px;
  159. }
  160. .zx24{
  161. color: #872db1;
  162. }
  163. .zx12{
  164. color: #4b87d0;
  165. }
  166. .zx6{
  167. color: #409940;
  168. }
  169. .zx4{
  170. color: #ed6e08;
  171. }
  172. .k3{
  173. display: inline-block;
  174. height: 30px;
  175. width: 30px;
  176. margin: 0px 5px;
  177. background-size: 100% 100%;
  178. vertical-align:middle ;
  179. }
  180. .balls .k3:first-child{
  181. margin-left: 180upx;
  182. }
  183. .k3.num_1{
  184. background-image: url("../static/img/num-1.png");
  185. }
  186. .k3.num_2{
  187. background-image: url("../static/img/num-2.png");
  188. }
  189. .k3.num_3{
  190. background-image: url("../static/img/num-3.png");
  191. }
  192. .k3.num_4{
  193. background-image: url("../static/img/num-4.png");
  194. }
  195. .k3.num_5{
  196. background-image: url("../static/img/num-5.png");
  197. }
  198. .k3.num_6{
  199. background-image: url("../static/img/num-6.png");
  200. }
  201. .pk10{
  202. display: inline-block;
  203. height: 25px;
  204. width: 25px;
  205. line-height: 25px;
  206. margin: 0px 4px;
  207. border-radius: 5px;
  208. text-align: center;
  209. color: #fff;
  210. }
  211. .pk10.num_01{
  212. background-color: #e7df00;
  213. }
  214. .pk10.num_02{
  215. background-color: #0093dd;
  216. }
  217. .pk10.num_03{
  218. background-color: #4a4a4a;
  219. }
  220. .pk10.num_04{
  221. background-color: #ff7600;
  222. }
  223. .pk10.num_05{
  224. background-color: #16e3e5;
  225. }
  226. .pk10.num_06{
  227. background-color: #5234ff;
  228. }
  229. .pk10.num_07{
  230. background-color: #ff0066;
  231. }
  232. .pk10.num_08{
  233. background-color: #ff2600;
  234. }
  235. .pk10.num_09{
  236. background-color: #780a00;
  237. }
  238. .pk10{
  239. background-color: #06bf00;
  240. }
  241. @keyframes issueBoxH {
  242. 0% {
  243. transform: translateY(-39px); }
  244. 25% {
  245. transform: translateY(20px); }
  246. 50% {
  247. transform: translateY(-9px); }
  248. 75% {
  249. transform: translateY(5px); }
  250. 100% {
  251. transform: translateY(0); } }
  252. @-webkit-keyframes issueBoxH {
  253. 0% {
  254. transform: translateY(-39px); }
  255. 25% {
  256. transform: translateY(20px); }
  257. 50% {
  258. transform: translateY(-9px); }
  259. 75% {
  260. transform: translateY(5px); }
  261. 100% {
  262. transform: translateY(0); } }
  263. .lotterylist .code_loading view:nth-child(1) {
  264. animation: issueBoxH 0.6s forwards; }
  265. .lotterylist .code_loading view:nth-child(2) {
  266. animation: issueBoxH 0.8s forwards; }
  267. .lotterylist .code_loading view:nth-child(3) {
  268. animation: issueBoxH 1.0s forwards; }
  269. .lotterylist .code_loading view:nth-child(4) {
  270. animation: issueBoxH 1.2s forwards; }
  271. .lotterylist .code_loading view:nth-child(5) {
  272. animation: issueBoxH 1.4s forwards; }
  273. .lotterylist .code_loading view:nth-child(6) {
  274. animation: issueBoxH 1.6s forwards; }
  275. .lotterylist .code_loading view:nth-child(7) {
  276. animation: issueBoxH 1.8s forwards; }
  277. .lotterylist .code_loading view:nth-child(8) {
  278. animation: issueBoxH 2s forwards; }
  279. .lotterylist .code_loading view:nth-child(9) {
  280. animation: issueBoxH 2.1s forwards; }
  281. .lotterylist .code_loading view:nth-child(9) {
  282. animation: issueBoxH 2.2s forwards; }
  283. .lotterylist .code_loading view:nth-child(10) {
  284. animation: issueBoxH 2.3s forwards; }
  285. .lotterylist .code_loading view:nth-child(11) {
  286. animation: issueBoxH 2.4s forwards; }
  287. .lotterylist .code_loading view:nth-child(12) {
  288. animation: issueBoxH 2.5s forwards; }
  289. .lotterylist .code_loading view:nth-child(13) {
  290. animation: issueBoxH 2.6s forwards; }
  291. .lotterylist .code_loading view:nth-child(14) {
  292. animation: issueBoxH 2.7s forwards; }
  293. .lotterylist .code_loading view:nth-child(15) {
  294. animation: issueBoxH 2.8s forwards; }
  295. .lotterylist .code_loading view:nth-child(16) {
  296. animation: issueBoxH 2.9s forwards; }
  297. .lotterylist .code_loading view:nth-child(17) {
  298. animation: issueBoxH 3s forwards; }
  299. .lotterylist .code_loading view:nth-child(18) {
  300. animation: issueBoxH 3.1s forwards; }
  301. .lotterylist .code_loading view:nth-child(19) {
  302. animation: issueBoxH 3.2s forwards; }
  303. </style>