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
10767c60
Commit
10767c60
authored
Jan 14, 2022
by
xhx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:调整
parent
2e76f9c9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
11 deletions
+16
-11
MiningCard.vue
src/components/MiningCard.vue
+1
-1
index.vue
src/views/Details/index.vue
+1
-1
InfoCard.vue
src/views/Home/InfoCard.vue
+5
-4
PoolList.vue
src/views/Home/PoolList.vue
+9
-5
No files found.
src/components/MiningCard.vue
View file @
10767c60
...
...
@@ -80,7 +80,7 @@ export default Vue.extend({
}
},
rest
()
{
return
Math
.
floor
((
this
.
coin
-
1
)
/
TICKET_COUNT
)
return
Math
.
floor
((
this
.
coin
-
1
)
/
TICKET_COUNT
)
<
0
?
0
:
Math
.
floor
((
this
.
coin
-
1
)
/
TICKET_COUNT
)
}
}
})
...
...
src/views/Details/index.vue
View file @
10767c60
...
...
@@ -78,7 +78,7 @@ export default Vue.extend({
},
async
buy
(
value
:
string
)
{
if
((
this
.
profit
-
1
)
/
this
.
ticketNum
<
+
(
this
.
min
as
number
))
{
Toast
(
`您的票数余额为
${
Math
.
floor
((
this
.
profit
-
1
)
/
this
.
ticketNum
)}
票,不足
${
this
.
min
}
票`
)
Toast
(
`您的票数余额为
${
Math
.
floor
((
this
.
profit
-
1
)
/
this
.
ticketNum
)
<
0
?
0
:
Math
.
floor
((
this
.
profit
-
1
)
/
this
.
ticketNum
)
}
票,不足
${
this
.
min
}
票`
)
return
}
const
bindRes
=
await
service
.
createBindMiner
({
...
...
src/views/Home/InfoCard.vue
View file @
10767c60
...
...
@@ -36,12 +36,12 @@ import { mapState } from 'vuex'
export
default
Vue
.
extend
({
data
()
{
return
{
addr
:
''
,
addr
:
''
,
// 当前地址
inviter
:
''
,
// 推荐人地址
profit
:
0
,
ticketNum
:
0
,
fee
:
0
,
profit
:
0
,
// 当前收益
ticketNum
:
0
,
// 当前票数
btnText
:
'领取奖励'
,
fee
:
0
,
timer
:
0
,
waiter
:
1000
}
...
...
@@ -62,6 +62,7 @@ export default Vue.extend({
getInfo
()
{
service
.
getBalance
(
this
.
address
,
'ticket'
).
then
((
res
:
any
)
=>
{
const
{
result
}
=
res
.
data
console
.
log
(
'用户余额'
,
result
[
0
].
frozen
)
this
.
profit
=
Math
.
floor
(
result
[
0
].
balance
/
1
e8
)
this
.
ticketNum
=
Math
.
floor
(
result
[
0
].
frozen
/
1
e8
/
TICKET_COUNT
)
// this.profit = Math.floor((res.data.result as any)[0].balance / 1e8)
...
...
src/views/Home/PoolList.vue
View file @
10767c60
...
...
@@ -77,18 +77,21 @@ export default Vue.extend({
},
data
()
{
return
{
// 列表相关
lists
:
[]
as
any
,
isLoading
:
false
,
refresh
:
false
,
page
:
1
,
pageSize
:
10
,
count
:
0
,
count
:
0
,
// 总数
coins
:
0
,
// 计算余票
timer
:
0
,
waiter
:
180000
,
show
:
false
,
// 数据展示,暂时隐藏
showInfo
:
false
,
coins
:
0
,
val
:
''
,
val
:
''
,
// 展示信息
show
:
false
,
// 邀请人弹窗
// 邀请确认弹窗
showSure
:
false
,
text
:
'5'
,
value
:
''
,
...
...
@@ -217,8 +220,9 @@ export default Vue.extend({
return
}
else
{
// 查询冻结余额, > 9000 可推荐
service
.
getBalance
(
this
.
address
,
'ticket'
).
then
((
res
:
any
)
=>
{
service
.
getBalance
(
val
,
'ticket'
).
then
((
res
:
any
)
=>
{
const
restFreeze
=
Math
.
floor
(
res
.
data
.
result
[
0
].
frozen
/
1
e8
)
console
.
log
(
res
.
data
.
result
[
0
].
frozen
,
'冻结余额--ticket'
,
restFreeze
)
if
(
restFreeze
>=
9000
)
{
this
.
value
=
val
this
.
text
=
'5'
...
...
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