From ca67d99e8f4e8852a831dc2d90f14e6fcfc2ffb3 Mon Sep 17 00:00:00 2001 From: yuyongdong Date: Fri, 5 Jul 2024 13:06:38 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=91=E5=B8=81=E5=8D=A1=E4=B8=8B=E9=93=BE?= =?UTF-8?q?=E5=AE=8C=E6=88=90=E3=80=81=E4=BF=AE=E6=94=B9=E6=96=87=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/img/home/investor_lmmutable.png | Bin 0 -> 6808 bytes src/components/Dialogs/sellDialog.vue | 15 +++-- src/components/about/AboutFooter.vue | 4 ++ src/components/assets/assetsContent.vue | 1 + src/components/assets/collectibles.vue | 11 +--- src/components/assets/hanging.vue | 40 ++++++------- src/components/assets/myCard.vue | 13 ++--- src/components/assets/trading.vue | 5 +- src/components/common/imgCard.vue | 4 +- src/components/home/HomeFooter.vue | 4 ++ src/views/DetailView.vue | 65 +++++---------------- 11 files changed, 61 insertions(+), 101 deletions(-) create mode 100644 src/assets/img/home/investor_lmmutable.png diff --git a/src/assets/img/home/investor_lmmutable.png b/src/assets/img/home/investor_lmmutable.png new file mode 100644 index 0000000000000000000000000000000000000000..8128dc77100ca48bab00b110fb2e0b4ed340b481 GIT binary patch literal 6808 zcmV;J8fWE+P)Py4Qb|NXRCr$Pd<&FR)tT=1?{iL7^|Sf`-Si6t@dZSjT;G|@#OsYojLu4Cg7L0I zGe$*4QHV4kGFqETY56ITR;fHcr=pkGvXSJgRZ z|CfJP6*NsZ4|S~@2hLio)vP+T>+F5L^Zoz#{r^6MQ#|I(aSL)oRvEFnjDaf&mkO25oECx;>}(GiOgb16F`eHphAMR_0{sU@|QKOJIB+ zMCD-QfDi#-kMMmTj5rAWU~UEBB?R^h2jlTw>({%nll|V=&;R?cz^I^eU00z8;{(V3 zDuKSjj7ku4M_Ljh0yB@iT8tPGnl130A=1bm|%3>+fHtA0Q$!qMbwuIu_|Z_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83IETl0I;rg12zsQ56fa}OU=8wO@B3i_R3z;SNGzM}9 zL*GT3_k*lj5dSqZg;NHyN#eW3u>o-*gA!o9Hjc*un1c)6Y|CfAB zsx*B7Uh*~7)~{Z)eZhj|`JupfndnXudxWuEKqn8y{Ml}0IP5$G;x8SxhotRHN?=lN zwE&hbpdT~w<3~D&i?W@$M3^_Ub66}7X+dvkZN-5D`watz!y(f*S6)_ba<)uUri5Gh zysNtltt~C+l2#`jm~+a;m7Baytde1^>!;m0JW>;wo-2gHseVoC~1p2kq!t2)5v>v-hf~@rb%OaUg4Vn6?hz9|kgv#!&E(BVePLaxr zN>d^e;7Q3$!mBWxfK_ri5gX&im7ySAuN~&?z3)8|!`s!}=cIh&Y5`7B(ZpOLR^eFE z8{SbOi9dRgn}~!c2&`m7!~EFLO+n&Ip)g&Y=||k%;1155InyrBF3&k+!M3cdM0WO| z6zz{}78hU@+r>FDrX>LcA2=6Yf%@B-U$l%K#} z^vSl&q2Gze_YbUDvqr+wkwdyTCQh7~tyG~+hx!!f%Al)2s;Hw}$0VN<|4n>25fEaj5a_CE_h#C@-%^s-ETH*^^?byZO0}-Z}P-#3Twu7%#PrD}7{GOIn^}*O!D@+4CS9cO z-Qj;0bI0%C&m_ox%=$}$l6RS0J=(iWh6C%Q?=k_u#>^}1+~Cy@x|8Ybz5D2{z=_}5 z6c3O0eSHfNe+5hxqrJ81gwtolK-|Ji&)c@zh)Ck>Tbn+*c==GS{G{)v6Nz3NiJZ$S zm?5=0l7_!id_NrnZHn=dPk5oH-`jaQ8>&B)*_|Ea&vFG$3cAcy%bPf}tWddvzKj%I zk$Dp*0|jZf-6I%je&kJ@8tTo#AlZ8MO`Lz0_x}IeMg2bn)5e~bl8!k50000
-
@@ -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(() => {