Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
ycc-website
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
Website
ycc-website
Commits
a9627295
Commit
a9627295
authored
Dec 19, 2023
by
wenglk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
地址转小写
parent
bdbe3b53
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
86 additions
and
80 deletions
+86
-80
chartsInAddr.vue
src/components/chartsInAddr.vue
+0
-0
address.ts
src/mixin/address.ts
+0
-0
AddressOverview.ts
src/mixin/componentsMixin/AddressOverview.ts
+86
-80
No files found.
src/components/chartsInAddr.vue
View file @
a9627295
This diff is collapsed.
Click to expand it.
src/mixin/address.ts
View file @
a9627295
This diff is collapsed.
Click to expand it.
src/mixin/componentsMixin/AddressOverview.ts
View file @
a9627295
...
@@ -3,92 +3,98 @@ import QRCode from "qrcode";
...
@@ -3,92 +3,98 @@ import QRCode from "qrcode";
import
{
getAddressTxCount
}
from
"@/service/api"
;
import
{
getAddressTxCount
}
from
"@/service/api"
;
import
Rpc
from
"@/utils/Rpc"
;
import
Rpc
from
"@/utils/Rpc"
;
export
default
Vue
.
extend
({
export
default
Vue
.
extend
({
data
()
{
data
()
{
return
{
return
{
txCount
:
0
,
txCount
:
0
,
receive
:
0
,
receive
:
0
,
send
:
0
,
send
:
0
,
value
:
0
,
value
:
0
,
};
};
},
watch
:
{
"$route.query.address"
()
{
this
.
getAddrOverview
();
this
.
init
();
getAddressTxCount
(
this
.
$route
.
query
.
address
as
string
).
then
((
ret
)
=>
{
if
(
ret
.
error
===
null
)
{
this
.
txCount
=
ret
.
result
;
}
});
},
},
},
watch
:
{
mounted
()
{
"$route.query.address"
()
{
this
.
getAddrOverview
();
this
.
getAddrOverview
();
this
.
init
();
this
.
init
();
getAddressTxCount
(
this
.
$route
.
query
.
address
as
string
).
then
((
ret
)
=>
{
getAddressTxCount
(
if
(
ret
.
error
===
null
)
{
(
this
.
$route
.
query
.
address
as
string
).
toLowerCase
()
this
.
txCount
=
ret
.
result
;
).
then
((
ret
)
=>
{
}
if
(
ret
.
error
===
null
)
{
});
this
.
txCount
=
ret
.
result
;
},
}
computed
:
{
});
tradeInTotalList
():
{
name
:
string
;
value
:
number
}[]
{
return
[
// {
// name: this.$t("lang.address.totalReception") as string,
// value: this.receive,
// },
// {
// name: this.$t("lang.address.totalSent") as string,
// value: this.send,
// },
{
name
:
this
.
$t
(
"lang.address.totalValue"
)
as
string
,
value
:
this
.
value
,
},
},
{
},
name
:
this
.
$t
(
"lang.block.txCount"
)
as
string
,
mounted
()
{
value
:
this
.
txCount
,
this
.
getAddrOverview
();
this
.
init
();
getAddressTxCount
(
(
this
.
$route
.
query
.
address
as
string
).
toLowerCase
()
).
then
((
ret
)
=>
{
if
(
ret
.
error
===
null
)
{
this
.
txCount
=
ret
.
result
;
}
});
},
computed
:
{
tradeInTotalList
():
{
name
:
string
;
value
:
number
}[]
{
return
[
// {
// name: this.$t("lang.address.totalReception") as string,
// value: this.receive,
// },
// {
// name: this.$t("lang.address.totalSent") as string,
// value: this.send,
// },
{
name
:
this
.
$t
(
"lang.address.totalValue"
)
as
string
,
value
:
this
.
value
,
},
{
name
:
this
.
$t
(
"lang.block.txCount"
)
as
string
,
value
:
this
.
txCount
,
},
];
},
},
];
},
},
},
methods
:
{
methods
:
{
getAddrOverview
()
{
getAddrOverview
()
{
Rpc
.
getAddrOverview
(
Rpc
.
getAddrOverview
(
this
.
$route
.
query
.
address
as
string
).
then
((
res
)
=>
{
(
this
.
$route
.
query
.
address
as
string
).
toLowerCase
()
if
(
res
.
error
===
null
)
{
).
then
((
res
)
=>
{
const
balance
=
res
.
result
.
balance
;
if
(
res
.
error
===
null
)
{
const
receiver
=
res
.
result
.
reciver
;
const
balance
=
res
.
result
.
balance
;
this
.
receive
=
receiver
;
const
receiver
=
res
.
result
.
reciver
;
this
.
send
=
receiver
-
balance
;
this
.
receive
=
receiver
;
this
.
send
=
receiver
-
balance
;
fetch
(
"/market"
)
fetch
(
"/market"
)
.
then
((
ret
)
=>
ret
.
json
())
.
then
((
ret
)
=>
ret
.
json
())
.
then
((
ret
)
=>
{
.
then
((
ret
)
=>
{
if
(
ret
.
msg
===
"succeed"
)
{
if
(
ret
.
msg
===
"succeed"
)
{
const
data
=
ret
.
data
.
data
.
USDT
.
YCC
;
const
data
=
ret
.
data
.
data
.
USDT
.
YCC
;
this
.
value
=
data
.
last
*
balance
;
this
.
value
=
data
.
last
*
balance
;
}
}
});
}
});
});
}
});
},
init
()
{
QRCode
.
toCanvas
(
document
.
getElementById
(
"qrcode"
),
this
.
$route
.
query
.
address
as
string
,
{
color
:
{
dark
:
"#1F3470"
,
light
:
"#0000"
,
},
width
:
130
,
margin
:
0
,
},
},
function
(
error
)
{
init
()
{
if
(
error
)
console
.
error
(
error
);
QRCode
.
toCanvas
(
}
document
.
getElementById
(
"qrcode"
),
);
(
this
.
$route
.
query
.
address
as
string
).
toLowerCase
(),
{
color
:
{
dark
:
"#1F3470"
,
light
:
"#0000"
,
},
width
:
130
,
margin
:
0
,
},
function
(
error
)
{
if
(
error
)
console
.
error
(
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