index.vue 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. <template>
  2. <view class="home">
  3. <view class="content">
  4. <Header>
  5. <template #title
  6. >ACC <span style="padding: 0 12rpx">|</span>连接钱包</template
  7. >
  8. </Header>
  9. <view class="home-img">
  10. <image src="@/static/image/home/home-banner.png" mode="widthFix" />
  11. </view>
  12. <view class="home-btn-box">
  13. <view class="home-btn-item">资产兑换</view>
  14. <view class="home-btn-item">竞赛</view>
  15. </view>
  16. <view class="home-code">
  17. <view class="home-url">
  18. <view class="url">http://www.wgt.cool</view>
  19. <view class="btn">分享链接</view>
  20. </view>
  21. <view class="code-img">
  22. <image
  23. src="@/static/image/test/code-img.png"
  24. mode="scaleToFill"
  25. />
  26. </view>
  27. </view>
  28. <view class="home-title-box">
  29. <view class="home-title-english">Platformer features</view>
  30. <view class="home-title-china">平台游戏特色</view>
  31. </view>
  32. <view class="home-game-box">
  33. <view class="game-item" v-for="item in 4" :key="item">
  34. <view class="border-game">
  35. <image
  36. src="@/static/image/home/game-item-img.png"
  37. mode="scaleToFill"
  38. />
  39. </view>
  40. <view class="game-tag">【主播力荐】</view>
  41. <view class="game-desc"
  42. >主播强推网红大v都爱玩快来指尖和主播一起Happy到底!</view
  43. >
  44. </view>
  45. </view>
  46. <view class="home-title-box">
  47. <view class="home-title-english">Game Recommendation</view>
  48. <view class="home-title-china">游戏推荐</view>
  49. </view>
  50. <view class="home-swiper">
  51. <up-swiper
  52. :list="list5"
  53. @change="(e) => (current = e.current)"
  54. :autoplay="false"
  55. height="320rpx"
  56. >
  57. <view class="swiper-item">
  58. <view class="game-item-index" v-for="item in 3" :key="item">
  59. <view class="game-icon-name">
  60. <image
  61. src="@/static/image/test/jcc-game.png"
  62. mode="scaleToFill"
  63. />
  64. <view class="name-star">
  65. <view class="name">金铲铲之战</view>
  66. <view class="star">
  67. <up-rate :count="5" size="14" active-color="#FFD339" inactive-color="#b2b2b2" gutter="0" v-model="star"></up-rate>
  68. </view>
  69. </view>
  70. </view>
  71. <view class="upload-btn">立即下载</view>
  72. </view>
  73. </view>
  74. </up-swiper>
  75. </view>
  76. </view>
  77. </view>
  78. </template>
  79. <script setup>
  80. import { ref, onMounted, reactive } from "vue";
  81. import Header from "@/components/Header";
  82. const title = ref("Hello");
  83. import getWeb3 from "@/utils/web";
  84. const star = ref(3);
  85. const count = ref(0);
  86. const list5 = reactive([
  87. "https://cdn.uviewui.com/uview/swiper/swiper3.png",
  88. "https://cdn.uviewui.com/uview/swiper/swiper2.png",
  89. "https://cdn.uviewui.com/uview/swiper/swiper1.png",
  90. ]);
  91. onMounted(async () => {
  92. try {
  93. const web3 = await getWeb3();
  94. const accounts = await web3.eth.getAccounts();
  95. console.log("钱包地址:", accounts[0]);
  96. } catch (err) {
  97. console.error(err);
  98. }
  99. });
  100. </script>
  101. <style lang="scss" scoped>
  102. .home {
  103. position: absolute;
  104. top: 0;
  105. bottom: 0;
  106. right: 0;
  107. left: 0;
  108. overflow-y: auto;
  109. }
  110. .content {
  111. display: flex;
  112. flex-direction: column;
  113. align-items: center;
  114. width: 100%;
  115. min-height: 100%;
  116. padding: 32rpx;
  117. padding-top: 116rpx;
  118. box-sizing: border-box;
  119. background-image: url("@/static/image/home/page-bg.jpg");
  120. // background: url('../../static/image/home/page-bg.jpg');
  121. background-size: 100%;
  122. background-position: 0 0;
  123. background-repeat: no-repeat;
  124. .home-img {
  125. width: 100%;
  126. display: flex;
  127. justify-content: center;
  128. align-items: center;
  129. image {
  130. width: 100%;
  131. }
  132. }
  133. .home-btn-box {
  134. display: flex;
  135. justify-content: space-between;
  136. align-items: center;
  137. width: 100%;
  138. .home-btn-item {
  139. width: 184rpx;
  140. height: 68rpx;
  141. background-image: url("@/static/image/home/home-btn.png");
  142. background-size: 100% auto;
  143. background-repeat: no-repeat;
  144. text-align: center;
  145. color: #ecb2a8;
  146. font-style: italic;
  147. font-family: DOUYUFONT-2;
  148. font-weight: 400 !important;
  149. display: flex;
  150. justify-content: center;
  151. align-items: center;
  152. }
  153. }
  154. .home-code {
  155. margin: 24rpx 0;
  156. width: 100%;
  157. padding: 20rpx;
  158. box-sizing: border-box;
  159. display: flex;
  160. justify-content: space-between;
  161. align-items: center;
  162. background-image: url("@/static/image/home/home-border.png");
  163. background-position: center;
  164. background-size: 100%;
  165. background-repeat: no-repeat;
  166. .home-url {
  167. padding: 0 12rpx;
  168. flex: 1;
  169. overflow: hidden;
  170. .url {
  171. font-size: 32rpx;
  172. color: #fff;
  173. overflow: hidden;
  174. text-overflow: ellipsis;
  175. white-space: nowrap;
  176. }
  177. .btn {
  178. // width: 254rpx;
  179. margin-top: 24rpx;
  180. width: 300rpx;
  181. height: 70rpx;
  182. background-image: url("@/static/image/home/share-btn.png");
  183. background-position: center;
  184. background-size: 100% 100%;
  185. background-repeat: no-repeat;
  186. display: flex;
  187. justify-content: center;
  188. align-items: center;
  189. color: #4f2917;
  190. font-size: 28rpx;
  191. font-weight: 600;
  192. }
  193. }
  194. .code-img {
  195. flex-shrink: 0;
  196. // background: yellow;
  197. width: 160rpx;
  198. height: 160rpx;
  199. image{
  200. width: 100%;
  201. height: 100%;
  202. }
  203. }
  204. }
  205. .home-title-box {
  206. position: relative;
  207. font-size: 32rpx;
  208. font-weight: 700;
  209. .home-title-english {
  210. color: #534135;
  211. text-transform: uppercase;
  212. }
  213. .home-title-china {
  214. color: #fff;
  215. position: absolute;
  216. left: 0;
  217. right: 0;
  218. display: flex;
  219. justify-content: center;
  220. align-items: center;
  221. top: 18rpx;
  222. }
  223. }
  224. .home-game-box {
  225. width: 100%;
  226. display: grid;
  227. grid-template-columns: repeat(2, minmax(0, 1fr));
  228. gap: 24rpx;
  229. margin-top: 36rpx;
  230. margin-bottom: 24rpx;
  231. .game-item {
  232. display: flex;
  233. flex-direction: column;
  234. align-items: center;
  235. border: 2rpx solid #90645a;
  236. background-color: hsla(0, 0%, 100%, 0.1);
  237. border-radius: 16rpx;
  238. height: 420rpx;
  239. padding: 24rpx;
  240. box-sizing: border-box;
  241. .border-game {
  242. width: 180rpx;
  243. height: 180rpx;
  244. background-image: url("@/static/image/home/game-border.png");
  245. background-position: center;
  246. background-size: 100% 100%;
  247. background-repeat: no-repeat;
  248. display: flex;
  249. justify-content: center;
  250. align-items: center;
  251. image {
  252. width: 100%;
  253. height: 100%;
  254. }
  255. }
  256. .game-tag {
  257. font-size: 32rpx;
  258. font-weight: 700;
  259. color: #bb8a57;
  260. }
  261. .game-desc {
  262. color: #e6b5aa;
  263. line-height: 48rpx;
  264. text-align: center;
  265. font-size: 28rpx;
  266. }
  267. }
  268. }
  269. .home-swiper {
  270. border: 2rpx solid #90645a;
  271. background-color: hsla(0, 0%, 100%, 0.1);
  272. border-radius: 16rpx;
  273. margin-top: 36rpx;
  274. width: 100%;
  275. padding: 24rpx;
  276. box-sizing: border-box;
  277. .swiper-item {
  278. .game-item-index {
  279. display: flex;
  280. justify-content: space-between;
  281. align-items: center;
  282. margin-bottom: 24rpx;
  283. .game-icon-name {
  284. display: flex;
  285. align-items: center;
  286. image {
  287. border-radius: 16rpx;
  288. height: 88rpx;
  289. width: 88rpx;
  290. flex-shrink: 0;
  291. }
  292. .name-star {
  293. width: 100%;
  294. padding: 0 24rpx ;
  295. box-sizing: border-box;
  296. .name{
  297. color: #fff;
  298. font-size: 28rpx;
  299. margin-bottom: 12rpx;
  300. }
  301. }
  302. }
  303. .upload-btn{
  304. padding: 12rpx 24rpx;
  305. box-sizing: border-box;
  306. border-radius: 100rpx;
  307. background: linear-gradient(to bottom,#FFF1CA ,#FAC21A);
  308. font-size: 28rpx;
  309. color: #4c220f;
  310. }
  311. }
  312. .game-item-index:last-child(){
  313. margin-bottom: 0;
  314. }
  315. }
  316. }
  317. }
  318. ::v-deep .u-swiper{
  319. background: none !important;
  320. }
  321. </style>