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.s_price,
// this.data.currency,
5,
'1000000000000000000',
7,
'9000000000000000000',
"0x8E7a8d3CAeEbbe9A92faC4db19424218aE6791a3",
CONTRACT_ADDRESS[AppModule.chainId].marketDddress
);

View File

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

View File

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

View File

@ -13,9 +13,9 @@
</div>
</div>
<PropertySelect
:options="options"
:options="chipOptions"
:selectValue="selectValue"
@handSelect="handHeroSelect"
@handSelect="handChipSelect"
></PropertySelect>
</div>
<div class="level-filter">
@ -23,7 +23,12 @@
<div class="btn-bg">Quility</div>
<div class="level-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 class="slider-number">
<div>0</div>
@ -32,46 +37,34 @@
</div>
</div>
</div>
<div class="price">
<div class="price-btn" @click="priceFilter">Price</div>
<div class="price-bottom">
<div class="price-min">
<el-input
v-model="priceMin"
:maxlength="13"
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>
<PriceFilter
v-show="isType !== 'mynft'"
@handPriceFilter="handPriceFilter"
@handPriceMax="handPriceMax"
@handPriceMin="handPriceMin"
:priceMin="priceMin"
:priceMax="priceMax"
/>
</div>
</template>
<script>
import Slider from "./Slider.vue";
import PriceFilter from "./PriceFilter.vue";
import PropertySelect from "./PropertySelect.vue";
export default {
props: ["chipList"],
props: ["chipList", "chipOptions", "isType", "priceMin", "priceMax"],
components: {
Slider,
PriceFilter,
PropertySelect,
},
data() {
return {
hero: "",
priceMin: "",
value2: 0,
value3: 0,
value: 0,
priceMax: "",
};
},
mounted() {
@ -92,8 +85,20 @@ export default {
handclick() {
this.$emit("hande");
},
handHeroSelect() {
this.$emit("handHeroSelect");
handChipSelect(value) {
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"
:priceMin="priceMin"
:priceMax="priceMax"
:isType="isType"
v-if="nftType == 1 && nftNumber"
class="filter-modal"
></HeroFilter>
<WeaponFilter
: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"
class="filter-modal"
></WeaponFilter>
<ChipFilter
:chipOptions="chipOptions"
@handChipSelect="handChipSelect"
@chipLevelChange="chipLevelChange"
@handPriceFilter="handPriceFilter"
@handPriceMax="handPriceMax"
@handPriceMin="handPriceMin"
:isType="isType"
:priceMin="priceMin"
:priceMax="priceMax"
v-else-if="nftType == 3 && nftNumber"
class="filter-modal"
:chipList="chipList"
></ChipFilter>
<PieceFilter
:pieceList="pieceList"
:isType="isType"
:pieceOptions="pieceOptions"
v-else-if="nftType == 4 && nftNumber"
class="filter-modal"
@ -60,15 +80,16 @@ import PieceFilter from "@/components/mobile/main/PieceFilter.vue";
export default {
props: [
"nftType",
"isType",
"jobList",
"chipList",
"pieceList",
"options",
"priceMin",
"priceMax",
'weaponOptions',
'chipOptions',
'pieceOptions'
"weaponOptions",
"chipOptions",
"pieceOptions",
],
components: {
HeroFilter,
@ -118,6 +139,24 @@ export default {
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>

View File

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

View File

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

View File

@ -12,6 +12,12 @@
@handPriceFilter="handPriceFilter"
@handPriceMax="handPriceMax"
@handPriceMin="handPriceMin"
@handWeaponSelect="handWeaponSelect"
@weaponQuilityChange="weaponQuilityChange"
@weaponLevelChange="weaponLevelChange"
@weaponDurabilityChange="weaponDurabilityChange"
@handChipSelect="handChipSelect"
@chipLevelChange="chipLevelChange"
:priceMin="priceMin"
:priceMax="priceMax"
:weaponOptions="weaponOptions"
@ -21,6 +27,7 @@
:pieceList="pieceList"
:jobList="jobList"
:options="options"
:isType="isType"
></FilterTop>
<NftTypeBar
:nftType="nftType"
@ -495,6 +502,31 @@ export default {
this.priceFilter = this.priceMin + "|" + this.priceMax;
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) {
if (!AppModule.accountId) {
return;