修改中心化card样式
This commit is contained in:
parent
6610f054c0
commit
8356f5ed5f
@ -7,14 +7,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<Collectibles v-if="navIndex == 0" />
|
<Collectibles v-if="navIndex == 0" />
|
||||||
<Hanging v-else-if="navIndex == 1" />
|
<!-- <Hanging v-else-if="navIndex == 1" />
|
||||||
<Trading v-else-if="navIndex == 2" />
|
<Trading v-else-if="navIndex == 2" />
|
||||||
<Activity v-else-if="navIndex == 3" />
|
<Activity v-else-if="navIndex == 3" /> -->
|
||||||
<!-- <Staking v-if="navIndex == 1" />
|
<Centralization v-if="navIndex == 1" />
|
||||||
<Centralization v-if="navIndex == 2" />
|
<Staking v-if="navIndex == 2" />
|
||||||
<Hanging v-else-if="navIndex == 3" />
|
<Hanging v-else-if="navIndex == 3" />
|
||||||
<Trading v-else-if="navIndex == 4" />
|
<Trading v-else-if="navIndex == 4" />
|
||||||
<Activity v-else-if="navIndex == 5" /> -->
|
<Activity v-else-if="navIndex == 5" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -37,12 +37,12 @@ const navList = ref([
|
|||||||
{
|
{
|
||||||
name: "NFTs"
|
name: "NFTs"
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// name: "Staking"
|
name: "Centralized Assets"
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// name: "Centralized Assets"
|
name: "Staking"
|
||||||
// },
|
},
|
||||||
{
|
{
|
||||||
name: "Listings"
|
name: "Listings"
|
||||||
},
|
},
|
||||||
|
@ -314,7 +314,7 @@ onMounted(() => {
|
|||||||
background: url('@/assets/img/marketplace/CEC_bg.png') no-repeat;
|
background: url('@/assets/img/marketplace/CEC_bg.png') no-repeat;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
display: none;
|
// display: none;
|
||||||
.uaw-listing-content {
|
.uaw-listing-content {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-btn">
|
<div class="card-btn">
|
||||||
<div class="card-sell" v-if="nftData.on_sale == 0" @click="mintNft(nftData)">Mint for NFT</div>
|
<div class="card-sell" v-if="nftData.on_sale == 0" @click="mintHero(nftData)">Mint for NFT</div>
|
||||||
</div>
|
</div>
|
||||||
<SellDialog :sellDialogVisible="sellDialogVisible" :floorPrice="floorPrice" :sellDataArr="sellDataArr" @handleClose="sellHandleClose" />
|
<SellDialog :sellDialogVisible="sellDialogVisible" :floorPrice="floorPrice" :sellDataArr="sellDataArr" @handleClose="sellHandleClose" />
|
||||||
<LoadingDialog :loadingDialogVisible="loadingDialogVisible" />
|
<LoadingDialog :loadingDialogVisible="loadingDialogVisible" />
|
||||||
@ -53,7 +53,6 @@ import placeholderImg from '@/assets/img/marketplace/GenesisHeroes_NFT.png'
|
|||||||
import {createModal} from "@/utils/model.util";
|
import {createModal} from "@/utils/model.util";
|
||||||
import ConfirmDialog from "@/components/Dialogs/confirmDialog.vue"
|
import ConfirmDialog from "@/components/Dialogs/confirmDialog.vue"
|
||||||
import { timeFormat } from "@/configs/priceCalculate"
|
import { timeFormat } from "@/configs/priceCalculate"
|
||||||
import { Locker } from "@/components/chain/contract/Locker"
|
|
||||||
const emit = defineEmits(['renewMyNft'])
|
const emit = defineEmits(['renewMyNft'])
|
||||||
import {formatPrice} from "@/components/chain/utils"
|
import {formatPrice} from "@/components/chain/utils"
|
||||||
|
|
||||||
@ -68,14 +67,6 @@ const props = defineProps({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const mintNft = async () => {
|
|
||||||
// console.log('-----', toRaw(props.nftData))
|
|
||||||
// return
|
|
||||||
const locker = new Locker()
|
|
||||||
let res = await locker.mintNft([toRaw(props.nftData).uniid])
|
|
||||||
console.log(res,'--------------')
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取地板价
|
// 获取地板价
|
||||||
const floorPrice = ref('0')
|
const floorPrice = ref('0')
|
||||||
const getFloorPrice = async (val) => {
|
const getFloorPrice = async (val) => {
|
||||||
@ -241,34 +232,9 @@ onMounted(() => {
|
|||||||
padding: 30px 30px 20px 30px;
|
padding: 30px 30px 20px 30px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
.card-img {
|
.card-img {
|
||||||
width: 240px;
|
width: 190px;
|
||||||
height: 360px;
|
height: 316px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
:deep(.card-img-common) {
|
|
||||||
li {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
.img-top {
|
|
||||||
width: 100px;
|
|
||||||
height: 30px;
|
|
||||||
top: 20px;
|
|
||||||
left: 20px;
|
|
||||||
}
|
|
||||||
.img-btm {
|
|
||||||
bottom: 12px;
|
|
||||||
left: 20px;
|
|
||||||
>div {
|
|
||||||
width: 80px;
|
|
||||||
height: 30px;
|
|
||||||
}
|
|
||||||
div:nth-child(1) {
|
|
||||||
}
|
|
||||||
div:nth-child(2) {
|
|
||||||
margin-left: 8px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.card-name {
|
.card-name {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
<img :src="heroBgImageUrl" alt="">
|
<img :src="heroBgImageUrl" alt="">
|
||||||
</div>
|
</div>
|
||||||
<div class="imgs-img">
|
<div class="imgs-img">
|
||||||
<!-- <img src="@/assets/img/marketplace/hero/Mariana.png" alt=""> -->
|
|
||||||
<img :src="heroImageUrl" alt="">
|
<img :src="heroImageUrl" alt="">
|
||||||
</div>
|
</div>
|
||||||
<div class="imgs-day">
|
<div class="imgs-day">
|
||||||
@ -63,12 +62,19 @@ const qualityImageUrl = computed(() => {
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.imgs {
|
.imgs {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
width: 190px;
|
||||||
|
height: 316px;
|
||||||
|
margin: 0 auto;
|
||||||
|
.imgs-bg {
|
||||||
|
width: 190px;
|
||||||
|
height: 316px;
|
||||||
|
}
|
||||||
.imgs-img {
|
.imgs-img {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 235px;
|
width: 184px;
|
||||||
height: 320px;
|
height: 273px;
|
||||||
img {
|
img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@ -76,11 +82,11 @@ const qualityImageUrl = computed(() => {
|
|||||||
}
|
}
|
||||||
.imgs-day {
|
.imgs-day {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
right: 3px;
|
||||||
bottom: 100px;
|
bottom: 100px;
|
||||||
width: 90px;
|
width: 76px;
|
||||||
height: 30px;
|
height: 25px;
|
||||||
line-height: 30px;
|
line-height: 25px;
|
||||||
background: url('@/assets/img/marketplace/hero/hero_card_coinTime.png') no-repeat;
|
background: url('@/assets/img/marketplace/hero/hero_card_coinTime.png') no-repeat;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
padding-left: 40px;
|
padding-left: 40px;
|
||||||
@ -88,41 +94,51 @@ const qualityImageUrl = computed(() => {
|
|||||||
}
|
}
|
||||||
.imgs-detail {
|
.imgs-detail {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 50px;
|
bottom: 45px;
|
||||||
width: 100%;
|
width: 184px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
color: #000;
|
color: #000;
|
||||||
background: #333141;
|
background: #333141;
|
||||||
div {
|
div {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
img {
|
img {
|
||||||
width: 30px;
|
width: 20px;
|
||||||
height: 30px;
|
height: 20px;
|
||||||
|
margin: 0 8px;
|
||||||
}
|
}
|
||||||
span {
|
span {
|
||||||
color: #fff;
|
font-family: 'MEurostile';
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 18px;
|
||||||
|
color: #FFFFFF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.imgs-quality {
|
.imgs-quality {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 50px;
|
bottom: 45px;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
width: 50px;
|
width: 50px;
|
||||||
height: 50px;
|
height: 53px;
|
||||||
line-height: 50px;
|
line-height: 50px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
.imgs-name {
|
.imgs-name {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 20px;
|
bottom: 10px;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
|
font-family: 'Anton';
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 23px;
|
||||||
|
color: #D9E3FF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -198,12 +198,15 @@ const cardPrice = async (val) => {
|
|||||||
|
|
||||||
// 赎回
|
// 赎回
|
||||||
const unStake = async (data) => {
|
const unStake = async (data) => {
|
||||||
// debugger
|
const bc = new BlockChain()
|
||||||
console.log(toRaw(data).contract_address,[toRaw(data).token_id])
|
let res = await bc.locker.unlockOrMintGameNft(toRaw(data).contract_address,[toRaw(data).token_id])
|
||||||
const locker = new Locker()
|
if(res) {
|
||||||
// console.log(locker.sendUnlockOrMint)
|
let timer = setTimeout(() => {
|
||||||
let res = await locker.unlockOrMintGameNft(toRaw(data).contract_address,[toRaw(data).token_id])
|
message.success('Unstake success.')
|
||||||
console.log(res)
|
emit('renewMyNft')
|
||||||
|
clearTimeout(timer);
|
||||||
|
}, 2000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 去详情页面
|
// 去详情页面
|
||||||
|
@ -66,14 +66,12 @@ const renewMyNft = async() => {
|
|||||||
overviewValue.value = ''
|
overviewValue.value = ''
|
||||||
nftList.value = []
|
nftList.value = []
|
||||||
getMyAssets()
|
getMyAssets()
|
||||||
// location.reload()
|
|
||||||
clearTimeout(timer);
|
clearTimeout(timer);
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
const next_cursor = ref()
|
const next_cursor = ref()
|
||||||
const getMyAssets = async () => {
|
const getMyAssets = async () => {
|
||||||
// nftList.value = []
|
|
||||||
const myADdress = localWalletStore.address
|
const myADdress = localWalletStore.address
|
||||||
const data = {
|
const data = {
|
||||||
type: 3,
|
type: 3,
|
||||||
|
@ -65,23 +65,21 @@ export class Locker {
|
|||||||
async unlockOrMintGameNft(nft, tokenIds) {
|
async unlockOrMintGameNft(nft, tokenIds) {
|
||||||
console.log('unlock nft', nft, tokenIds)
|
console.log('unlock nft', nft, tokenIds)
|
||||||
const blockChain = new BlockChain()
|
const blockChain = new BlockChain()
|
||||||
const { provider, address } = await blockChain.selectAddress({})
|
const { provider, address } = await this.bc.selectAddress({})
|
||||||
await blockChain.checkPassportLogin();
|
await this.bc.checkPassportLogin();
|
||||||
await blockChain.checkAndChangeChain();
|
await this.bc.checkAndChangeChain();
|
||||||
const preDatas = {
|
const preDatas = {
|
||||||
net_id: import.meta.env.VUE_APP_NET_ID,
|
net_id: import.meta.env.VUE_APP_NET_ID,
|
||||||
to: address,
|
to: address,
|
||||||
contract_address: nft,
|
contract_address: nft,
|
||||||
tokens: tokenIds.map(tokenId => {return { tokenId }}),
|
tokens: tokenIds.map(token_id => {return { token_id }}),
|
||||||
}
|
}
|
||||||
console.log(await this.bc)
|
const passportToken = await this.bc.passportToken()
|
||||||
const passportToken = await blockChain.passportToken()
|
|
||||||
const { errcode, errmsg, trans_req } = await apiUnlockOrMint(preDatas, passportToken)
|
const { errcode, errmsg, trans_req } = await apiUnlockOrMint(preDatas, passportToken)
|
||||||
if (errcode) {
|
if (errcode) {
|
||||||
throw new Error(errmsg)
|
throw new Error(errmsg)
|
||||||
}
|
}
|
||||||
const web3Provider = this.bc.passportProvider || this.bc.web3Provider
|
const web3Provider = this.bc.passportProvider || this.bc.web3Provider
|
||||||
console.log(web3Provider)
|
|
||||||
return this.sendUnlockOrMint(web3Provider, trans_req)
|
return this.sendUnlockOrMint(web3Provider, trans_req)
|
||||||
}
|
}
|
||||||
// 游戏内资产上链, 只用于mint
|
// 游戏内资产上链, 只用于mint
|
||||||
@ -100,6 +98,6 @@ export class Locker {
|
|||||||
throw new Error(errmsg)
|
throw new Error(errmsg)
|
||||||
}
|
}
|
||||||
trans_req.from = address
|
trans_req.from = address
|
||||||
return this.sendUnlockOrMint(this.bc.web3Provider, trans_req)
|
return this.sendUnlockOrMint(blockChain.web3Provider, trans_req)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<a-radio value="0">All</a-radio>
|
<a-radio value="0">All</a-radio>
|
||||||
<a-radio value="1">Listed</a-radio>
|
<a-radio value="1">Listed</a-radio>
|
||||||
<a-radio value="2">Unlisted</a-radio>
|
<a-radio value="2">Unlisted</a-radio>
|
||||||
<a-radio value="3">Staking</a-radio>
|
<!-- <a-radio value="3">Staking</a-radio> -->
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user