diff --git a/src/assets/img/home/investor_lmmutable.png b/src/assets/img/home/investor_lmmutable.png new file mode 100644 index 0000000..8128dc7 Binary files /dev/null and b/src/assets/img/home/investor_lmmutable.png differ diff --git a/src/components/Dialogs/sellDialog.vue b/src/components/Dialogs/sellDialog.vue index d80e7ee..ecff6b0 100644 --- a/src/components/Dialogs/sellDialog.vue +++ b/src/components/Dialogs/sellDialog.vue @@ -17,7 +17,6 @@
-
@@ -25,14 +24,12 @@
  • -
    @@ -175,10 +172,16 @@ const optionDayValue = ref("86400000"); const priceValue = ref(); const isPriceListShow = ref(false); +const handleInput = (event) => { + // 使用正则表达式来限制输入长度为7位,并排除小数点 + const value = event.target.value; + priceValue.value = value.replace(/[^\d]/g, '').slice(0, 7) +}; + // 出售 const currency = import.meta.env.VUE_APP_MARKET_CURRENCY; const sellConfirm = async () => { - if (priceValue.value) { + if (priceValue.value && Number(priceValue.value) > 0) { let curDate = new Date(); let orderData = new Date(curDate.getTime() + Number(optionDayValue.value)); const data = { diff --git a/src/components/about/AboutFooter.vue b/src/components/about/AboutFooter.vue index d933199..c7af6f0 100644 --- a/src/components/about/AboutFooter.vue +++ b/src/components/about/AboutFooter.vue @@ -88,6 +88,10 @@ const logos = ref([ imgeSrc: new URL("@/assets/img/home/investor_GSR.png", import.meta.url) .href, }, + { + imgeSrc: new URL("@/assets/img/home/investor_lmmutable.png", import.meta.url) + .href, + }, ]); const emit = defineEmits(["goToSlide"]); diff --git a/src/components/assets/assetsContent.vue b/src/components/assets/assetsContent.vue index 4e56941..af76b27 100644 --- a/src/components/assets/assetsContent.vue +++ b/src/components/assets/assetsContent.vue @@ -40,6 +40,7 @@ const nftList = ref([]) const navTable = (i) => { navIndex.value = i + window.scrollTo(0, 0) } const filterList = ref([]) diff --git a/src/components/assets/collectibles.vue b/src/components/assets/collectibles.vue index 5c52cc4..2d102c2 100644 --- a/src/components/assets/collectibles.vue +++ b/src/components/assets/collectibles.vue @@ -101,7 +101,6 @@ const getMyAssets = async () => { } const handleScroll = () => { - const myADdress = localWalletStore.address var scrollTop = document.documentElement.scrollTop || document.body.scrollTop; //变量windowHeight是可视区的高度 var windowHeight = @@ -110,19 +109,11 @@ const handleScroll = () => { document.documentElement.scrollHeight || document.body.scrollHeight; if (scrollTop + windowHeight == scrollHeight) { //请求数据接口 - // this.seeMoreSchoolList(); // console.log('scrollTop + windowHeight == scrollHeight请求接口',toRaw(marketplaceStore.cursorObj), scrollTop, windowHeight, scrollHeight) - // if(myADdress) { if(toRaw(marketplaceStore.cursorObj).remaining != 0) { - // getMyAssets() - // } else { - console.log('请求coll') - } else { - console.log('不用请求coll') - // return false; + getMyAssets() } return false; - // } } } diff --git a/src/components/assets/hanging.vue b/src/components/assets/hanging.vue index 19b4324..8e4775c 100644 --- a/src/components/assets/hanging.vue +++ b/src/components/assets/hanging.vue @@ -6,7 +6,7 @@
    - +
    @@ -71,25 +71,23 @@ const getHistoryList = async () => { } }; -// const handleScrollListing = () => { -// var scrollTop = document.documentElement.scrollTop || document.body.scrollTop; //变量windowHeight是可视区的高度 -// var windowHeight = document.documentElement.clientHeight || document.body.clientHeight; //变量scrollHeight是滚动条的总高度 -// var scrollHeight = document.documentElement.scrollHeight || document.body.scrollHeight; -// console.log("next_cursor.value",scrollTop, windowHeight, scrollHeight); -// return; -// if (scrollTop + windowHeight == scrollHeight) { +// 取消出售后刷新 +const renewMyNft = () => { + getHistoryList() +} + +const handleScrollListing = () => { + var scrollTop = document.documentElement.scrollTop || document.body.scrollTop; //变量windowHeight是可视区的高度 + var windowHeight = document.documentElement.clientHeight || document.body.clientHeight; //变量scrollHeight是滚动条的总高度 + var scrollHeight = document.documentElement.scrollHeight || document.body.scrollHeight; + if (scrollTop + windowHeight == scrollHeight) { // // //请求数据接口 -// // // this.seeMoreSchoolList(); -// // // console.log('scrollTop + windowHeight == scrollHeight请求接口',toRaw(marketplaceStore.cursorObj), scrollTop, windowHeight, scrollHeight) -// console.log("next_cursor.value", next_cursor.value); -// if (next_cursor.value.remaining != 0) { -// // getHistoryList() -// console.log("请求list"); -// } else { -// console.log("不用请求list"); -// } -// } -// }; + if (next_cursor.value.remaining != 0) { + getHistoryList() + } + return false; + } +}; watch(localWalletStore, () => { if (!localWalletStore.token) { @@ -101,11 +99,11 @@ watch(localWalletStore, () => { onMounted(() => { getHistoryList(); - // window.removeEventListener("scroll", handleScrollListing); + window.addEventListener("scroll", handleScrollListing); }); onUnmounted(() => { - // window.removeEventListener("scroll", handleScrollListing); + window.removeEventListener("scroll", handleScrollListing); }); diff --git a/src/components/assets/myCard.vue b/src/components/assets/myCard.vue index f3df53c..2bdb0a0 100644 --- a/src/components/assets/myCard.vue +++ b/src/components/assets/myCard.vue @@ -125,12 +125,10 @@ const cancelNft = async (val) => { // 下链使用 const lockToGame = async(type) => { -// console.log('lockToGame',toRaw(props.nftData).contract_address, [toRaw(props.nftData).token_id]) -// return if(type == 'redeem') { const confirmResult = await createModal(ConfirmDialog, { title: '', - message: 'Once enabled, the gold coin card will be consumed, and you will receive corresponding gold coins in the game. Do you wish to continue with this?' + message: `Redeem ${props.nftData.detail.gold_coins} Gold to your game account. Do you wish to proceed?` }).show() if (confirmResult.errcode == 0) { lockToGameConfirm() @@ -138,24 +136,23 @@ const lockToGame = async(type) => { } else if(type == 'convert') { const confirmResult = await createModal(ConfirmDialog, { title: '', - message: 'After the hero links, you can use in the game, and can auto re-link after the game test ending, whether to continue the next link?' + message: 'After converting, you will be able to use the hero in the game. At the end of Season 1, the hero will automatically be returned to your wallet or Immutable Passport. Do you want to proceed?' }).show() - // console.log('confirmResult',confirmResult) if (confirmResult.errcode == 0) { lockToGameConfirm() } } } - const lockToGameConfirm = async () => { try { const bc = new BlockChain() let res = await bc.locker.lock(toRaw(props.nftData).contract_address, [toRaw(props.nftData).token_id]) // console.log('lockToGame success', res) message.success('lockToGame success') - router.go(-1) + // router.go(-1) + emit('renewMyNft') + // router.push('/assets') } catch (e) { - // console.log('lockToGame fail', e.message) message.error('lockToGame fail.') } } diff --git a/src/components/assets/trading.vue b/src/components/assets/trading.vue index 7593947..d19b5bb 100644 --- a/src/components/assets/trading.vue +++ b/src/components/assets/trading.vue @@ -93,10 +93,7 @@ const handleScrollTrad = () => { // this.seeMoreSchoolList(); // console.log('scrollTop + windowHeight == scrollHeight请求接口',toRaw(marketplaceStore.cursorObj), scrollTop, windowHeight, scrollHeight) if(next_cursor.value.remaining != 0) { - // getHistoryList() - console.log('请求trad') - } else { - console.log('不用请求trad') + getHistoryList() } return false; } diff --git a/src/components/common/imgCard.vue b/src/components/common/imgCard.vue index 89d6131..0e9d524 100644 --- a/src/components/common/imgCard.vue +++ b/src/components/common/imgCard.vue @@ -12,8 +12,8 @@
  • - - + +
  • diff --git a/src/components/home/HomeFooter.vue b/src/components/home/HomeFooter.vue index d812d2b..fcbddd1 100644 --- a/src/components/home/HomeFooter.vue +++ b/src/components/home/HomeFooter.vue @@ -136,6 +136,10 @@ const logos = ref([ imgeSrc: new URL("@/assets/img/home/investor_GSR.png", import.meta.url) .href, }, + { + imgeSrc: new URL("@/assets/img/home/investor_lmmutable.png", import.meta.url) + .href, + }, ]); let timer = null; diff --git a/src/views/DetailView.vue b/src/views/DetailView.vue index 5392cbc..371e965 100644 --- a/src/views/DetailView.vue +++ b/src/views/DetailView.vue @@ -6,9 +6,7 @@
    - -
    @@ -40,7 +38,6 @@ 3、购买 4、 --> -
    Buy Now
    @@ -140,15 +137,15 @@

    Property

    -

    Gold coins

    -

    1000

    +

    Gold Amount

    +

    {{ detailData.nft.detail.gold_coins }}

    - It can be enabled on your home page and you will receive 100,000 gold coins in counter Fire. + A Gold Card is equivalent to 100,000 Gold. Once redeemed, 100,000 Gold will be credited to your Counter Fire game account.
    @@ -201,28 +198,15 @@ const cardLogin = async () => { // 购买 const buyDataArr = ref([]) const buyNow = async () => { - // console.log(toRaw(detailData.value)) - // return - // debugger buyDataArr.value = [] buyDataArr.value.push(detailData.value) const buyResult = await createModal(BuyDialog, { buyDataArr: buyDataArr.value, }).show() if(buyResult.errcode) { - console.log('buy fail') message.success('buy fail') return } - return - // ------------------------ - let tokenIds = [detailData.value.event.data.id] - try { - await new BlockChain().market.batchBuy(tokenIds) - console.log('buy success') - } catch (e) { - console.log('buy fail', e.message) - } } // 添加购物车 @@ -238,7 +222,7 @@ const addCart = async () => { } try { const { errcode, errmsg } = await marketplaceList.addCartListState(data) - console.log(errcode, errmsg) + // console.log(errcode, errmsg) if(errcode == 0) { message.success('success! Add from cart') marketplaceList.getCartList = await marketplaceList.getCartListState() @@ -269,15 +253,16 @@ const clearCart = async () => { getDetail() } } catch (e) { - console.log(e) + // console.log(e) } } +// 下链使用 const lockToGame = async(type) => { if(type == 'redeem') { const confirmResult = await createModal(ConfirmDialog, { title: '', - message: 'Once enabled, the gold coin card will be consumed, and you will receive corresponding gold coins in the game. Do you wish to continue with this?' + message: `Redeem ${detailData.value.nft.detail.gold_coins} Gold to your game account. Do you wish to proceed?` }).show() if (confirmResult.errcode == 0) { lockToGameConfirm() @@ -285,24 +270,20 @@ const lockToGame = async(type) => { } else if(type == 'convert') { const confirmResult = await createModal(ConfirmDialog, { title: '', - message: 'After the hero links, you can use in the game, and can auto re-link after the game test ending, whether to continue the next link?' + message: 'After converting, you will be able to use the hero in the game. At the end of Season 1, the hero will automatically be returned to your wallet or Immutable Passport. Do you want to proceed?' }).show() - console.log('confirmResult',confirmResult) + // console.log('confirmResult',confirmResult) if (confirmResult.errcode == 0) { lockToGameConfirm() } } } - const lockToGameConfirm = async () => { - try { await new BlockChain().locker.lock(detailData.value.nft.contract_address, [detailData.value.nft.token_id]) - // console.log('lockToGame success') message.success('lockToGame success') router.go(-1) } catch (e) { - // console.log('lockToGame fail', e.message) message.error('lockToGame fail.') } } @@ -315,28 +296,12 @@ const beginSell = async() => { if (detailData.value.event) return floorPrice.value = await getFloorPrice() sellDialogVisible.value = true - return - try { - //TODO:: 根据输入的内容出售 - const sellData = { - contractAddress: detailData.contract_address, - tokenId: detailData.token_id, - currencyAddress: import.meta.env.VUE_APP_MARKET_CURRENCY, - currencyAmount: '1000000000000000000', - orderExpiry: null - } - await new BlockChain().market.beginSellERC721(sellData) - console.log('beginSell success') - } catch (e) { - console.log('beginSell fail', e.message) - } - } // 取消售卖 const cancelSell = async() => { - console.log('cancelSell', detailData.value.event) + // console.log('cancelSell', detailData.value.event) if (!detailData.value.event) return try { @@ -347,7 +312,7 @@ const cancelSell = async() => { clearTimeout(timer) }, 2000); } - console.log('cancelSell success') + // console.log('cancelSell success') } catch (e) { try { let res = await new BlockChain().market.cancelOrdersOnChain([detailData.value.event.data.id]) @@ -358,9 +323,9 @@ const cancelSell = async() => { }, 2000); } } catch (e2) { - console.log('cancelSell fail', e.message) + // console.log('cancelSell fail', e.message) } - console.log('cancelSell fail', e.message) + // console.log('cancelSell fail', e.message) } } @@ -407,7 +372,7 @@ const getDetail = async () => { let { errcode, errmsg, data} = await nftDetail(props.address, props.tokenid) contractBlankUrl.value = `${import.meta.env.VUE_APP_EXPLORER_URL}${data.nft.contract_address}` if (errcode) { - console.log(errmsg) + // console.log(errmsg) //TODO:: 提示错误信息 return } @@ -422,7 +387,7 @@ const getDetail = async () => { price.value = _data.tokenAmount } - console.log(data,contractBlankUrl.value,import.meta.env.VUE_APP_NET_ID,import.meta.env.VUE_APP_GPAL_API,`${import.meta.env.VUE_APP_EXPLORER_URL}${data.nft.contract_address}`,'----') + // console.log(data,contractBlankUrl.value,import.meta.env.VUE_APP_NET_ID,import.meta.env.VUE_APP_GPAL_API,`${import.meta.env.VUE_APP_EXPLORER_URL}${data.nft.contract_address}`,'----') } onMounted(() => {