This commit is contained in:
huangjinming 2023-01-06 14:39:40 +08:00
parent 9c0dd719bc
commit c6a5e7b3c0
8 changed files with 169 additions and 76 deletions

View File

@ -74,8 +74,8 @@ export default {
// this.data.orderId, // this.data.orderId,
// this.data.s_price, // this.data.s_price,
// this.data.currency, // this.data.currency,
5, 7,
'1000000000000000000', '9000000000000000000',
"0x8E7a8d3CAeEbbe9A92faC4db19424218aE6791a3", "0x8E7a8d3CAeEbbe9A92faC4db19424218aE6791a3",
CONTRACT_ADDRESS[AppModule.chainId].marketDddress CONTRACT_ADDRESS[AppModule.chainId].marketDddress
); );

View File

@ -346,7 +346,7 @@ export default {
return { return {
isTabs: false, isTabs: false,
type: "hero", type: "hero",
orderId: 3, orderId: 6,
chainManager: new ChainManager(), chainManager: new ChainManager(),
}; };
}, },

View File

@ -106,7 +106,7 @@ export default {
nft_Token: "", nft_Token: "",
chainManager: new ChainManager(), chainManager: new ChainManager(),
cunout: 1, cunout: 1,
orderId:4, orderId:6,
dialogVisible: false, dialogVisible: false,
isWeapon: false, isWeapon: false,
options: [], options: [],

View File

@ -13,9 +13,9 @@
</div> </div>
</div> </div>
<PropertySelect <PropertySelect
:options="options" :options="chipOptions"
:selectValue="selectValue" :selectValue="selectValue"
@handSelect="handHeroSelect" @handSelect="handChipSelect"
></PropertySelect> ></PropertySelect>
</div> </div>
<div class="level-filter"> <div class="level-filter">
@ -23,7 +23,12 @@
<div class="btn-bg">Quility</div> <div class="btn-bg">Quility</div>
<div class="level-slider"> <div class="level-slider">
<div class="slider"> <div class="slider">
<Slider :min="0" :max="15" v-model="value"></Slider> <Slider
:min="0"
:max="15"
v-model="value"
@change="chipLevelChange"
></Slider>
</div> </div>
<div class="slider-number"> <div class="slider-number">
<div>0</div> <div>0</div>
@ -32,46 +37,34 @@
</div> </div>
</div> </div>
</div> </div>
<div class="price"> <PriceFilter
<div class="price-btn" @click="priceFilter">Price</div> v-show="isType !== 'mynft'"
<div class="price-bottom"> @handPriceFilter="handPriceFilter"
<div class="price-min"> @handPriceMax="handPriceMax"
<el-input @handPriceMin="handPriceMin"
v-model="priceMin" :priceMin="priceMin"
:maxlength="13" :priceMax="priceMax"
placeholder="Min" />
></el-input>
</div>
<div class="boder"></div>
<div class="price-max">
<el-input
v-model="priceMax"
:maxlength="13"
placeholder="Max"
></el-input>
</div>
</div>
</div>
</div> </div>
</template> </template>
<script> <script>
import Slider from "./Slider.vue"; import Slider from "./Slider.vue";
import PriceFilter from "./PriceFilter.vue";
import PropertySelect from "./PropertySelect.vue"; import PropertySelect from "./PropertySelect.vue";
export default { export default {
props: ["chipList"], props: ["chipList", "chipOptions", "isType", "priceMin", "priceMax"],
components: { components: {
Slider, Slider,
PriceFilter,
PropertySelect, PropertySelect,
}, },
data() { data() {
return { return {
hero: "", hero: "",
priceMin: "",
value2: 0, value2: 0,
value3: 0, value3: 0,
value: 0, value: 0,
priceMax: "",
}; };
}, },
mounted() { mounted() {
@ -92,8 +85,20 @@ export default {
handclick() { handclick() {
this.$emit("hande"); this.$emit("hande");
}, },
handHeroSelect() { handChipSelect(value) {
this.$emit("handHeroSelect"); this.$emit("handChipSelect", value);
},
chipLevelChange(value) {
this.$emit("chipLevelChange", value);
},
handPriceFilter() {
this.$emit("handPriceFilter");
},
handPriceMax(value) {
this.$emit("handPriceMax", value);
},
handPriceMin(value) {
this.$emit("handPriceMin", value);
}, },
}, },
}; };

View File

@ -28,22 +28,42 @@
@handPriceMin="handPriceMin" @handPriceMin="handPriceMin"
:priceMin="priceMin" :priceMin="priceMin"
:priceMax="priceMax" :priceMax="priceMax"
:isType="isType"
v-if="nftType == 1 && nftNumber" v-if="nftType == 1 && nftNumber"
class="filter-modal" class="filter-modal"
></HeroFilter> ></HeroFilter>
<WeaponFilter <WeaponFilter
:weaponOptions="weaponOptions" :weaponOptions="weaponOptions"
@handWeaponSelect="handWeaponSelect"
@weaponQuilityChange="weaponQuilityChange"
@weaponLevelChange="weaponLevelChange"
@weaponDurabilityChange="weaponDurabilityChange"
@handPriceFilter="handPriceFilter"
@handPriceMax="handPriceMax"
@handPriceMin="handPriceMin"
:isType="isType"
:priceMin="priceMin"
:priceMax="priceMax"
v-else-if="nftType == 2 && nftNumber" v-else-if="nftType == 2 && nftNumber"
class="filter-modal" class="filter-modal"
></WeaponFilter> ></WeaponFilter>
<ChipFilter <ChipFilter
:chipOptions="chipOptions" :chipOptions="chipOptions"
@handChipSelect="handChipSelect"
@chipLevelChange="chipLevelChange"
@handPriceFilter="handPriceFilter"
@handPriceMax="handPriceMax"
@handPriceMin="handPriceMin"
:isType="isType"
:priceMin="priceMin"
:priceMax="priceMax"
v-else-if="nftType == 3 && nftNumber" v-else-if="nftType == 3 && nftNumber"
class="filter-modal" class="filter-modal"
:chipList="chipList" :chipList="chipList"
></ChipFilter> ></ChipFilter>
<PieceFilter <PieceFilter
:pieceList="pieceList" :pieceList="pieceList"
:isType="isType"
:pieceOptions="pieceOptions" :pieceOptions="pieceOptions"
v-else-if="nftType == 4 && nftNumber" v-else-if="nftType == 4 && nftNumber"
class="filter-modal" class="filter-modal"
@ -60,15 +80,16 @@ import PieceFilter from "@/components/mobile/main/PieceFilter.vue";
export default { export default {
props: [ props: [
"nftType", "nftType",
"isType",
"jobList", "jobList",
"chipList", "chipList",
"pieceList", "pieceList",
"options", "options",
"priceMin", "priceMin",
"priceMax", "priceMax",
'weaponOptions', "weaponOptions",
'chipOptions', "chipOptions",
'pieceOptions' "pieceOptions",
], ],
components: { components: {
HeroFilter, HeroFilter,
@ -118,6 +139,24 @@ export default {
handPriceMin(value) { handPriceMin(value) {
this.$emit("handPriceMin", value); this.$emit("handPriceMin", value);
}, },
handWeaponSelect(value) {
this.$emit("handWeaponSelect", value);
},
weaponQuilityChange(value) {
this.$emit("weaponQuilityChange", value);
},
weaponLevelChange(value) {
this.$emit("weaponLevelChange", value);
},
weaponDurabilityChange(value) {
this.$emit("weaponDurabilityChange", value);
},
handChipSelect(value) {
this.$emit("handChipSelect",value);
},
chipLevelChange(value) {
this.$emit("chipLevelChange", value);
},
}, },
}; };
</script> </script>

View File

@ -3,7 +3,6 @@
<div class="job-content"> <div class="job-content">
<PropertySelect <PropertySelect
:options="weaponOptions" :options="weaponOptions"
:selectValue="selectValue"
@handSelect="handWeaponSelect" @handSelect="handWeaponSelect"
></PropertySelect> ></PropertySelect>
</div> </div>
@ -12,7 +11,12 @@
<div class="btn-bg">Quility</div> <div class="btn-bg">Quility</div>
<div class="level-slider"> <div class="level-slider">
<div class="slider"> <div class="slider">
<Slider :min="0" :max="15" v-model="value"></Slider> <Slider
:min="0"
:max="15"
v-model="value"
@change="weaponQuilityChange"
></Slider>
</div> </div>
<div class="slider-number"> <div class="slider-number">
<div>0</div> <div>0</div>
@ -21,80 +25,74 @@
</div> </div>
</div> </div>
<div class="level-item"> <div class="level-item">
<div class="btn-bg">2</div> <div class="btn-bg">Level</div>
<div class="level-slider"> <div class="level-slider">
<div class="slider"> <div class="slider">
<Slider :min="0" :max="15" v-model="value2"></Slider> <Slider
:min="0"
:max="20"
v-model="value2"
@change="weaponLevelChange"
></Slider>
</div> </div>
<div class="slider-number"> <div class="slider-number">
<div>0</div> <div>0</div>
<div>15</div> <div>20</div>
</div> </div>
</div> </div>
</div> </div>
<div class="level-item"> <div class="level-item">
<div class="btn-bg">3</div> <div class="btn-bg">durability</div>
<div class="level-slider"> <div class="level-slider">
<div class="slider"> <div class="slider">
<Slider :min="0" :max="15" v-model="value3"></Slider> <Slider
:min="0"
:max="100"
v-model="value3"
@change="weaponDurabilityChange"
></Slider>
</div> </div>
<div class="slider-number"> <div class="slider-number">
<div>0</div> <div>0</div>
<div>15</div> <div>100%</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="price"> <PriceFilter
<div class="price-btn" @click="priceFilter">Price</div> v-show="isType !== 'mynft'"
<div class="price-bottom"> @handPriceFilter="handPriceFilter"
<div class="price-min"> @handPriceMax="handPriceMax"
<el-input @handPriceMin="handPriceMin"
v-model="priceMin" :priceMin="priceMin"
:maxlength="13" :priceMax="priceMax"
placeholder="Min" />
></el-input>
</div>
<div class="boder"></div>
<div class="price-max">
<el-input
v-model="priceMax"
:maxlength="13"
placeholder="Max"
></el-input>
</div>
</div>
</div>
</div> </div>
</template> </template>
<script> <script>
import Slider from "./Slider.vue"; import Slider from "./Slider.vue";
import PriceFilter from "./PriceFilter.vue";
import PropertySelect from "./PropertySelect.vue"; import PropertySelect from "./PropertySelect.vue";
export default { export default {
props:['weaponOptions'], props: ["weaponOptions", "priceMin", "priceMax",'isType'],
components: { components: {
Slider, Slider,
PropertySelect PriceFilter,
PropertySelect,
}, },
data() { data() {
return { return {
hero: "", hero: "",
priceMin: "", value2: 0,
value2: 7, value3: 0,
value3: 7, value: 0,
value: 7,
priceMax: "",
}; };
}, },
mounted() { mounted() {
// document.getElementsByClassName("el-slider__button")[0].childNodes[0].nodeValue = ""; // document.getElementsByClassName("el-slider__button")[0].childNodes[0].nodeValue = "";
}, },
methods: { methods: {
jobStatus(item) {
this.jobList[item.id].jobType = !this.jobList[item.id].jobType;
},
searchClear() { searchClear() {
this.hero = ""; this.hero = "";
// this.$emit('searchClear') // this.$emit('searchClear')
@ -107,7 +105,25 @@ export default {
this.$emit("hande"); this.$emit("hande");
}, },
handWeaponSelect(value) { handWeaponSelect(value) {
this.$emit("handWeaponSelect",value); this.$emit("handWeaponSelect", value);
},
weaponQuilityChange(value) {
this.$emit("weaponQuilityChange", value);
},
weaponLevelChange(value) {
this.$emit("weaponLevelChange", value);
},
weaponDurabilityChange(value) {
this.$emit("weaponDurabilityChange", value);
},
handPriceFilter() {
this.$emit("handPriceFilter");
},
handPriceMax(value) {
this.$emit("handPriceMax", value);
},
handPriceMin(value) {
this.$emit("handPriceMin", value);
}, },
}, },
}; };
@ -318,4 +334,3 @@ export default {
background-size: contain; background-size: contain;
} }
</style> </style>

View File

@ -36,6 +36,7 @@
:pieceOptions="pieceOptions" :pieceOptions="pieceOptions"
:chipOptions="chipOptions" :chipOptions="chipOptions"
:nft-type="nftType" :nft-type="nftType"
:isType="isType"
:value="value" :value="value"
:priceMax="priceMax" :priceMax="priceMax"
:priceMin="priceMin" :priceMin="priceMin"
@ -104,6 +105,7 @@ import { debounce } from "@/utils/formatAddress";
export default class Market extends Vue { export default class Market extends Vue {
mobileFilterShow = false; mobileFilterShow = false;
currentTab = "market"; currentTab = "market";
isType="isType"
value = 7; value = 7;
nftType = 1; nftType = 1;
nftList = []; nftList = [];

View File

@ -12,6 +12,12 @@
@handPriceFilter="handPriceFilter" @handPriceFilter="handPriceFilter"
@handPriceMax="handPriceMax" @handPriceMax="handPriceMax"
@handPriceMin="handPriceMin" @handPriceMin="handPriceMin"
@handWeaponSelect="handWeaponSelect"
@weaponQuilityChange="weaponQuilityChange"
@weaponLevelChange="weaponLevelChange"
@weaponDurabilityChange="weaponDurabilityChange"
@handChipSelect="handChipSelect"
@chipLevelChange="chipLevelChange"
:priceMin="priceMin" :priceMin="priceMin"
:priceMax="priceMax" :priceMax="priceMax"
:weaponOptions="weaponOptions" :weaponOptions="weaponOptions"
@ -21,6 +27,7 @@
:pieceList="pieceList" :pieceList="pieceList"
:jobList="jobList" :jobList="jobList"
:options="options" :options="options"
:isType="isType"
></FilterTop> ></FilterTop>
<NftTypeBar <NftTypeBar
:nftType="nftType" :nftType="nftType"
@ -495,6 +502,31 @@ export default {
this.priceFilter = this.priceMin + "|" + this.priceMax; this.priceFilter = this.priceMin + "|" + this.priceMax;
this.getHeroNftList(); this.getHeroNftList();
}, },
handWeaponSelect(value) {
this.searchFilters = value;
this.getHeroNftList();
},
weaponQuilityChange(value) {
this.qualityFilter = value;
this.getHeroNftList();
},
weaponLevelChange(value) {
this.lvFilter = value;
this.getHeroNftList();
},
weaponDurabilityChange(value) {
this.durabilityFilter = value;
this.getHeroNftList();
},
handChipSelect(value) {
console.log(value, "handChipSelect");
this.searchFilters = value;
this.getHeroNftList();
},
chipLevelChange(value) {
this.lvFilter = value;
this.getHeroNftList();
},
async getHeroNftList(pageNo) { async getHeroNftList(pageNo) {
if (!AppModule.accountId) { if (!AppModule.accountId) {
return; return;