diff --git a/src/components/market/FilterLeft.vue b/src/components/market/FilterLeft.vue index fd14213..679ba50 100644 --- a/src/components/market/FilterLeft.vue +++ b/src/components/market/FilterLeft.vue @@ -18,6 +18,8 @@ :selectValue="selectValue" :options="options" :isType="isType" + :priceMax="priceMax" + :priceMin="priceMin" > @@ -73,6 +81,8 @@ import Chipfilter from "@/components/market/filters/Chipfilter"; import Piecefilter from "@/components/market/filters/Piecefilter"; export default { props: [ + 'priceMax', + 'priceMin', "nftType", "value", "isType", @@ -165,9 +175,9 @@ export default { handPriceMin(value) { this.$emit("handPriceMin", value); }, - handPriceFilter() { + handPriceFilter() { this.$emit("handPriceFilter"); - } + }, }, }; diff --git a/src/components/market/Piecedialog.vue b/src/components/market/Piecedialog.vue index 6a72edd..2d2d44c 100644 --- a/src/components/market/Piecedialog.vue +++ b/src/components/market/Piecedialog.vue @@ -35,7 +35,12 @@ Amount: -
{{ piece.balance }}
+
+ {{ piece.balance }} +
+
+ {{ balance }} +
@@ -63,7 +68,7 @@
{{ - data.s_price ? data.s_price : " " + piece.s_price ? piece.s_price : " " }}
@@ -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 + }}