gx
queenwuli
2022-03-17 b702a5141e4bb77369c7c6b0d740aaf4a7713f6d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<template>
    <div class="wrap">
        <div class="top">
            <div class="header flex align-center justify-between">
            <div class="left flex align-center">
                <img src="../../assets/images/icon3.png" class="icon"/>
                <van-dropdown-menu active-color="#3D8AF2">
                    <van-dropdown-item v-model="value1" :options="option1" />
                </van-dropdown-menu>
            </div>
            <span class="title">ANT-ETH</span>
            <div class="right flex align-center">
                <img src="../../assets/images/icon.png" class="icon"/>
                <span>连接钱包</span>
            </div>
            </div>
            <div class="banner-content">
                <p>免质押挖矿</p>
                <p>奖励<span class="em">1000,000</span> ETH</p>
                <button @click="show = true">授权凭证</button>
            </div>
        </div>
        <img src="../../assets/images/banner.png" class="banner"/>
        <van-tabs class="scale" title-active-color="#080808" title-inactive-color="#999999" line-height="4px">
            <van-tab title="矿池">
                <OrePool></OrePool>
            </van-tab>
            <van-tab title="账户">
              <Account></Account>
            </van-tab>
        </van-tabs>
        <van-overlay :show="show" @click="show = false">
          <div class="wrapper" @click.stop>
            <div class="block" />
          </div>
        </van-overlay>
  </div>
</template>
 
<script>
import WalletConnectProvider from "@walletconnect/web3-provider"; 
import Web3 from "web3";
import { ref } from 'vue';
import OrePool from './orePool';
import Account from './account';
 
export default {
  name: 'App',
  components: {
    OrePool,
    Account
  },
  setup() {
    const value1 = ref(0);
    const option1 = [
      { text: '简体中文', value: 0 },
      { text: 'English', value: 1 }
    ];
    const show = ref(false);
    return {
      value1,
      option1,
      show
    };
  },
  methods: {
    connect() {
      const provider = new WalletConnectProvider({
        infuraId: '27e484dcd9e3efcfd25a83a78777cdf1',
        bridge: "https://bridge.walletconnect.org",
      });
      //  Enable session (triggers QR Code modal)
      provider.enable();
 
      this.web3 = new Web3(provider);
 
      // this.getAccount();
      // subscribe to events
      // this.subscribeToEvents();
    },
    subscribeToEvents() {
      const connector = this.connector;
      if (!connector) {
        return;
      }
    },
  }
}
</script>
 
<style scoped>
.wrap{
  padding-bottom: 40px;
}
.top{
  position: absolute;
  left: 0;
  right: 0;
}
.header{
  padding: 0 24px
}
.header .left .icon{
  width: 48px
}
.header .title{
  font-size: 32px;
  font-weight: bold;
  color: #FFFFFF;
}
.header .right{
  background: #FFFFFF;
  border-radius: 24px;
  padding-right: 24px;
  padding-left: 12px;
  font-size: 24px;
  color: #3D8AF2;
}
.header .right .icon{
  width: 48px
}
.banner{
  width: 100%;
  display: block;
}
.banner-content{
  margin-top: 120px;
  padding-left: 40px;
  text-align: left
}
.banner-content p{
  font-size: 48px;
  font-weight: bold;
  color: #F5F6F7;
  letter-spacing:4px;
}
.banner-content p .em{
  font-size: 68px;
  color: #FEAA4A;
}
.banner-content button{
  background:  linear-gradient(142deg, #FEAA4A 0%, #FF8517 100%);
  border: 0;
  color: #FFFFFF;
  font-size: 32px;
  font-weight: bold;
  padding: 24px 72px;
  border-radius: 44px;
  margin-top: 30px
}
.wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}
.block {
    width: 120px;
    background-color: #fff;
}
 
</style>