Browse Source

feat:钱包数据按照要求对接

jianghaili 3 days ago
parent
commit
74cbcff368
1 changed files with 81 additions and 55 deletions
  1. 81 55
      src/pages/trade/index.vue

+ 81 - 55
src/pages/trade/index.vue

@@ -17,8 +17,8 @@
         </view>
       </view>
       <view class="home-code">
-        <view class="trade-border-box"> ${{ gameDetail.counts }}</view>
-        <view class="trade-border-num">≈¥{{ gameDetail.bonus }}</view>
+        <view class="trade-border-box"> ${{ gameList[2]?.bonus || 0 }}</view>
+        <view class="trade-border-num">≈¥{{ gameList[2]?.bonus*7.2 || 0 }}</view>
       </view>
       <view class="trade-img-box">
         <image src="@/static/image/trade/money-box.png" mode="aspectFit" />
@@ -77,11 +77,18 @@
             >
           </view>
         </up-count-down>
-        <view class="start-btn" @click="showGameBm=true">未报名</view>
-        <view class="num-txt"
-          >奖池数量:<text>${{ gameDetail.counts }}</text>
+        <view
+          class="start-btn"
+          @click="gameCheck == 2 ? (showGameBm = true) : ''"
+          :style="{ color: gameCheck == 2 ? '#fff' : '' }"
+          >{{ gameCheck == 2 ? "报名" : "未报名" }}</view
+        >
+        <view class="num-txt" v-if="gameCheck != 2"
+          >奖池数量:<text>${{ gameDetail.bonus }}</text>
         </view>
-        <view class="num-txt-small">≈¥{{ gameDetail.bonus }}</view>
+        <view class="num-txt-small" v-if="gameCheck != 2"
+          >≈¥{{ gameDetail.bonus*7.2 }}</view
+        >
       </view>
       <view class="game-play-name">赛程名次</view>
       <view class="game-list">
@@ -130,29 +137,38 @@
     >
       <view class="show-game-msg">
         <image
-        class="close-img"
+          class="close-img"
           src="@/static/image/home/alert-pay-close.png"
           mode="scaleToFill"
-           @click="showGameMsg=false"
+          @click="showGameMsg = false"
         />
-        <view class="show-game-title">
-          <text>赛程</text>竞赛消息
-        </view>
+        <view class="show-game-title"> <text>{{gameDetail.title}}赛程</text>竞赛消息 </view>
         <view class="show-game-content">
-          <view class="game-msg">1:赛程开始时间:</view>
-          <view class="game-msg">2:赛程结束时间:</view>
-          <view class="game-msg">3:参与场次:<text>0场;</text>输:<text>0局;</text>赢:<text>0局;</text></view>
+          <view class="game-msg">1:赛程开始时间:{{ gameDetail.date }}</view>
+          <view class="game-msg">2:赛程结束时间:{{ gameDetail.end_date }}</view>
+          <view class="game-msg"
+            >3:参与场次:<text>0场;</text>输:<text>0局;</text>赢:<text
+              >0局;</text
+            ></view
+          >
           <view class="game-msg">4:排名赢局:<text>0局</text></view>
           <view class="desc-title">注意:</view>
           <view class="dest-item">①: 当期赛程信息可能存在延迟,仅供参考;</view>
-          <view class="dest-item">②:如当期赛程奖励未在有效期内领取,将视为放弃;</view>
-          <view class="dest-item">③:赢局次数小于等于0的地址参与排名,但没有奖励分配;</view>
-          <view class="dest-item" style="color:red;">④:每场赛程中相同地址频繁对战,场次将不作为有效局数; </view>
-          <view class="dest-item" style="color:red;">⑤:对于恶意刷单地址,平台将永久封禁账号;</view>
-
+          <view class="dest-item"
+            >②:如当期赛程奖励未在有效期内领取,将视为放弃;</view
+          >
+          <view class="dest-item"
+            >③:赢局次数小于等于0的地址参与排名,但没有奖励分配;</view
+          >
+          <view class="dest-item" style="color: red"
+            >④:每场赛程中相同地址频繁对战,场次将不作为有效局数;
+          </view>
+          <view class="dest-item" style="color: red"
+            >⑤:对于恶意刷单地址,平台将永久封禁账号;</view
+          >
         </view>
         <view class="show-game-bottom">
-          <view class="show-game-btn" @click="showGameMsg=false">关闭</view>
+          <view class="show-game-btn" @click="showGameMsg = false">关闭</view>
         </view>
       </view>
     </up-popup>
@@ -163,24 +179,34 @@
       :closeOnClickOverlay="true"
       @close="showGameBm = false"
     >
-      <view class="show-game-msg" style="height:40vh;">
+      <view class="show-game-msg" style="height: 40vh">
         <image
-        class="close-img"
+          class="close-img"
           src="@/static/image/home/alert-pay-close.png"
           mode="scaleToFill"
-           @click="showGameBm=false"
+          @click="showGameBm = false"
         />
-        <view class="show-game-title">
-          <text>赛程</text>报名
-        </view>
+        <view class="show-game-title"> <text>赛程</text>报名 </view>
         <view class="show-game-content">
