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
959d4750
Commit
959d4750
authored
Jan 24, 2022
by
xhx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:邀请人验证
parent
738c427e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
10 deletions
+30
-10
index.html
public/index.html
+1
-3
pool.ts
src/service/pool.ts
+9
-0
PoolList.vue
src/views/Home/PoolList.vue
+20
-7
No files found.
public/index.html
View file @
959d4750
...
...
@@ -13,9 +13,7 @@
<strong>
We're sorry but
<
%=
htmlWebpackPlugin
.
options
.
title
%
>
doesn't work properly without JavaScript enabled. Please enable it to continue.
</strong>
</noscript>
<div
id=
"app"
></div>
<script>
console
.
log
(
'v1.1.0'
)
</script>
<script>
console
.
log
(
'v1.3.0'
)
</script>
<!-- built files will be auto injected -->
</body>
</html>
src/service/pool.ts
View file @
959d4750
...
...
@@ -50,6 +50,15 @@ export const bindPool = function(id: string, amount: string|number, isBind?: boo
}
/**
* 是否是超级节点|社区节点
* @param addr
* @returns
*/
export
const
getTop
=
function
(
addr
:
string
)
{
return
service
.
get
(
'/web/is-top'
,
{
params
:
{
addr
}})
}
/**
* 是否初次绑定委托
* @param id
* @returns
...
...
src/views/Home/PoolList.vue
View file @
959d4750
...
...
@@ -61,7 +61,7 @@ import MiningCard from '@/components/MiningCard.vue'
import
xPopup
from
'@/components/Popup.vue'
import
constant
from
'@/constance/Image'
import
Bus
from
'@/utils/bus'
import
{
invitePool
,
poolList
,
checkBind
}
from
'@/service/pool'
import
{
invitePool
,
poolList
,
checkBind
,
getTop
}
from
'@/service/pool'
import
service
from
'@/service/chain33'
import
{
PullRefresh
,
Toast
,
Popup
,
Dialog
}
from
'vant'
import
{
mapState
}
from
'vuex'
...
...
@@ -219,11 +219,9 @@ export default Vue.extend({
Toast
(
'请先输入推荐人地址'
)
return
}
else
{
// 查询冻结余额, > 9000 可推荐
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
)
{
getTop
(
val
).
then
(
res
=>
{
console
.
log
(
'res-isTop'
,
res
)
if
(
res
.
data
.
data
.
isSucc
)
{
this
.
value
=
val
this
.
text
=
'5'
if
(
this
.
tipsTimer
)
clearInterval
(
this
.
tipsTimer
)
...
...
@@ -232,7 +230,22 @@ export default Vue.extend({
},
1000
)
this
.
showSure
=
true
}
else
{
Toast
(
'该推荐人暂无推荐资格'
)
// 查询冻结余额, > 9000 可推荐
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'
if
(
this
.
tipsTimer
)
clearInterval
(
this
.
tipsTimer
)
this
.
tipsTimer
=
setInterval
(()
=>
{
this
.
text
=
+
this
.
text
>
0
?
+
this
.
text
-
1
+
''
:
'确定'
},
1000
)
this
.
showSure
=
true
}
else
{
Toast
(
'该推荐人暂无推荐资格'
)
}
})
}
})
}
...
...
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