-
@@ -192,33 +183,39 @@ export default class HeroNft extends Vue {
isPiecePut: boolean = false;
isBuy: boolean = false;
type: string = "hero";
- created() {
- console.log(this.data, "nftlist3sdfsadff");
- }
+ // created() {
+ // console.log(this.data, "nftlist3sdfsadff");
+ // }
+
+ firstOrder = [
+ { Image: require("@/assets/market/hero/star01.png") },
+ { Image: require("@/assets/market/hero/star01.png") },
+ { Image: require("@/assets/market/hero/star01.png") },
+ { Image: require("@/assets/market/hero/star01.png") },
+ { Image: require("@/assets/market/hero/star01.png") },
+ ];
+ firstOrder2 = [
+ { Image: require("@/assets/market/hero/star01.png") },
+ { Image: require("@/assets/market/hero/star01.png") },
+ { Image: require("@/assets/market/hero/star01.png") },
+ { Image: require("@/assets/market/hero/star01.png") },
+ { Image: require("@/assets/market/hero/star01.png") },
+ ];
+ secondOrder = [
+ { Image: require("@/assets/market/hero/star02.png") },
+ { Image: require("@/assets/market/hero/star02.png") },
+ { Image: require("@/assets/market/hero/star02.png") },
+ { Image: require("@/assets/market/hero/star02.png") },
+ { Image: require("@/assets/market/hero/star02.png") },
+ ];
+ thirdOrder = [
+ { Image: require("@/assets/market/hero/star03.png") },
+ { Image: require("@/assets/market/hero/star03.png") },
+ { Image: require("@/assets/market/hero/star03.png") },
+ { Image: require("@/assets/market/hero/star03.png") },
+ { Image: require("@/assets/market/hero/star03.png") },
+ ];
- levelList = {
- firstOrder: [
- { Image: require("@/assets/market/hero/star01.png") },
- { Image: require("@/assets/market/hero/star01.png") },
- { Image: require("@/assets/market/hero/star01.png") },
- { Image: require("@/assets/market/hero/star01.png") },
- { Image: require("@/assets/market/hero/star01.png") },
- ],
- secondOrder: [
- { Image: require("@/assets/market/hero/star02.png") },
- { Image: require("@/assets/market/hero/star02.png") },
- { Image: require("@/assets/market/hero/star02.png") },
- { Image: require("@/assets/market/hero/star02.png") },
- { Image: require("@/assets/market/hero/star02.png") },
- ],
- thirdOrder: [
- { Image: require("@/assets/market/hero/star03.png") },
- { Image: require("@/assets/market/hero/star03.png") },
- { Image: require("@/assets/market/hero/star03.png") },
- { Image: require("@/assets/market/hero/star03.png") },
- { Image: require("@/assets/market/hero/star03.png") },
- ],
- };
fillZero(str: number | string) {
var realNum;
if (str < 10) {
@@ -235,6 +232,53 @@ export default class HeroNft extends Vue {
showTip(hide: boolean) {
this.isTab = hide;
}
+ created() {
+ // console.log(this.starList, "starList");
+ if (this.data.detail.quality > 0 && this.data.detail.quality <= 5) {
+ this.firstOrder.splice(0, 5 - this.data.detail.quality);
+ // this.firstOrder= this.firstOrder.splice(0, 5 - this.data.detail.quality);
+ } else if (this.data.detail.quality > 5 && this.data.detail.quality <= 10) {
+ console.log("2");
+ this.secondOrder.splice(0, 5 - (this.data.detail.quality - 5));
+ } else {
+ this.thirdOrder.splice(0, 5 - (this.data.detail.quality - 10));
+ }
+ }
+ beforeUpdate(){
+ if (this.data.detail.quality > 0 && this.data.detail.quality <= 5) {
+ this.firstOrder2.splice(0, 5 - this.data.detail.quality);
+ // this.firstOrder= this.firstOrder.splice(0, 5 - this.data.detail.quality);
+ } else if (this.data.detail.quality > 5 && this.data.detail.quality <= 10) {
+ console.log("2");
+ this.secondOrder.splice(0, 5 - (this.data.detail.quality - 5));
+ } else {
+ this.thirdOrder.splice(0, 5 - (this.data.detail.quality - 10));
+ }
+ }
+ // Update(){
+ // if (this.data.detail.quality > 0 && this.data.detail.quality <= 5) {
+ // this.firstOrder2.splice(0, 5 - this.data.detail.quality);
+ // // this.firstOrder= this.firstOrder.splice(0, 5 - this.data.detail.quality);
+ // } else if (this.data.detail.quality > 5 && this.data.detail.quality <= 10) {
+ // console.log("2");
+ // this.secondOrder.splice(0, 5 - (this.data.detail.quality - 5));
+ // } else {
+ // this.thirdOrder.splice(0, 5 - (this.data.detail.quality - 10));
+ // }
+ // }
+ // get starList() {
+ // if (this.data.detail.quality > 0 && this.data.detail.quality <= 5) {
+ // console.log('11111111111111',this.firstOrder.splice(0, 5 - this.data.detail.quality));
+
+ // return this.firstOrder.splice(0, 5 - this.data.detail.quality);
+ // } else if (this.data.detail.quality > 5 && this.data.detail.quality <= 10) {
+ // console.log('2');
+ // return this.secondOrder.splice(0, 5 - (this.data.detail.quality - 5));
+ // } else {
+ // return this.thirdOrder.splice(0, 5 - (this.data.detail.quality - 10));
+ // }
+ // }
+
get levelNumber() {
return this.data.detail.hero_lv;
}
@@ -295,7 +339,7 @@ export default class HeroNft extends Vue {
opacity: 0.8;
z-index: 11;
border-radius: 16px;
- .for-rent-img{
+ .for-rent-img {
margin-top: 100px;
margin-bottom: 70px;
}
diff --git a/src/components/market/nft/WeaponList.vue b/src/components/market/nft/WeaponList.vue
index 3eb8284..45e50c0 100644
--- a/src/components/market/nft/WeaponList.vue
+++ b/src/components/market/nft/WeaponList.vue
@@ -32,7 +32,7 @@
>
@@ -44,7 +44,7 @@
>
@@ -53,7 +53,7 @@
![]()
@@ -141,31 +141,72 @@ export default {
type: "weapon",
isBuy: false,
isPiecePut: false,
- levelList: {
- firstOrder: [
- { Image: require("@/assets/market/hero/star01.png") },
- { Image: require("@/assets/market/hero/star01.png") },
- { Image: require("@/assets/market/hero/star01.png") },
- { Image: require("@/assets/market/hero/star01.png") },
- { Image: require("@/assets/market/hero/star01.png") },
- ],
- secondOrder: [
- { Image: require("@/assets/market/hero/star02.png") },
- { Image: require("@/assets/market/hero/star02.png") },
- { Image: require("@/assets/market/hero/star02.png") },
- { Image: require("@/assets/market/hero/star02.png") },
- { Image: require("@/assets/market/hero/star02.png") },
- ],
- thirdOrder: [
- { Image: require("@/assets/market/hero/star03.png") },
- { Image: require("@/assets/market/hero/star03.png") },
- { Image: require("@/assets/market/hero/star03.png") },
- { Image: require("@/assets/market/hero/star03.png") },
- { Image: require("@/assets/market/hero/star03.png") },
- ],
- },
+
+ firstOrder: [
+ { Image: require("@/assets/market/hero/star01.png") },
+ { Image: require("@/assets/market/hero/star01.png") },
+ { Image: require("@/assets/market/hero/star01.png") },
+ { Image: require("@/assets/market/hero/star01.png") },
+ { Image: require("@/assets/market/hero/star01.png") },
+ ],
+ firstOrder2: [
+ { Image: require("@/assets/market/hero/star01.png") },
+ { Image: require("@/assets/market/hero/star01.png") },
+ { Image: require("@/assets/market/hero/star01.png") },
+ { Image: require("@/assets/market/hero/star01.png") },
+ { Image: require("@/assets/market/hero/star01.png") },
+ ],
+ secondOrder: [
+ { Image: require("@/assets/market/hero/star02.png") },
+ { Image: require("@/assets/market/hero/star02.png") },
+ { Image: require("@/assets/market/hero/star02.png") },
+ { Image: require("@/assets/market/hero/star02.png") },
+ { Image: require("@/assets/market/hero/star02.png") },
+ ],
+ thirdOrder: [
+ { Image: require("@/assets/market/hero/star03.png") },
+ { Image: require("@/assets/market/hero/star03.png") },
+ { Image: require("@/assets/market/hero/star03.png") },
+ { Image: require("@/assets/market/hero/star03.png") },
+ { Image: require("@/assets/market/hero/star03.png") },
+ ],
};
},
+ created() {
+ // console.log(this.starList, "starList");
+ if (this.weapon.detail.quality > 0 && this.weapon.detail.quality <= 5) {
+ console.log(
+ this.weapon.detail.quality,
+ this.firstOrder.splice(0, 5 - this.weapon.detail.quality) ,'opppppppppppppppppppppppp23233'
+ );
+ // this.firstOrder= this.firstOrder.splice(0, 5 - this.data.detail.quality);
+ } else if (
+ this.weapon.detail.quality > 5 &&
+ this.weapon.detail.quality <= 10
+ ) {
+ console.log("2");
+ this.secondOrder = this.secondOrder.splice(
+ 0,
+ 5 - (this.weapon.detail.quality - 5)
+ );
+ } else {
+ this.thirdOrder = this.thirdOrder.splice(
+ 0,
+ 5 - (this.weapon.detail.quality - 10)
+ );
+ }
+ },
+ beforeUpdate(){
+ if (this.weapon.detail.quality > 0 && this.weapon.detail.quality <= 5) {
+ this.firstOrder2.splice(0, 5 - this.weapon.detail.quality);
+ // this.firstOrder= this.firstOrder.splice(0, 5 - this.data.detail.quality);
+ } else if (this.weapon.detail.quality > 5 && this.weapon.detail.quality <= 10) {
+ console.log("2");
+ this.secondOrder.splice(0, 5 - (this.weapon.detail.quality - 5));
+ } else {
+ this.thirdOrder.splice(0, 5 - (this.weapon.detail.quality - 10));
+ }
+ },
methods: {
ChipDialoghide() {
this.dialogVisible = false;
diff --git a/src/views/desktop/Market.vue b/src/views/desktop/Market.vue
index a0a2918..0dcf97b 100644
--- a/src/views/desktop/Market.vue
+++ b/src/views/desktop/Market.vue
@@ -616,13 +616,16 @@ export default class Market extends Vue {
this.nftList = list.filter((item: any) => {
return item.details !== null;
});
+
+
if (res) {
const page = res;
this.totalPage = parseInt(page.total) || 1;
this.pageSize = page.page_size || 10;
this.starts = page.start;
this.currentPage = page.start / page.page_size + 1;
- }
+ }
+ console.log(this.nftList,'this.nftList');
}
}
@Watch("isLogin")