-          <view class="desc-title" style="color:red;">报名方式①:</view>
-          <view class="game-msg" style="font-weight:400;">消耗 <text style="color:#d4ac27;">0.25U</text> 等值WGT:</view>
-          <view class="game-msg">≈<text>0.0012</text>WGT<text style="color:#d4ac27;font-size: 20rpx;">(钱包扣除)</text></view>
-          <view class="dest-item" style="color: #aaa;">(WGT钱包余额0.0002)</view>
-          <view class="desc-title" style="color:red;">报名方式②:</view>
-          <view class="game-msg">消耗0.25U <text style="color:#d4ac27; font-size:20rpx;">(钱包扣除)</text></view>
-          <view class="dest-item" style="color: #aaa;">(STT钱包余额0.0002)</view>
+          <view class="desc-title" style="color: red">报名方式①:</view>
+          <view class="game-msg" style="font-weight: 400"
+            >消耗 <text style="color: #d4ac27">0.25U</text> 等值WGT:</view
+          >
+          <view class="game-msg"
+            >≈<text>0.0012</text>WGT<text
+              style="color: #d4ac27; font-size: 20rpx"
+              >(钱包扣除)</text
+            ></view
+          >
+          <view class="dest-item" style="color: #aaa">(WGT钱包余额0.0002)</view>
+          <view class="desc-title" style="color: red">报名方式②:</view>
+          <view class="game-msg"
+            >消耗0.25U
+            <text style="color: #d4ac27; font-size: 20rpx"
+              >(钱包扣除)</text
+            ></view
+          >
+          <view class="dest-item" style="color: #aaa">(STT钱包余额0.0002)</view>
         </view>
         <view class="show-game-bottom">
           <view class="show-game-btn-wgt">WGT报名</view>
@@ -271,7 +297,8 @@ const getGameInfo = async (id) => {
 const gameCheck = ref(1);
 const selectGame = (value, item) => {
   gameCheck.value = value;
-  getGameInfo(item.id);
+  gameDetail.value = item;
+  // getGameInfo(item.id);
   getGameRank(item.id);
 };
 // 游戏规则弹出框
@@ -279,10 +306,10 @@ const showGameMsg = ref(false);
 const openGamePopup = () => {
   showGameMsg.value = true;
 };
-const showGameBm=ref(false)
-const openBmPopup=()=>{
-  showGameBm.value=true;
-}
+const showGameBm = ref(false);
+const openBmPopup = () => {
+  showGameBm.value = true;
+};
 </script>
   
   <style lang="scss" scoped>
@@ -623,7 +650,7 @@ const openBmPopup=()=>{
   display: flex;
   flex-direction: column;
   position: relative;
-  .close-img{
+  .close-img {
     width: 50rpx;
     height: 50rpx;
     position: absolute;
@@ -637,7 +664,7 @@ const openBmPopup=()=>{
     margin-bottom: 35rpx;
     text-align: center;
     color: #fff;
-    text{
+    text {
       color: rgb(255, 214, 0);
       margin-right: 10rpx;
     }
@@ -650,20 +677,20 @@ const openBmPopup=()=>{
     font-size: 28rpx;
     font-weight: 700;
     color: #fff;
-    .game-msg{
+    .game-msg {
       color: #f1dc00;
       font-size: 26rpx;
       margin-bottom: 6rpx;
-      text{
+      text {
         color: #fff;
         font-weight: 600;
       }
     }
-    .desc-title{
+    .desc-title {
       padding: 12rpx 0;
       box-sizing: border-box;
     }
-    .dest-item{
+    .dest-item {
       font-weight: 400;
       margin-bottom: 6rpx;
     }
@@ -675,41 +702,40 @@ const openBmPopup=()=>{
     justify-content: space-between;
     align-items: center;
     gap: 24rpx;
-    .show-game-btn{
+    .show-game-btn {
       width: 100%;
-      background: linear-gradient(90deg, rgba(0, 179, 170, .7) 0, #00b3aa);
+      background: linear-gradient(90deg, rgba(0, 179, 170, 0.7) 0, #00b3aa);
       color: #fff;
       height: 80rpx;
-      border-radius:8rpx ;
+      border-radius: 8rpx;
       display: flex;
       justify-content: center;
       align-items: center;
     }
-    .show-game-btn-wgt{
+    .show-game-btn-wgt {
       width: 100%;
-      background: linear-gradient(90deg, #ef602c83 0, #EF612C);
+      background: linear-gradient(90deg, #ef602c83 0, #ef612c);
       color: #fff;
       height: 80rpx;
-      border-radius:8rpx ;
+      border-radius: 8rpx;
       display: flex;
       justify-content: center;
       align-items: center;
     }
-    .show-game-btn-stt{
+    .show-game-btn-stt {
       width: 100%;
-      background: linear-gradient(90deg, #0190c470 0, #0191C4);
+      background: linear-gradient(90deg, #0190c470 0, #0191c4);
       color: #fff;
       height: 80rpx;
-      border-radius:8rpx ;
+      border-radius: 8rpx;
       display: flex;
       justify-content: center;
       align-items: center;
       // EF612C
     }
-
   }
 }
-::v-deep .u-popup__content{
+::v-deep .u-popup__content {
   background: none !important;
 }
 </style>