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
871807ee
Commit
871807ee
authored
Mar 08, 2022
by
chenqikuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
c6b1f060
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
77 additions
and
40 deletions
+77
-40
en.ts
src/assets/lang/en.ts
+8
-8
m-chain-perf.vue
src/components/mobile/m-chain-perf.vue
+3
-2
m-chain-price.vue
src/components/mobile/m-chain-price.vue
+1
-1
m-chainCard.vue
src/components/mobile/m-chainCard.vue
+1
-1
Balance.vue
...mponents/pc/BlockChainBrowser/AddressOverview/Balance.vue
+9
-2
CardShowTradeInTotal.vue
...lockChainBrowser/AddressOverview/CardShowTradeInTotal.vue
+16
-8
ChainCardShowPerf.vue
.../pc/BlockChainBrowser/ChainOverview/ChainCardShowPerf.vue
+3
-2
ChainCardShowPrice.vue
...pc/BlockChainBrowser/ChainOverview/ChainCardShowPrice.vue
+1
-1
index.vue
src/components/pc/BlockChainBrowser/TradeTable/index.vue
+3
-3
TradeTable2.vue
src/components/pc/BlockChainBrowser/TradeTable2.vue
+3
-3
filters.ts
src/utils/filters.ts
+4
-0
utils.ts
src/utils/utils.ts
+4
-1
m-address-blue-card.vue
...ess/components/m-address-overview/m-address-blue-card.vue
+6
-2
m-four-params.vue
...e/address/components/m-address-overview/m-four-params.vue
+15
-6
No files found.
src/assets/lang/en.ts
View file @
871807ee
...
...
@@ -2,7 +2,7 @@ export const lang = {
home
:
"Home"
,
book
:
"White Paper"
,
news
:
"Press Releases"
,
blockChainBrowser
:
"Blockchain
Brows
er"
,
blockChainBrowser
:
"Blockchain
Explor
er"
,
page
:
{
first
:
"First"
,
last
:
"Last"
,
...
...
@@ -10,20 +10,20 @@ export const lang = {
nodata
:
"Nodata"
,
},
blockChain
:
"Blockchain"
,
browser
:
"
Brows
er"
,
browser
:
"
Explor
er"
,
chainMsg
:
{
latestBlock
:
"Latest Block"
,
nodeNum
:
"Number
O
f Nodes"
,
latestBlock
:
"Latest Block
s
"
,
nodeNum
:
"Number
o
f Nodes"
,
circulation
:
"Circulation"
,
pledgeQuantity
:
"
Pledge
Quantity"
,
pledgeQuantity
:
"
Mining
Quantity"
,
},
transaction
:
"Txns"
,
latestTx
:
"Latest
Deal
"
,
latestTx
:
"Latest
Transactions
"
,
chainPerf
:
{
speed
:
"Block Speed"
,
tps
:
"TPS"
,
txNumber
:
"Total Number
O
f Txns"
,
addressNumber
:
"Total Number
O
f Addr"
,
txNumber
:
"Total Number
o
f Txns"
,
addressNumber
:
"Total Number
o
f Addr"
,
txNumberOnTheChain
:
"On-chain Txns Number"
,
},
viewMore
:
"See More"
,
...
...
src/components/mobile/m-chain-perf.vue
View file @
871807ee
...
...
@@ -16,6 +16,7 @@
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
filterNum
}
from
'@/utils/utils'
import
Vue
from
'vue'
export
default
Vue
.
extend
({
props
:
{
...
...
@@ -37,11 +38,11 @@ export default Vue.extend({
},
{
name
:
this
.
$t
(
'lang.chainPerf.txNumber'
)
as
string
,
value
:
this
.
txNumber
,
value
:
filterNum
(
this
.
txNumber
)
,
},
{
name
:
this
.
$t
(
'lang.chainPerf.addressNumber'
)
as
string
,
value
:
this
.
addressNumber
,
value
:
filterNum
(
this
.
addressNumber
)
,
},
]
},
...
...
src/components/mobile/m-chain-price.vue
View file @
871807ee
...
...
@@ -27,7 +27,7 @@
{{
$t
(
'lang.price.marketValueInDollars'
)
}}
</div>
<div
class=
"text-footer-color font-bold"
>
{{
marketValue
}}
{{
marketValue
|
filterNum
}}
</div>
</div>
</div>
...
...
src/components/mobile/m-chainCard.vue
View file @
871807ee
...
...
@@ -11,7 +11,7 @@
{{
item
.
title
}}
</div>
<div
class=
"text-title-color text-base font-bold"
>
{{
item
.
number
}}
{{
item
.
number
|
filterNum
}}
</div>
</div>
</div>
...
...
src/components/pc/BlockChainBrowser/AddressOverview/Balance.vue
View file @
871807ee
...
...
@@ -8,10 +8,13 @@
<div
class=
"balance-label"
>
{{
$t
(
'lang.address.balance'
)
}}
</div>
<div
class=
"balance-value"
>
{{
balance
|
filterAmount
}}
YCC
</div>
<div
class=
"balance-value"
>
{{
filterNum
(
balance
/
1
e8
)
}}
YCC
</div>
<div
class=
"text-sm text-white"
style=
"margin-top: 10px;"
>
{{
$t
(
'lang.address.freeze'
)
}}
<span
class=
"ml-2"
>
{{
frozen
|
filterAmount
}}
YCC
</span>
<span
class=
"ml-2"
>
{{
filterNum
(
frozen
/
1
e8
)
}}
YCC
</span>
</div>
<Select
style=
"margin-top: 73px;"
...
...
@@ -24,6 +27,7 @@
</
template
>
<
script
lang=
"ts"
>
import
{
filterNum
}
from
'@/utils/utils'
import
VueTypedMixins
from
'vue-typed-mixins'
import
Select
from
'../../CurrencySelect.vue'
export
default
VueTypedMixins
().
extend
({
...
...
@@ -35,6 +39,9 @@ export default VueTypedMixins().extend({
optionsList
:
Array
,
handleSelectChange
:
Function
,
},
methods
:
{
filterNum
,
},
})
</
script
>
...
...
src/components/pc/BlockChainBrowser/AddressOverview/CardShowTradeInTotal.vue
View file @
871807ee
...
...
@@ -7,13 +7,14 @@
class=
"mt-4 text-title-color text-xl font-bold overflow-hidden overflow-ellipsis whitespace-nowrap"
>
<span
v-if=
"index
<
2
"
ref=
"a"
>
{{
item
.
value
|
filterAmount
}}
YCC
{{
filterNum
(
item
.
value
/
1
e8
)
}}
YCC
</span>
<span
v-else-if=
"index == 2"
ref=
"b"
>
{{
item
.
value
|
filterMoney
}}
{{
$t
(
'lang.price.dollar'
)
}}
{{
filterNum
(
Number
(
item
.
value
/
1
e8
).
toFixed
(
2
))
}}
{{
$t
(
'lang.price.dollar'
)
}}
</span>
<span
v-else
ref=
"c"
>
{{
item
.
value
}}
{{
item
.
value
|
filterNum
}}
</span>
</div>
</div>
...
...
@@ -21,7 +22,9 @@
</
template
>
<
script
lang=
"ts"
>
import
{
filterNum
}
from
'@/utils/utils'
import
Vue
,
{
PropType
}
from
'vue'
export
default
Vue
.
extend
({
props
:
{
list
:
Array
as
PropType
<
{
name
:
string
;
value
:
string
|
number
}[]
>
,
...
...
@@ -30,17 +33,22 @@ export default Vue.extend({
this
.
setFontSize
()
},
methods
:
{
filterNum
,
setFontSize
()
{
const
father
=
this
.
$refs
.
father
as
HTMLElement
[]
const
a
=
this
.
$refs
.
a
as
HTMLElement
[]
const
b
=
this
.
$refs
.
b
as
HTMLElement
const
c
=
this
.
$refs
.
c
as
HTMLElement
;[...
a
,
b
,
c
].
forEach
((
el
:
HTMLElement
)
=>
{
console
.
log
(
el
.
offsetWidth
,
father
[
0
].
offsetWidth
)
const
b
=
this
.
$refs
.
b
as
HTMLElement
[]
const
c
=
this
.
$refs
.
c
as
HTMLElement
[]
let
beSmall
=
false
;[...
a
,
...
b
,
...
c
].
some
((
el
:
HTMLElement
)
=>
{
if
(
el
.
offsetWidth
>=
father
[
0
].
offsetWidth
)
{
el
.
style
.
fontSize
=
'14px'
beSmall
=
true
}
})
beSmall
&&
[...
a
,
...
b
,
...
c
].
forEach
((
el
:
HTMLElement
)
=>
{
el
.
style
.
fontSize
=
'14px'
})
},
},
watch
:
{
...
...
src/components/pc/BlockChainBrowser/ChainOverview/ChainCardShowPerf.vue
View file @
871807ee
...
...
@@ -12,6 +12,7 @@
</
template
>
<
script
lang=
"ts"
>
import
{
filterNum
}
from
'@/utils/utils'
import
Vue
from
'vue'
export
default
Vue
.
extend
({
props
:
{
...
...
@@ -33,11 +34,11 @@ export default Vue.extend({
},
{
name
:
this
.
$t
(
'lang.chainPerf.txNumber'
)
as
string
,
value
:
this
.
txNumber
,
value
:
filterNum
(
this
.
txNumber
)
,
},
{
name
:
this
.
$t
(
'lang.chainPerf.addressNumber'
)
as
string
,
value
:
this
.
addressNumber
,
value
:
filterNum
(
this
.
addressNumber
)
,
},
]
},
...
...
src/components/pc/BlockChainBrowser/ChainOverview/ChainCardShowPrice.vue
View file @
871807ee
...
...
@@ -20,7 +20,7 @@
{{
$t
(
'lang.price.marketValueInDollars'
)
}}
</div>
<div
class=
"marketValue text-footer-color"
>
{{
marketValue
}}
{{
marketValue
|
filterNum
}}
</div>
</div>
</div>
...
...
src/components/pc/BlockChainBrowser/TradeTable/index.vue
View file @
871807ee
...
...
@@ -51,7 +51,7 @@
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"hash"
:label=
"$t('lang.trade.sender')"
width=
"1
60
"
>
<el-table-column
prop=
"hash"
:label=
"$t('lang.trade.sender')"
width=
"1
55
"
>
<
template
slot-scope=
"item"
>
<router-link
:to=
"`/address?address=$
{item.row.fromAddr}`"
...
...
@@ -79,7 +79,7 @@
<el-table-column
prop=
"hash"
:label=
"$t('lang.trade.receiver')"
width=
"1
60
"
width=
"1
55
"
>
<
template
slot-scope=
"item"
>
<router-link
...
...
@@ -116,7 +116,7 @@
</div>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('lang.trade.time')"
width=
"1
6
0"
>
<el-table-column
:label=
"$t('lang.trade.time')"
width=
"1
7
0"
>
<
template
slot-scope=
"item"
>
<div
class=
"text-darkBlue"
>
{{
item
.
row
.
blockTime
|
formatTime
}}
...
...
src/components/pc/BlockChainBrowser/TradeTable2.vue
View file @
871807ee
...
...
@@ -51,7 +51,7 @@
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"hash"
:label=
"$t('lang.trade.sender')"
width=
"1
60
"
>
<el-table-column
prop=
"hash"
:label=
"$t('lang.trade.sender')"
width=
"1
55
"
>
<
template
slot-scope=
"item"
>
<router-link
:to=
"`/address?address=$
{item.row.from}`"
...
...
@@ -79,7 +79,7 @@
<el-table-column
prop=
"hash"
:label=
"$t('lang.trade.receiver')"
width=
"1
60
"
width=
"1
55
"
>
<
template
slot-scope=
"item"
>
<router-link
...
...
@@ -111,7 +111,7 @@
</div>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('lang.trade.time')"
width=
"1
6
0"
>
<el-table-column
:label=
"$t('lang.trade.time')"
width=
"1
7
0"
>
<
template
slot-scope=
"item"
>
<div
class=
"text-darkBlue"
>
{{
item
.
row
.
block_time
|
formatTime
}}
...
...
src/utils/filters.ts
View file @
871807ee
...
...
@@ -3,6 +3,7 @@ import { iAsset } from "@/types/trade";
import
{
deCode
}
from
"./prototype"
;
import
{
parseTransferNote
}
from
"@33cn/chain33-transaction-parser"
;
import
{
yccDifferenceBlockRewardHeight
}
from
"@/constant"
;
import
{
filterNum
}
from
"./utils"
;
/**
* 格式化时间
...
...
@@ -96,8 +97,11 @@ const decodeTransferNote = (tx: any = {}) => {
return
payload
;
};
//截断哈希
export
default
{
filterNum
,
filterHash
:
(
str
=
""
,
num
=
8
):
string
=>
{
return
str
.
substring
(
0
,
num
)
+
"..."
+
str
.
substring
(
str
.
length
-
4
);
},
...
...
src/utils/utils.ts
View file @
871807ee
...
...
@@ -6,7 +6,10 @@ export const checkIsMobile = function() {
return
!!
(
flag
||
width
<=
500
);
};
export
function
filterNum
(
num
:
number
|
string
)
{
export
function
filterNum
(
num
:
any
)
{
if
(
num
===
0
||
num
===
"0"
)
{
return
"0"
;
}
const
str
=
num
.
toString
();
const
reg
=
str
.
indexOf
(
"."
)
>
-
1
?
/
(\d)(?=(\d{3})
+
\.)
/g
:
/
(\d)(?=(?:\d{3})
+$
)
/g
;
...
...
src/views/mobile/address/components/m-address-overview/m-address-blue-card.vue
View file @
871807ee
...
...
@@ -26,11 +26,11 @@
{{
$t
(
'lang.address.balance'
)
}}
</div>
<div
class=
"text-white mt-1 text-3xl font-bold"
>
{{
balance
|
filterAmount
}}
YCC
{{
filterNum
(
balance
/
1
e8
)
}}
YCC
</div>
<div
class=
"text-white text-xs"
style=
"margin-top: 5px;"
>
{{
$t
(
'lang.address.freeze'
)
}}
{{
f
orzen
|
filterAmount
}}
YCC
{{
f
ilterNum
(
forzen
/
1
e8
)
}}
YCC
</div>
</div>
</
template
>
...
...
@@ -39,6 +39,7 @@
import
Select
from
'@/components/pc/CurrencySelect.vue'
import
balanceBg
from
'@/assets/images/blockChainBrowser/address/balanceBg-mobile.png'
import
Vue
from
'vue'
import
{
filterNum
}
from
'@/utils/utils'
export
default
Vue
.
extend
({
components
:
{
Select
,
...
...
@@ -50,6 +51,9 @@ export default Vue.extend({
optionsList
:
Array
,
handleSelectChange
:
Function
,
},
methods
:
{
filterNum
,
},
data
()
{
return
{
balanceBg
,
...
...
src/views/mobile/address/components/m-address-overview/m-four-params.vue
View file @
871807ee
...
...
@@ -11,7 +11,7 @@
class=
"text-title-color text-sm font-bold ml-7 overflow-hidden overflow-ellipsis"
ref=
"a1"
>
<span
ref=
"a2"
>
{{
receive
|
filterAmount
}}
YCC
</span>
<span
ref=
"a2"
>
{{
filterNum
(
receive
/
1
e8
)
}}
YCC
</span>
</div>
</div>
<div
class=
"param"
>
...
...
@@ -25,7 +25,7 @@
class=
"text-title-color text-sm font-bold ml-7 overflow-hidden overflow-ellipsis"
ref=
"b1"
>
<span
ref=
"b2"
>
{{
send
|
filterAmount
}}
YCC
</span>
<span
ref=
"b2"
>
{{
filterNum
(
send
/
1
e8
)
}}
YCC
</span>
</div>
</div>
<div
class=
"param"
>
...
...
@@ -40,7 +40,8 @@
ref=
"c1"
>
<span
ref=
"c2"
>
{{
value
|
filterMoney
}}{{
$t
(
'lang.price.dollar'
)
}}
{{
filterNum
(
Number
(
value
/
1
e8
).
toFixed
(
2
))
}}{{
$t
(
'lang.price.dollar'
)
}}
</span>
</div>
</div>
...
...
@@ -56,14 +57,16 @@
ref=
"d1"
>
<span
ref=
"d2"
>
{{
txCount
}}
{{
txCount
|
filterNum
}}
</span>
</div>
</div>
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
filterNum
}
from
'@/utils/utils'
import
Vue
from
'vue'
export
default
Vue
.
extend
({
props
:
{
receive
:
[
Number
,
Object
],
...
...
@@ -89,17 +92,23 @@ export default Vue.extend({
},
},
methods
:
{
filterNum
,
setFontSize
()
{
const
father
=
this
.
$refs
.
a1
as
HTMLElement
const
a
=
this
.
$refs
.
a2
as
HTMLElement
const
b
=
this
.
$refs
.
b2
as
HTMLElement
const
c
=
this
.
$refs
.
c2
as
HTMLElement
const
d
=
this
.
$refs
.
d2
as
HTMLElement
;[
a
,
b
,
c
,
d
].
forEach
((
el
:
HTMLElement
)
=>
{
let
beSmall
=
false
;[
a
,
b
,
c
,
d
].
some
((
el
:
HTMLElement
)
=>
{
if
(
el
.
offsetWidth
>=
father
.
offsetWidth
)
{
el
.
style
.
fontSize
=
'10px'
beSmall
=
true
}
})
beSmall
&&
[
a
,
b
,
c
,
d
].
forEach
((
el
:
HTMLElement
)
=>
{
el
.
style
.
fontSize
=
'10px'
})
},
},
})
...
...
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