
@@ -263,6 +271,9 @@ import MosaicChip from "./MosaicChip.vue";
import { formatAddress } from "@/utils/formatAddress";
import { formatPrice } from "@/utils/chain.util";
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 {
props: ["isType"],
components: { LevelStar, ProgressCard, LevelValue, AccountCard, MosaicChip },
@@ -270,11 +281,13 @@ export default {
data() {
return {
detailVisible: false,
+ chainManager: new ChainManager(),
hero: "",
isTabs: false,
chipsid: 0,
cunter: 0,
- name: ""
+ name: "",
+ loadingInstance: null,
};
},
// created() {
@@ -289,14 +302,14 @@ export default {
level() {
return this.hero.info ? this.hero.info.level : false;
},
-
- chipinfo(){
- if(this.hero?.detail?.chips_info ){
- return this.hero.detail.chips_info
- }else{
- return false
- }
- },
+
+ chipinfo() {
+ if (this.hero?.detail?.chips_info) {
+ return this.hero.detail.chips_info;
+ } else {
+ return false;
+ }
+ },
address() {
return formatAddress(
this.hero.detail.chips_info[this.chipsid].nft_address
@@ -346,31 +359,40 @@ export default {
handBuyShow() {
this.$emit("handBuyShow", this.hero);
},
- },
- // watch: {
- // isShow: {
- // //弹出层禁止背景页面滑动
- // watch: {
- // isShow: {
- // //弹出层禁止背景页面滑动
- // handler(val) {
- // var mo = function (e) {
- // e.preventDefault();
- // };
- // if (val) {
- // document.getElementById("container").style.overflow = "hidden";
- // document.getElementById("container").style.position = "fixed";
- // document.addEventListener("touchmove", mo, false); //禁止页面滑动
- // } else {
- // document.getElementById("container").style.overflow = ""; //出现滚动条
- // document.getElementById("container").style.position = "";
- // document.removeEventListener("touchmove", mo, false);
- // }
- // },
- // },
- // },
- // },
- // },
+ async handremove() {
+ try {
+ this.showLoading();
+ const nftres = await this.chainManager.bc.beginCancelOrder(
+ this.hero.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) {
+ 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();
+ },
+ }
};
@@ -807,6 +829,24 @@ export default {
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 {
width: 47px;
diff --git a/src/components/mobile/main/HeroSellTop.vue b/src/components/mobile/main/HeroSellTop.vue
index f135697..d2a07e7 100644
--- a/src/components/mobile/main/HeroSellTop.vue
+++ b/src/components/mobile/main/HeroSellTop.vue
@@ -9,6 +9,12 @@
:src="require('@/assets/mobile/market/hero/' + data.item_id + '.png')"
alt=""
/>
+

diff --git a/src/components/mobile/main/PieceList.vue b/src/components/mobile/main/PieceList.vue
index 4c43f7f..348904d 100644
--- a/src/components/mobile/main/PieceList.vue
+++ b/src/components/mobile/main/PieceList.vue
@@ -166,14 +166,14 @@ export default {
align-items: center;
flex-direction: row;
margin-top: 43px;
- margin-left: 28px;
+ margin-left: 72px;
align-items: center;
flex-wrap: wrap;
}
.list-content {
display: flex;
flex-direction: column;
- margin-right: 18px;
+ margin-right: 41px;
width: 382px;
height: 504px;
padding-top: 35px;
diff --git a/src/components/mobile/main/PieceModal.vue b/src/components/mobile/main/PieceModal.vue
index a75172e..23ea20f 100644
--- a/src/components/mobile/main/PieceModal.vue
+++ b/src/components/mobile/main/PieceModal.vue
@@ -61,10 +61,18 @@