You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
131 lines
3.5 KiB
131 lines
3.5 KiB
<template>
|
|
<view class="maintoP">
|
|
<navigation :showBack="false" :bgnum="true" class="aaa">
|
|
<image src="../../../../static/tongyonh/Vector.png" mode="aspectFit" class="back" @click="back()" ></image>
|
|
<image src="../../../../static/tongyonh/IconGroup.png" mode="aspectFit" @click="goAdd" class="renYou2" slot="logo"></image>
|
|
<text class="big_title">
|
|
{{item.projectName}}
|
|
</text>
|
|
</navigation>
|
|
<view class="main">
|
|
|
|
<view class="item" v-for="item,index in result" :key="index">
|
|
<view class="top">
|
|
<image :src="item.chainIconUrl" mode="aspectFit" class="img"></image>
|
|
{{item.address}}
|
|
<image src="../../../../static/tongyonh/[email protected]" mode="aspectFit" class="img lfet" @click="goDetail(index)"></image>
|
|
</view>
|
|
<view class="top">
|
|
<text class="textleft">Contracts: </text>{{item.contract}}
|
|
</view>
|
|
<view class="top">
|
|
<text class="textleft texttt">ID: </text>{{item.id}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import cont from "@/components/navigation/navigation.vue"
|
|
import token from "@/utils/TokenUtil"
|
|
export default {
|
|
data() {
|
|
return {
|
|
item:{},
|
|
wallet:{},
|
|
address:'',
|
|
result:[],
|
|
result2:[],
|
|
pageSize:10,
|
|
pageNum:1,
|
|
}
|
|
},
|
|
|
|
onLoad(option) {
|
|
if(uni.getStorageSync('wallet')){
|
|
this.address=uni.getStorageSync('wallet').address
|
|
this.wallet=uni.getStorageSync('wallet')
|
|
this.wallet.address = this.wallet.address.substring(0, 6) + '...' + this.wallet.address
|
|
.substring(25, this.wallet.address.length);
|
|
|
|
}else{
|
|
this.wallet=uni.getStorageSync('walletInfo').BTC[0]
|
|
this.wallet.address = this.wallet.address.substring(0, 6) + '...' + this.wallet.address.substring(25, this.wallet.address.length);
|
|
console.log(this.wallet,111)
|
|
}
|
|
|
|
|
|
this.item=uni.getStorageSync('nftitem')
|
|
|
|
|
|
this.getProject()
|
|
this.getProject2()
|
|
},
|
|
onReachBottom() {
|
|
this.pageSize+=5
|
|
this.getProject()
|
|
this.getProject2()
|
|
},
|
|
methods: {
|
|
back(){
|
|
uni.reLaunch({
|
|
url:'../index'
|
|
})
|
|
},
|
|
// http://wallet-api.weirui0755.com/api/nft/getNftCollectionList?nftProjectId=1&address=
|
|
getProject(){
|
|
uni.request({
|
|
url: 'http://wallet-api.weirui0755.com/api/nft/getNftCollectionList?'+'nftProjectId='+this.item.id+'&'+'address='+this.address+'&'+'pageSize='+this.pageSize+'&'+'pageNum='+this.pageNum, //请求接口
|
|
header: {
|
|
'content-type': 'application/x-www-form-urlencoded', //自定义请求头信息
|
|
},
|
|
success: (res) => {
|
|
this.result=res.data.data.rows
|
|
for(var i =0;i<this.result.length;i++){
|
|
this.result[i].address = this.result[i].address.substring(0, 6) + '...' + this.result[i].address
|
|
.substring(25, this.result[i].address.length);
|
|
}
|
|
|
|
}
|
|
});
|
|
},
|
|
getProject2(){
|
|
uni.request({
|
|
url: 'http://wallet-api.weirui0755.com/api/nft/getNftCollectionList?'+'nftProjectId='+this.item.id+'&'+'address='+this.address+'&'+'pageSize='+this.pageSize+'&'+'pageNum='+this.pageNum, //请求接口
|
|
header: {
|
|
'content-type': 'application/x-www-form-urlencoded', //自定义请求头信息
|
|
},
|
|
success: (res) => {
|
|
this.result2=res.data.data.rows
|
|
console.log( this.result2,7878)
|
|
}
|
|
});
|
|
},
|
|
goAdd(){
|
|
uni.navigateTo({
|
|
url:'../addCollection/index'
|
|
})
|
|
},
|
|
goDetail(index){
|
|
console.log(this.result2[index])
|
|
uni.setStorageSync('nftOneItem',this.result2[index])
|
|
uni.navigateTo({
|
|
url:'../collectionDetailtrue/index'
|
|
})
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
};
|
|
</script>
|
|
<style scoped>
|
|
|
|
</style>
|
|
|
|
<style>
|
|
@import './index.css';
|
|
</style>
|
|
|