fix
This commit is contained in:
parent
989219ee31
commit
a4777dd8e2
@ -183,6 +183,7 @@ export default {
|
|||||||
height: 531px;
|
height: 531px;
|
||||||
padding-top: 45px;
|
padding-top: 45px;
|
||||||
padding-left: 46px;
|
padding-left: 46px;
|
||||||
|
// margin: 0 auto;
|
||||||
// padding-right: 31px;
|
// padding-right: 31px;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
background: url("../../../assets/mobile/market/chip/bg.png") no-repeat;
|
background: url("../../../assets/mobile/market/chip/bg.png") no-repeat;
|
||||||
|
@ -79,7 +79,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mynft-sell" v-if="isType == 'mynft'">
|
<div class="mynft-sell" v-if="isType == 'mynft'">
|
||||||
<div class="sell" @click="handPutShow">Sell</div>
|
<div class="for-rent-btn" v-if="chip.o_link > 0">
|
||||||
|
<div class="adjust" @click="handPutShow"></div>
|
||||||
|
<div class="remove" @click="handRemove"></div>
|
||||||
|
</div>
|
||||||
|
<div class="sell" @click="handPutShow" v-else>Sell</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="buy-price" v-else>
|
<div class="buy-price" v-else>
|
||||||
<div class="price"><span class="price-number">{{formatPriceShow(chip.s_price,18)}}</span></div>
|
<div class="price"><span class="price-number">{{formatPriceShow(chip.s_price,18)}}</span></div>
|
||||||
@ -98,6 +102,9 @@
|
|||||||
import { formatSelect } from "@/utils/UTCTime";
|
import { formatSelect } from "@/utils/UTCTime";
|
||||||
import { formatPrice } from "@/utils/chain.util";
|
import { formatPrice } from "@/utils/chain.util";
|
||||||
import { formatAddress } from "@/utils/formatAddress";
|
import { formatAddress } from "@/utils/formatAddress";
|
||||||
|
import { AppModule } from "@/store/modules/app";
|
||||||
|
import { CONTRACT_ADDRESS } from "@/configs/config_chain";
|
||||||
|
import ChainManager from "@/chain/ChainManager";
|
||||||
export default {
|
export default {
|
||||||
props: ["isType"],
|
props: ["isType"],
|
||||||
name: "HeroModal",
|
name: "HeroModal",
|
||||||
@ -105,6 +112,8 @@ export default {
|
|||||||
return {
|
return {
|
||||||
detailVisible: false,
|
detailVisible: false,
|
||||||
chip: "",
|
chip: "",
|
||||||
|
loadingInstance:null,
|
||||||
|
chainManager: new ChainManager(),
|
||||||
chipArrid: {
|
chipArrid: {
|
||||||
39: "Hp Pct",
|
39: "Hp Pct",
|
||||||
40: "Atk Pct",
|
40: "Atk Pct",
|
||||||
@ -152,6 +161,40 @@ export default {
|
|||||||
handBuyShow() {
|
handBuyShow() {
|
||||||
this.$emit("handBuyShow", this.chip);
|
this.$emit("handBuyShow", this.chip);
|
||||||
},
|
},
|
||||||
|
async handRemove() {
|
||||||
|
|
||||||
|
try {
|
||||||
|
this.showLoading()
|
||||||
|
const nftres = await this.chainManager.bc.beginCancelOrder(
|
||||||
|
this.chip.o_link,
|
||||||
|
CONTRACT_ADDRESS[AppModule.chainId].marketDddress
|
||||||
|
);
|
||||||
|
if (nftres.status == true) {
|
||||||
|
this.$emit("handMessage", 1);
|
||||||
|
this.hideLoading();
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$emit("handMessageHide");
|
||||||
|
this.$emit("on-close");
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$emit("getMarketNftList");
|
||||||
|
}, 1000);
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.log("query order status error", err);
|
||||||
|
this.hideLoading();
|
||||||
|
this.$emit("handMessage", 1);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
showLoading() {
|
||||||
|
this.loadingInstance = this.$loading({
|
||||||
|
background: "rgba(0, 0, 0, 0.8)",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
hideLoading() {
|
||||||
|
this.loadingInstance?.close();
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@ -407,6 +450,24 @@ export default {
|
|||||||
background: url("../../../assets/market/hero/sell-mb-btn.png") no-repeat;
|
background: url("../../../assets/market/hero/sell-mb-btn.png") no-repeat;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
}
|
}
|
||||||
|
.for-rent-btn {
|
||||||
|
display: flex;
|
||||||
|
.adjust {
|
||||||
|
width: 344px;
|
||||||
|
height: 89px;
|
||||||
|
cursor: pointer;
|
||||||
|
background: url("../../../assets/market/hero/adjust.png") no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
.remove {
|
||||||
|
width: 344px;
|
||||||
|
height: 89px;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-left: 14px;
|
||||||
|
background: url("../../../assets/market/hero/remove.png") no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.buy-price {
|
.buy-price {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -140,7 +140,7 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-top: 34px;
|
margin-top: 34px;
|
||||||
margin-left: 27px;
|
margin-left: 39px;
|
||||||
margin-right: 27px;
|
margin-right: 27px;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
|
@ -50,7 +50,9 @@
|
|||||||
<div class="hero-bottom">
|
<div class="hero-bottom">
|
||||||
<div class="hero-right-token">
|
<div class="hero-right-token">
|
||||||
<div class="token-name">TOKEN ID</div>
|
<div class="token-name">TOKEN ID</div>
|
||||||
<div class="token-id">#{{hero.detail.token_id? hero.detail.token_id :''}}</div>
|
<div class="token-id">
|
||||||
|
#{{ hero.detail.token_id ? hero.detail.token_id : "" }}
|
||||||
|
</div>
|
||||||
<div class="hill">
|
<div class="hill">
|
||||||
<div class="hill-content">
|
<div class="hill-content">
|
||||||
<div class="hill-name">
|
<div class="hill-name">
|
||||||
@ -237,11 +239,17 @@
|
|||||||
</div>
|
</div>
|
||||||
<MosaicChip v-if="isTabs" :data="hero"></MosaicChip>
|
<MosaicChip v-if="isTabs" :data="hero"></MosaicChip>
|
||||||
<div class="mynft-sell" v-if="isType == 'mynft'">
|
<div class="mynft-sell" v-if="isType == 'mynft'">
|
||||||
<div class="sell" @click="handPutShow">Sell</div>
|
<div class="for-rent-btn" v-if="hero.o_link > 0">
|
||||||
|
<div class="adjust" @click="handPutShow(hero)"></div>
|
||||||
|
<div class="remove" @click="handremove"></div>
|
||||||
|
</div>
|
||||||
|
<div class="sell" @click="handPutShow" v-else>Sell</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="buy-price" v-else>
|
<div class="buy-price" v-else>
|
||||||
<div class="price">
|
<div class="price">
|
||||||
<span class="price-number">{{formatPriceShow(hero.s_price,18) }}</span>
|
<span class="price-number">{{
|
||||||
|
formatPriceShow(hero.s_price, 18)
|
||||||
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="buy-img" @click="handBuyShow">
|
<div class="buy-img" @click="handBuyShow">
|
||||||
<img src="../../../assets/market/hero/buy.png" alt="aoi-hero" />
|
<img src="../../../assets/market/hero/buy.png" alt="aoi-hero" />
|
||||||
@ -263,6 +271,9 @@ import MosaicChip from "./MosaicChip.vue";
|
|||||||
import { formatAddress } from "@/utils/formatAddress";
|
import { formatAddress } from "@/utils/formatAddress";
|
||||||
import { formatPrice } from "@/utils/chain.util";
|
import { formatPrice } from "@/utils/chain.util";
|
||||||
import { formatSelect } from "@/utils/UTCTime";
|
import { formatSelect } from "@/utils/UTCTime";
|
||||||
|
import { AppModule } from "@/store/modules/app";
|
||||||
|
import { CONTRACT_ADDRESS } from "@/configs/config_chain";
|
||||||
|
import ChainManager from "@/chain/ChainManager";
|
||||||
export default {
|
export default {
|
||||||
props: ["isType"],
|
props: ["isType"],
|
||||||
components: { LevelStar, ProgressCard, LevelValue, AccountCard, MosaicChip },
|
components: { LevelStar, ProgressCard, LevelValue, AccountCard, MosaicChip },
|
||||||
@ -270,11 +281,13 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
detailVisible: false,
|
detailVisible: false,
|
||||||
|
chainManager: new ChainManager(),
|
||||||
hero: "",
|
hero: "",
|
||||||
isTabs: false,
|
isTabs: false,
|
||||||
chipsid: 0,
|
chipsid: 0,
|
||||||
cunter: 0,
|
cunter: 0,
|
||||||
name: ""
|
name: "",
|
||||||
|
loadingInstance: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
// created() {
|
// created() {
|
||||||
@ -289,14 +302,14 @@ export default {
|
|||||||
level() {
|
level() {
|
||||||
return this.hero.info ? this.hero.info.level : false;
|
return this.hero.info ? this.hero.info.level : false;
|
||||||
},
|
},
|
||||||
|
|
||||||
chipinfo(){
|
chipinfo() {
|
||||||
if(this.hero?.detail?.chips_info ){
|
if (this.hero?.detail?.chips_info) {
|
||||||
return this.hero.detail.chips_info
|
return this.hero.detail.chips_info;
|
||||||
}else{
|
} else {
|
||||||
return false
|
return false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
address() {
|
address() {
|
||||||
return formatAddress(
|
return formatAddress(
|
||||||
this.hero.detail.chips_info[this.chipsid].nft_address
|
this.hero.detail.chips_info[this.chipsid].nft_address
|
||||||
@ -346,31 +359,40 @@ export default {
|
|||||||
handBuyShow() {
|
handBuyShow() {
|
||||||
this.$emit("handBuyShow", this.hero);
|
this.$emit("handBuyShow", this.hero);
|
||||||
},
|
},
|
||||||
},
|
async handremove() {
|
||||||
// watch: {
|
try {
|
||||||
// isShow: {
|
this.showLoading();
|
||||||
// //弹出层禁止背景页面滑动
|
const nftres = await this.chainManager.bc.beginCancelOrder(
|
||||||
// watch: {
|
this.hero.o_link,
|
||||||
// isShow: {
|
CONTRACT_ADDRESS[AppModule.chainId].marketDddress
|
||||||
// //弹出层禁止背景页面滑动
|
);
|
||||||
// handler(val) {
|
if (nftres.status == true) {
|
||||||
// var mo = function (e) {
|
this.$emit("handMessage", 1);
|
||||||
// e.preventDefault();
|
this.hideLoading();
|
||||||
// };
|
setTimeout(() => {
|
||||||
// if (val) {
|
this.$emit("handMessageHide");
|
||||||
// document.getElementById("container").style.overflow = "hidden";
|
this.$emit("on-close");
|
||||||
// document.getElementById("container").style.position = "fixed";
|
setTimeout(() => {
|
||||||
// document.addEventListener("touchmove", mo, false); //禁止页面滑动
|
this.$emit("getMarketNftList");
|
||||||
// } else {
|
}, 1000);
|
||||||
// document.getElementById("container").style.overflow = ""; //出现滚动条
|
}, 1000);
|
||||||
// document.getElementById("container").style.position = "";
|
}
|
||||||
// document.removeEventListener("touchmove", mo, false);
|
} catch (err) {
|
||||||
// }
|
this.hideLoading();
|
||||||
// },
|
this.$emit("handMessage", 0);
|
||||||
// },
|
console.log("query order status error", err);
|
||||||
// },
|
}
|
||||||
// },
|
},
|
||||||
// },
|
showLoading() {
|
||||||
|
this.loadingInstance = this.$loading({
|
||||||
|
background: "rgba(0, 0, 0, 0.8)",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
hideLoading() {
|
||||||
|
this.loadingInstance?.close();
|
||||||
|
},
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -807,6 +829,24 @@ export default {
|
|||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.for-rent-btn {
|
||||||
|
display: flex;
|
||||||
|
.adjust {
|
||||||
|
width: 384px;
|
||||||
|
height: 89px;
|
||||||
|
cursor: pointer;
|
||||||
|
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%;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.star-img {
|
.star-img {
|
||||||
width: 47px;
|
width: 47px;
|
||||||
|
@ -9,6 +9,12 @@
|
|||||||
:src="require('@/assets/mobile/market/hero/' + data.item_id + '.png')"
|
:src="require('@/assets/mobile/market/hero/' + data.item_id + '.png')"
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
|
<img
|
||||||
|
class="hero-img"
|
||||||
|
v-if="data.c_id"
|
||||||
|
:src="require('@/assets/mobile/market/hero/' + data.c_id + '.png')"
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="gen" v-if="data.info.is_genesis">
|
<div class="gen" v-if="data.info.is_genesis">
|
||||||
<img width="31px" src="../../../assets/market/hero/gen.png" alt="" />
|
<img width="31px" src="../../../assets/market/hero/gen.png" alt="" />
|
||||||
|
@ -166,14 +166,14 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
margin-top: 43px;
|
margin-top: 43px;
|
||||||
margin-left: 28px;
|
margin-left: 72px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
.list-content {
|
.list-content {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
margin-right: 18px;
|
margin-right: 41px;
|
||||||
width: 382px;
|
width: 382px;
|
||||||
height: 504px;
|
height: 504px;
|
||||||
padding-top: 35px;
|
padding-top: 35px;
|
||||||
|
@ -61,10 +61,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mynft-sell" v-if="isType == 'mynft'">
|
<div class="mynft-sell" v-if="isType == 'mynft'">
|
||||||
<div class="sell" @click="handPutShow">Sell</div>
|
<div class="for-rent-btn" v-if="piece.o_link > 0">
|
||||||
|
<div class="adjust" @click="handPutShow"></div>
|
||||||
|
<div class="remove" @click="handRemove"></div>
|
||||||
|
</div>
|
||||||
|
<div class="sell" @click="handPutShow" v-else>Sell</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="buy-price" v-else>
|
<div class="buy-price" v-else>
|
||||||
<div class="price"><span class="price-number">{{formatPriceShow(piece.s_price,18)}}</span></div>
|
<div class="price">
|
||||||
|
<span class="price-number">{{
|
||||||
|
formatPriceShow(piece.s_price, 18)
|
||||||
|
}}</span>
|
||||||
|
</div>
|
||||||
<div class="buy-img" @click="handBuyShow">
|
<div class="buy-img" @click="handBuyShow">
|
||||||
<img src="../../../assets/market/hero/buy.png" alt="aoi-hero" />
|
<img src="../../../assets/market/hero/buy.png" alt="aoi-hero" />
|
||||||
</div>
|
</div>
|
||||||
@ -80,13 +88,18 @@
|
|||||||
import { formatSelect } from "@/utils/UTCTime";
|
import { formatSelect } from "@/utils/UTCTime";
|
||||||
import { formatPrice } from "@/utils/chain.util";
|
import { formatPrice } from "@/utils/chain.util";
|
||||||
import { formatAddress } from "@/utils/formatAddress";
|
import { formatAddress } from "@/utils/formatAddress";
|
||||||
|
import { AppModule } from "@/store/modules/app";
|
||||||
|
import { CONTRACT_ADDRESS } from "@/configs/config_chain";
|
||||||
|
import ChainManager from "@/chain/ChainManager";
|
||||||
export default {
|
export default {
|
||||||
props: ["isType"],
|
props: ["isType"],
|
||||||
name: "HeroModal",
|
name: "HeroModal",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
detailVisible: false,
|
detailVisible: false,
|
||||||
piece: ""
|
piece: "",
|
||||||
|
loadingInstance: null,
|
||||||
|
chainManager: new ChainManager(),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -105,7 +118,7 @@ export default {
|
|||||||
// 分发自定义事件(事件名: closeTip)
|
// 分发自定义事件(事件名: closeTip)
|
||||||
this.$emit("closeTip");
|
this.$emit("closeTip");
|
||||||
},
|
},
|
||||||
formatPriceShow(price, decimals, fixed = 2) {
|
formatPriceShow(price, decimals, fixed = 2) {
|
||||||
return formatPrice(price, decimals, fixed);
|
return formatPrice(price, decimals, fixed);
|
||||||
},
|
},
|
||||||
init(data) {
|
init(data) {
|
||||||
@ -119,6 +132,40 @@ export default {
|
|||||||
handBuyShow() {
|
handBuyShow() {
|
||||||
this.$emit("handBuyShow", this.piece);
|
this.$emit("handBuyShow", this.piece);
|
||||||
},
|
},
|
||||||
|
async handRemove() {
|
||||||
|
try {
|
||||||
|
this.showLoading();
|
||||||
|
const nftres = await this.chainManager.bc.beginCancelOrder(
|
||||||
|
this.piece.o_link,
|
||||||
|
CONTRACT_ADDRESS[AppModule.chainId].marketDddress
|
||||||
|
);
|
||||||
|
// console.log(nftres, "beginSell");
|
||||||
|
if (nftres.status == true) {
|
||||||
|
this.$emit("handMessage", 1);
|
||||||
|
this.hideLoading();
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$emit("handMessageHide");
|
||||||
|
this.$emit("closeTip", false);
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$emit("getMarketNftList");
|
||||||
|
}, 1000);
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
this.hideLoading();
|
||||||
|
this.$emit("handMessage", 0);
|
||||||
|
console.log("query order status error", err);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
showLoading() {
|
||||||
|
this.loadingInstance = this.$loading({
|
||||||
|
background: "rgba(0, 0, 0, 0.8)",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
hideLoading() {
|
||||||
|
this.loadingInstance?.close();
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@ -370,6 +417,24 @@ export default {
|
|||||||
background: url("../../../assets/market/hero/sell-mb-btn.png") no-repeat;
|
background: url("../../../assets/market/hero/sell-mb-btn.png") no-repeat;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
}
|
}
|
||||||
|
.for-rent-btn {
|
||||||
|
display: flex;
|
||||||
|
.adjust {
|
||||||
|
width: 274px;
|
||||||
|
height: 89px;
|
||||||
|
cursor: pointer;
|
||||||
|
background: url("../../../assets/market/hero/adjust.png") no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
.remove {
|
||||||
|
width: 274px;
|
||||||
|
height: 89px;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-left: 14px;
|
||||||
|
background: url("../../../assets/market/hero/remove.png") no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.buy-price {
|
.buy-price {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
<div v-if="isBuy == true">
|
<div v-if="isBuy == true">
|
||||||
<div class="amount">Amount</div>
|
<div class="amount">Amount</div>
|
||||||
<div class="count-content">cunout
|
<div class="count-content">
|
||||||
<div class="count">
|
<div class="count">
|
||||||
<div class="left" @click="handReduce"></div>
|
<div class="left" @click="handReduce"></div>
|
||||||
<div class="conunt-number">{{ cunout }}</div>
|
<div class="conunt-number">{{ cunout }}</div>
|
||||||
@ -44,7 +44,7 @@
|
|||||||
<div class="priece" v-else>
|
<div class="priece" v-else>
|
||||||
<div class="priece-btn">
|
<div class="priece-btn">
|
||||||
<div class="priece-number">
|
<div class="priece-number">
|
||||||
{{ formatPriceShow(data.s_price,18)}}
|
{{ formatPriceShow(data.s_price, 18) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -55,24 +55,22 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { formatPrice } from "@/utils/chain.util";
|
import { formatPrice } from "@/utils/chain.util";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: ["data", "isBuy",'cunout'],
|
props: ["data", "isBuy", "cunout"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {};
|
||||||
};
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handReduce() {
|
handReduce() {
|
||||||
this.$emit("handReduce")
|
this.$emit("handReduce");
|
||||||
},
|
},
|
||||||
handPlus() {
|
handPlus() {
|
||||||
this.$emit("handPlus")
|
this.$emit("handPlus");
|
||||||
},
|
},
|
||||||
formatPriceShow(price, decimals, fixed = 2) {
|
formatPriceShow(price, decimals, fixed = 2) {
|
||||||
return formatPrice(price, decimals, fixed);
|
return formatPrice(price, decimals, fixed);
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -407,6 +407,7 @@ export default {
|
|||||||
height: 115px;
|
height: 115px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 115px;
|
line-height: 115px;
|
||||||
|
opacity: 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: #9dabd3;
|
color: #9dabd3;
|
||||||
background: url("../../../assets/market/dialog/confirm.png") no-repeat;
|
background: url("../../../assets/market/dialog/confirm.png") no-repeat;
|
||||||
|
@ -161,6 +161,7 @@ export default {
|
|||||||
// 分发自定义事件(事件名: closeTip)
|
// 分发自定义事件(事件名: closeTip)
|
||||||
// this.$emit("closeTip");
|
// this.$emit("closeTip");
|
||||||
this.detailVisible = false;
|
this.detailVisible = false;
|
||||||
|
this.shell.price =''
|
||||||
},
|
},
|
||||||
init(data) {
|
init(data) {
|
||||||
this.detailVisible = true;
|
this.detailVisible = true;
|
||||||
@ -556,6 +557,7 @@ $item-size: 22px;
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 115px;
|
line-height: 115px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
opacity: 0;
|
||||||
color: #9dabd3;
|
color: #9dabd3;
|
||||||
background: url("../../../assets/market/dialog/confirm.png") no-repeat;
|
background: url("../../../assets/market/dialog/confirm.png") no-repeat;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
|
@ -226,7 +226,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<MosaicChip v-if="isTabs" :data="weapon"></MosaicChip>
|
<MosaicChip v-if="isTabs" :data="weapon"></MosaicChip>
|
||||||
<div class="mynft-sell" v-if="isType == 'mynft'">
|
<div class="mynft-sell" v-if="isType == 'mynft'">
|
||||||
<div class="sell" @click="handPutShow">Sell</div>
|
<div class="for-rent-btn" v-if="weapon.o_link > 0">
|
||||||
|
<div class="adjust" @click="handPutShow(hero)"></div>
|
||||||
|
<div class="remove" @click="handRemove"></div>
|
||||||
|
</div>
|
||||||
|
<div class="sell" @click="handPutShow" v-else>Sell</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="buy-price" v-else>
|
<div class="buy-price" v-else>
|
||||||
<div class="price"><span class="price-number">{{formatPriceShow(weapon.s_price,18)}}</span></div>
|
<div class="price"><span class="price-number">{{formatPriceShow(weapon.s_price,18)}}</span></div>
|
||||||
@ -248,6 +252,9 @@ import AccountCard from "./AccountCard.vue";
|
|||||||
import ProgressCard from "./ProgressCard.vue";
|
import ProgressCard from "./ProgressCard.vue";
|
||||||
import MosaicChip from "./MosaicChip.vue";
|
import MosaicChip from "./MosaicChip.vue";
|
||||||
import { formatPrice } from "@/utils/chain.util";
|
import { formatPrice } from "@/utils/chain.util";
|
||||||
|
import { AppModule } from "@/store/modules/app";
|
||||||
|
import { CONTRACT_ADDRESS } from "@/configs/config_chain";
|
||||||
|
import ChainManager from "@/chain/ChainManager";
|
||||||
export default {
|
export default {
|
||||||
props: ["isType"],
|
props: ["isType"],
|
||||||
components: { LevelStar, ProgressCard, LevelValue, AccountCard, MosaicChip },
|
components: { LevelStar, ProgressCard, LevelValue, AccountCard, MosaicChip },
|
||||||
@ -255,8 +262,10 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
detailVisible: false,
|
detailVisible: false,
|
||||||
|
chainManager: new ChainManager(),
|
||||||
weapon: "",
|
weapon: "",
|
||||||
isTabs: false,
|
isTabs: false,
|
||||||
|
loadingInstance:null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -288,6 +297,41 @@ export default {
|
|||||||
handBuyShow() {
|
handBuyShow() {
|
||||||
this.$emit("handBuyShow", this.weapon);
|
this.$emit("handBuyShow", this.weapon);
|
||||||
},
|
},
|
||||||
|
async handRemove() {
|
||||||
|
try {
|
||||||
|
this.showLoading()
|
||||||
|
const nftres = await this.chainManager.bc.beginCancelOrder(
|
||||||
|
this.weapon.o_link,
|
||||||
|
CONTRACT_ADDRESS[AppModule.chainId].marketDddress
|
||||||
|
);
|
||||||
|
console.log(nftres, "beginSell");
|
||||||
|
if (nftres.status == true) {
|
||||||
|
|
||||||
|
this.$emit("handMessage", 1);
|
||||||
|
this.hideLoading();
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$emit("handMessageHide");
|
||||||
|
this.$emit("on-close");
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$emit("getMarketNftList");
|
||||||
|
}, 1000);
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
this.hideLoading();
|
||||||
|
this.$emit("handMessage", 0);
|
||||||
|
console.log("query order status error", err);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
showLoading() {
|
||||||
|
this.loadingInstance = this.$loading({
|
||||||
|
background: "rgba(0, 0, 0, 0.8)",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
hideLoading() {
|
||||||
|
this.loadingInstance?.close();
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@ -708,6 +752,24 @@ export default {
|
|||||||
background: url("../../../assets/market/hero/sell-mb-btn.png") no-repeat;
|
background: url("../../../assets/market/hero/sell-mb-btn.png") no-repeat;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
}
|
}
|
||||||
|
.for-rent-btn {
|
||||||
|
display: flex;
|
||||||
|
.adjust {
|
||||||
|
width: 384px;
|
||||||
|
height: 89px;
|
||||||
|
cursor: pointer;
|
||||||
|
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%;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.buy-price {
|
.buy-price {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user