From 931d5bd59b383c993eea1e3d7e8f2d60f8c866b3 Mon Sep 17 00:00:00 2001
From: cebgcontract <99630598+cebgcontract@users.noreply.github.com>
Date: Sat, 23 Apr 2022 23:05:26 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=AD=A6=E5=99=A8=E5=B1=95?=
=?UTF-8?q?=E7=A4=BA=E6=96=B9=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/market/NftDetail.vue | 52 ++++++++++++++++++++++++++++-
src/components/market/NftInfo.vue | 38 +++++++++++++++++----
src/types/Nft.ts | 2 +-
3 files changed, 84 insertions(+), 8 deletions(-)
diff --git a/src/components/market/NftDetail.vue b/src/components/market/NftDetail.vue
index 3c98570..cce8f6a 100644
--- a/src/components/market/NftDetail.vue
+++ b/src/components/market/NftDetail.vue
@@ -72,6 +72,54 @@
+
+
+
+
+ Basic Data
+
+
+
+
+
Attack
+
{{nftData.attrMap.get('atk')}}
+
+
+
Clip
+
{{nftData.attrMap.get('clip_volume')}}
+
+
+
+
+
Reload
+
{{nftData.attrMap.get('reload_time')}}
+
+
+
Rate
+
{{nftData.attrMap.get('fire_rate')}}
+
+
+
+
+
Speed
+
{{nftData.attrMap.get('bullet_speed')}}
+
+
+
Range
+
{{nftData.attrMap.get('range')}}
+
+
+
+
+
Advanced Count
+
{{nftData.attrMap.get('advanced_count')}}
+
+
+
+
+
+
+
-
{{data.key}}
+
{{data.key.replace(/_/g, ' ')}}
{{data.value}}
@@ -382,6 +430,7 @@ export default class extends Vue {
.info-title {
font-size: 20px;
width: 60%;
+ text-transform: capitalize;
}
.info-val {
color: #3CF562;
@@ -530,6 +579,7 @@ export default class extends Vue {
.info-title {
font-size: 16px;
width: 60%;
+ text-transform: capitalize;
}
.info-val {
color: #3CF562;
diff --git a/src/components/market/NftInfo.vue b/src/components/market/NftInfo.vue
index e1eea20..dc2032c 100644
--- a/src/components/market/NftInfo.vue
+++ b/src/components/market/NftInfo.vue
@@ -37,14 +37,40 @@
-
-
-
Level
+
+
+
Level
{{nftData.level}}
-
-
{{data.key.replace(/_/g, ' ')}}
-
{{data.value}}
+
+
+
+
Attack
+
{{nftData.attrMap.get('atk')}}
+
+
+
clip
+
{{nftData.attrMap.get('clip_volume')}}
+
+
+
+
+
reload
+
{{nftData.attrMap.get('reload_time')}}
+
+
+
rate
+
{{nftData.attrMap.get('fire_rate')}}
+
+
+
+
+
Speed
+
{{nftData.attrMap.get('bullet_speed')}}
+
+
+
range
+
{{nftData.attrMap.get('range')}}
diff --git a/src/types/Nft.ts b/src/types/Nft.ts
index 2a9aa7e..cb1e8cb 100644
--- a/src/types/Nft.ts
+++ b/src/types/Nft.ts
@@ -71,7 +71,7 @@ export function parseNftData(data: any) {
const extAttrList = []
if (info.attr) {
for (const sub of info.attr) {
- const val = sub.type ? `${sub.val}%` : sub.val
+ const val = parseInt(sub.type) === 2 ? `${sub.val}%` : sub.val
extAttrList.push({ key: sub.name, value: val })
}
}