@@ -106,10 +111,21 @@ export default {
},
computed: {
time() {
- return formatSelect(this.piece.modifytime);
+ if (this.piece.modifytime) {
+ return formatSelect(this.piece.modifytime);
+ }
},
owner() {
- return formatAddress(this.piece.owner_address);
+ if (this.piece.owner_address) {
+ return formatAddress(this.piece.owner_address);
+ }
+ },
+ balance() {
+ if (this.piece.detail) {
+ return this.piece.detail.balance;
+ } else {
+ return this.piece.balance;
+ }
},
},
methods: {
@@ -124,6 +140,7 @@ export default {
this.dialogVisible = true;
this.piece = data;
console.log(data, "dfgdg");
+ console.log(this.piece.detail.balance, "this.piece.detail.balance");
},
handPutShow() {
this.$emit("handPutShow");
diff --git a/src/components/market/filters/Chipfilter.vue b/src/components/market/filters/Chipfilter.vue
index 851154f..bb05e14 100644
--- a/src/components/market/filters/Chipfilter.vue
+++ b/src/components/market/filters/Chipfilter.vue
@@ -57,7 +57,9 @@
@@ -71,7 +73,7 @@ import SearchInput from "../SearchInput";
import PriceFilter from "../PriceFilter.vue";
import PropertySelect from "../PropertySelect.vue";
export default {
- props: ["value", "isType", "chipList", "chipOptions"],
+ props: ["value", "isType", "chipList", "chipOptions", "priceMax", "priceMin"],
components: {
Slider,
SearchInput,
@@ -81,8 +83,6 @@ export default {
data() {
return {
hero: "",
- priceMin: "",
- priceMax: "",
jobList: [
{
id: 0,
@@ -150,9 +150,14 @@ export default {
sliderChange() {
this.$emit("sliderChange", value);
},
- priceFilter() {
- this.priceMin = "";
- this.priceMax = "";
+ handPriceMax(value) {
+ this.$emit("handPriceMax", value);
+ },
+ handPriceMin(value) {
+ this.$emit("handPriceMin", value);
+ },
+ handPriceFilter() {
+ this.$emit("handPriceFilter");
},
handChipSelect(value) {
this.$emit("handChipSelect", value);
@@ -160,9 +165,9 @@ export default {
chipSearch(value) {
this.$emit("chipSearch", value);
},
- chipLevelChange(value){
+ chipLevelChange(value) {
this.$emit("chipLevelChange", value);
- }
+ },
},
};
diff --git a/src/components/market/filters/Herofilter.vue b/src/components/market/filters/Herofilter.vue
index 90ac1e8..32c1250 100644
--- a/src/components/market/filters/Herofilter.vue
+++ b/src/components/market/filters/Herofilter.vue
@@ -92,7 +92,7 @@
@@ -71,7 +73,14 @@ import SearchInput from "../SearchInput";
import PriceFilter from "../PriceFilter.vue";
import PropertySelect from "../PropertySelect.vue";
export default {
- props: ["value", "isType", "pieceList", "pieceOptions"],
+ props: [
+ "value",
+ "isType",
+ "pieceList",
+ "pieceOptions",
+ "priceMax",
+ "priceMin",
+ ],
components: {
Slider,
SearchInput,
@@ -81,8 +90,6 @@ export default {
data() {
return {
hero: "",
- priceMin: "",
- priceMax: "",
jobList: [
{
id: 0,
@@ -149,12 +156,17 @@ export default {
sliderChange() {
this.$emit("sliderChange", value);
},
- priceFilter() {
- this.priceMin = "";
- this.priceMax = "";
+ handPriceMax(value) {
+ this.$emit("handPriceMax", value);
+ },
+ handPriceMin(value) {
+ this.$emit("handPriceMin", value);
+ },
+ handPriceFilter() {
+ this.$emit("handPriceFilter");
},
pieceSearch(value) {
- this.$emit("pieceSearch",value);
+ this.$emit("pieceSearch", value);
},
handPieceSelect(value) {
this.$emit("handPieceSelect", value);
diff --git a/src/components/market/filters/Weaponfilter.vue b/src/components/market/filters/Weaponfilter.vue
index b770254..e81b9fb 100644
--- a/src/components/market/filters/Weaponfilter.vue
+++ b/src/components/market/filters/Weaponfilter.vue
@@ -69,7 +69,9 @@
@@ -83,7 +85,7 @@ import SearchInput from "../SearchInput";
import PriceFilter from "../PriceFilter.vue";
import PropertySelect from "../PropertySelect.vue";
export default {
- props: ["value", , "isType", "weaponOptions"],
+ props: ["value", , "isType", "weaponOptions", "priceMin", "priceMax"],
components: {
SearchInput,
Slider,
@@ -93,8 +95,6 @@ export default {
data() {
return {
hero: "",
- priceMin: "",
- priceMax: "",
jobList: [
{
id: 0,
@@ -164,9 +164,14 @@ export default {
sliderChange() {
this.$emit("sliderChange", value);
},
- priceFilter() {
- this.priceMin = "";
- this.priceMax = "";
+ handPriceMax(value) {
+ this.$emit("handPriceMax", value);
+ },
+ handPriceMin(value) {
+ this.$emit("handPriceMin", value);
+ },
+ handPriceFilter() {
+ this.$emit("handPriceFilter");
},
handWeaponSelect(value) {
// console.log(value);
diff --git a/src/components/market/nft/PieceNft.vue b/src/components/market/nft/PieceNft.vue
index a7edd27..5056695 100644
--- a/src/components/market/nft/PieceNft.vue
+++ b/src/components/market/nft/PieceNft.vue
@@ -20,7 +20,11 @@
:src="require('@/assets/market/piece/piece_' + '01' + '.png')"
alt=""
/>
-
Amount:{{ piece.balance }}
+
Amount:{{
+ piece.balance ? piece.balance : piece.detail.balance
+ }}