Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
Community-Mining-Client
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mining
Community-Mining-Client
Commits
d02c7cae
Commit
d02c7cae
authored
Dec 13, 2021
by
xhx
Browse files
Options
Browse Files
Download
Plain Diff
fix:merge
parents
f50bae0c
6c63bb31
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
74 additions
and
53 deletions
+74
-53
.env.development
.env.development
+4
-5
.env.test
.env.test
+1
-3
MiningCard.vue
src/components/MiningCard.vue
+28
-21
DetailsCard.vue
src/views/Details/DetailsCard.vue
+7
-1
DetailsList.vue
src/views/Details/DetailsList.vue
+14
-8
index.vue
src/views/Details/index.vue
+6
-1
PoolList.vue
src/views/Home/PoolList.vue
+6
-13
index.vue
src/views/Home/index.vue
+8
-1
No files found.
.env.development
View file @
d02c7cae
NODE_ENV="development"
#
VUE_APP_URL="http://172.16.100.59:8090"
VUE_APP_URL="http://172.16.100.59:8092"
VUE_APP_CHAIN="http://172.16.100.
59
:8801"
VUE_APP_URL="http://172.16.100.59:8090"
#
VUE_APP_URL="http://172.16.100.59:8092"
VUE_APP_CHAIN="http://172.16.100.
247
:8801"
VUE_APP_AIRDROP = "http://172.16.100.59:8091"
VUE_APP_NODE=http://118.24.145.138:8801
\ No newline at end of file
VUE_APP_NODE=http://118.24.145.138:8801
.env.test
View file @
d02c7cae
NODE_ENV
=
'development'
VUE_APP_URL
=
"http://172.16.100.59:8090"
#VUE_APP_URL="http://172.16.100.59:8092"
#VUE_APP_CHAIN="http://172.16.100.59:8801"
VUE_APP_CHAIN
=
"http://172.16.100.247:8801"
VUE_APP_NODE
=
http
://
118.24
.
145.138
:
8801
\ No newline at end of file
VUE_APP_NODE
=
http
://
118.24
.
145.138
:
8801
src/components/MiningCard.vue
View file @
d02c7cae
<
template
>
<div
class=
"mining-card bg-card-color px-2 pt-10 pb-2 rounded-lg"
>
<div
class=
"mining-name bg-gradient-3 text-white text-13px rounded-r-full"
>
{{
info
.
name
}}
</div>
<div
class=
"mining-card bg-card-color px-2 pb-2 rounded-lg"
>
<div
class=
"mining-top w-full overflow-hidden"
>
<div
class=
"mining-name bg-gradient-3 text-white text-13px rounded-r-full overflow-hidden"
>
{{
info
.
name
}}
</div>
<span
class=
"font-semibold text-white1 ml-3 flex-shrink-0"
>
{{
info
.
friendlyName
}}
</span>
</div>
<!--
<time-box
:date=
"runDays"
:prefix=
"prefix"
/>
-->
<
div
class=
"text-right text-white2 text-sm"
@
click=
"showInfo"
>
票池每票日产出
</div
>
<
!--
<div
class=
"text-right text-white2 text-sm"
@
click=
"showInfo"
>
票池每票日产出
</div>
--
>
<div>
<div
class=
"px-2 flex items-center justify-between"
>
<span
class=
"font-semibold text-white1"
>
{{
info
.
friendlyName
}}
</span>
<div
class=
"px-2 pt-6 pl-14 pb-8 flex items-center justify-between"
>
</div>
<div
class=
"pb-3 flex items-center justify-between"
>
<div
class=
"px-2 flex flex-col items-start"
>
<div
class=
"income-count"
>
{{
rest
||
0
}}
</div>
<div
class=
"text-xs text-white2"
>
可委托票数约
</div>
<div
class=
"income-count"
>
{{
rest
||
0
}}
</div>
</div>
<button
class=
"w-24 h-9 rounded-full text-sm text-brown1 text-medium bg-gradient-4"
@
click=
"goMining"
>
立即委托
</button>
</div>
...
...
@@ -90,24 +93,28 @@ export default Vue.extend({
&
:last-of-type
{
margin-bottom
:
0
;
}
.mining-name
{
max-width
:
100%
;
min-width
:
55px
;
padding
:
2px
8px
;
.mining-top
{
position
:
absolute
;
top
:
10px
;
left
:
-5px
;
&
:
:
after
{
display
:
block
;
content
:
''
;
width
:
0
;
border-top
:
2px
solid
#7E480C
;
border-right
:
2px
solid
#7E480C
;
border-bottom
:
2px
solid
transparent
;
border-left
:
2px
solid
transparent
;
position
:
absolute
;
bottom
:
-4px
;
left
:
0
;
display
:
flex
;
align-items
:
center
;
.mining-name
{
max-width
:
100%
;
min-width
:
55px
;
padding
:
2px
8px
;
&
:
:
after
{
display
:
block
;
content
:
''
;
width
:
0
;
border-top
:
2px
solid
#7E480C
;
border-right
:
2px
solid
#7E480C
;
border-bottom
:
2px
solid
transparent
;
border-left
:
2px
solid
transparent
;
position
:
absolute
;
bottom
:
-4px
;
left
:
0
;
}
}
}
.income-count
{
...
...
src/views/Details/DetailsCard.vue
View file @
d02c7cae
...
...
@@ -19,7 +19,7 @@
<div>
最低
{{
info
.
minTicket
||
10
}}
票
</div>
</
template
>
<div>
票池周期
</div>
<div>
{{
info.
days }}天
</div>
<div>
{{ days }}天
</div>
<
template
v-slot:right
>
<div>
技术服务费
</div>
<div
class=
"special"
>
限时免费
</div>
...
...
@@ -39,6 +39,11 @@ export default Vue.extend({
info
:
{
type
:
Object
}
},
computed
:
{
days
():
number
{
return
+
this
.
info
.
days
-
+
this
.
info
.
runDays
}
}
})
</
script
>
\ No newline at end of file
src/views/Details/DetailsList.vue
View file @
d02c7cae
<
template
>
<div
class=
"bg-theme-color pt-3"
>
<div
class=
"bg-card2-color px-4"
>
<
!--
<
div
class=
"bg-card2-color px-4"
>
<p
class=
"details-title"
>
委托说明
</p>
<div
class=
"py-2"
>
<list-line>
...
...
@@ -20,28 +20,28 @@
<
template
v-slot:right
><span>
到期本金自动取回
</span></
template
>
</list-line>
</div>
</div>
<div
class=
"bg-card2-color px-4 mt-3 pb-
16
"
>
</div>
-->
<div
class=
"bg-card2-color px-4 mt-3 pb-
4
"
>
<p
class=
"details-title"
>
投票信息
</p>
<div
class=
"py-2"
>
<list-line>
票池地址
<
template
v-slot:right
><span>
{{
info
.
minerAddr
||
'-'
}}
</span></
template
>
<
template
v-slot:right
><span>
{{
address
||
'-'
}}
</span></
template
>
</list-line>
<list-line>
<
!-- <
list-line>
发起人投票地址
<template v-slot:right><span>{{ info.selfAddr || '-' }}</span></template>
</list-line>
<list-line>
发起人委托票数
<template v-slot:right><span>{{ info.selfEntrustTicket || 0 }} 票</span></template>
</list-line>
</list-line>
-->
<list-line>
当前
委托人数
委托人数
<
template
v-slot:right
><span
class=
"special"
>
{{
info
.
entrustPerson
||
0
}}
人
</span></
template
>
</list-line>
<list-line>
当前委托投票票数
委托总票
<
template
v-slot:right
><span
class=
"special"
>
{{
info
.
entrustTicket
||
0
}}
票
</span></
template
>
</list-line>
</div>
...
...
@@ -70,6 +70,12 @@ export default Vue.extend({
info
:
{
type
:
Object
}
},
computed
:
{
address
():
string
{
const
length
=
this
.
info
.
minerAddr
?.
length
return
this
.
info
?.
minerAddr
?.
slice
(
0
,
10
)
+
'...'
+
this
.
info
?.
minerAddr
?.
slice
(
length
-
10
)
}
}
})
</
script
>
...
...
src/views/Details/index.vue
View file @
d02c7cae
<
template
>
<div>
<div
class=
"min-h-screen"
>
<nav-bar
left-arrow
@
click-left=
"onClickLeft"
fixed
>
<template
#
title
>
<div
class=
"text-lg text-white"
>
...
...
@@ -54,7 +54,12 @@ export default Vue.extend({
})
},
getInfo
()
{
Toast
.
loading
({
forbidClick
:
true
,
duration
:
0
})
poolInfo
(
this
.
$route
.
query
.
id
as
string
).
then
((
res
:
any
)
=>
{
Toast
.
clear
()
this
.
info
=
res
.
data
.
data
checkBind
(
this
.
$route
.
query
.
id
as
string
).
then
(
res
=>
{
// 已经绑定过
...
...
src/views/Home/PoolList.vue
View file @
d02c7cae
...
...
@@ -107,6 +107,7 @@ export default Vue.extend({
page
:
this
.
page
,
pageSize
:
this
.
pageSize
}).
then
((
res
:
any
)
=>
{
Toast
.
clear
()
if
(
this
.
refresh
)
{
this
.
refresh
=
false
this
.
lists
=
[]
...
...
@@ -116,6 +117,7 @@ export default Vue.extend({
this
.
count
=
+
data
.
count
document
.
addEventListener
(
'scroll'
,
this
.
scrollEvent
)
}).
catch
(
e
=>
{
Toast
.
clear
()
const
err
=
e
.
response
if
(
err
.
data
?.
code
===
406
&&
err
.
data
?.
reason
===
'USER_NOT_BIND'
)
{
this
.
show
=
true
...
...
@@ -217,20 +219,11 @@ export default Vue.extend({
},
},
mounted
()
{
// getCurrentBTYAddress('',(res: string) => {
// console.log('BTY ADDRESS', res)
// this.$store.commit('app/SET_ADDRESS', res)
// getDeviceId('', (ret: string) => {
// console.log(ret, 'DEVICEID')
// this.$store.commit('app/SET_DEVICEID', ret)
// hasPoolAddr(res)
// this.getInfo()
// this.getCoins()
// this.getList()
// this.setTimer()
// })
// })
setTimeout
(()
=>
{
// Toast.loading({
// forbidClick: true,
// duration: 0
// })
this
.
getInfo
()
this
.
getCoins
()
this
.
getList
()
...
...
src/views/Home/index.vue
View file @
d02c7cae
...
...
@@ -23,7 +23,7 @@ import Vue from 'vue'
import
Header
from
'@/components/Header.vue'
import
InfoCard
from
'@/views/Home/InfoCard.vue'
import
PoolList
from
'@/views/Home/PoolList.vue'
import
{
Icon
}
from
'vant'
import
{
Icon
,
Toast
}
from
'vant'
export
default
Vue
.
extend
({
components
:
{
Header
,
...
...
@@ -35,6 +35,12 @@ export default Vue.extend({
goMining
()
{
this
.
$router
.
push
({
path
:
'/mine'
,
query
:
{}})
},
},
mounted
()
{
Toast
.
loading
({
duration
:
0
,
forbidClick
:
true
})
}
})
</
script
>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment