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
b5d567cf
Commit
b5d567cf
authored
Dec 28, 2021
by
xhx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:弹窗及导入地址获取
parent
bae01511
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
89 additions
and
24 deletions
+89
-24
.env.development
.env.development
+2
-2
.env.test
.env.test
+2
-2
index.html
public/index.html
+1
-1
PoolList.vue
src/views/Home/PoolList.vue
+78
-5
index.vue
src/views/NodePage/List/index.vue
+6
-14
No files found.
.env.development
View file @
b5d567cf
NODE_ENV="development"
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: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
.env.test
View file @
b5d567cf
NODE_ENV
=
'development'
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:8090"
VUE_APP_URL
=
"http://172.16.100.59:8092"
VUE_APP_CHAIN
=
"http://172.16.100.247:8801"
VUE_APP_NODE
=
http
://
118.24
.
145.138
:
8801
public/index.html
View file @
b5d567cf
...
...
@@ -14,7 +14,7 @@
</noscript>
<div
id=
"app"
></div>
<script>
console
.
log
(
'v1.0.
2
'
)
console
.
log
(
'v1.0.
4
'
)
</script>
<!-- built files will be auto injected -->
</body>
...
...
src/views/Home/PoolList.vue
View file @
b5d567cf
...
...
@@ -27,6 +27,22 @@
</div>
</div>
<x-popup
:show=
"show"
@
getMessage=
"addInvite"
/>
<van-dialog
v-model=
"showSure"
title=
"注意"
:show-cancel-button=
"false"
:show-confirm-button=
"false"
>
<div
class=
"px-2 mt-2"
>
<p>
1台手机仅可为一个钱包地址提供委托服务,一旦绑定委托关系,无法解绑。
</p>
<br>
<p>
请再次确认推荐人地址:
<span
class=
"text-orange1"
>
{{ value }}
</span></p>
</div>
<div
class=
"flex justify-around border-t mt-2"
>
<div
class=
"py-3 flex-1 border-r"
@
click=
"showSure = false"
>
取消
</div>
<div
class=
"py-3 flex-1"
@
click=
"handleConfirm"
>
{{ text }}
</div>
</div>
</van-dialog>
<van-popup
v-model=
"showInfo"
>
<div
class=
"mining-card-info"
>
<p
class=
"text-lg text-white"
>
票池每日矿产出
</p>
...
...
@@ -47,15 +63,16 @@ import constant from '@/constance/Image'
import
Bus
from
'@/utils/bus'
import
{
invitePool
,
poolList
,
checkBind
}
from
'@/service/pool'
import
service
from
'@/service/chain33'
import
{
PullRefresh
,
Toast
,
Popup
}
from
'vant'
import
{
PullRefresh
,
Toast
,
Popup
,
Dialog
}
from
'vant'
// import { getDeviceId, getCurrentBTYAddress } from '@/utils/bridge' // 币钱包环境
export
default
Vue
.
extend
({
components
:
{
'van-pull-refresh'
:
PullRefresh
,
'van-popup'
:
Popup
,
'van-dialog'
:
Dialog
.
Component
,
MiningCard
,
'x-popup'
:
xPopup
'x-popup'
:
xPopup
,
},
data
()
{
return
{
...
...
@@ -70,7 +87,11 @@ export default Vue.extend({
show
:
false
,
showInfo
:
false
,
coins
:
0
,
val
:
''
val
:
''
,
showSure
:
false
,
text
:
'5'
,
value
:
''
,
tipsTimer
:
0
}
},
computed
:
{
...
...
@@ -184,10 +205,55 @@ export default Vue.extend({
Toast
(
'请先输入推荐人地址'
)
return
}
invitePool
(
val
).
then
((
res
:
any
)
=>
{
this
.
value
=
val
this
.
text
=
'5'
if
(
this
.
tipsTimer
)
clearInterval
(
this
.
tipsTimer
)
this
.
tipsTimer
=
setInterval
(()
=>
{
console
.
log
(
'run---------'
)
this
.
text
=
+
this
.
text
>
0
?
+
this
.
text
-
1
+
''
:
'确定'
},
1000
)
this
.
showSure
=
true
// Dialog.confirm({
// title: '提示',
// message: `注意:1台手机仅可为一个钱包地址提供委托服务,一旦绑定委托关系,无法解绑。\n请再次确认推荐人地址:${val}`,
// confirmButtonText: `${text}`,
// }).then(() => {
// // on close
// if (+text > 0) {
// console.log('-----------------')
// return false;
// }
// invitePool(val).then((res: any) => {
// if (res.data.data.isSucc) {
// Toast('添加成功')
// this.show = false
// this.getList()
// Bus.$emit('updateMsg', true)
// } else {
// Toast('请输入正确的推荐人地址')
// }
// }).catch((e) => {
// console.log(e)
// const { status } = e.response
// if (status === 413) {
// Toast('该设备已绑定过推荐人')
// } else {
// Toast('请输入正确的推荐人地址')
// }
// })
// });
},
handleConfirm
()
{
if
(
+
this
.
text
>
0
)
{
this
.
showSure
=
true
;
return
;
}
console
.
log
(
'this.val'
,
this
.
value
)
invitePool
(
this
.
value
).
then
((
res
:
any
)
=>
{
if
(
res
.
data
.
data
.
isSucc
)
{
Toast
(
'添加成功'
)
this
.
show
=
false
this
.
showSure
=
false
this
.
getList
()
Bus
.
$emit
(
'updateMsg'
,
true
)
}
else
{
...
...
@@ -201,8 +267,9 @@ export default Vue.extend({
}
else
{
Toast
(
'请输入正确的推荐人地址'
)
}
this
.
showSure
=
false
})
}
,
}
},
mounted
()
{
setTimeout
(()
=>
{
...
...
@@ -290,4 +357,9 @@ export default Vue.extend({
/
deep
/
.van-popup--center
{
border-radius
:
27px
;
}
/
deep
/
.van-dialog__header
{
font-weight
:
bold
;
color
:
#f00
;
font-size
:
16px
;
}
</
style
>
\ No newline at end of file
src/views/NodePage/List/index.vue
View file @
b5d567cf
...
...
@@ -79,13 +79,9 @@ import { passwdInputProxy } from '@/utils/passwdProxy';
import
{
importSeed
}
from
'@/utils/bridge'
;
import
{
createAccount
}
from
'@/utils/account'
;
import
{
Toast
,
Dialog
}
from
'vant'
;
import
{
mapState
}
from
'vuex'
;
export
default
Vue
.
extend
({
data
()
{
return
{
// mapState({
// wifiName: ''
// }),
pageShow
:
false
,
wifiName
:
''
,
devices
:
[]
as
Array
<
any
>
,
...
...
@@ -100,9 +96,6 @@ export default Vue.extend({
btyAddress
():
string
{
return
this
.
$store
.
state
.
app
.
address
},
// ...mapState({
// btyAddress: (state: any) => state.app.address
// })
},
components
:
{
DeviceItem
,
...
...
@@ -126,7 +119,7 @@ export default Vue.extend({
},
resetWalletHandler
(
params
:
any
){
if
(
!
this
.
isEqualBtyAddress
(
params
.
mineAddress
))
{
this
.
$toast
(
'请确认当前币钱包地址与设备地址一致'
);
this
.
$toast
(
'请确认当前币钱包地址与
YUAN-miner
设备地址一致'
);
return
;
}
let
toast
:
any
;
...
...
@@ -169,8 +162,8 @@ export default Vue.extend({
Dialog
.
alert
({
title
:
'关闭成功'
,
// message: '矿机程序已经下载完成,请手动重启
设备',//请等待
程序重启
message
:
'节点关闭成功,请手动关闭设备'
,
// message: '矿机程序已经下载完成,请手动重启
YUAN-miner设备',//请等待YUAN-miner
程序重启
message
:
'节点关闭成功,请手动关闭
YUAN-miner
设备'
,
})
.
then
(()
=>
{
// on close
...
...
@@ -200,7 +193,7 @@ export default Vue.extend({
},
routeTo
(
params
:
any
)
{
if
(
!
this
.
isEqualBtyAddress
(
params
.
mineAddress
))
{
this
.
$toast
(
'请确认当前币钱包地址与设备地址一致'
);
this
.
$toast
(
'请确认当前币钱包地址与
YUAN-miner
设备地址一致'
);
return
;
}
this
.
$router
.
push
({
...
...
@@ -228,7 +221,7 @@ export default Vue.extend({
forbidClick
:
true
,
message
:
'正在导入钱包,请稍后...'
});
const
label
=
'节点'
;
const
label
=
'
YUAN-miner
节点'
;
await
createAccount
({
seed
,
passwd
,
...
...
@@ -308,4 +301,4 @@ export default Vue.extend({
min-height
:
80vh
;
}
}
</
style
>
\ No newline at end of file
</
style
>
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