index.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923
  1. <template>
  2. <view class="home">
  3. <view class="content">
  4. <Header @update:address="handleAddressUpdate"></Header>
  5. <view class="home-img">
  6. <image src="@/static/image/trade/jinsai-icon.png" mode="widthFix" />
  7. </view>
  8. <view class="home-btn-box">
  9. <view class="trade-num">奖池数量</view>
  10. <view class="image-num">
  11. <image src="@/static/image/trade/title-bg.png" mode="scaleToFill" />
  12. </view>
  13. </view>
  14. <view class="home-code">
  15. <view class="trade-border-box"> STT{{ (Number(gameList[2]?.prev_bonus) || 0).toFixed(6) }}</view>
  16. <view class="trade-border-num"
  17. >≈¥{{ ((Number(gameList[2]?.prev_bonus) || 0) * 7.2).toFixed(2) }}</view
  18. >
  19. </view>
  20. <view class="trade-img-box">
  21. <image src="@/static/image/trade/money-box.png" mode="aspectFit" />
  22. </view>
  23. <view class="card-item" style="width: 100%;">
  24. <view class="trade-process" :class="bgClass">
  25. <view
  26. :class="
  27. gameCheck == index
  28. ? 'trde-process-item-active'
  29. : 'trde-process-item'
  30. "
  31. v-for="(item, index) in gameList"
  32. :key="index"
  33. @click="selectGame(index, item)"
  34. >
  35. <view class="trade-game-name">{{ item?.title || '暂无赛程'}}</view>
  36. <view class="trade-game-time" v-if="item"
  37. >{{ dayjs(item?.date).format("MM/DD") }}-{{
  38. dayjs(item?.end_date).format("MM/DD")
  39. }}</view
  40. >
  41. </view>
  42. </view>
  43. <view class="trade-time-box" v-if="gameDetail">
  44. <view class="time-title">
  45. 距离 <text>{{ gameDetail.title }}赛程 竞赛结束 </text>还有
  46. </view>
  47. <up-count-down
  48. :time="
  49. dayjs(gameDetail.end_date).valueOf() - dayjs(new Date()).valueOf()
  50. "
  51. format="DD:HH:mm:ss"
  52. autoStart
  53. millisecond
  54. @change="onChange"
  55. >
  56. <view class="time-box-index">
  57. <view class="time__item"
  58. ><view class="time-box">{{ timeData.days }}</view> 天</view
  59. >
  60. <view class="time__item">
  61. <view class="time-box">{{
  62. timeData.hours > 10 ? timeData.hours : "0" + timeData.hours
  63. }}</view>
  64. 时</view
  65. >
  66. <view class="time__item"
  67. ><view class="time-box">
  68. {{ timeData.minutes }}
  69. </view>
  70. 分</view
  71. >
  72. <view class="time__item"
  73. ><view class="time-box">{{ timeData.seconds }}</view
  74. >秒</view
  75. >
  76. </view>
  77. </up-count-down>
  78. <view
  79. class="start-btn"
  80. @click="changeSign"
  81. :style="{ color: gameCheck == 2 || gameDetail.is_enroll? '#fff' : '' }">{{ gameCheck == 2 && !gameDetail.is_enroll ? "报名" : (gameDetail.is_enroll ? "已报名" : "未报名") }}</view
  82. >
  83. <view class="num-txt" v-if="gameCheck != 2"
  84. >奖池数量:<text>STT{{ (Number(gameDetail.bonus) || 0).toFixed(6) }}</text>
  85. </view>
  86. <view class="num-txt-small" v-if="gameCheck != 2"
  87. >≈¥{{ ((Number(gameDetail.bonus) || 0) * 7.2).toFixed(2) }}</view
  88. >
  89. </view>
  90. </view>
  91. <view class="game-play-name">赛程名次</view>
  92. <view class="game-list">
  93. <view class="game-list-item" v-for="(item, index) in gameRankList" :key="index">
  94. <view class="game-item-left">
  95. <view class="game-order-index">
  96. <image
  97. src="@/static/image/trade/one.png"
  98. v-if="index == 0"
  99. mode="scaleToFill"
  100. />
  101. <image
  102. src="@/static/image/trade/two.png"
  103. v-if="index == 1"
  104. mode="scaleToFill"
  105. />
  106. <image
  107. src="@/static/image/trade/three.png"
  108. v-if="index == 2"
  109. mode="scaleToFill"
  110. />
  111. <text v-if="index != 0 && index != 1 && index != 2">{{
  112. index + 1
  113. }}</text>
  114. </view>
  115. <view class="game-order-num">
  116. <view class="game-num-txt">
  117. <view>{{`${item.address.slice(0, 4)}...${item.address.slice(-4)}` }}</view>
  118. <view class="game-num-num">{{ gameDetail?.title }}</view>
  119. </view>
  120. <view class="game-num-txt" v-if="item.is_self && item.is_prize && gameCheck == 0">
  121. <view class="game-item-btn" @click="awardFun(item)">{{item.is_receive?'已领取':'领取'}}</view>
  122. </view>
  123. <view class="game-num-txt" v-else>
  124. <view>排名赢局</view>
  125. <view class="game-num-num">{{ item.score }}</view>
  126. </view>
  127. </view>
  128. </view>
  129. </view>
  130. </view>
  131. </view>
  132. <view class="fix-box">
  133. <view class="fix-item" @click="openGamePopup(1)">赛程规则</view>
  134. <view class="fix-item" @click="openGamePopup(2)">赛程名次</view>
  135. </view>
  136. <!-- 规则和名次 -->
  137. <up-popup
  138. :show="showGameMsg"
  139. :round="10"
  140. mode="center"
  141. :closeOnClickOverlay="true"
  142. @close="showGameMsg = false"
  143. >
  144. <view class="show-game-msg">
  145. <image
  146. class="close-img"
  147. src="@/static/image/home/alert-pay-close.png"
  148. mode="scaleToFill"
  149. @click="showGameMsg = false"
  150. />
  151. <view class="show-game-title" v-if="showType==2">
  152. <text>{{ gameDetail.title }}赛程</text>竞赛消息
  153. </view>
  154. <view class="show-game-title" v-if="showType==1">
  155. 竞赛规则
  156. </view>
  157. <!-- 名次 -->
  158. <view class="show-game-content" v-if="showType==2">
  159. <view class="game-msg">1:赛程开始时间:{{ gameDetail.date }} 00:00:00</view>
  160. <view class="game-msg"
  161. >2:赛程结束时间:{{ gameDetail.end_date }} 23:59:59</view
  162. >
  163. <view class="game-msg"
  164. >3:参与场次:<text>0场;</text>输:<text>0局;</text>赢:<text
  165. >0局;</text
  166. ></view
  167. >
  168. <view class="game-msg">4:排名赢局:<text>0局</text></view>
  169. <view class="desc-title">注意:</view>
  170. <view class="dest-item">①: 当期赛程信息可能存在延迟,仅供参考;</view>
  171. <view class="dest-item"
  172. >②:如当期赛程奖励未在有效期内领取,将视为放弃;</view
  173. >
  174. <view class="dest-item"
  175. >③:赢局次数小于等于0的地址参与排名,但没有奖励分配;</view
  176. >
  177. <view class="dest-item" style="color: red"
  178. >④:每场赛程中相同地址频繁对战,场次将不作为有效局数;
  179. </view>
  180. <view class="dest-item" style="color: red"
  181. >⑤:对于恶意刷单地址,平台将永久封禁账号;</view
  182. >
  183. </view>
  184. <!-- 规则 -->
  185. <view class="show-game-content" v-if="showType==1">
  186. <view class="game-msg">1: 赛程报名截止时间:每期赛程开始前</view>
  187. <view class="game-msg"
  188. >2: 赛程奖励结算时间:每期赛程结束后(约需要1-30分钟)</view
  189. >
  190. <view class="game-msg"
  191. >3: 赛程奖励领取时间:每期赛程结束结算完成后</view
  192. >
  193. <view class="game-msg"
  194. >4:赛程奖励失效时间:当期赛程结束后,下期赛程结束前</view
  195. >
  196. <view class="game-msg"
  197. >5:赛程奖励规则: 当期奖池金额</view
  198. >
  199. <view class="dest-item" style="color: red;font-size: 24rpx;" v-for="(item,i) in gameDetail?.rules" :key="i">
  200. <text>{{ i == 0?'①':i == 1?'②':'③' }}</text>:{{item.rule}}
  201. </view>
  202. <view class="desc-title">注意:</view>
  203. <view class="dest-item">①: 如当期赛程奖励未在有效期内领取,将视为放弃;</view>
  204. <view class="dest-item"
  205. >②:赢局次数小于等于0的地址参与排名,但没有奖励分配;</view
  206. >
  207. <view class="dest-item" style="color:red;"
  208. >③:每场赛程中相同地址频繁对战,场次将不作为有效局数;</view
  209. >
  210. <view class="dest-item" style="color:red;"
  211. >④:对于恶意刷单地址,平台将永久封禁账号;</view
  212. >
  213. </view>
  214. <view class="show-game-bottom">
  215. <view class="show-game-btn" @click="showGameMsg = false">关闭</view>
  216. </view>
  217. </view>
  218. </up-popup>
  219. <!-- 报名 -->
  220. <up-popup
  221. :show="showGameBm"
  222. :round="10"
  223. mode="center"
  224. :closeOnClickOverlay="true"
  225. @close="showGameBm = false"
  226. >
  227. <view class="show-game-msg" style="height: 40vh">
  228. <image
  229. class="close-img"
  230. src="@/static/image/home/alert-pay-close.png"
  231. mode="scaleToFill"
  232. @click="showGameBm = false"
  233. />
  234. <view class="show-game-title"> <text>赛程</text>报名 </view>
  235. <view class="show-game-content">
  236. <view class="desc-title" style="color: red">报名方式①:</view>
  237. <view class="game-msg" style="font-weight: 400"
  238. >消耗 <text style="color: #d4ac27">{{entry_fee}} STT</text> 等值 WGT:</view
  239. >
  240. <view class="game-msg"
  241. >≈<text>{{wgt_price}}</text>WGT<text
  242. style="color: #d4ac27; font-size: 20rpx"
  243. >(钱包扣除)</text
  244. ></view
  245. >
  246. <view class="dest-item" style="color: #aaa">(WGT钱包余额{{ (Number(WGTbalance) || 0).toFixed(6) }})</view>
  247. <view class="desc-title" style="color: red">报名方式②:</view>
  248. <view class="game-msg"
  249. >消耗{{entry_fee}} STT
  250. <text style="color: #d4ac27; font-size: 20rpx"
  251. >(钱包扣除)</text
  252. ></view
  253. >
  254. <view class="dest-item" style="color: #aaa">(STT钱包余额{{ (Number(STTbalance) || 0).toFixed(6) }})</view>
  255. </view>
  256. <view class="show-game-bottom">
  257. <view class="show-game-btn-wgt" @click="changeWGT">WGT报名</view>
  258. <view class="show-game-btn-stt" @click="changeSTT">STT报名</view>
  259. </view>
  260. </view>
  261. </up-popup>
  262. </view>
  263. </template>
  264. <script setup>
  265. import { ref, onMounted,computed, reactive } from "vue";
  266. import Header from "@/components/Header";
  267. import { sendSingleReward,WGTForToken,STTForToken,getBalance } from "@/utils/web.js";
  268. import { matchList, matchRank, matchInfo,verifyEnroll,matchEnroll,userPrize,claimPrize } from "@/api/game";
  269. import dayjs from "dayjs";
  270. const timeData = ref({});
  271. const onChange = (e) => {
  272. timeData.value = e;
  273. };
  274. const walletAddress = ref('');
  275. const gameList = ref([]);
  276. const gameRankList = ref([]);
  277. const gameDetail = ref({});
  278. const gameCheck = ref(1);//选中tab
  279. const showGameBm = ref(false);
  280. const WGTbalance = ref(0);
  281. const STTbalance = ref(0);
  282. const entry_fee = ref(0);
  283. const wgt_price = ref(0);
  284. const privateKey = ref('');
  285. // const privateKey = "0x4553077da5d773773dad0511c6e5d33142ae2c1bd05a3a8a4a7becbc0d23d9b5";//H5
  286. const bgClass = computed(() => {
  287. if (gameCheck.value === 0) return 'bg1';
  288. if (gameCheck.value === 1) return 'bg2';
  289. return 'bg3';
  290. });
  291. const handleAddressUpdate = (addr) => {
  292. privateKey.value = window.android.getPrivateKey();//app
  293. walletAddress.value = addr;
  294. getGameMatchList();
  295. getnum(privateKey.value);
  296. };
  297. // 获取游戏赛事列表(三个tab)
  298. const getGameMatchList = async (type = true) => {
  299. let params = {
  300. dapp_id: 15,
  301. address:walletAddress.value
  302. };
  303. let res = await matchList(params);
  304. if (res.status == 200) {
  305. gameList.value = res.data;
  306. if(type){
  307. gameDetail.value = res.data[1];
  308. getGameRank();
  309. }else{
  310. gameDetail.value = res.data[2];
  311. }
  312. }
  313. };
  314. // 查询游戏赛事排名
  315. const getGameRank = async () => {
  316. let params = {
  317. dapp_id: 15,
  318. address:walletAddress.value
  319. };
  320. let res = await matchRank(params);
  321. if (res.status == 200) {
  322. gameRankList.value = res.data;
  323. }
  324. };
  325. // 切换tab
  326. const selectGame = (value, item) => {
  327. gameCheck.value = value;
  328. gameDetail.value = item;
  329. getGameRank();
  330. };
  331. // 游戏规则弹出框
  332. const showGameMsg = ref(false);
  333. const showType=ref(0);
  334. const openGamePopup = (value) => {
  335. showGameMsg.value = true;
  336. showType.value=value;
  337. };
  338. // 获取余额
  339. const getnum = async (privateKey) =>{
  340. try {
  341. WGTbalance.value = await getBalance(privateKey,'wgt');
  342. STTbalance.value = await getBalance(privateKey,'stt');
  343. }catch(error){
  344. console.log(error)
  345. }
  346. }
  347. //校验报名
  348. const changeSign = async () =>{
  349. if (gameCheck.value != 2 || gameDetail.value?.is_enroll) return;
  350. let res = await verifyEnroll({dapp_id:15,match_id:gameDetail.value?.id,address:walletAddress.value});
  351. if (res.status == 200) {
  352. entry_fee.value = Number(res.data.entry_fee).toFixed(2);
  353. wgt_price.value = Number(res.data.format?.wgt_price).toFixed(4);
  354. showGameBm.value = true;
  355. }
  356. }
  357. // 报名
  358. const getMatchEnroll = async () =>{
  359. let res = await matchEnroll({dapp_id:15,match_id:gameList.value[gameCheck.value]?.id,address:walletAddress.value});
  360. if (res.status == 200) {
  361. uni.hideLoading()
  362. uni.showToast({
  363. title: '报名成功',
  364. icon: 'none',
  365. duration: 1000
  366. })
  367. getGameMatchList(false);
  368. }else{
  369. uni.hideLoading()
  370. }
  371. }
  372. const changeWGT = async () => {
  373. await handleTokenSignUp(WGTForToken, wgt_price.value);
  374. };
  375. const changeSTT = async () => {
  376. await handleTokenSignUp(STTForToken, entry_fee.value);
  377. };
  378. const handleTokenSignUp = async (signUpFn, price) => {
  379. showGameBm.value = false;
  380. uni.showLoading({
  381. title: '报名中...',
  382. mask: true
  383. });
  384. try {
  385. const result = await signUpFn(privateKey.value, price);
  386. if (result.status === "success") {
  387. await getMatchEnroll();
  388. } else {
  389. uni.hideLoading();
  390. uni.showToast({
  391. title: result.message || "报名失败",
  392. icon: 'none',
  393. duration: 5000
  394. });
  395. }
  396. } catch (error) {
  397. uni.hideLoading();
  398. uni.showToast({
  399. title: error.message || "报名失败",
  400. icon: 'none',
  401. duration: 5000
  402. });
  403. }
  404. };
  405. //查询用户奖金信息
  406. const awardFun = async (item) => {
  407. if(item.is_receive) return;
  408. let res = await userPrize({dapp_id:15,match_id:gameDetail.value?.id,address:walletAddress.value});
  409. if (res.status == 200) {
  410. if(!res.data.prize_money){
  411. uni.showToast({
  412. title: '正在结算中!',
  413. icon: 'none',
  414. duration: 1000
  415. })
  416. return;
  417. };
  418. getsendSingleReward(res.data.prize_money)
  419. }
  420. };
  421. // 领取用户奖金
  422. const getClaimPrize = async () =>{
  423. let res = await claimPrize({dapp_id:15,match_id:gameDetail.value?.id,address:walletAddress.value});
  424. if (res.status == 200) {
  425. uni.hideLoading();
  426. uni.showToast({
  427. title: '领取成功',
  428. icon: 'none',
  429. duration: 1000
  430. })
  431. getGameRank()
  432. }
  433. }
  434. const getsendSingleReward = async (prize_money) =>{
  435. uni.showLoading({
  436. title: '领取中...',
  437. mask: true
  438. });
  439. try {
  440. const result = await sendSingleReward(privateKey.value,prize_money);
  441. if (result.status === "success") {
  442. await getClaimPrize();
  443. }else{
  444. uni.hideLoading();
  445. uni.showToast({
  446. title: result.message || "领取失败",
  447. icon: 'none',
  448. duration: 5000
  449. });
  450. }
  451. } catch (error) {
  452. uni.hideLoading();
  453. uni.showToast({
  454. title: error.message || "领取失败",
  455. icon: 'none',
  456. duration: 5000
  457. });
  458. }
  459. }
  460. // onMounted(async () => {
  461. // });
  462. </script>
  463. <style lang="scss" scoped>
  464. .home {
  465. position: absolute;
  466. top: 0;
  467. bottom: 0;
  468. right: 0;
  469. left: 0;
  470. overflow-y: auto;
  471. .fix-box {
  472. position: fixed;
  473. right: 0;
  474. z-index: 99;
  475. top: 258rpx;
  476. .fix-item {
  477. border-radius: 40rpx 0 0 40rpx;
  478. background-color: #734210;
  479. color: #fff;
  480. text-align: center;
  481. padding: 6rpx 24rpx;
  482. box-sizing: border-box;
  483. font-size: 26rpx;
  484. margin-bottom: 12rpx;
  485. }
  486. }
  487. }
  488. .content {
  489. display: flex;
  490. flex-direction: column;
  491. align-items: center;
  492. width: 100%;
  493. min-height: 100%;
  494. padding: 32rpx;
  495. // padding-top: 116rpx;
  496. padding-top: 168rpx;
  497. box-sizing: border-box;
  498. background-image: url("@/static/image/home/page-bg.jpg");
  499. // background: url('../../static/image/home/page-bg.jpg');
  500. background-size: 100%;
  501. background-position: 0 0;
  502. background-repeat: no-repeat;
  503. .home-img {
  504. width: 100%;
  505. display: flex;
  506. justify-content: center;
  507. align-items: center;
  508. image {
  509. width: 154rpx;
  510. height: 154rpx;
  511. }
  512. }
  513. .home-btn-box {
  514. display: flex;
  515. justify-content: center;
  516. align-items: center;
  517. width: 100%;
  518. position: relative;
  519. .trade-num {
  520. font-size: 32rpx;
  521. text-align: center;
  522. color: #d4ac27;
  523. background: -webkit-gradient(
  524. linear,
  525. left top,
  526. left bottom,
  527. from(#fffbe1),
  528. to(#d4ac27)
  529. );
  530. background: linear-gradient(180deg, #fffbe1 0, #d4ac27);
  531. -webkit-background-clip: text;
  532. -webkit-text-fill-color: transparent;
  533. font-weight: 700;
  534. }
  535. .image-num {
  536. position: absolute;
  537. left: 0;
  538. right: 0;
  539. bottom: 0;
  540. top: 0;
  541. display: flex;
  542. justify-content: center;
  543. align-items: center;
  544. image {
  545. width: 208rpx;
  546. height: 40rpx;
  547. }
  548. }
  549. }
  550. .home-code {
  551. margin: 24rpx 0;
  552. width: 100%;
  553. .trade-border-box {
  554. width: 520rpx;
  555. height: 100rpx;
  556. margin: auto;
  557. background-image: url("@/static/image/trade/border-jinsai.png");
  558. background-size: 100% 100%;
  559. background-position: center center;
  560. background-repeat: no-repeat;
  561. display: flex;
  562. justify-content: center;
  563. align-items: center;
  564. font-size: 36rpx;
  565. color: #fff;
  566. }
  567. .trade-border-num {
  568. text-align: center;
  569. color: #fff;
  570. font-size: 32rpx;
  571. }
  572. }
  573. .trade-img-box {
  574. width: 100%;
  575. height: 384rpx;
  576. image {
  577. width: 100%;
  578. height: 100%;
  579. }
  580. }
  581. .bg1{
  582. background-image: url("@/static/image/trade/bg1.png");
  583. }
  584. .bg2{
  585. background-image: url("@/static/image/trade/bg2.png");
  586. }
  587. .bg3{
  588. background-image: url("@/static/image/trade/bg3.png");
  589. }
  590. .trade-process {
  591. height: 131rpx;
  592. width: 100%;
  593. background-position: center center;
  594. background-size: 100% 100%;
  595. background-repeat: no-repeat;
  596. display: flex;
  597. justify-content: space-between;
  598. align-items: center;
  599. // .trde-process-item {
  600. // width: 100%;
  601. // height: 100%;
  602. // color: #4C3F2E;
  603. // display: flex;
  604. // flex-direction: column;
  605. // justify-content: center;
  606. // align-items: center;
  607. // text-align: center;
  608. // .trade-game-name {
  609. // font-size: 28rpx;
  610. // font-weight: 600;
  611. // }
  612. // .trade-game-time {
  613. // font-size: 24rpx;
  614. // margin-top: 12rpx;
  615. // }
  616. // }
  617. .trde-process-item {
  618. width: 100%;
  619. height: 100%;
  620. display: flex;
  621. flex-direction: column;
  622. text-align: center;
  623. justify-content: center;
  624. align-items: center;
  625. color: #9c9c9c;
  626. overflow: hidden;
  627. padding-left: 36rpx;
  628. box-sizing: border-box;
  629. .trade-game-name {
  630. overflow: hidden;
  631. text-overflow: ellipsis;
  632. white-space: nowrap;
  633. width: 100%;
  634. font-size: 28rpx;
  635. font-weight: 600;
  636. }
  637. .trade-game-time {
  638. font-size: 24rpx;
  639. margin-top: 12rpx;
  640. }
  641. }
  642. .trde-process-item-active {
  643. width: 100%;
  644. height: 100%;
  645. display: flex;
  646. flex-direction: column;
  647. justify-content: center;
  648. text-align: center;
  649. align-items: center;
  650. color: #493D2A;
  651. overflow: hidden;
  652. padding-left: 36rpx;
  653. box-sizing: border-box;
  654. .trade-game-name {
  655. overflow: hidden;
  656. text-overflow: ellipsis;
  657. white-space: nowrap;
  658. width: 100%;
  659. font-size: 28rpx;
  660. font-weight: 600;
  661. }
  662. .trade-game-time {
  663. font-size: 24rpx;
  664. margin-top: 12rpx;
  665. }
  666. }
  667. }
  668. .trade-time-box {
  669. margin: 24rpx 0;
  670. font-size: 28rpx;
  671. color: #a29481;
  672. background: #53473a;
  673. // background: #6E573A;
  674. border-radius: 30rpx;
  675. width: 100%;
  676. padding: 24rpx;
  677. box-sizing: border-box;
  678. display: flex;
  679. flex-direction: column;
  680. align-items: center;
  681. .time-title {
  682. text {
  683. color: rgb(255, 214, 0);
  684. font-weight: 600;
  685. }
  686. }
  687. .time-box-index {
  688. margin-top: 13rpx;
  689. display: flex;
  690. justify-content: center;
  691. align-items: center;
  692. .time__item {
  693. display: flex;
  694. justify-content: center;
  695. align-items: center;
  696. .time-box {
  697. width: 70rpx;
  698. border-radius: 4rpx;
  699. height: 56rpx;
  700. background-color: #6b5d4b;
  701. color: #f3cf9b;
  702. margin: 0 10rpx;
  703. display: flex;
  704. justify-content: center;
  705. align-items: center;
  706. }
  707. }
  708. }
  709. .start-btn {
  710. height: 84rpx;
  711. width: 190rpx;
  712. background-image: url("@/static/image/trade/weibaoming-bg.png");
  713. background-position: center center;
  714. background-size: 100% 100%;
  715. background-repeat: no-repeat;
  716. display: flex;
  717. justify-content: center;
  718. align-items: center;
  719. margin: 12rpx 0;
  720. }
  721. .num-txt {
  722. text {
  723. color: rgb(255, 214, 0);
  724. font-weight: 600;
  725. }
  726. }
  727. .num-txt-small {
  728. color: #fff;
  729. font-size: 22rpx;
  730. }
  731. }
  732. .game-play-name {
  733. width: 342rpx;
  734. height: 64rpx;
  735. margin-top: 24rpx;
  736. background-image: url("@/static/image/trade/trade-title-bg.png");
  737. background-position: center center;
  738. background-size: 100% 100%;
  739. background-repeat: no-repeat;
  740. display: flex;
  741. justify-content: center;
  742. align-items: center;
  743. color: #f5b65f;
  744. font-size: 26rpx;
  745. font-weight: 700;
  746. }
  747. .game-list {
  748. width: 100%;
  749. .game-list-item {
  750. display: flex;
  751. justify-content: space-between;
  752. align-items: center;
  753. padding: 24rpx 0;
  754. box-sizing: border-box;
  755. border-bottom: 2rpx solid #3b3630;
  756. .game-item-left {
  757. display: flex;
  758. justify-content: center;
  759. align-items: center;
  760. width: 100%;
  761. .game-order-index {
  762. flex-shrink: 0;
  763. width: 64rpx;
  764. height: 64rpx;
  765. margin-right: 24rpx;
  766. display: flex;
  767. justify-content: center;
  768. align-items: center;
  769. font-size: 36rpx;
  770. color: #f2ce9a;
  771. font-weight: 700;
  772. image {
  773. width: 100%;
  774. height: 100%;
  775. }
  776. }
  777. .game-order-num {
  778. flex: 1;
  779. width: 100%;
  780. display: flex;
  781. justify-content: space-between;
  782. align-items: center;
  783. .game-num-txt {
  784. font-size: 28rpx;
  785. color: #f2ce9a;
  786. font-weight: 700;
  787. }
  788. .game-num-num {
  789. margin-top: 10rpx;
  790. font-size: 28rpx;
  791. color: #fff;
  792. display: flex;
  793. justify-content: space-between;
  794. align-items: center;
  795. }
  796. }
  797. }
  798. .game-item-btn {
  799. width: 178rpx;
  800. height: 54rpx;
  801. background: url("@/static/image/trade/lingqu-btn-bg.png") 50% no-repeat;
  802. background-size: 100% 100%;
  803. display: block;
  804. color: #f7dbb1;
  805. font-size: 28rpx;
  806. display: flex;
  807. justify-content: center;
  808. align-items: center;
  809. }
  810. }
  811. }
  812. }
  813. .show-game-msg {
  814. background: #000;
  815. border-radius: 25rpx;
  816. padding: 30rpx;
  817. box-sizing: border-box;
  818. width: 80vw;
  819. height: 60vh;
  820. display: flex;
  821. flex-direction: column;
  822. position: relative;
  823. .close-img {
  824. width: 50rpx;
  825. height: 50rpx;
  826. position: absolute;
  827. right: 0;
  828. top: 0;
  829. }
  830. .show-game-title {
  831. flex-shrink: 0;
  832. font-size: 32rpx;
  833. font-weight: 700;
  834. margin-bottom: 35rpx;
  835. text-align: center;
  836. color: #fff;
  837. text {
  838. color: rgb(255, 214, 0);
  839. margin-right: 10rpx;
  840. }
  841. }
  842. .show-game-content {
  843. padding-bottom: 24rpx;
  844. box-sizing: border-box;
  845. overflow-y: auto;
  846. flex: 1;
  847. font-size: 28rpx;
  848. font-weight: 700;
  849. color: #fff;
  850. .game-msg {
  851. color: #f1dc00;
  852. font-size: 26rpx;
  853. margin-bottom: 6rpx;
  854. text {
  855. color: #fff;
  856. font-weight: 600;
  857. }
  858. }
  859. .desc-title {
  860. padding: 12rpx 0;
  861. box-sizing: border-box;
  862. }
  863. .dest-item {
  864. font-weight: 400;
  865. margin-bottom: 6rpx;
  866. }
  867. }
  868. .show-game-bottom {
  869. width: 100%;
  870. flex-shrink: 0;
  871. display: flex;
  872. justify-content: space-between;
  873. align-items: center;
  874. gap: 24rpx;
  875. .show-game-btn {
  876. width: 100%;
  877. background: linear-gradient(90deg, rgba(0, 179, 170, 0.7) 0, #00b3aa);
  878. color: #fff;
  879. height: 80rpx;
  880. border-radius: 8rpx;
  881. display: flex;
  882. justify-content: center;
  883. align-items: center;
  884. }
  885. .show-game-btn-wgt {
  886. width: 100%;
  887. background: linear-gradient(90deg, #ef602c83 0, #ef612c);
  888. color: #fff;
  889. height: 80rpx;
  890. border-radius: 8rpx;
  891. display: flex;
  892. justify-content: center;
  893. align-items: center;
  894. }
  895. .show-game-btn-stt {
  896. width: 100%;
  897. background: linear-gradient(90deg, #0190c470 0, #0191c4);
  898. color: #fff;
  899. height: 80rpx;
  900. border-radius: 8rpx;
  901. display: flex;
  902. justify-content: center;
  903. align-items: center;
  904. // EF612C
  905. }
  906. }
  907. }
  908. ::v-deep .u-popup__content {
  909. background: none !important;
  910. }
  911. </style>