Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
meme_image
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘续中
meme_image
Commits
9016a99b
Commit
9016a99b
authored
Jun 23, 2024
by
brent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify balance
parent
484da319
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
+6
-3
Header.vue
src/components/Header.vue
+4
-1
Index.vue
src/views/Index.vue
+1
-1
User.vue
src/views/User.vue
+1
-1
No files found.
src/components/Header.vue
View file @
9016a99b
...
...
@@ -64,6 +64,7 @@ const balance = async () => {
balanceValue
.
value
=
temp
/
1000000000000000000
n
}
console
.
log
(
"
Header balanceValue.value
"
,
balanceValue
.
value
)
localStorage
.
setItem
(
"
aon_balance
"
,
balanceValue
.
value
)
}
catch
(
error
)
{
console
.
log
(
error
,
"
balance error
"
)
}
...
...
@@ -82,8 +83,10 @@ const checkIfUserPage = () => {
onMounted
(()
=>
{
checkIfUserPage
();
let
balance
=
localStorage
.
getItem
(
"
aon_balance
"
)
balanceValue
.
value
=
balance
balance
()
//
balance()
});
</
script
>
...
...
src/views/Index.vue
View file @
9016a99b
...
...
@@ -245,7 +245,7 @@ async function login() {
})
return
}
//
bus.emit('get_balance',"login");
bus
.
emit
(
'
get_balance
'
,
"
login
"
);
console
.
log
(
'
index islogin sssss
'
,
temp
)
}
...
...
src/views/User.vue
View file @
9016a99b
...
...
@@ -88,7 +88,7 @@ async function getAccount() {
let
get_account
=
await
ethereum
.
request
({
method
:
'
eth_requestAccounts
'
})
get_account
=
get_account
[
0
]
account
.
value
=
get_account
//
bus.emit('get_balance', "login");
bus
.
emit
(
'
get_balance
'
,
"
login
"
);
}
}
catch
(
error
)
{
console
.
log
(
error
,
"
getAccount error
"
)
...
...
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