Match.vue 50 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700
  1. <template>
  2. <view class="match">
  3. <view class="match-head">
  4. <div class="search-box">
  5. <div class="search" @click="toSearch">
  6. <img class="icon" src="/static/image/search-icon.svg" alt="">
  7. <div>
  8. <!-- Search for tours and teams... -->
  9. {{ $t('match.lab86') }}
  10. </div>
  11. </div>
  12. </div>
  13. <div class="filter-box">
  14. <div class="box">
  15. <div class="item-box" id="item-box">
  16. <div class="item item1" :class="{'active': match_live !== 0}" @click="matchLiveShow = true">
  17. <img class="icon" v-show="match_live == 0" src="/static/image/match/video.svg" alt="">
  18. <img class="icon" v-show="match_live !== 0" src="/static/image/match/video-a.svg" alt="">
  19. <!-- Streaming -->
  20. {{ $t('match.lab87') }}
  21. <img class="down" v-show="match_live == 0" src="/static/image/match/expert_down_ico.svg" alt="">
  22. <img class="down" v-show="match_live !== 0" src="/static/image/match/expert_down_ico_a.svg" alt="">
  23. </div>
  24. <div class="border"></div>
  25. <div v-for="item in tagActiveList" :key="item.id" class="item" :class="{'active': selectArr.indexOf(item.id) !== -1}" @click="selectedTag(item.id)">
  26. {{ item.name }}
  27. </div>
  28. </div>
  29. <div class="tours" @click="showSelectMask">
  30. <div class="number-box" v-if="selectArr.length">{{ selectArr.length }}</div>
  31. <!-- Tours -->
  32. {{ $t('match.lab88') }}
  33. <img class="down" src="/static/image/match/expert_down_ico.svg" alt="">
  34. </div>
  35. </div>
  36. <div class="box1">
  37. <div class="left">
  38. <div class="bold">{{ formatDate1(titleDate) }}</div>
  39. <div v-if="titleDate">- {{ formatDate(titleDate) }}</div>
  40. </div>
  41. <div class="right">
  42. <div class="live-now" :class="{'active': live == 1}" @click="checkLive">
  43. <!-- Live Now -->
  44. {{ $t('match.labe6') }}
  45. </div>
  46. <div class="date-box" :class="{active: nowDate != targetDate}" @click="dateShowChange">
  47. <img class="icon" v-show="nowDate != targetDate" src="/static/image/match/icon_Calendar.png" alt="">
  48. <img class="icon" v-show="nowDate == targetDate" src="/static/image/match/icon_Calendar.svg" alt="">
  49. <!-- Calendar -->
  50. {{ $t('match.lab89') }}
  51. </div>
  52. </div>
  53. </div>
  54. </div>
  55. </view>
  56. <!-- 列表 -->
  57. <scroll-view
  58. class="scroll"
  59. :scroll-y="true"
  60. :refresher-enabled="refresherEnabled"
  61. :refresher-triggered="triggered"
  62. :refresher-threshold="100"
  63. :scroll-top="scrollTop"
  64. @scroll="scroll"
  65. @refresherpulling="onPulling"
  66. @refresherrefresh="onRefresh"
  67. @scrolltolower="scrolltolower"
  68. @refresherabort="onAbort"
  69. >
  70. <view class="match-list" id="match">
  71. <view
  72. class="match-list-ul"
  73. v-for="(item) in matchList"
  74. :key="item.item[0].day"
  75. :data-day="item.item[0].day"
  76. >
  77. <div class="day" :class="{'target-date': item.item[0].day == targetDate}"><div class="bold">{{ formatDate1(item.item[0].day) }}</div> - {{ formatDate(item.item[0].day) }}</div>
  78. <div class="list" v-for="list in item.item[0].list" :key="list.tournament_id">
  79. <div class="title" @click="toMatchList(list)">
  80. <view class="text-clamp">{{ list.name }}</view>
  81. <img class="icon" src="/static/image/match/next_ico.svg" alt="">
  82. </div>
  83. <div class="match-list" v-for="item1 in list.cricket_match" :key="item1.id">
  84. <div class="match-detail-box" @click="toDetail(item1)">
  85. <div class="match_num">{{ item1.match_num }}</div>
  86. <div class="detail-box">
  87. <div class="detail">
  88. <div class="home">
  89. <div class="left">
  90. <div class="row">
  91. <u--image :src="item1.home_logo || '/static/image/common/team.png'" shape="circle" width="40rpx" height="40rpx"></u--image>
  92. <div class="text-clamp">{{ item1.home_name }}</div>
  93. </div>
  94. <div class="row">
  95. <u--image :src="item1.away_logo || '/static/image/common/team.png'" shape="circle" width="40rpx" height="40rpx"></u--image>
  96. <div class="text-clamp">{{ item1.away_name }}</div>
  97. </div>
  98. </div>
  99. <div class="right">
  100. <div class="li-team-value" v-if="item1.home_display_score">
  101. <div class="value">{{ formaScore(item1.home_display_score) }}</div>
  102. <div class="value2" v-if="item1.home_display_score != '0/0(0)' && formaScore2(item1.home_display_score)" :class="{'r': item1.win_id == item1.away_id && item1.status == 2}">{{ formaScore2(item1.home_display_score) }}</div>
  103. <div class="value1" v-if="item1.home_display_score != '0/0(0)'" :class="{'r': item1.win_id == item1.away_id && item1.status == 2}">{{ formaScore1(item1.home_display_score) }}</div>
  104. <u-icon v-if="item1.win_id == item1.home_id && item1.status == 2" name="play-left-fill" color="#DC3C23" size="11"></u-icon>
  105. </div>
  106. <div class="li-team-value" v-if="item1.away_display_score">
  107. <div class="value">{{ formaScore(item1.away_display_score) }}</div>
  108. <div class="value2" v-if="item1.away_display_score != '0/0(0)' && formaScore2(item1.away_display_score)" :class="{'r': item1.win_id == item1.home_id && item1.status == 2}">{{ formaScore2(item1.away_display_score) }} </div>
  109. <div class="value1" v-if="item1.away_display_score != '0/0(0)'" :class="{'r': item1.win_id == item1.home_id && item1.status == 2}">{{ formaScore1(item1.away_display_score) }}</div>
  110. <u-icon v-if="item1.win_id == item1.away_id && item1.status == 2" name="play-left-fill" color="#DC3C23" size="11"></u-icon>
  111. </div>
  112. </div>
  113. </div>
  114. </div>
  115. <!-- status 0未开始 1已开始 2已结束 -->
  116. <div class="state-box">
  117. <div class="status2" v-if="item1.status == 2">
  118. <!-- Completed -->
  119. {{ $t('match.lab90') }}
  120. </div>
  121. <template v-if="item1.status == 0">
  122. <div v-if="item1.live_time">
  123. <!-- Watch Live In -->
  124. {{ $t('match.lab91') }}
  125. </div>
  126. <div v-else>
  127. <!-- Watch Live in -->
  128. {{ $t('match.lab92') }}
  129. </div>
  130. <div v-if="item1.live_time" class="down">{{ item1.live_time }}</div>
  131. <div v-else class="status0"><span class="down">{{ watchLiveAt(item1.scheduled) }}&nbsp;</span><span>{{ watchLiveAt1(item1.scheduled) }}</span></div>
  132. </template>
  133. <template v-if="item1.status == 1">
  134. <div @click.stop="toDetail(item1, 1)" v-if="item1.match_live" class="match_live">
  135. <img class="icon" src="/static/image/match/play_icon.png" alt="">
  136. <!-- Watch Live -->
  137. {{ $t('match.lab93') }}
  138. </div>
  139. <div v-if="item1.live_id && item1.islive == 1" @click.stop="toDetail(item1, 2)" class="match_live">
  140. <img class="icon" src="/static/image/match/play_icon.png" alt="">
  141. <!-- L I V E -->
  142. {{ $t('match.lab94') }}
  143. </div>
  144. <div class="scores" v-if="!(item1.live_id && item1.islive == 1) && !item1.match_live">
  145. <div class="radius"></div>
  146. <!-- Live Scores -->
  147. {{ $t('match.lab95') }}
  148. </div>
  149. </template>
  150. </div>
  151. </div>
  152. <div v-if="item1.match_result" class="ended">{{ item1.match_result }}</div>
  153. </div>
  154. </div>
  155. </div>
  156. </view>
  157. <u-loadmore
  158. v-if="matchList.length != 0 && !live && !selectArr.length && match_live == 0"
  159. :status="status"
  160. fontSize="28"
  161. :line="true"
  162. :loading-text="statusType.loadingText"
  163. :loadmore-text="statusType.loadmoreText"
  164. :nomore-text="statusType.nomoreText"
  165. />
  166. </view>
  167. <div class="skeleton" v-if="!matchList.length && status == 'loading'">
  168. <div class="list">
  169. <div class="item-header"></div>
  170. <div class="item-body">
  171. <div class="item">
  172. <div class="row">
  173. <div class="left"></div>
  174. <div class="right"></div>
  175. </div>
  176. <div class="row">
  177. <div class="left"></div>
  178. <div class="right"></div>
  179. </div>
  180. </div>
  181. <div class="item">
  182. <div class="row">
  183. <div class="left"></div>
  184. <div class="right"></div>
  185. </div>
  186. <div class="row">
  187. <div class="left"></div>
  188. <div class="right"></div>
  189. </div>
  190. </div>
  191. </div>
  192. </div>
  193. <div class="list">
  194. <div class="item-header"></div>
  195. <div class="item-body">
  196. <div class="item">
  197. <div class="row">
  198. <div class="left"></div>
  199. <div class="right"></div>
  200. </div>
  201. <div class="row">
  202. <div class="left"></div>
  203. <div class="right"></div>
  204. </div>
  205. </div>
  206. <div class="item">
  207. <div class="row">
  208. <div class="left"></div>
  209. <div class="right"></div>
  210. </div>
  211. <div class="row">
  212. <div class="left"></div>
  213. <div class="right"></div>
  214. </div>
  215. </div>
  216. </div>
  217. </div>
  218. </div>
  219. <div class="no-data" v-show="!matchList.length && status == 'loadmore'">
  220. <img class="e_img" src="/static/image/match/no_data.jpg" alt="">
  221. <div class="text">
  222. <!-- No search results for this filter -->
  223. {{ $t('match.lab96') }}
  224. </div>
  225. <div class="reset-box">
  226. <div class="btn" @click="reset">
  227. <!-- RESET FILTERS -->
  228. {{ $t('match.lab97') }}
  229. </div>
  230. </div>
  231. </div>
  232. </scroll-view>
  233. <u-calendar
  234. class="calendar"
  235. :maxDate="maxDate"
  236. :showSubtitle="false"
  237. :title="$t('match.la31')"
  238. :defaultDate="defaultDate"
  239. color="#DC3C23"
  240. :rowHeight="114"
  241. confirmText="Confirm"
  242. :formatter="formatter"
  243. :minDate="minDate"
  244. :show="dateShow"
  245. @monthSelected="monthSelected"
  246. @close="dateClose"
  247. @confirm="dateConfirm">
  248. </u-calendar>
  249. <u-popup
  250. :show="selectMask"
  251. mode="bottom"
  252. :round="20"
  253. @close="selectMask = false"
  254. >
  255. <view class="tag_popup_box" @touchmove.stop="">
  256. <view class="top">
  257. <img class="left_img" src="/static/image/match/left.png" @click="selectMask = false" alt="">
  258. <u--input
  259. :placeholder="$t('match.lab98')"
  260. v-model="tournamentName"
  261. prefixIcon="search"
  262. prefixIconStyle="font-size: 28px;color: #909399"
  263. ></u--input>
  264. <img class="close" src="/static/image/common/warn.png" @click="selectMask = false" alt="">
  265. </view>
  266. <view class="list" v-if="tournamentListFilter.length">
  267. <view
  268. class="li font28 flex"
  269. v-for="(item) in tournamentListFilter"
  270. :key="item.tournament_id"
  271. @click="checkboxChange(item.tournament_id)"
  272. >
  273. <text>{{ item.name }}</text>
  274. <img class="img" :src="selectArrPopup.indexOf(item.tournament_id) != -1 ? '/static/image/match/match_selected.png' : '/static/image/match/match_notselected.png'">
  275. </view>
  276. </view>
  277. <div class="no-tag-box" v-else>
  278. <img class="no" src="/static/image/match/no_tag.png" alt="">
  279. <div class="found">
  280. <!-- Nothing found! -->
  281. {{ $t('match.lab99') }}
  282. </div>
  283. <div class="text">
  284. <!-- Please try searching again -->
  285. {{ $t('match.labe') }}
  286. </div>
  287. </div>
  288. <view class="foot flex-around" v-if="tournamentListFilter.length">
  289. <view class="btn" @click="selectArrPopup = []">
  290. <!-- Clear All -->
  291. {{ $t('match.labe1') }}
  292. </view>
  293. <view class="btn1" @click="saveOptions">
  294. <!-- Save Options -->
  295. {{ $t('match.labe2') }}
  296. </view>
  297. </view>
  298. </view>
  299. </u-popup>
  300. <u-popup
  301. :show="matchLiveShow"
  302. mode="bottom"
  303. :round="20"
  304. @close="matchLiveShow = false"
  305. >
  306. <view class="match_live_box" @touchmove.stop="">
  307. <div class="item" @click="selectMatchLive(0)">
  308. <!-- All matches(Non-streaming & Streaming) -->
  309. {{ $t('match.labe3') }}
  310. <div class="radius">
  311. <div v-if="match_live == 0" class="radius-active"></div>
  312. </div>
  313. </div>
  314. <div class="item" @click="selectMatchLive(2)">
  315. <!-- Anchor explanation -->
  316. {{ $t('match.labe4') }}
  317. <div class="radius">
  318. <div v-if="match_live == 2" class="radius-active"></div>
  319. </div>
  320. </div>
  321. <div class="item" @click="selectMatchLive(1)">
  322. <!-- Streaming on OneCric -->
  323. {{ $t('match.labe5') }}
  324. <div class="radius">
  325. <div v-if="match_live == 1" class="radius-active"></div>
  326. </div>
  327. </div>
  328. </view>
  329. </u-popup>
  330. <div @click="goTop" :class="getTopClass()" class="to-top" v-if="((!hasNowDate) || (titleDate && titleDate != nowDate)) && matchList.length">
  331. <u-icon name="arrow-left-double" color="#fff"></u-icon>
  332. </div>
  333. <div class="news-install">
  334. <install></install>
  335. </div>
  336. </view>
  337. </template>
  338. <script>
  339. import install from "@/components/install/install.vue";
  340. import { deepCopy } from '@/utils/common-utils';
  341. export default {
  342. components: {
  343. install,
  344. },
  345. data() {
  346. const d = new Date()
  347. const year = d.getFullYear()
  348. let month = d.getMonth() + 1
  349. month = month < 10 ? `0${month}` : month
  350. const date = d.getDate()
  351. return {
  352. value: [],
  353. streaming: 0,
  354. status: "loadmore",
  355. selectMask: false,
  356. homeShow: false,
  357. timer: null,
  358. intervalTimer: null,
  359. defaultDate: null,
  360. statusType: {
  361. loadingText: this.$t('common.lab'),
  362. loadmoreText: this.$t('common.lab1'),
  363. nomoreText: this.$t('common.lab2')
  364. },
  365. matchList: [],
  366. tournamentList: [],
  367. tournamentName: '',
  368. triggered: false,
  369. _freshing: false,
  370. selectArr: [],
  371. selectArrPopup: [],
  372. live: 0,
  373. match_live: 0,
  374. tagList: [],
  375. targetDate: '',
  376. nowDate: '',
  377. hasNowDate: true,
  378. nextDate: '',
  379. preDate: '',
  380. dateShow: false,
  381. matchLiveShow: false,
  382. scrollTop: 0,
  383. old: {
  384. scrollTop: 0
  385. },
  386. titleDate: '',
  387. targetDateScrollTop: 0,
  388. maxDate: `${year}-${month}-${date + 15}`,
  389. minDate: `${year}-${month}-${date - 15}`,
  390. };
  391. },
  392. computed: {
  393. refresherEnabled() {
  394. if (this.match_live !== 0) {
  395. return false
  396. }
  397. if (this.live == 1) {
  398. return false
  399. }
  400. if (!this.matchList[0]) {
  401. return false
  402. }
  403. return true
  404. },
  405. tagActiveList() {
  406. let list = [];
  407. list = this.tagList.filter(item => {
  408. return this.selectArr.indexOf(item.id) !== -1
  409. })
  410. list = list.concat(this.tagList.filter(item => {
  411. return this.selectArr.indexOf(item.id) === -1
  412. }))
  413. return list
  414. },
  415. tournamentListFilter() {
  416. return this.tournamentList.filter(item => {
  417. return item.name.toLowerCase().indexOf(this.tournamentName.toLowerCase()) !== -1
  418. })
  419. },
  420. info() {
  421. return this.$store.state.info;
  422. },
  423. isLogin() {
  424. return this.$store.state.isLogin;
  425. },
  426. },
  427. created() {
  428. if (sessionStorage.getItem('match_live')) {
  429. this.matchLiveLoad()
  430. } else {
  431. this.targetDate = this.$common.parseTime(new Date(), '{y}-{m}-{d}')
  432. this.get_Cricket_match(true);
  433. }
  434. this.get_cricket_tag();
  435. this.get_cricket_tournament();
  436. this.intervalTimer = setInterval(() => {
  437. if (this.matchList.length) {
  438. this.get_live_Cricket_match()
  439. }
  440. }, 10000)
  441. },
  442. activated() {
  443. if (sessionStorage.getItem('match_live')) {
  444. this.matchLiveLoad()
  445. }
  446. this.intervalTimer = setInterval(() => {
  447. if (this.matchList.length) {
  448. this.get_live_Cricket_match()
  449. }
  450. }, 10000)
  451. },
  452. deactivated() {
  453. clearInterval(this.intervalTimer)
  454. this.intervalTimer = null
  455. },
  456. methods: {
  457. setList() {
  458. let num = this.streaming;
  459. this.streaming = num == 1 ? 0 : 1;
  460. this.get_Cricket_match();
  461. },
  462. // 获取公开赛列表
  463. get_cricket_tournament() {
  464. uni.$u.http
  465. .post("/api/Cricket/get_cricket_tournament", {})
  466. .then((res) => {
  467. this.tournamentList = res;
  468. })
  469. .catch((res) => {});
  470. },
  471. // 联赛-标签
  472. get_cricket_tag() {
  473. uni.$u.http
  474. .post("/api/Cricketnew/get_cricket_tag", {})
  475. .then((res) => {
  476. this.tagList = res
  477. })
  478. .catch((res) => {});
  479. },
  480. /* 获取板球列表 */
  481. get_Cricket_match(reset, d) {
  482. this.status = "loading";
  483. let time = new Date();
  484. let timeZone = time.toLocaleTimeString("en-us", {
  485. timeZoneName: "short",
  486. }); //'1:12:38 PM GMT+8'
  487. let timeZoneId = Intl.DateTimeFormat().resolvedOptions().timeZone; //'Asia/Shanghai'
  488. let selectArr = this.selectArr.join(',');
  489. this.nowDate = this.$common.parseTime(new Date(), '{y}-{m}-{d}')
  490. if (this.nowDate == d) {
  491. this.hasNowDate = true
  492. }
  493. uni.$u.http
  494. .post("/api/Cricketnew/cricket_match_day", {
  495. timezone: timeZoneId,
  496. date: d || this.targetDate,
  497. live: this.live,
  498. tag: selectArr,
  499. match_live: this.match_live
  500. })
  501. .then((res) => {
  502. if (reset) {
  503. let matchList = [];
  504. (res.item || []).forEach(a => {
  505. matchList.push({
  506. end_day: res.end_day,
  507. front_day: res.front_day,
  508. item: [a]
  509. })
  510. })
  511. this.matchList = matchList;
  512. this.$nextTick(() => {
  513. this.scrollTop = this.old.scrollTop
  514. this.$nextTick(()=>{
  515. this.scrollTop = 0
  516. });
  517. this.getDateTitle()
  518. var div = document.querySelectorAll('.match-list-ul')
  519. //最终结果
  520. div.forEach(item => {
  521. let distance = item.offsetTop + this.getTop(item.parentElement)
  522. if (this.hasNowDate) {
  523. if (item.getAttribute('data-day') == this.nowDate) {
  524. this.targetDateScrollTop = distance
  525. }
  526. } else {
  527. if (item.getAttribute('data-day') == this.targetDate) {
  528. this.targetDateScrollTop = distance
  529. }
  530. }
  531. })
  532. })
  533. } else {
  534. if (d == this.preDate) {
  535. let titleDate = this.titleDate
  536. uni.stopPullDownRefresh();
  537. let matchList = [];
  538. (res.item || []).forEach(a => {
  539. matchList.push({
  540. end_day: res.end_day,
  541. front_day: res.front_day,
  542. item: [a]
  543. })
  544. })
  545. this.matchList = matchList.concat(this.matchList);
  546. this.$nextTick(() => {
  547. var div = document.querySelectorAll('.match-list-ul')
  548. div.forEach(item => {
  549. let distance = item.offsetTop + this.getTop(item.parentElement)
  550. if (item.getAttribute('data-day') == titleDate) {
  551. this.targetDateScrollTop = distance
  552. }
  553. })
  554. this.scrollTop = (this.targetDateScrollTop - 90)
  555. })
  556. } else {
  557. if (res) {
  558. let matchList = [];
  559. (res.item || []).forEach(a => {
  560. matchList.push({
  561. end_day: res.end_day,
  562. front_day: res.front_day,
  563. item: [a]
  564. })
  565. })
  566. this.matchList = this.matchList.concat(matchList);
  567. }
  568. this.$nextTick(() => {
  569. this.getDateTitle()
  570. var div = document.querySelectorAll('.match-list-ul')
  571. //最终结果
  572. div.forEach(item => {
  573. let distance = item.offsetTop + this.getTop(item.parentElement)
  574. if (this.hasNowDate) {
  575. if (item.getAttribute('data-day') == this.nowDate) {
  576. this.targetDateScrollTop = distance
  577. }
  578. } else {
  579. if (item.getAttribute('data-day') == this.targetDate) {
  580. this.targetDateScrollTop = distance
  581. }
  582. }
  583. })
  584. })
  585. }
  586. }
  587. if (this.timer) {
  588. clearInterval(this.timer)
  589. this.timer = null
  590. }
  591. this.countdown1()
  592. this.timer = setInterval(this.countdown, 1000)
  593. document.getElementById('item-box').scrollLeft=0;
  594. if (this.selectMask) {
  595. this.selectMask = false;
  596. }
  597. }).finally(() => {
  598. this.triggered = false
  599. this._freshing = false;
  600. this.status = "loadmore";
  601. })
  602. .catch((res) => {});
  603. },
  604. toMatchList(item) {
  605. uni.navigateTo({
  606. url:`./match-list?title=${item.name}&id=${item.tournament_id}&type=${item.type}${item.cricket_match.length != 0 ? ('&matchid=' + item.cricket_match[0].id): ''}`
  607. })
  608. },
  609. toSearch() {
  610. uni.navigateTo({
  611. url:`./search`
  612. })
  613. },
  614. close(event) {
  615. this.homeShow = false;
  616. },
  617. countdown1() {
  618. var matchList = this.matchList
  619. matchList.forEach(item => {
  620. if (item.item && item.item[0] && item.item[0].list) {
  621. item.item[0].list.forEach(a => {
  622. a.cricket_match && a.cricket_match.forEach(item1 => {
  623. if (item1.match_result == null) {
  624. item1.match_result = ''
  625. }
  626. item1.live_time_unix = new Date(item1.todaystart.replace(new RegExp(/-/gm), "/")).getTime() - new Date().getTime()
  627. if (item1.live_time_unix > 0 && item1.live_time_unix < (1000 * 60 * 60 * 3)) {
  628. item1.live_time = this.$common.countdownFun(item1.live_time_unix / 1000)
  629. } else {
  630. item1.live_time = null
  631. }
  632. if (item1.live_time_unix == 0) {
  633. item1.status = 1
  634. }
  635. })
  636. })
  637. }
  638. })
  639. this.$set(this, 'matchList', matchList)
  640. },
  641. countdown() {
  642. var matchList = this.matchList
  643. matchList.forEach(item => {
  644. if (item.item && item.item[0] && item.item[0].list) {
  645. item.item[0].list.forEach(a => {
  646. a.cricket_match && a.cricket_match.forEach(item1 => {
  647. if (item1.match_result == null) {
  648. item1.match_result = ''
  649. }
  650. if (item1.live_time_unix > 0 && item1.live_time_unix < (1000 * 60 * 60 * 3)) {
  651. item1.live_time_unix = item1.live_time_unix - 1000
  652. item1.live_time = this.$common.countdownFun(item1.live_time_unix / 1000)
  653. } else {
  654. item1.live_time = null
  655. }
  656. if (item1.live_time_unix == 0) {
  657. item1.status = 1
  658. }
  659. })
  660. })
  661. }
  662. })
  663. this.$set(this, 'matchList', matchList)
  664. },
  665. get_live_Cricket_match() {
  666. let timeZoneId = Intl.DateTimeFormat().resolvedOptions().timeZone; //'Asia/Shanghai'
  667. let selectArr = this.selectArr.join(',');
  668. let nowDate = this.$common.parseTime(new Date(), '{y}-{m}-{d}')
  669. uni.$u.http
  670. .post("/api/Cricketnew/cricket_match_day", {
  671. timezone: timeZoneId,
  672. date: nowDate,
  673. live: this.live,
  674. tag: selectArr,
  675. match_live: this.match_live
  676. })
  677. .then((res) => {
  678. if (res.item[0] && res.item[0].list&& res.item[0].list[0]) {
  679. let obj = {}
  680. res.item[0].list.forEach(item => {
  681. (item.cricket_match || []).forEach(m => {
  682. obj[m.id] = m
  683. })
  684. })
  685. let matchList = deepCopy(this.matchList)
  686. matchList.forEach((item, index1) => {
  687. if (item.item && item.item[0] && item.item[0].list) {
  688. item.item[0].list.forEach((a, index2) => {
  689. a.cricket_match && a.cricket_match.forEach((item1, index3) => {
  690. if (obj[item1.id]) {
  691. obj[item1.id].live_time = item1.live_time
  692. item1 = obj[item1.id]
  693. a.cricket_match[index3] = item1
  694. }
  695. })
  696. })
  697. }
  698. })
  699. matchList.forEach(item => {
  700. if (item.item && item.item[0] && item.item[0].list) {
  701. item.item[0].list.forEach(a => {
  702. a.cricket_match && a.cricket_match.forEach(item1 => {
  703. item1.live_time_unix = new Date(item1.todaystart.replace(new RegExp(/-/gm), "/")).getTime() - new Date().getTime()
  704. if (item1.live_time_unix > 0 && item1.live_time_unix < (1000 * 60 * 60 * 3)) {
  705. item1.live_time = this.$common.countdownFun(item1.live_time_unix / 1000)
  706. } else {
  707. item1.live_time = null
  708. }
  709. if (item1.live_time_unix == 0) {
  710. item1.status = 1
  711. }
  712. })
  713. })
  714. }
  715. })
  716. this.matchList = matchList
  717. }
  718. })
  719. .catch((res) => {});
  720. },
  721. toDetail(item, type) {
  722. if (type == 1) {
  723. this.$toUrl('./match-detail?id=' + item.id + '&animation=1')
  724. return
  725. }
  726. if (type == 2) {
  727. this.$toUrl('/pages/Live/live-detail?ID=' + item.live_id)
  728. return
  729. }
  730. if(item.status == 1) {
  731. this.$toUrl(`./match-detail?id=${item.id}&live=1`)
  732. return
  733. }
  734. this.$toUrl('./match-detail?id=' + item.id)
  735. },
  736. open(event) {},
  737. onPulling(e) {
  738. },
  739. onRefresh() {
  740. if (this._freshing) return;
  741. this.triggered = true
  742. this._freshing = true;
  743. this.preDate = this.matchList[0].front_day
  744. this.get_Cricket_match(false, this.preDate);
  745. },
  746. scrolltolower() {
  747. if (this.live || this.selectArr.length || !this.matchList[this.matchList.length - 1] || this.match_live !== 0) {
  748. return
  749. }
  750. if (this.status == "loadmore") {
  751. this.nextDate = this.matchList[this.matchList.length - 1].end_day
  752. this.get_Cricket_match(false, this.nextDate);
  753. }
  754. },
  755. scroll(e) {
  756. // console.error(e)
  757. this.old.scrollTop = e.detail.scrollTop
  758. this.getDateTitle()
  759. },
  760. getDateTitle() {
  761. var div = document.querySelectorAll('.match-list-ul')
  762. //最终结果
  763. let hasNowDate = false
  764. div.forEach(item => {
  765. if (item.getAttribute('data-day') == this.nowDate) {
  766. hasNowDate = true
  767. }
  768. let distance = item.offsetTop + item.offsetHeight
  769. if ((this.old.scrollTop - distance) < -100 && this.old.scrollTop >= item.offsetTop) {
  770. this.titleDate = item.getAttribute('data-day')
  771. }
  772. })
  773. this.hasNowDate = hasNowDate
  774. },
  775. getTop(dom, distance) {
  776. distance = distance || 0
  777. //可以使用dom.style.positin 但style只能获取到行内属性会出现获取不到属性值返回空字符串
  778. //getComputedStyle会输出最终应用于该element上的最终样式 IE9+支持
  779. //currentStyle IE老版本支持
  780. if (['relative','absolute','fixed'].includes(getComputedStyle(dom).position)) {
  781. distance += distance.offsetTop
  782. }
  783. if (dom.parentElement.nodeName === 'BODY' || !dom.parentElement) {
  784. return distance
  785. }
  786. return this.getTop(dom.parentElement, distance)
  787. },
  788. onAbort() {
  789. },
  790. monthSelected(e) {
  791. this.defaultDate = e
  792. },
  793. selectMatchLive(type) {
  794. this.matchLiveShow = false
  795. if (this.match_live == type) {
  796. return
  797. }
  798. this.targetDate = this.nowDate
  799. this.match_live = type
  800. this.get_Cricket_match(true);
  801. },
  802. reset() {
  803. this.live = 0;
  804. this.match_live = 0;
  805. this.selectArr = [];
  806. this.get_Cricket_match(true);
  807. },
  808. matchLiveLoad() {
  809. this.match_live = JSON.parse(sessionStorage.getItem('match_live'))
  810. this.targetDate = this.$common.parseTime(new Date(), '{y}-{m}-{d}')
  811. this.get_Cricket_match(true);
  812. sessionStorage.removeItem('match_live')
  813. },
  814. checkLive() {
  815. if (this.status == "loading") {
  816. return
  817. }
  818. this.match_live = 0;
  819. this.targetDate = this.nowDate
  820. let selectArr = []
  821. this.tagActiveList.forEach(item => {
  822. if (this.selectArr.indexOf(item.id) !== -1) {
  823. selectArr.push(item.id)
  824. }
  825. })
  826. this.selectArr = selectArr
  827. this.live = this.live ? 0 : 1
  828. this.targetDate = this.$common.parseTime(new Date(), '{y}-{m}-{d}')
  829. this.get_Cricket_match(true)
  830. },
  831. selectedTag(id) {
  832. if (this.status == "loading") {
  833. return
  834. }
  835. if (this.selectArr.indexOf(id) === -1) {
  836. this.selectArr.push(id)
  837. } else {
  838. this.selectArr = this.selectArr.filter(item => {
  839. return item != id
  840. })
  841. }
  842. this.match_live = 0;
  843. this.live = 0
  844. this.targetDate = this.nowDate
  845. document.getElementById('item-box').scrollLeft=0;
  846. this.get_Cricket_match(true)
  847. },
  848. checkboxChange(id) {
  849. if (this.selectArrPopup.indexOf(id) === -1) {
  850. this.selectArrPopup.push(id)
  851. } else {
  852. this.selectArrPopup = this.selectArrPopup.filter(item => {
  853. return item != id
  854. })
  855. }
  856. },
  857. saveOptions() {
  858. this.selectArr = deepCopy(this.selectArrPopup)
  859. this.targetDate = this.nowDate
  860. this.selectMask = false
  861. this.get_Cricket_match(true)
  862. },
  863. showSelectMask() {
  864. this.selectMask = true
  865. this.tournamentName = ''
  866. this.selectArrPopup = deepCopy(this.selectArr)
  867. },
  868. dateConfirm(e) {
  869. this.targetDate = e[0]
  870. this.get_Cricket_match(true)
  871. this.dateShow = false
  872. },
  873. dateClose() {
  874. this.dateShow = false
  875. },
  876. dateShowChange() {
  877. this.dateShow = true
  878. this.defaultDate = [this.targetDate]
  879. },
  880. goTop(e) {
  881. if (!this.hasNowDate) {
  882. this.selectArr = [];
  883. this.match_live = 0;
  884. this.targetDate = this.nowDate
  885. this.get_Cricket_match(true, this.nowDate);
  886. return
  887. }
  888. var div = document.querySelectorAll('.match-list-ul')
  889. let scrollTop = 0
  890. div.forEach(item => {
  891. if (item.getAttribute('data-day') == this.nowDate) {
  892. scrollTop = item.offsetTop
  893. }
  894. })
  895. // 解决view层不同步的问题
  896. this.scrollTop = this.old.scrollTop
  897. this.$nextTick(()=>{
  898. this.scrollTop = scrollTop
  899. this.old.scrollTop = scrollTop
  900. this.getDateTitle()
  901. });
  902. },
  903. getTopClass() {
  904. if (new Date(this.titleDate.replace(new RegExp(/-/gm), "/")).getTime() < new Date(this.nowDate.replace(new RegExp(/-/gm), "/")).getTime()) {
  905. return 'down'
  906. }
  907. return 'up'
  908. },
  909. formatter(day) {
  910. const d = new Date()
  911. let month = d.getMonth() + 1
  912. const date = d.getDate()
  913. if(day.month == month && day.day == date)
  914. {
  915. day.bottomInfo = this.$t('match.tab2')
  916. }
  917. return day
  918. },
  919. watchLiveAt(value) {
  920. if (!value) {
  921. return ''
  922. }
  923. var date = new Date(value.replace(new RegExp(/-/gm), "/"));
  924. var hours = date.getHours();
  925. var minutes = date.getMinutes();
  926. if (hours != 12) {
  927. hours = hours % 12;
  928. }
  929. if (hours == 12 && minutes) {
  930. hours = hours % 12;
  931. }
  932. minutes = minutes < 10 ? '0' + minutes : minutes;
  933. hours = hours < 10 ? '0' + hours : hours;
  934. var strTime = hours + ':' + minutes;
  935. return strTime;
  936. },
  937. watchLiveAt1(value) {
  938. if (!value) {
  939. return ''
  940. }
  941. var date = new Date(value.replace(new RegExp(/-/gm), "/"));
  942. var hours = date.getHours();
  943. var minutes = date.getMinutes();
  944. var ampm = hours >= 12 ? "PM" : "AM";
  945. var strTime = ampm;
  946. if (minutes && hours == 12) {
  947. strTime = 'PM'
  948. }
  949. return strTime;
  950. },
  951. formaScore(v){
  952. if (v == '0/0(0)') {
  953. return 'Yet To Bat'
  954. }
  955. let s = v.replace("(", '(')
  956. let index = v.indexOf('(')
  957. return s.substring(index)
  958. },
  959. formaScore1(v){
  960. let s = v.replace("(", '(')
  961. let index = v.indexOf('(')
  962. let val = s.substring(0, index).split('&')
  963. if (val[1]) {
  964. return '&' + val[1]
  965. }
  966. return val[0]
  967. },
  968. formaScore2(v){
  969. let s = v.replace("(", '(')
  970. let index = v.indexOf('(')
  971. let val = s.substring(0, index).split('&')
  972. if (val[1]) {
  973. return val[0]
  974. }
  975. return ''
  976. },
  977. formatDate1(value) {
  978. if (!value) {
  979. return ''
  980. }
  981. var nowDate = new Date(this.$common.parseTime(new Date(), '{y}/{m}/{d}')).getTime();
  982. var date = new Date(value.replace(new RegExp(/-/gm), "/"));
  983. var weekNum = date.getDay()
  984. let week = ""
  985. switch (weekNum) {
  986. case 0:
  987. week = "Sunday";
  988. break;
  989. case 1:
  990. week = "Monday";
  991. break;
  992. case 2:
  993. week = "Tuesday";
  994. break;
  995. case 3:
  996. week = "Wednesday";
  997. break;
  998. case 4:
  999. week = "Thursday";
  1000. break;
  1001. case 5:
  1002. week = "Friday";
  1003. break;
  1004. case 6:
  1005. week = "Saturday";
  1006. break;
  1007. }
  1008. var targetDate = date.getTime()
  1009. if (nowDate - targetDate < 0 && nowDate - targetDate >= -(1000 * 60 * 60 * 24)) {
  1010. week = this.$t('match.la33')
  1011. }
  1012. if (nowDate - targetDate > 0 && nowDate - targetDate <= (1000 * 60 * 60 * 24)) {
  1013. week = this.$t('match.la32')
  1014. }
  1015. if (nowDate == targetDate) {
  1016. week = this.$t('match.tab2')
  1017. }
  1018. return `${week}`;
  1019. },
  1020. formatDate(value) {
  1021. if (!value) {
  1022. return ''
  1023. }
  1024. var date = new Date(value.replace(new RegExp(/-/gm), "/"));
  1025. var MonthNum = date.getMonth() + 1
  1026. let Month = ''
  1027. switch (MonthNum) {
  1028. case 1:
  1029. Month = "Jan";
  1030. break;
  1031. case 2:
  1032. Month = "Feb";
  1033. break;
  1034. case 3:
  1035. Month = "Mar";
  1036. break;
  1037. case 4:
  1038. Month = "Apr";
  1039. break;
  1040. case 5:
  1041. Month = "May";
  1042. break;
  1043. case 6:
  1044. Month = "Jun";
  1045. break;
  1046. case 7:
  1047. Month = "Jul";
  1048. break;
  1049. case 8:
  1050. Month = "Aug";
  1051. break;
  1052. case 9:
  1053. Month = "Sept";
  1054. break;
  1055. case 10:
  1056. Month = "Oct";
  1057. break;
  1058. case 11:
  1059. Month = "Nov";
  1060. break;
  1061. case 12:
  1062. Month = "Dec";
  1063. break;
  1064. }
  1065. let day = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate())
  1066. return `${day} ${Month}`;
  1067. },
  1068. },
  1069. };
  1070. </script>
  1071. <style lang="scss" scoped>
  1072. page {
  1073. background-color: rgb(251, 251, 252);
  1074. padding-bottom: var(--window-bottom);
  1075. }
  1076. .match-head {
  1077. color: #fff;
  1078. font-size: 28rpx;
  1079. position: sticky;
  1080. top: 0;
  1081. z-index: 99;
  1082. background-color: $color1;
  1083. .match-install {
  1084. color: #333;
  1085. }
  1086. }
  1087. .search-box {
  1088. padding: 22rpx 24rpx;
  1089. color: #BBBBBB;
  1090. font-size: 28rpx;
  1091. .search {
  1092. background-color: rgba(245,245,245,0.3);
  1093. border-radius: 44rpx;
  1094. height: 60rpx;
  1095. display: flex;
  1096. align-items: center;
  1097. padding: 0 18rpx;
  1098. }
  1099. .icon {
  1100. width: 28rpx;
  1101. height: 28rpx;
  1102. margin-right: 18rpx;
  1103. }
  1104. }
  1105. .filter-box {
  1106. background-color: #fff;
  1107. .box {
  1108. padding: 24rpx 0;
  1109. position: relative;
  1110. }
  1111. .item-box {
  1112. padding: 0 26rpx;
  1113. display: flex;
  1114. align-items: center;
  1115. flex-wrap: nowrap;
  1116. white-space: nowrap;
  1117. word-break: keep-all;
  1118. overflow: auto;
  1119. .item {
  1120. display: flex;
  1121. align-items: center;
  1122. line-height: 1;
  1123. height: 52rpx;
  1124. color: #333;
  1125. font-size: 22rpx;
  1126. border-radius: 30rpx;
  1127. border: 1px solid #999999;
  1128. padding: 0 20rpx;
  1129. margin-right: 16rpx;
  1130. &.item1 {
  1131. padding: 0 13rpx;
  1132. }
  1133. &.active {
  1134. color: #DC3C23;
  1135. border-color: #DC3C23;
  1136. }
  1137. .icon {
  1138. margin-right: 11rpx;
  1139. height: 20rpx;
  1140. width: 20rpx;
  1141. }
  1142. .down {
  1143. margin-left: 9rpx;
  1144. height: 16rpx;
  1145. }
  1146. }
  1147. }
  1148. .border {
  1149. height: 40rpx;
  1150. min-width: 1rpx;
  1151. max-width: 1px;
  1152. background-color: #CCCCCC;
  1153. margin-right: 18rpx;
  1154. }
  1155. .tours {
  1156. position: absolute;
  1157. top: 50%;
  1158. right: 0;
  1159. transform: translateY(-50%);
  1160. height: 64rpx;
  1161. padding-left: 20rpx;
  1162. padding-right: 15rpx;
  1163. display: flex;
  1164. align-items: center;
  1165. line-height: 1;
  1166. color: #333;
  1167. font-size: 22rpx;
  1168. background-color: #fff;
  1169. background: #FFFFFF;
  1170. box-shadow: 4rpx 4rpx 8rpx 1rpx rgba(0,0,0,0.16);
  1171. border-radius: 10rpx 0px 0px 10rpx;
  1172. border: 1px solid #CCCCCC;
  1173. .down {
  1174. margin-left: 16rpx;
  1175. height: 16rpx;
  1176. }
  1177. .number-box {
  1178. margin-right: 9rpx;
  1179. width: 34rpx;
  1180. height: 26rpx;
  1181. display: flex;
  1182. align-items: center;
  1183. justify-content: center;
  1184. font-size: 18rpx;
  1185. line-height: 1;
  1186. color: #fff;
  1187. background: #DC3C23;
  1188. border-radius: 30rpx;
  1189. }
  1190. }
  1191. .box1 {
  1192. padding: 25rpx 24rpx 22rpx;
  1193. display: flex;
  1194. align-items: center;
  1195. justify-content: space-between;
  1196. color: #333;
  1197. .live-now {
  1198. width: 120rpx;
  1199. height: 40rpx;
  1200. display: flex;
  1201. align-items: center;
  1202. justify-content: center;
  1203. border-radius: 30rpx;
  1204. border: 1px solid #CCCCCC;
  1205. line-height: 1;
  1206. font-size: 22rpx;
  1207. &.active {
  1208. color: #DC3C23;
  1209. border-color: #DC3C23;
  1210. }
  1211. }
  1212. }
  1213. .left {
  1214. display: flex;
  1215. align-items: center;
  1216. font-size: 26rpx;
  1217. line-height: 1;
  1218. .bold {
  1219. font-weight: bold;
  1220. margin-right: 6rpx;
  1221. }
  1222. }
  1223. .right {
  1224. display: flex;
  1225. align-items: center;
  1226. }
  1227. .date-box {
  1228. display: flex;
  1229. align-items: center;
  1230. height: 36rpx;
  1231. border-left: 1px solid #ccc;
  1232. font-size: 28rpx;
  1233. padding-left: 19rpx;
  1234. margin-left: 22rpx;
  1235. &.active {
  1236. color: #FF3300;
  1237. }
  1238. .icon {
  1239. width: 28rpx;
  1240. margin-right: 10rpx;
  1241. }
  1242. }
  1243. }
  1244. .match-list {
  1245. &+.match-list-ul {
  1246. margin-top: 20rpx;
  1247. }
  1248. .match-list-ul {
  1249. background-color: #fff;
  1250. &+.match-list-ul {
  1251. margin-top: 20rpx;
  1252. }
  1253. .day {
  1254. font-size: 26rpx;
  1255. color: #333;
  1256. height: 77rpx;
  1257. display: flex;
  1258. align-items: center;
  1259. padding: 0 24rpx;
  1260. .bold {
  1261. font-weight: bold;
  1262. margin-right: 6rpx;
  1263. }
  1264. }
  1265. .list {
  1266. background-color: linear-gradient(180deg, #FFFFFF 0%, #FFFFFF 100%);
  1267. border-bottom: 1px solid #F3F3F7;
  1268. }
  1269. .list + .list{
  1270. margin-top: 22rpx;
  1271. }
  1272. .title {
  1273. height: 80rpx;
  1274. display: flex;
  1275. align-items: center;
  1276. justify-content: space-between;
  1277. padding: 0 24rpx;
  1278. font-size: 30rpx;
  1279. font-weight: bold;
  1280. color: #333;
  1281. background-image: url('/static/image/match/list-top-bg.png');
  1282. background-repeat: no-repeat;
  1283. background-size: 100% 100%;
  1284. .icon {
  1285. width: 48rpx;
  1286. }
  1287. }
  1288. .match-list {
  1289. padding: 15rpx 25rpx 17rpx;
  1290. &+.match-list {
  1291. border-top: 1px solid #F3F3F7;
  1292. }
  1293. }
  1294. .match-detail-box {
  1295. padding: 20rpx 0 20rpx 19rpx;
  1296. .match_num {
  1297. margin-bottom: 10px;
  1298. font-size: 22rpx;
  1299. color: #999;
  1300. }
  1301. .detail-box {
  1302. padding-right: 212rpx;
  1303. position: relative;
  1304. .detail {
  1305. font-size: 24rpx;
  1306. line-height: 40rpx;
  1307. color: #333;
  1308. font-weight: bold;
  1309. border-right: 1px solid #F3F3F7;
  1310. }
  1311. .home {
  1312. display: flex;
  1313. align-items: center;
  1314. justify-content: space-between;
  1315. position: relative;
  1316. .row {
  1317. display: flex;
  1318. align-items: center;
  1319. &+.row {
  1320. margin-top: 32rpx;
  1321. }
  1322. }
  1323. .left {
  1324. flex: 1;
  1325. min-width: 10%;
  1326. max-width: 100%;
  1327. .text-clamp {
  1328. // padding-right: 14rpx;
  1329. }
  1330. }
  1331. .u-icon {
  1332. position: absolute;
  1333. right: -6rpx;
  1334. top: 50%;
  1335. transform: translateY(-50%);
  1336. }
  1337. .u-transition {
  1338. margin-right: 18rpx;
  1339. }
  1340. .li-team-value {
  1341. display: flex;
  1342. align-items: center;
  1343. justify-content: flex-end;
  1344. line-height: 40rpx;
  1345. padding-right: 16rpx;
  1346. position: relative;
  1347. &+.li-team-value {
  1348. margin-top: 32rpx;
  1349. }
  1350. }
  1351. .value {
  1352. font-size: 22rpx;
  1353. font-weight: 400;
  1354. color: #666666;
  1355. }
  1356. .value2 {
  1357. font-size: 24rpx;
  1358. font-weight: bold;
  1359. color: #999;
  1360. margin-right: 3px;
  1361. &.r {
  1362. color: #666666;
  1363. }
  1364. }
  1365. .value1 {
  1366. font-size: 24rpx;
  1367. font-weight: bold;
  1368. color: #333;
  1369. &.r {
  1370. color: #666666;
  1371. }
  1372. }
  1373. }
  1374. }
  1375. .state-box {
  1376. position: absolute;
  1377. right: 0;
  1378. top: 50%;
  1379. transform: translateY(-50%);
  1380. min-width: 212rpx;
  1381. max-width: 212rpx;
  1382. display: flex;
  1383. align-items: center;
  1384. justify-content: center;
  1385. flex-direction: column;
  1386. font-size: 22rpx;
  1387. line-height: 30rpx;
  1388. font-weight: 400;
  1389. .status2 {
  1390. color: #999;
  1391. }
  1392. .status0 {
  1393. display: flex;
  1394. align-items: flex-end;
  1395. line-height: 1;
  1396. .down {
  1397. margin-right: 8rpx;
  1398. }
  1399. }
  1400. .down {
  1401. font-size: 28rpx;
  1402. font-weight: bold;
  1403. }
  1404. .match_live {
  1405. display: flex;
  1406. align-items: center;
  1407. justify-content: center;
  1408. width: 160rpx;
  1409. height: 50rpx;
  1410. background-color: #DC3C23;
  1411. border-radius: 40rpx;
  1412. font-size: 22rpx;
  1413. color: #fff;
  1414. line-height: 1;
  1415. font-weight: 400;
  1416. &+.match_live {
  1417. margin-top: 20rpx;
  1418. }
  1419. .icon {
  1420. width: 19rpx;
  1421. margin-right: 4px;
  1422. }
  1423. }
  1424. .scores {
  1425. color: #959DEE;
  1426. display: flex;
  1427. align-items: center;
  1428. font-weight: bold;
  1429. .radius {
  1430. width: 6rpx;
  1431. height: 6rpx;
  1432. border-radius: 50%;
  1433. background-color: #959DEE;
  1434. margin-right: 7rpx;
  1435. }
  1436. }
  1437. }
  1438. .ended {
  1439. font-size: 22rpx;
  1440. line-height: 30rpx;
  1441. font-weight: bold;
  1442. color: #999;
  1443. margin-top: 22rpx;
  1444. }
  1445. }
  1446. }
  1447. }
  1448. .skeleton {
  1449. background-color: #fff;
  1450. .list {
  1451. background-color: #fff;
  1452. border-bottom: 1px solid #F3F3F7;
  1453. &+.list {
  1454. margin-top: 20rpx;
  1455. }
  1456. .item-header {
  1457. background-color: #F3F3F7;
  1458. height: 80rpx;
  1459. }
  1460. .item-body {
  1461. padding: 6rpx 25rpx 0;
  1462. }
  1463. .item {
  1464. padding: 30rpx 13rpx 40rpx;
  1465. &+.item {
  1466. border-top: 1px solid #ccc;
  1467. }
  1468. .row {
  1469. display: flex;
  1470. align-items: center;
  1471. .left, .right {
  1472. height: 44rpx;
  1473. background-color: #F3F3F7;
  1474. }
  1475. .left {
  1476. width: 44rpx;
  1477. margin-right: 12rpx;
  1478. }
  1479. .right {
  1480. width: 423rpx;
  1481. }
  1482. &+.row {
  1483. margin-top: 20rpx;
  1484. }
  1485. }
  1486. }
  1487. }
  1488. }
  1489. .match_live_box {
  1490. background-color: #fff;
  1491. border-top-left-radius: 20rpx;
  1492. border-top-right-radius: 20rpx;
  1493. padding-top: 43rpx;
  1494. padding-bottom: 34rpx;
  1495. .item {
  1496. display: flex;
  1497. align-items: center;
  1498. justify-content: space-between;
  1499. line-height: 40rpx;
  1500. font-size: 28rpx;
  1501. font-weight: bold;
  1502. color: #333333;
  1503. padding: 19rpx 42rpx 19rpx 24rpx;
  1504. }
  1505. .radius {
  1506. display: flex;
  1507. align-items: center;
  1508. justify-content: center;
  1509. width: 32rpx;
  1510. height: 32rpx;
  1511. border-radius: 50%;
  1512. border: 3rpx solid #DC3C23;
  1513. }
  1514. .radius-active {
  1515. width: 16rpx;
  1516. height: 16rpx;
  1517. border-radius: 50%;
  1518. background-color: #DC3C23;
  1519. }
  1520. }
  1521. .tag_popup_box {
  1522. background-color: #fff;
  1523. border-top-left-radius: 20rpx;
  1524. border-top-right-radius: 20rpx;
  1525. position: relative;
  1526. padding-bottom: 130rpx;
  1527. .top {
  1528. display: flex;
  1529. align-items: center;
  1530. justify-content: space-between;
  1531. padding: 26rpx 39rpx 40rpx 36rpx;
  1532. .u-input {
  1533. flex: 1;
  1534. border: none;
  1535. height: 58rpx;
  1536. border-radius: 44rpx;
  1537. background-color: #F5F5F5;
  1538. box-sizing: border-box;
  1539. }
  1540. .left_img {
  1541. min-width: 19rpx;
  1542. max-width: 19rpx;
  1543. margin-right: 31rpx;
  1544. }
  1545. .close {
  1546. min-width: 28rpx;
  1547. max-width: 28rpx;
  1548. margin-left: 24rpx;
  1549. }
  1550. }
  1551. .list {
  1552. max-height: 50vh;
  1553. overflow-y: auto;
  1554. padding-left: 24rpx;
  1555. padding-right: 41rpx;
  1556. .li {
  1557. height: 75rpx;
  1558. display: flex;
  1559. align-items: center;
  1560. font-size: 24rpx;
  1561. color: #333;
  1562. font-weight: bold;
  1563. .img {
  1564. width: 34rpx;
  1565. height: 34rpx;
  1566. }
  1567. }
  1568. }
  1569. .no-tag-box {
  1570. padding-top: 170rpx;
  1571. padding-bottom: 300rpx;
  1572. display: flex;
  1573. align-items: center;
  1574. justify-content: center;
  1575. flex-direction: column;
  1576. .no {
  1577. display: block;
  1578. width: 164rpx;
  1579. margin-bottom: 37rpx;
  1580. }
  1581. .found {
  1582. line-height: 45rpx;
  1583. font-size: 32rpx;
  1584. font-weight: bold;
  1585. color: #333333;
  1586. margin-bottom: 12rpx;
  1587. }
  1588. .text {
  1589. height: 33rpx;
  1590. font-size: 24rpx;
  1591. font-weight: 400;
  1592. color: #999999;
  1593. }
  1594. }
  1595. .foot {
  1596. padding-top: 26rpx;
  1597. padding-bottom: 22rpx;
  1598. box-shadow: 0px -3px 8px 1px rgba(0,0,0,0.1);
  1599. line-height: 1;
  1600. box-sizing: border-box;
  1601. position: absolute;
  1602. bottom: 0;
  1603. left: 0;
  1604. right: 0;
  1605. background-color: #ffff;
  1606. z-index: 2;
  1607. }
  1608. .btn {
  1609. width: 232rpx;
  1610. height: 62rpx;
  1611. border-radius: 10rpx;
  1612. border: 1px solid #707070;
  1613. display: flex;
  1614. align-items: center;
  1615. justify-content: center;
  1616. font-size: 28rpx;
  1617. font-weight: 400;
  1618. color: #333333;
  1619. }
  1620. .btn1 {
  1621. width: 232rpx;
  1622. height: 62rpx;
  1623. border-radius: 10rpx;
  1624. border: 1px solid #DC3C23;
  1625. display: flex;
  1626. align-items: center;
  1627. justify-content: center;
  1628. font-size: 28rpx;
  1629. font-weight: 400;
  1630. color: #fff;
  1631. background-color: #DC3C23;
  1632. }
  1633. }
  1634. .no-data {
  1635. padding-top: 20vh;
  1636. .e_img {
  1637. display: block;
  1638. width: 160rpx;
  1639. margin: 0 auto;
  1640. }
  1641. .text {
  1642. color: #999;
  1643. font-size: 32rpx;
  1644. margin-top: 32rpx;
  1645. margin-bottom: 60rpx;
  1646. text-align: center;
  1647. }
  1648. .reset-box {
  1649. display: flex;
  1650. justify-content: center;
  1651. .btn {
  1652. border: 1px solid #DC3C23;
  1653. color: #DC3C23;
  1654. display: flex;
  1655. align-items: center;
  1656. justify-content: center;
  1657. padding: 0 30rpx;
  1658. height: 84rpx;
  1659. border-radius: 16rpx;
  1660. }
  1661. }
  1662. }
  1663. .scroll {
  1664. height: calc(100vh - 290rpx - var(--window-bottom));
  1665. }
  1666. .to-top {
  1667. position: fixed;
  1668. right: 24px;
  1669. bottom: 248rpx;
  1670. z-index: 5;
  1671. height: 40px;
  1672. width: 40px;
  1673. border-radius: 50%;
  1674. background-color: #1D2550;
  1675. color: #fff;
  1676. display: flex;
  1677. align-items: center;
  1678. justify-content: center;
  1679. &.up {
  1680. .u-icon {
  1681. transform: rotate(90deg);
  1682. }
  1683. }
  1684. &.down {
  1685. .u-icon {
  1686. transform: rotate(-90deg);
  1687. }
  1688. }
  1689. }
  1690. .news-install {
  1691. position: sticky;
  1692. bottom: var(--window-bottom);
  1693. z-index: 200;
  1694. }
  1695. </style>