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
bf0cc816
Commit
bf0cc816
authored
Dec 09, 2021
by
xhx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
5d3185f7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
32 deletions
+32
-32
MiningCard.vue
src/components/MiningCard.vue
+4
-4
DetailsList.vue
src/views/Details/DetailsList.vue
+4
-4
PoolList.vue
src/views/Home/PoolList.vue
+24
-24
No files found.
src/components/MiningCard.vue
View file @
bf0cc816
<
template
>
<div
class=
"mining-card bg-card-color px-2 p
t-10 p
b-2 rounded-lg"
>
<div
class=
"mining-card bg-card-color px-2 pb-2 rounded-lg"
>
<div
class=
"mining-name bg-gradient-3 text-white text-13px rounded-r-full"
>
{{
info
.
name
}}
</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"
>
<div
class=
"px-2
pt-3 pl-14 pb-8
flex items-center justify-between"
>
<span
class=
"font-semibold text-white1"
>
{{
info
.
friendlyName
}}
</span>
</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>
...
...
src/views/Details/DetailsList.vue
View file @
bf0cc816
...
...
@@ -37,11 +37,11 @@
<template v-slot:right><span>{{ info.selfEntrustTicket || 0 }} 票</span></template>
</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>
...
...
@@ -73,8 +73,8 @@ export default Vue.extend({
},
computed
:
{
address
():
string
{
const
length
=
this
.
info
.
minerAddr
.
length
return
this
.
info
.
minerAddr
.
slice
(
0
,
10
)
+
'...'
+
this
.
info
.
minerAddr
.
slice
(
length
-
10
)
const
length
=
this
.
info
.
minerAddr
?
.
length
return
this
.
info
?.
minerAddr
?.
slice
(
0
,
10
)
+
'...'
+
this
.
info
?.
minerAddr
?
.
slice
(
length
-
10
)
}
}
})
...
...
src/views/Home/PoolList.vue
View file @
bf0cc816
...
...
@@ -162,32 +162,32 @@ export default Vue.extend({
sellDays
:
string
,
startTime
:
string
})
{
service
.
getTicketAddress
(
this
.
$store
.
state
.
app
.
address
).
then
(
r
=>
{
//
service.getTicketAddress(this.$store.state.app.address).then(r => {
// 已经投过票,跳过封闭期
if
(
r
.
data
.
result
?.
data
)
{
checkBind
(
val
.
id
).
then
(
res
=>
{
if
(
res
.
data
.
data
.
isSucc
)
{
Toast
.
clear
()
//
if (r.data.result?.data) {
//
checkBind(val.id).then(res => {
//
if (res.data.data.isSucc) {
//
Toast.clear()
this
.
$router
.
push
({
path
:
'/details'
,
query
:
{
id
:
val
.
id
||
'1'
}})
}
}).
catch
(()
=>
{
Toast
(
'该账号已绑定过票池'
)
})
}
else
{
// 未投过,检测封闭期是否到期,到期停止进入
const
_now
=
Date
.
now
()
const
endTime
=
(
+
val
.
startTime
+
(
+
val
.
sellDays
*
24
*
3600
))
*
1000
if
(
endTime
<
_now
&&
val
.
sellDays
!==
'0'
)
{
Toast
(
'该票池已过封闭期,您不能进入'
)
}
else
{
// 清除失败提示
Toast
.
clear
()
this
.
$router
.
push
({
path
:
'/details'
,
query
:
{
id
:
val
.
id
||
'1'
}})
}
}
}).
catch
(()
=>
{
Toast
(
'网络异常'
)
})
//
}
//
}).catch(() => {
//
Toast('该账号已绑定过票池')
//
})
//
} else {
//
// 未投过,检测封闭期是否到期,到期停止进入
//
const _now = Date.now()
//
const endTime = (+val.startTime + (+val.sellDays * 24 * 3600)) * 1000
//
if (endTime
<
_now
&&
val
.
sellDays
!==
'0'
)
{
//
Toast('该票池已过封闭期,您不能进入')
//
} else {
//
// 清除失败提示
//
Toast.clear()
//
this.$router.push({ path: '/details', query: { id: val.id || '1' }})
//
}
//
}
//
}).catch(() => {
//
Toast('网络异常')
//
})
},
addInvite
(
val
:
string
)
{
if
(
!
val
)
{
...
...
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