Commit d76ccc2f authored by xhx's avatar xhx

调整

parent 8051a625
<template>
<div class="py-2 text-13px flex items-center justify-between rounded" :class="[bgColor, color]">
<div class="flex-1 border-r border-solid" :class="[borderColor]">
<slot name="left"></slot>
</div>
<div class="flex-1 border-r border-solid" :class="[borderColor]">
<slot></slot>
</div>
<div class="flex-1">
<slot name="right"></slot>
</div>
</div>
</template>
<script lang="ts">
import Vue from 'vue'
export default Vue.extend({
props: {
info: {
type: Object
},
bgColor: {
type: String,
default: 'bg-gradient-7'
},
color: {
type: String,
default: 'text-brown3'
},
borderColor: {
type: String,
default: 'border-card2-color'
}
}
})
</script>
\ No newline at end of file
<template> <template>
<div class=""> <div class="leading-9 text-white3 text-sm flex items-center justify-between">
<div class="flex-shrink-0 mr-3">
<slot></slot>
</div>
<div class="flex-grow-0 hide">
<slot name="right"></slot>
</div>
</div> </div>
</template> </template>
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<div> <div>
<div class="px-2 flex items-center justify-between"> <div class="px-2 flex items-center justify-between">
<span class="font-semibold text-white1">{{ info.friendlyName }}</span> <span class="font-semibold text-white1">{{ info.friendlyName }}</span>
<!-- <span class="text-xs text-t-color leading-4 border border-solid border-card-text py-0.5 px-1.5 rounded">{{ '节点稳定 省时省力' }}</span> -->
</div> </div>
<div class="pb-3 flex items-center justify-between"> <div class="pb-3 flex items-center justify-between">
<div class="px-2 flex flex-col items-start"> <div class="px-2 flex flex-col items-start">
...@@ -14,29 +13,24 @@ ...@@ -14,29 +13,24 @@
<button class="w-24 h-9 rounded-full text-sm text-brown1 text-medium bg-gradient-4" @click="goMining">立即委托</button> <button class="w-24 h-9 rounded-full text-sm text-brown1 text-medium bg-gradient-4" @click="goMining">立即委托</button>
</div> </div>
</div> </div>
<div class="bg-gradient-5 text-13px text-t-color rounded-lg flex justify-between items-center py-1.5"> <info-bar bgColor="bg-gradient-5" color="text-t-color" borderColor="border-brown2">
<!-- <div class="text-left text-t-color text-13px pl-2 pr-5 border-r border-solid border-brown2 "> <template v-slot:left>
<p>必选理由</p>
<p>比特元生态爆发,低门槛即可参与</p>
</div> -->
<div class="flex-grow border-r border-solid border-brown2">
<p>今日出矿</p> <p>今日出矿</p>
<p>{{ info.todayAmount || 0 }} BTY</p> <p>{{ info.todayAmount || 0 }} BTY</p>
</div> </template>
<div class="flex-grow border-r border-solid border-brown2"> <p>已运行天数</p>
<p>已运行天数</p> <p>{{ info.runDays || 0 }}天</p>
<p>{{ info.runDays || 0 }}</p> <template v-slot:right>
</div>
<div class="flex-grow">
<p>已委托</p> <p>已委托</p>
<p>{{ info.entrustTicket || 0 }}</p> <p>{{ info.entrustTicket || 0 }}</p>
</div> </template>
</div> </info-bar>
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
import Vue from 'vue' import Vue from 'vue'
import InfoBar from '@/components/InfoBar.vue'
export default Vue.extend({ export default Vue.extend({
props: { props: {
info: { info: {
...@@ -44,11 +38,11 @@ export default Vue.extend({ ...@@ -44,11 +38,11 @@ export default Vue.extend({
} }
}, },
components: { components: {
InfoBar
}, },
methods: { methods: {
goMining() { goMining() {
this.$emit('goDetails', (this.info as any).id) this.$emit('goDetails', (this.info as any).id)
// this.$router.push({ path: '/details', query: { id: (this.info as any).id || '1' }})
} }
} }
}) })
...@@ -83,7 +77,6 @@ export default Vue.extend({ ...@@ -83,7 +77,6 @@ export default Vue.extend({
} }
.income-count { .income-count {
font-size: 35px; font-size: 35px;
// font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold; font-weight: bold;
color: #EFB771; color: #EFB771;
line-height: 41px; line-height: 41px;
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
class="mining-card w-84 h-56 px-2 pt-10 pb-2" class="mining-card w-84 h-56 px-2 pt-10 pb-2"
:class="{'bg-bg1-card': type === 1, 'bg-bg2-card': type === 2}"> :class="{'bg-bg1-card': type === 1, 'bg-bg2-card': type === 2}">
<div class="mining-name bg-gradient-3 text-white text-13px rounded-r-full">{{ info.name }}</div> <div class="mining-name bg-gradient-3 text-white text-13px rounded-r-full">{{ info.name }}</div>
<img v-if="type === 2" class="w-18 h-16 end-img" src="@/assets/image/end.png" /> <img v-if="type === 2" class="w-18 h-16 end-img" :src="constant.CARD" />
<img v-if="type === 1" class="w-full h-full under" src="@/assets/image/bg1-card.png" /> <img v-if="type === 1" class="w-full h-full under" :src="constant.BG_START" />
<img v-if="type === 2" class="w-full h-full under" src="@/assets/image/bg2-card.png" /> <img v-if="type === 2" class="w-full h-full under" :src="constant.BG_END" />
<div> <div>
<div class="px-2 flex items-center justify-between"> <div class="px-2 flex items-center justify-between">
<span class="font-semibold text-white1">{{ info.friendlyName }}</span> <span class="font-semibold text-white1">{{ info.friendlyName }}</span>
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
</div> </div>
<div class="bg-gradient-5 rounded-lg flex justify-between items-center py-2"> <div class="bg-gradient-5 rounded-lg flex justify-between items-center py-2">
<div class="text-left text-t-color text-13px pl-2 overflow-hidden"> <div class="text-left text-t-color text-13px pl-2 overflow-hidden">
<p class="tracking-tight pool-addr">矿池地址:{{ info.addr }}</p> <p class="tracking-tight hide">矿池地址:{{ info.addr }}</p>
<p class="tracking-tight">矿机周期:{{ info.period }}</p> <p class="tracking-tight">矿机周期:{{ info.period }}</p>
</div> </div>
</div> </div>
...@@ -32,9 +32,8 @@ ...@@ -32,9 +32,8 @@
<script lang="ts"> <script lang="ts">
import Vue from 'vue' import Vue from 'vue'
import constant from '@/constance/Image'
export default Vue.extend({ export default Vue.extend({
components: {
},
props: { props: {
type: { type: {
type: Number type: Number
...@@ -43,6 +42,11 @@ export default Vue.extend({ ...@@ -43,6 +42,11 @@ export default Vue.extend({
type: Object type: Object
} }
}, },
computed: {
constant() {
return constant.MINE_IMAGE
}
}
}) })
</script> </script>
...@@ -94,7 +98,6 @@ export default Vue.extend({ ...@@ -94,7 +98,6 @@ export default Vue.extend({
} }
.income-count { .income-count {
font-size: 35px; font-size: 35px;
// font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold; font-weight: bold;
line-height: 41px; line-height: 41px;
padding-top: 12px; padding-top: 12px;
...@@ -107,9 +110,4 @@ export default Vue.extend({ ...@@ -107,9 +110,4 @@ export default Vue.extend({
color: #906227; color: #906227;
} }
} }
.pool-addr {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style> </style>
\ No newline at end of file
const HOME_IMAGE = {
TITLE: require('@/assets/image/title.png'),
TITLE_LEFT: require('@/assets/image/title-l.png'),
TITLE_RIGHT: require('@/assets/image/title-r.png'),
CARD: require('@/assets/image/card.png')
}
const MINE_IMAGE = {
BG_START: require('@/assets/image/bg1-card.png'),
BG_END: require('@/assets/image/bg2-card.png'),
END: require('@/assets/image/end.png')
}
export default {
HOME_IMAGE,
MINE_IMAGE
}
\ No newline at end of file
// export const test = { // export const test = {
// addr: '13SnepxL5RELnLwxGTWFkMJMgMJqJhP4FV', // addr: '12c2vCE13SmnExVSNG1bpMsNKqCZbrBcGf',
// privateKey: '0xCC38546E9E659D15E6B4893F0AB32A06D103931A8230B0BDE71459D2B27D6944' // privateKey: '0xCC38546E9E659D15E6B4893F0AB32A06D103931A8230B0BDE71459D2B27D6944'
// } // }
// export const test = { // export const test = {
......
<template> <template>
<div class="bg-gradient-7 py-2 text-13px text-brown3 flex items-center justify-between rounded"> <div class="bg-gradient-7 py-1.5 text-13px text-brown3 flex items-center justify-between rounded">
<div class="flex-grow border-r border-solid border-card2-color"> <div class="flex-grow border-r border-solid border-card2-color">
<div>挖矿门槛</div> <div>挖矿门槛</div>
<div>最低{{ info.minTicket || 10 }}</div> <div>最低{{ info.minTicket || 10 }}</div>
......
<template> <template>
<div class="bg-gradient-6 p-4 pt-20"> <div class="bg-gradient-6 p-4 pt-20">
<div class="pb-4"> <div class="pb-4">
<div class="text-brown1 text-base font-semibold text-left">{{ info.friendlyName || 'xinghao' }}</div> <div class="text-brown1 text-base font-semibold text-left">{{ info.friendlyName || '-' }}</div>
</div> </div>
<div class="mb-6 flex items-center justify-between"> <div class="mb-6 flex items-center justify-between">
<div class="text-left flex-grow"> <div class="text-left flex-grow">
...@@ -13,16 +13,27 @@ ...@@ -13,16 +13,27 @@
<p class="text-base text-red1 font-semibold">已实际出矿收益为准</p> <p class="text-base text-red1 font-semibold">已实际出矿收益为准</p>
</div> </div>
</div> </div>
<details-bar :info="info" /> <info-bar>
<template v-slot:left>
<div>挖矿门槛</div>
<div>最低{{ info.minTicket || 10 }}</div>
</template>
<div>矿机周期</div>
<div>{{ info.days }}天</div>
<template v-slot:right>
<div>技术服务费</div>
<div class="special">限时免费</div>
</template>
</info-bar>
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
import Vue from 'vue' import Vue from 'vue'
import DetailsBar from '@/views/Details/DetailsBar.vue' import InfoBar from '@/components/InfoBar.vue'
export default Vue.extend({ export default Vue.extend({
components: { components: {
DetailsBar InfoBar
}, },
props: { props: {
info: { info: {
......
...@@ -3,47 +3,47 @@ ...@@ -3,47 +3,47 @@
<div class="bg-card2-color px-4"> <div class="bg-card2-color px-4">
<p class="details-title">购买说明</p> <p class="details-title">购买说明</p>
<div class="py-2"> <div class="py-2">
<p class="details-item"> <list-line>
<span>挖矿门槛</span> 挖矿门槛
<span>最低{{ info.minTicket || 10 }}</span> <template v-slot:right><span>最低{{ info.minTicket || 10 }}</span></template>
</p> </list-line>
<p class="details-item"> <list-line>
<span>矿池周期</span> 矿池周期
<span>{{ info.days }}</span> <template v-slot:right><span>{{ info.days || '-' }}</span></template>
</p> </list-line>
<p class="details-item"> <list-line>
<span>技术服务费</span> 技术服务费
<span class="special">限时免费</span> <template v-slot:right><span class="special">限时免费</span></template>
</p> </list-line>
<p class="details-item"> <list-line>
<span>运行机制</span> 运行机制
<span>到期本金自动取回</span> <template v-slot:right><span>到期本金自动取回</span></template>
</p> </list-line>
</div> </div>
</div> </div>
<div class="bg-card2-color px-4 mt-3"> <div class="bg-card2-color px-4 mt-3">
<p class="details-title">挖矿信息</p> <p class="details-title">挖矿信息</p>
<div class="py-2"> <div class="py-2">
<p class="details-item"> <list-line>
<span class="flex-shrink-0 mr-3">矿池地址</span> 矿池地址
<span class="flex-grow-0 hide">{{ info.minerAddr || '-' }}</span> <template v-slot:right><span>{{ info.minerAddr || '-' }}</span></template>
</p> </list-line>
<p class="details-item"> <list-line>
<span class="flex-shrink-0 mr-3">发起人挖矿地址</span> 发起人挖矿地址
<span class="flex-grow-0 hide">{{ info.selfAddr || '-' }}</span> <template v-slot:right><span>{{ info.selfAddr || '-' }}</span></template>
</p> </list-line>
<p class="details-item"> <list-line>
<span>发起人委托票数</span> 发起人委托票数
<span>{{ info.selfEntrustTicket || 0 }}</span> <template v-slot:right><span>{{ info.selfEntrustTicket || 0 }}</span></template>
</p> </list-line>
<p class="details-item"> <list-line>
<span>当前委托人数</span> 当前委托人数
<span class="special">{{ info.entrustPerson || 0 }}</span> <template v-slot:right><span class="special">{{ info.entrustPerson || 0 }}</span></template>
</p> </list-line>
<p class="details-item"> <list-line>
<span>当前委托挖矿票数</span> 当前委托挖矿票数
<span class="special">{{ info.entrustTicket || 0 }}</span> <template v-slot:right><span class="special">{{ info.entrustTicket || 0 }}</span></template>
</p> </list-line>
</div> </div>
</div> </div>
<div class="bg-card2-color px-4 pb-16 mt-3"> <div class="bg-card2-color px-4 pb-16 mt-3">
...@@ -61,7 +61,11 @@ ...@@ -61,7 +61,11 @@
<script lang="ts"> <script lang="ts">
import Vue from 'vue' import Vue from 'vue'
import ListLine from '@/components/ListLine.vue'
export default Vue.extend({ export default Vue.extend({
components: {
ListLine
},
props: { props: {
info: { info: {
type: Object type: Object
......
...@@ -35,8 +35,8 @@ export default Vue.extend({ ...@@ -35,8 +35,8 @@ export default Vue.extend({
info: {} as any, info: {} as any,
fee: 0, fee: 0,
profit: 0, profit: 0,
isBind: false, isBind: false, // 是否初次委托
ticketNum: 10000 ticketNum: 10000 // 每票BTY
} }
}, },
methods: { methods: {
...@@ -110,6 +110,7 @@ export default Vue.extend({ ...@@ -110,6 +110,7 @@ export default Vue.extend({
Toast(res.data.result.receipt.tyName) Toast(res.data.result.receipt.tyName)
} else { } else {
const isBind = this.isBind ? true : false const isBind = this.isBind ? true : false
if (isBind) return
bindPool(this.info.id, value, isBind).then(async (r: any) => { bindPool(this.info.id, value, isBind).then(async (r: any) => {
if (r.data.data.isSucc) { if (r.data.data.isSucc) {
this.$toast('购买成功') this.$toast('购买成功')
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
<div class="card-list relative py-7 px-3"> <div class="card-list relative py-7 px-3">
<div class="home-title w-full absolute flex items-start justify-center"> <div class="home-title w-full absolute flex items-start justify-center">
<div class="dot-l"></div> <div class="dot-l"></div>
<img class="w-1/5" src="../../assets/image/title-l.png" alt=""> <img class="w-1/5" :src="constant.TITLE_LEFT" alt="">
<img class="w-1/4 mt-1.5 mx-1" src="../../assets/image/title.png" alt=""> <img class="w-1/4 mt-1.5 mx-1" :src="constant.TITLE" alt="">
<img class="w-1/5" src="../../assets/image/title-r.png" alt=""> <img class="w-1/5" :src="constant.TITLE_RIGHT" alt="">
<div class="dot-r"></div> <div class="dot-r"></div>
</div> </div>
<div> <div>
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
import Vue from 'vue' import Vue from 'vue'
import MiningCard from '@/components/MiningCard.vue' import MiningCard from '@/components/MiningCard.vue'
import Popup from '@/components/Popup.vue' import Popup from '@/components/Popup.vue'
import constant from '@/constance/Image'
import Bus from '@/utils/bus' import Bus from '@/utils/bus'
import { invitePool, poolList, checkBind } from '@/service/pool' import { invitePool, poolList, checkBind } from '@/service/pool'
import { PullRefresh, Toast } from 'vant' import { PullRefresh, Toast } from 'vant'
...@@ -56,6 +57,11 @@ export default Vue.extend({ ...@@ -56,6 +57,11 @@ export default Vue.extend({
show: false show: false
} }
}, },
computed: {
constant() {
return constant.HOME_IMAGE
}
},
methods: { methods: {
getList() { getList() {
poolList({ poolList({
...@@ -136,6 +142,10 @@ export default Vue.extend({ ...@@ -136,6 +142,10 @@ export default Vue.extend({
}, },
created() { created() {
this.getList() this.getList()
this.setTimer()
},
beforeDestroy() {
if (this.timer) clearInterval(this.timer)
} }
}) })
</script> </script>
......
...@@ -41,8 +41,6 @@ export default Vue.extend({ ...@@ -41,8 +41,6 @@ export default Vue.extend({
return { return {
active: 1, active: 1,
isLoading: false, isLoading: false,
// onLine: [],
// offLine: [],
lists: [], lists: [],
page: 1, page: 1,
pageSize: 10, pageSize: 10,
......
<template> <template>
<div class="mine"> <div>
<nav-bar left-arrow @click-left="onClickLeft" fixed> <nav-bar left-arrow @click-left="onClickLeft" fixed>
<template #title> <template #title>
<div class="tab-tool"> <div class="tab-tool">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment