This commit is contained in:
huangjinming 2022-12-23 15:40:56 +08:00
parent f67c64953c
commit 620f7238a5
12 changed files with 152 additions and 24 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@ -87,7 +87,7 @@
v-for="(item, i) in data.detail.rand_attr" v-for="(item, i) in data.detail.rand_attr"
:key="i" :key="i"
> >
<div>{{chipArrid[item.attr_id]}}</div> <div>{{ chipArrid[item.attr_id] }}</div>
<div>{{ parseFloat(item.val).toFixed(2) * 100 }}%</div> <div>{{ parseFloat(item.val).toFixed(2) * 100 }}%</div>
</div> </div>
<!-- <div class="def-item"> <!-- <div class="def-item">
@ -104,6 +104,10 @@
</div> </div>
<div class="buy-price"> <div class="buy-price">
<div class="mynft" v-if="isType === 'mynft'"> <div class="mynft" v-if="isType === 'mynft'">
<!-- <div class="for-rent-btn" v-if="orderId">
<div class="adjust" @click="handPutShow"></div>
<div class="remove"></div>
</div> -->
<div class="rent"></div> <div class="rent"></div>
<div class="sell" @click="handPutShow">Sell</div> <div class="sell" @click="handPutShow">Sell</div>
</div> </div>
@ -140,7 +144,7 @@ export default {
props: ["dialogVisible", "data", "isType"], props: ["dialogVisible", "data", "isType"],
data() { data() {
return { return {
chipArrid: { chipArrid: {
39: "Hp Pct", 39: "Hp Pct",
40: "Atk Pct", 40: "Atk Pct",
41: "Def Pct", 41: "Def Pct",
@ -151,7 +155,7 @@ export default {
46: "Hp Recover Pct", 46: "Hp Recover Pct",
47: "Brain Life Pct", 47: "Brain Life Pct",
48: "Reload Time Pct", 48: "Reload Time Pct",
49:"Bullet Speed", 49: "Bullet Speed",
50: "Bullet Speed Pct", 50: "Bullet Speed Pct",
51: "Cool Down Pct", 51: "Cool Down Pct",
}, },
@ -439,5 +443,25 @@ export default {
background: url("../../assets/market/chip/sell-btn.png") no-repeat; background: url("../../assets/market/chip/sell-btn.png") no-repeat;
background-size: contain; background-size: contain;
} }
.for-rent-btn {
display: flex;
// margin-top: 170px;
.adjust {
width: 277px;
height: 72px;
cursor: pointer;
// margin-left: 14px;
background: url("../../assets/market/chip/adjust.png") no-repeat;
background-size: 100% 100%;
}
.remove {
width: 277px;
height: 72px;
cursor: pointer;
margin-left: 14px;
background: url("../../assets/market/chip/remove.png") no-repeat;
background-size: 100% 100%;
}
}
} }
</style> </style>

View File

@ -231,8 +231,13 @@
></Transition> ></Transition>
<div class="buy-price"> <div class="buy-price">
<div class="mynft" v-if="isType === 'mynft'"> <div class="mynft" v-if="isType === 'mynft'">
<!-- <div class="for-rent-btn" v-if="orderId">
<div class="adjust" @click="handPutShow"></div>
<div class="remove"></div>
</div> -->
<div class="rent"></div> <div class="rent"></div>
<div class="sell" @click="handPutShow">Sell</div> <div class="sell" @click="handPutShow">Sell</div>
</div> </div>
<div class="maeket" v-else> <div class="maeket" v-else>
<div class="price"> <div class="price">
@ -592,6 +597,26 @@ export default {
height: 100px; height: 100px;
margin-right: 30px; margin-right: 30px;
} }
.for-rent-btn {
display: flex;
// margin-top: 170px;
.adjust {
width: 384px;
height: 89px;
cursor: pointer;
// margin-left: 14px;
background: url("../../assets/market/hero/adjust.png") no-repeat;
background-size: 100% 100%;
}
.remove {
width: 384px;
height: 89px;
cursor: pointer;
margin-left: 14px;
background: url("../../assets/market/hero/remove.png") no-repeat;
background-size: 100% 100%;
}
}
} }
.tabs { .tabs {
position: absolute; position: absolute;

View File

@ -107,7 +107,9 @@
<div> <div>
{{ {{
hero.detail.rand_attr[0].val hero.detail.rand_attr[0].val
? hero.detail.rand_attr[0].val>=100 ? parseInt(hero.detail.rand_attr[0].val*1) : (hero.detail.rand_attr[0].val*1).toFixed(2) ? hero.detail.rand_attr[0].val >= 100
? parseInt(hero.detail.rand_attr[0].val * 1)
: (hero.detail.rand_attr[0].val * 1).toFixed(2)
: "" : ""
}} }}
</div> </div>
@ -126,7 +128,9 @@
<div> <div>
{{ {{
hero.detail.rand_attr[1].val hero.detail.rand_attr[1].val
? hero.detail.rand_attr[1].val>=100 ? parseInt(hero.detail.rand_attr[1].val*1) : (hero.detail.rand_attr[1].val*1).toFixed(2) ? hero.detail.rand_attr[1].val >= 100
? parseInt(hero.detail.rand_attr[1].val * 1)
: (hero.detail.rand_attr[1].val * 1).toFixed(2)
: "" : ""
}} }}
</div> </div>
@ -146,7 +150,9 @@
<div> <div>
{{ {{
hero.detail.rand_attr[2].val hero.detail.rand_attr[2].val
? hero.detail.rand_attr[2].val>=100 ? parseInt(hero.detail.rand_attr[2].val*1) : (hero.detail.rand_attr[2].val*1).toFixed(2) ? hero.detail.rand_attr[2].val >= 100
? parseInt(hero.detail.rand_attr[2].val * 1)
: (hero.detail.rand_attr[2].val * 1).toFixed(2)
: "" : ""
}} }}
</div> </div>
@ -165,7 +171,7 @@
<div> <div>
{{ {{
hero.detail.rand_attr[4].val hero.detail.rand_attr[4].val
? ((hero.detail.rand_attr[4].val *1)*100).toFixed(2) ? (hero.detail.rand_attr[4].val * 1 * 100).toFixed(2)
: "0" : "0"
}}% }}%
</div> </div>
@ -184,7 +190,7 @@
<div> <div>
{{ {{
hero.detail.rand_attr[5].val hero.detail.rand_attr[5].val
? ((hero.detail.rand_attr[5].val *1)*100).toFixed(2) ? (hero.detail.rand_attr[5].val * 1 * 100).toFixed(2)
: "0" : "0"
}}% }}%
</div> </div>
@ -203,7 +209,7 @@
<div> <div>
{{ {{
hero.detail.rand_attr[6].val hero.detail.rand_attr[6].val
? ((hero.detail.rand_attr[6].val *1)*100).toFixed(2) ? (hero.detail.rand_attr[6].val * 1 * 100).toFixed(2)
: "0" : "0"
}}% }}%
</div> </div>
@ -222,7 +228,7 @@
<div> <div>
{{ {{
hero.detail.rand_attr[7].val hero.detail.rand_attr[7].val
? ((hero.detail.rand_attr[7].val *1)*100).toFixed(2) ? (hero.detail.rand_attr[7].val * 1 * 100).toFixed(2)
: "0" : "0"
}}% }}%
</div> </div>
@ -266,6 +272,10 @@
></Transition> ></Transition>
<div class="buy-price"> <div class="buy-price">
<div class="mynft" v-if="isType === 'mynft'"> <div class="mynft" v-if="isType === 'mynft'">
<!-- <div class="for-rent-btn" v-if="orderId">
<div class="adjust" @click="handPutShow"></div>
<div class="remove"></div>
</div> -->
<div class="rent"></div> <div class="rent"></div>
<div class="sell" @click="handPutShow">Sell</div> <div class="sell" @click="handPutShow">Sell</div>
</div> </div>
@ -628,6 +638,26 @@ export default {
height: 89px; height: 89px;
margin-right: 35px; margin-right: 35px;
} }
.for-rent-btn {
display: flex;
// margin-top: 170px;
.adjust {
width: 384px;
height: 89px;
cursor: pointer;
// margin-left: 14px;
background: url("../../assets/market/hero/adjust.png") no-repeat;
background-size: 100% 100%;
}
.remove {
width: 384px;
height: 89px;
cursor: pointer;
margin-left: 14px;
background: url("../../assets/market/hero/remove.png") no-repeat;
background-size: 100% 100%;
}
}
} }
.tabs { .tabs {
position: absolute; position: absolute;

View File

@ -7,14 +7,12 @@
v-if="piece.c_id" v-if="piece.c_id"
width="214px" width="214px"
:src=" :src="
require('@/assets/market/piece/details/' + require('@/assets/market/piece/details/' + piece.c_id + '_full.png')
piece.c_id +
'_full.png')
" "
alt="" alt=""
/> />
<img <img
v-else-if="piece.item_id" v-else-if="piece.item_id"
width="214px" width="214px"
:src=" :src="
require('@/assets/market/piece/details/' + require('@/assets/market/piece/details/' +
@ -52,7 +50,7 @@
{{ piece.balance }} {{ piece.balance }}
</div> </div>
<div class="piece-number" v-else> <div class="piece-number" v-else>
<span> {{ piece.amount}}</span> <span> {{ piece.amount }}</span>
</div> </div>
</div> </div>
</div> </div>
@ -75,6 +73,10 @@
</div> </div>
<div class="buy-price"> <div class="buy-price">
<div class="mynft" v-if="isType === 'mynft'"> <div class="mynft" v-if="isType === 'mynft'">
<!-- <div class="for-rent-btn" v-if="orderId">
<div class="adjust" @click="handPutShow"></div>
<div class="remove"></div>
</div> -->
<div class="rent"></div> <div class="rent"></div>
<div class="sell" @click="handPutShow">Sell</div> <div class="sell" @click="handPutShow">Sell</div>
</div> </div>
@ -156,7 +158,7 @@ export default {
console.log(this.piece.detail.balance, "this.piece.detail.balance"); console.log(this.piece.detail.balance, "this.piece.detail.balance");
}, },
handPutShow() { handPutShow() {
this.$emit("handPutShow",this.piece); this.$emit("handPutShow", this.piece);
console.log("ppwowerw"); console.log("ppwowerw");
}, },
showTip() { showTip() {
@ -164,7 +166,7 @@ export default {
this.$emit("showTip"); this.$emit("showTip");
}, },
handBuyShow() { handBuyShow() {
this.$emit("handBuyShow",this.piece); this.$emit("handBuyShow", this.piece);
console.log("handBuyShow"); console.log("handBuyShow");
}, },
}, },
@ -384,5 +386,25 @@ export default {
background: url("../../assets/market/chip/sell-btn.png") no-repeat; background: url("../../assets/market/chip/sell-btn.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
.for-rent-btn {
display: flex;
// margin-top: 170px;
.adjust {
width: 229px;
height: 72px;
cursor: pointer;
// margin-left: 14px;
background: url("../../assets/market/piece/adjust.png") no-repeat;
background-size: 100% 100%;
}
.remove {
width: 229px;
height: 72px;
cursor: pointer;
margin-left: 14px;
background: url("../../assets/market/piece/remove.png") no-repeat;
background-size: 100% 100%;
}
}
} }
</style> </style>

View File

@ -80,7 +80,7 @@ import WeaponSellTop from "./WeaponSellTop.vue";
import PieceSellTop from "./PieceSellTop.vue"; import PieceSellTop from "./PieceSellTop.vue";
import HeroSellTop from "./HeroSellTop.vue"; import HeroSellTop from "./HeroSellTop.vue";
import ChipSellTop from "./ChipSellTop.vue"; import ChipSellTop from "./ChipSellTop.vue";
import { sellMyNft, getSupportedCurrenTypes } from "@/api/Market"; import { getSupportedCurrenTypes } from "@/api/Market";
import { AppModule } from "@/store/modules/app"; import { AppModule } from "@/store/modules/app";
import { CONTRACT_ADDRESS } from "@/configs/config_chain"; import { CONTRACT_ADDRESS } from "@/configs/config_chain";
import ChainManager from "@/chain/ChainManager"; import ChainManager from "@/chain/ChainManager";

View File

@ -2,11 +2,16 @@
<div> <div>
<div class="container" @click="HeroDialog(data)"> <div class="container" @click="HeroDialog(data)">
<!-- <div class="no-sale"> <!-- <div class="no-sale">
<img <div class="for-rent">
width="205px" <div class="for-rent-img">
src="../../../assets/market/hero/no-sale.png" <img
alt="" width="205px"
/> src="../../../assets/market/hero/for-rent.png"
alt=""
/>
</div>
</div>
</div> --> </div> -->
<div class="type-img" v-if="data.info !== null"> <div class="type-img" v-if="data.info !== null">
<img <img
@ -239,7 +244,7 @@ export default class HeroNft extends Vue {
HeroDialog(data: void) { HeroDialog(data: void) {
// console.log(data.item_id+''); // console.log(data.item_id+'');
this.dialogVisible = true; this.dialogVisible = true;
console.log('-=--==--=',this.dialogVisible) console.log("-=--==--=", this.dialogVisible);
// get cardBg() { // get cardBg() {
// if (this.nftData.isGenesis) { // if (this.nftData.isGenesis) {
// return require("@/assets/main/card/card_border_s.png"); // return require("@/assets/main/card/card_border_s.png");
@ -290,6 +295,28 @@ export default class HeroNft extends Vue {
opacity: 0.8; opacity: 0.8;
z-index: 11; z-index: 11;
border-radius: 16px; border-radius: 16px;
.for-rent-img{
margin-top: 100px;
margin-bottom: 70px;
}
.for-rent-btn {
display: flex;
// margin-top: 170px;
.adjust {
width: 105px;
height: 35px;
// margin-left: 14px;
background: url("../../../assets/market/hero/adjust.png") no-repeat;
background-size: 100% 100%;
}
.remove {
width: 105px;
height: 35px;
margin-left: 14px;
background: url("../../../assets/market/hero/remove.png") no-repeat;
background-size: 100% 100%;
}
}
} }
// padding-top: 18px; // padding-top: 18px;
.type-img { .type-img {