Przeglądaj źródła

feat:竞赛界面静态页面

jianghaili 4 dni temu
rodzic
commit
1266703ee5

+ 1 - 1
src/pages.json

@@ -73,7 +73,7 @@
 				"pagePath": "pages/trade/index",
 				"iconPath": "static/image/tabbar/jiaoyi.png",
 				"selectedIconPath": "static/image/tabbar/jiaoyi-check.png",
-				"text": "交易"
+				"text": "竞赛"
 			},
 			{
 				"pagePath": "pages/node/index",

+ 326 - 0
src/pages/game/index.vue

@@ -0,0 +1,326 @@
+<template>
+    <view class="home">
+      <view class="content">
+        <Header>
+          <template #title
+            >ACC <span style="padding: 0 12rpx">|</span>连接钱包</template
+          >
+        </Header>
+        <view class="home-img">
+          <image src="@/static/image/home/home-banner.png" mode="widthFix" />
+        </view>
+        <view class="home-btn-box">
+          <view class="home-btn-item">资产兑换</view>
+          <view class="home-btn-item">竞赛</view>
+        </view>
+        <view class="home-code">
+          <view class="home-url">
+            <view class="url">http://www.wgt.cool</view>
+            <view class="btn">分享链接</view>
+          </view>
+          <view class="code-img">
+            <image
+              src="@/static/image/test/code-img.png"
+              mode="scaleToFill"
+            />
+          </view>
+        </view>
+        <view class="home-title-box">
+          <view class="home-title-english">Platformer features</view>
+          <view class="home-title-china">平台游戏特色</view>
+        </view>
+        <view class="home-game-box">
+          <view class="game-item" v-for="item in 4" :key="item">
+            <view class="border-game">
+              <image
+                src="@/static/image/home/game-item-img.png"
+                mode="scaleToFill"
+              />
+            </view>
+            <view class="game-tag">【主播力荐】</view>
+            <view class="game-desc"
+              >主播强推网红大v都爱玩快来指尖和主播一起Happy到底!</view
+            >
+          </view>
+        </view>
+        <view class="home-title-box">
+          <view class="home-title-english">Game Recommendation</view>
+          <view class="home-title-china">游戏推荐</view>
+        </view>
+        <view class="home-swiper">
+          <up-swiper
+            :list="list5"
+            @change="(e) => (current = e.current)"
+            :autoplay="false"
+            height="320rpx"
+          >
+            <view class="swiper-item">
+              <view class="game-item-index" v-for="item in 3" :key="item">
+                <view class="game-icon-name">
+                  <image
+                    src="@/static/image/test/jcc-game.png"
+                    mode="scaleToFill"
+                  />
+                  <view class="name-star">
+                    <view class="name">金铲铲之战</view>
+                    <view class="star">
+                      <up-rate :count="5" size="14" active-color="#FFD339" inactive-color="#b2b2b2" gutter="0" v-model="star"></up-rate>
+                    </view>
+                  </view>
+                </view>
+                <view class="upload-btn">立即下载</view>
+              </view>
+            </view>
+          </up-swiper>
+        </view>
+      </view>
+    </view>
+  </template>
+    
+    <script setup>
+  import { ref, onMounted, reactive } from "vue";
+  import Header from "@/components/Header";
+  const title = ref("Hello");
+  import getWeb3 from "@/utils/web";
+  const star = ref(3);
+  const count = ref(0);
+  const list5 = reactive([
+    "https://cdn.uviewui.com/uview/swiper/swiper3.png",
+    "https://cdn.uviewui.com/uview/swiper/swiper2.png",
+    "https://cdn.uviewui.com/uview/swiper/swiper1.png",
+  ]);
+  onMounted(async () => {
+    try {
+      const web3 = await getWeb3();
+      const accounts = await web3.eth.getAccounts();
+      console.log("钱包地址:", accounts[0]);
+    } catch (err) {
+      console.error(err);
+    }
+  });
+  </script>
+    
+    <style lang="scss" scoped>
+  .home {
+    position: absolute;
+    top: 0;
+    bottom: 0;
+    right: 0;
+    left: 0;
+    overflow-y: auto;
+  }
+  .content {
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    width: 100%;
+    min-height: 100%;
+    padding: 32rpx;
+    padding-top: 116rpx;
+    box-sizing: border-box;
+    background-image: url("@/static/image/home/page-bg.jpg");
+    // background: url('../../static/image/home/page-bg.jpg');
+    background-size: 100%;
+    background-position: 0 0;
+    background-repeat: no-repeat;
+    .home-img {
+      width: 100%;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      image {
+        width: 100%;
+      }
+    }
+    .home-btn-box {
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      width: 100%;
+      .home-btn-item {
+        width: 184rpx;
+        height: 68rpx;
+        background-image: url("@/static/image/home/home-btn.png");
+        background-size: 100% auto;
+        background-repeat: no-repeat;
+        text-align: center;
+        color: #ecb2a8;
+        font-style: italic;
+        font-family: DOUYUFONT-2;
+        font-weight: 400 !important;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+      }
+    }
+    .home-code {
+      margin: 24rpx 0;
+      width: 100%;
+      padding: 20rpx;
+      box-sizing: border-box;
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      background-image: url("@/static/image/home/home-border.png");
+      background-position: center;
+      background-size: 100%;
+      background-repeat: no-repeat;
+      .home-url {
+        padding: 0 12rpx;
+        flex: 1;
+        overflow: hidden;
+        .url {
+          font-size: 32rpx;
+          color: #fff;
+          overflow: hidden;
+          text-overflow: ellipsis;
+          white-space: nowrap;
+        }
+        .btn {
+          // width: 254rpx;
+          margin-top: 24rpx;
+          width: 300rpx;
+          height: 70rpx;
+          background-image: url("@/static/image/home/share-btn.png");
+          background-position: center;
+          background-size: 100% 100%;
+          background-repeat: no-repeat;
+          display: flex;
+          justify-content: center;
+          align-items: center;
+          color: #4f2917;
+          font-size: 28rpx;
+          font-weight: 600;
+        }
+      }
+      .code-img {
+        flex-shrink: 0;
+        // background: yellow;
+        width: 160rpx;
+        height: 160rpx;
+        image{
+          width: 100%;
+          height: 100%;
+        }
+      }
+    }
+    .home-title-box {
+      position: relative;
+      font-size: 32rpx;
+      font-weight: 700;
+      .home-title-english {
+        color: #534135;
+        text-transform: uppercase;
+      }
+      .home-title-china {
+        color: #fff;
+        position: absolute;
+        left: 0;
+        right: 0;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        top: 18rpx;
+      }
+    }
+    .home-game-box {
+      width: 100%;
+      display: grid;
+      grid-template-columns: repeat(2, minmax(0, 1fr));
+      gap: 24rpx;
+      margin-top: 36rpx;
+      margin-bottom: 24rpx;
+      .game-item {
+        display: flex;
+        flex-direction: column;
+        align-items: center;
+        border: 2rpx solid #90645a;
+        background-color: hsla(0, 0%, 100%, 0.1);
+        border-radius: 16rpx;
+        height: 420rpx;
+        padding: 24rpx;
+        box-sizing: border-box;
+        .border-game {
+          width: 180rpx;
+          height: 180rpx;
+          background-image: url("@/static/image/home/game-border.png");
+          background-position: center;
+          background-size: 100% 100%;
+          background-repeat: no-repeat;
+          display: flex;
+          justify-content: center;
+          align-items: center;
+          image {
+            width: 100%;
+            height: 100%;
+          }
+        }
+        .game-tag {
+          font-size: 32rpx;
+          font-weight: 700;
+          color: #bb8a57;
+        }
+        .game-desc {
+          color: #e6b5aa;
+          line-height: 48rpx;
+          text-align: center;
+          font-size: 28rpx;
+        }
+      }
+    }
+    .home-swiper {
+      border: 2rpx solid #90645a;
+      background-color: hsla(0, 0%, 100%, 0.1);
+      border-radius: 16rpx;
+      margin-top: 36rpx;
+      width: 100%;
+      padding: 24rpx;
+      box-sizing: border-box;
+      .swiper-item {
+        .game-item-index {
+          display: flex;
+          justify-content: space-between;
+          align-items: center;
+          margin-bottom: 24rpx;
+  
+          .game-icon-name {
+            display: flex;
+            align-items: center;
+            image {
+              border-radius: 16rpx;
+              height: 88rpx;
+              width: 88rpx;
+              flex-shrink: 0;
+            }
+            .name-star {
+              width: 100%;
+              padding: 0 24rpx ;
+              box-sizing: border-box;
+              .name{
+                color: #fff;
+                font-size: 28rpx;
+                margin-bottom: 12rpx;
+              }
+            }
+          }
+          .upload-btn{
+            padding: 12rpx 24rpx;
+            box-sizing: border-box;
+            border-radius: 100rpx;
+            background: linear-gradient(to bottom,#FFF1CA ,#FAC21A);
+            font-size: 28rpx;
+            color: #4c220f;
+          }
+        }
+        .game-item-index:last-child(){
+          margin-bottom: 0;
+        }
+      }
+    }
+  }
+  ::v-deep .u-swiper{
+    background: none !important;
+  }
+  
+  </style>
+    

+ 363 - 58
src/pages/trade/index.vue

@@ -1,78 +1,383 @@
 <template>
+  <view class="home">
     <view class="content">
       <Header>
-        <template #title>ACC <span style="padding:0 12rpx;">|</span>连接钱包</template>
+        <template #title
+          >ACC <text style="padding: 0 12rpx">|</text>连接钱包</template
+        >
       </Header>
-      <image class="logo" src="/static/logo.png" />
-      <image class="logo" src="/static/logo.png" />
-      <image class="logo" src="/static/logo.png" />
-      <image class="logo" src="/static/logo.png" />
-      <image class="logo" src="/static/logo.png" />
-      <image class="logo" src="/static/logo.png" />
-      <image class="logo" src="/static/logo.png" />
-      <image class="logo" src="/static/logo.png" />
-      <image class="logo" src="/static/logo.png" />
-      <image class="logo" src="/static/logo.png" />
-      <image class="logo" src="/static/logo.png" />
-      <image class="logo" src="/static/logo.png" />
-      <image class="logo" src="/static/logo.png" />
-      <image class="logo" src="/static/logo.png" />
-      <image class="logo" src="/static/logo.png" />
-      <image class="logo" src="/static/logo.png" />
-      <image class="logo" src="/static/logo.png" />
-      <image class="logo" src="/static/logo.png" />
-      <image class="logo" src="/static/logo.png" />
-      <image class="logo" src="/static/logo.png" />
-      <image class="logo" src="/static/logo.png" />
-  
-      <view class="text-area">
-        <text class="title">{{ title }}</text>
+      <view class="home-img">
+        <image src="@/static/image/trade/jinsai-icon.png" mode="widthFix" />
+      </view>
+      <view class="home-btn-box">
+        <view class="trade-num">奖池数量</view>
+        <view class="image-num">
+          <image src="@/static/image/trade/title-bg.png" mode="scaleToFill" />
+        </view>
+      </view>
+      <view class="home-code">
+        <view class="trade-border-box"> $0 </view>
+        <view class="trade-border-num">≈¥0</view>
+      </view>
+      <view class="trade-img-box">
+        <image src="@/static/image/trade/money-box.png" mode="aspectFit" />
+      </view>
+      <view class="trade-process"></view>
+      <view class="trade-time-box">
+        <view class="time-title"> 距离 <text>赛程 竞赛结束 </text>还有 </view>
+        <up-count-down
+          :time="30 * 60 * 60 * 1000"
+          format="DD:HH:mm:ss"
+          autoStart
+          millisecond
+          @change="onChange"
+        >
+          <view class="time-box-index">
+            <view class="time__item"
+              ><view class="time-box">{{ timeData.days }}</view> 天</view
+            >
+            <view class="time__item">
+              <view class="time-box">{{
+                timeData.hours > 10 ? timeData.hours : "0" + timeData.hours
+              }}</view>
+              时</view
+            >
+            <view class="time__item"
+              ><view class="time-box">
+                {{ timeData.minutes }}
+              </view>
+              分</view
+            >
+            <view class="time__item"
+              ><view class="time-box">{{ timeData.seconds }}</view
+              >秒</view
+            >
+          </view>
+        </up-count-down>
+        <view class="start-btn">未报名</view>
+        <view class="num-txt">奖池数量:<text>$0</text> </view>
+        <view class="num-txt-small">≈¥0</view>
       </view>
+      <view class="game-play-name">赛程名次</view>
+      <view class="game-list">
+        <view class="game-list-item" v-for="(item, index) in 10" :key="index">
+          <view class="game-item-left">
+            <view class="game-order-index">
+              <image
+                src="@/static/image/trade/one.png"
+                v-if="index == 0"
+                mode="scaleToFill"
+              />
+              <image
+                src="@/static/image/trade/two.png"
+                v-if="index == 1"
+                mode="scaleToFill"
+              />
+              <image
+                src="@/static/image/trade/three.png"
+                v-if="index == 2"
+                mode="scaleToFill"
+              />
+              <text v-if="index != 0 && index != 1 && index != 2">{{
+                index + 1
+              }}</text>
+            </view>
+            <view class="game-order-num">
+              <view class="game-num-txt">0×**001</view>
+              <view class="game-num-num">*.00</view>
+            </view>
+          </view>
+          <view class="game-item-btn">领取</view>
+        </view>
+      </view>
+    </view>
+    <view class="fix-box">
+      <view class="fix-item">赛程规则</view>
+      <view class="fix-item">赛程名次</view>
     </view>
-  </template>
+  </view>
+</template>
   
   <script setup>
-  import { ref, onMounted } from "vue";
-  import Header from '@/components/Header'
-  const title = ref("Hello");
-  import getWeb3 from "@/utils/web";
-  onMounted(async () => {
-    try {
-      const web3 = await getWeb3();
-      const accounts = await web3.eth.getAccounts();
-      console.log("钱包地址:", accounts[0]);
-    } catch (err) {
-      console.error(err);
-    }
-  });
-  </script>
+import { ref, onMounted, reactive } from "vue";
+import Header from "@/components/Header";
+import getWeb3 from "@/utils/web";
+// 使用 reactive 创建响应式对象
+const timeData = ref({});
+// 定义 onChange 方法
+const onChange = (e) => {
+  timeData.value = e;
+};
+onMounted(async () => {
+  try {
+    const web3 = await getWeb3();
+    const accounts = await web3.eth.getAccounts();
+    console.log("钱包地址:", accounts[0]);
+  } catch (err) {
+    console.error(err);
+  }
+});
+</script>
   
   <style lang="scss" scoped>
-  .content {
+.home {
+  position: absolute;
+  top: 0;
+  bottom: 0;
+  right: 0;
+  left: 0;
+  overflow-y: auto;
+  .fix-box {
+    position: fixed;
+    right: 0;
+    z-index: 99;
+    top: 258rpx;
+    .fix-item {
+      border-radius: 40rpx 0 0 40rpx;
+      background-color: #734210;
+      color: #fff;
+      text-align: center;
+      padding: 6rpx 24rpx;
+      box-sizing: border-box;
+      font-size: 26rpx;
+      margin-bottom: 12rpx;
+    }
+  }
+}
+.content {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  width: 100%;
+  min-height: 100%;
+  padding: 32rpx;
+  // padding-top: 116rpx;
+  padding-top: 168rpx;
+  box-sizing: border-box;
+  background-image: url("@/static/image/home/page-bg.jpg");
+  // background: url('../../static/image/home/page-bg.jpg');
+  background-size: 100%;
+  background-position: 0 0;
+  background-repeat: no-repeat;
+  .home-img {
+    width: 100%;
     display: flex;
-    flex-direction: column;
+    justify-content: center;
     align-items: center;
+    image {
+      width: 154rpx;
+      height: 154rpx;
+    }
+  }
+  .home-btn-box {
+    display: flex;
     justify-content: center;
-    width: 100vw;
+    align-items: center;
+    width: 100%;
+    position: relative;
+    .trade-num {
+      font-size: 32rpx;
+      text-align: center;
+      color: #d4ac27;
+      background: -webkit-gradient(
+        linear,
+        left top,
+        left bottom,
+        from(#fffbe1),
+        to(#d4ac27)
+      );
+      background: linear-gradient(180deg, #fffbe1 0, #d4ac27);
+      -webkit-background-clip: text;
+      -webkit-text-fill-color: transparent;
+      font-weight: 700;
+    }
+    .image-num {
+      position: absolute;
+      left: 0;
+      right: 0;
+      bottom: 0;
+      top: 0;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      image {
+        width: 208rpx;
+        height: 40rpx;
+      }
+    }
   }
-  
-  .logo {
-    height: 200rpx;
-    width: 200rpx;
-    margin-top: 200rpx;
-    margin-left: auto;
-    margin-right: auto;
-    margin-bottom: 50rpx;
+  .home-code {
+    margin: 24rpx 0;
+    width: 100%;
+    .trade-border-box {
+      width: 520rpx;
+      height: 100rpx;
+      margin: auto;
+      background-image: url("@/static/image/trade/border-jinsai.png");
+      background-size: 100% 100%;
+      background-position: center center;
+      background-repeat: no-repeat;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      font-size: 36rpx;
+      color: #fff;
+    }
+    .trade-border-num {
+      text-align: center;
+      color: #fff;
+      font-size: 32rpx;
+    }
   }
-  
-  .text-area {
+  .trade-img-box {
+    width: 100%;
+    height: 384rpx;
+    image {
+      width: 100%;
+      height: 100%;
+    }
+  }
+  .trade-process {
+    height: 131rpx;
+    width: 100%;
+    background-image: url("@/static/image/trade/process.png");
+    background-position: center center;
+    background-size: 100% 100%;
+    background-repeat: no-repeat;
+  }
+  .trade-time-box {
+    margin: 24rpx 0;
+    font-size: 28rpx;
+    color: #a29481;
+    background: #53473a;
+    // background: #6E573A;
+    border-radius: 30rpx;
+    width: 100%;
+    padding: 24rpx;
+    box-sizing: border-box;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    .time-title {
+      text {
+        color: rgb(255, 214, 0);
+        font-weight: 600;
+      }
+    }
+    .time-box-index {
+      margin-top: 13rpx;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      .time__item {
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        .time-box {
+          width: 70rpx;
+          border-radius: 4rpx;
+          height: 56rpx;
+          background-color: #6b5d4b;
+          color: #f3cf9b;
+          margin: 0 10rpx;
+          display: flex;
+          justify-content: center;
+          align-items: center;
+        }
+      }
+    }
+    .start-btn {
+      height: 84rpx;
+      width: 190rpx;
+      background-image: url("@/static/image/trade/weibaoming-bg.png");
+      background-position: center center;
+      background-size: 100% 100%;
+      background-repeat: no-repeat;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      margin: 12rpx 0;
+    }
+    .num-txt {
+      text {
+        color: rgb(255, 214, 0);
+        font-weight: 600;
+      }
+    }
+    .num-txt-small {
+      color: #fff;
+      font-size: 22rpx;
+    }
+  }
+  .game-play-name {
+    width: 342rpx;
+    height: 64rpx;
+    background-image: url("@/static/image/trade/trade-title-bg.png");
+    background-position: center center;
+    background-size: 100% 100%;
+    background-repeat: no-repeat;
     display: flex;
     justify-content: center;
+    align-items: center;
+    color: #f5b65f;
+    font-size: 26rpx;
+    font-weight: 700;
   }
-  
-  .title {
-    font-size: 36rpx;
-    color: #8f8f94;
+  .game-list {
+    width: 100%;
+    .game-list-item {
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      padding: 24rpx 0;
+      box-sizing: border-box;
+      border-bottom: 2rpx solid #3b3630;
+      .game-item-left {
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        .game-order-index {
+          width: 64rpx;
+          height: 64rpx;
+          margin-right: 24rpx;
+          display: flex;
+          justify-content: center;
+          align-items: center;
+          font-size: 36rpx;
+          color: #f2ce9a;
+          font-weight: 700;
+          image {
+            width: 100%;
+            height: 100%;
+          }
+        }
+        .game-order-num {
+          .game-num-txt {
+            font-size: 28rpx;
+            color: #f2ce9a;
+            font-weight: 700;
+          }
+          .game-num-num {
+            margin-top: 10rpx;
+            font-size: 28rpx;
+            color: #fff;
+          }
+        }
+      }
+      .game-item-btn {
+        width: 178rpx;
+        height: 54rpx;
+        background: url("@/static/image/trade/lingqu-btn-bg.png") 50% no-repeat;
+        background-size: 100% 100%;
+        display: block;
+        color: #f7dbb1;
+        font-size: 28rpx;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+      }
+    }
   }
-  </style>
+}
+</style>
   

BIN
src/static/image/trade/border-jinsai.png


BIN
src/static/image/trade/jinsai-icon.png


BIN
src/static/image/trade/lingqu-btn-bg.png


BIN
src/static/image/trade/money-box.png


BIN
src/static/image/trade/one.png


BIN
src/static/image/trade/process.png


BIN
src/static/image/trade/three.png


BIN
src/static/image/trade/title-bg.png


BIN
src/static/image/trade/trade-title-bg.png


BIN
src/static/image/trade/two.png


BIN
src/static/image/trade/weibaoming-bg.png