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
153c9039
Commit
153c9039
authored
Sep 28, 2021
by
xhx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整
parent
7bb75be5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
21 deletions
+19
-21
.env.development
.env.development
+3
-2
.env.test
.env.test
+3
-2
test.ts
src/utils/test.ts
+2
-2
index.vue
src/views/Details/index.vue
+4
-4
InfoCard.vue
src/views/Home/InfoCard.vue
+7
-11
No files found.
.env.development
View file @
153c9039
NODE_ENV="development"
NODE_ENV="development"
#
VUE_APP_URL="http://172.16.100.59:8090"
VUE_APP_URL="http://172.16.100.59:8090"
VUE_APP_URL="http://172.16.100.59:8092"
#
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.59:8801"
#VUE_APP_CHAIN="https://mainnet.bityuan.com/api"
#VUE_APP_CHAIN="https://mainnet.bityuan.com/api"
\ No newline at end of file
.env.test
View file @
153c9039
NODE_ENV
=
'development'
NODE_ENV
=
'development'
#
VUE_APP_URL="http://172.16.100.59:8090"
VUE_APP_URL
=
"http://172.16.100.59:8090"
VUE_APP_URL
=
"http://172.16.100.59:8092"
#
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.59:8801"
\ No newline at end of file
src/utils/test.ts
View file @
153c9039
...
@@ -8,8 +8,8 @@
...
@@ -8,8 +8,8 @@
// }
// }
export
const
test
=
{
export
const
test
=
{
// addr: '1Lm22ZxsCHYE3PNtEnGYZJduJs5KG95GUp',
// addr: '1Lm22ZxsCHYE3PNtEnGYZJduJs5KG95GUp',
addr
:
'16vD58z9z2Uvpci8ssvj797ENahbYZ497W'
,
//
addr: '16vD58z9z2Uvpci8ssvj797ENahbYZ497W',
//
addr: '16GgdskdRFasxuMdtBaxNS4ZagyZgEUuMs',
addr
:
'16GgdskdRFasxuMdtBaxNS4ZagyZgEUuMs'
,
// addr: '1LGQLmGVHSNthZcLbGpVfJTDmcicMQprZs',
// addr: '1LGQLmGVHSNthZcLbGpVfJTDmcicMQprZs',
privateKey
:
'0xa65b62735022cd47b11c5a88b0caac8d360810257aaf1e14bbc330dee63b35ff'
privateKey
:
'0xa65b62735022cd47b11c5a88b0caac8d360810257aaf1e14bbc330dee63b35ff'
}
}
...
...
src/views/Details/index.vue
View file @
153c9039
...
@@ -52,9 +52,6 @@ export default Vue.extend({
...
@@ -52,9 +52,6 @@ export default Vue.extend({
service
.
getBalance
(
this
.
$store
.
state
.
app
.
address
,
'coins'
).
then
((
res
:
any
)
=>
{
service
.
getBalance
(
this
.
$store
.
state
.
app
.
address
,
'coins'
).
then
((
res
:
any
)
=>
{
this
.
profit
=
Math
.
floor
((
res
.
data
.
result
as
any
)[
0
].
balance
/
1
e8
)
this
.
profit
=
Math
.
floor
((
res
.
data
.
result
as
any
)[
0
].
balance
/
1
e8
)
})
})
service
.
getBalance
(
this
.
$store
.
state
.
app
.
address
,
'ticket'
).
then
((
res
:
any
)
=>
{
this
.
ticket
=
Math
.
floor
((
res
.
data
.
result
as
any
)[
0
].
balance
/
1
e8
)
})
},
},
getInfo
()
{
getInfo
()
{
poolInfo
(
this
.
$route
.
query
.
id
as
string
).
then
((
res
:
any
)
=>
{
poolInfo
(
this
.
$route
.
query
.
id
as
string
).
then
((
res
:
any
)
=>
{
...
@@ -91,6 +88,9 @@ export default Vue.extend({
...
@@ -91,6 +88,9 @@ export default Vue.extend({
note
:
'coins->ticket'
,
note
:
'coins->ticket'
,
execName
:
'ticket'
execName
:
'ticket'
})
})
// service.getBalance(this.$store.state.app.address, 'coins').then((res: any) => {
// this.profit = Math.floor((res.data.result as any)[0].balance / 1e8)
// })
const
sign
=
await
this
.
signGroup
([
bindRes
.
data
.
result
.
txHex
,
transRes
.
data
.
result
]);
const
sign
=
await
this
.
signGroup
([
bindRes
.
data
.
result
.
txHex
,
transRes
.
data
.
result
]);
Toast
.
loading
({
Toast
.
loading
({
duration
:
0
,
duration
:
0
,
...
@@ -117,7 +117,7 @@ export default Vue.extend({
...
@@ -117,7 +117,7 @@ export default Vue.extend({
if
(
isBind
)
return
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
.
$store
.
commit
(
'global/SET_BALANCE'
,
this
.
ticket
Num
*
Number
(
value
)
+
this
.
ticket
)
this
.
$store
.
commit
(
'global/SET_BALANCE'
,
this
.
ticket
)
this
.
$toast
(
'购买成功'
)
this
.
$toast
(
'购买成功'
)
}
}
}).
catch
(
e
=>
{
}).
catch
(
e
=>
{
...
...
src/views/Home/InfoCard.vue
View file @
153c9039
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
Vue
from
'vue'
import
Vue
from
'vue'
import
service
from
'@/service/chain33'
import
service
from
'@/service/chain33'
import
{
TICKET_COUNT
}
from
'@/constance/const'
import
{
TICKET_COUNT
,
INCOME
}
from
'@/constance/const'
import
{
Toast
}
from
'vant'
import
{
Toast
}
from
'vant'
import
Bus
from
'@/utils/bus'
import
Bus
from
'@/utils/bus'
export
default
Vue
.
extend
({
export
default
Vue
.
extend
({
...
@@ -55,20 +55,16 @@ export default Vue.extend({
...
@@ -55,20 +55,16 @@ export default Vue.extend({
service
.
getBalance
(
this
.
$store
.
state
.
app
.
address
,
'ticket'
).
then
((
res
:
any
)
=>
{
service
.
getBalance
(
this
.
$store
.
state
.
app
.
address
,
'ticket'
).
then
((
res
:
any
)
=>
{
this
.
profit
=
Math
.
floor
((
res
.
data
.
result
as
any
)[
0
].
balance
/
1
e8
)
this
.
profit
=
Math
.
floor
((
res
.
data
.
result
as
any
)[
0
].
balance
/
1
e8
)
this
.
ticketNum
=
Math
.
floor
((
res
.
data
.
result
as
any
)[
0
].
frozen
/
1
e8
/
TICKET_COUNT
)
this
.
ticketNum
=
Math
.
floor
((
res
.
data
.
result
as
any
)[
0
].
frozen
/
1
e8
/
TICKET_COUNT
)
console
.
log
(
this
.
$store
.
state
.
global
.
inputBalance
,
'income'
)
console
.
log
(
this
.
profit
,
'profit'
)
// 等待 freezon
// 等待 freezon
if
(
this
.
$store
.
state
.
global
.
inputBalance
<=
this
.
profit
)
{
// if (this.profit
<=
this
.
$store
.
state
.
global
.
inputBalance
+
INCOME
)
{
this
.
btnClick
=
true
//
this.btnClick = true
this
.
btnText
=
'等待挖矿'
//
this.btnText = '等待挖矿'
this
.
waitToPool
()
//
this.waitToPool()
}
else
{
//
} else {
if
(
this
.
timer
)
clearInterval
(
this
.
timer
)
if
(
this
.
timer
)
clearInterval
(
this
.
timer
)
// 普通状态 重置 inputBalance
this
.
$store
.
commit
(
'global/SET_BALANCE'
,
0
)
this
.
btnText
=
'领取收益'
this
.
btnText
=
'领取收益'
this
.
btnClick
=
false
this
.
btnClick
=
false
}
//
}
})
})
},
},
getFee
()
{
getFee
()
{
...
...
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