7 changed files with 245 additions and 226 deletions
@ -1,29 +1,31 @@ |
|||||
<template> |
<template> |
||||
<view class="maintoP"> |
<view class="maintoP"> |
||||
<navigation :showBack="false" :bgnum="true" class="aaa"> |
<navigation :showBack="false" :bgnum="true" class="aaa"> |
||||
<image src="../../../../static/tongyonh/Vector.png" mode="aspectFit" class="back" @click="back()" ></image> |
<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> |
<image src="../../../../static/tongyonh/IconGroup.png" mode="aspectFit" @click="goAdd" class="renYou2" |
||||
<text class="big_title"> |
slot="logo"></image> |
||||
{{item.projectName}} |
<text class="big_title"> |
||||
</text> |
{{item.projectName}} |
||||
|
</text> |
||||
</navigation> |
</navigation> |
||||
<view class="main"> |
<view class="main"> |
||||
|
|
||||
<view class="item" v-for="item,index in result" :key="index"> |
<view class="item" v-for="item,index in result" :key="index"> |
||||
<view class="top"> |
<view class="top"> |
||||
<image :src="item.chainIconUrl" mode="aspectFit" class="img"></image> |
<image :src="item.chainIconUrl" mode="aspectFit" class="img"></image> |
||||
{{item.address}} |
{{item.address}} |
||||
<image src="../../../../static/tongyonh/[email protected]" mode="aspectFit" class="img lfet" @click="goDetail(index)"></image> |
<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> |
||||
<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> |
</view> |
||||
</template> |
</template> |
||||
|
|
||||
@ -33,90 +35,90 @@ |
|||||
export default { |
export default { |
||||
data() { |
data() { |
||||
return { |
return { |
||||
item:{}, |
item: {}, |
||||
wallet:{}, |
wallet: {}, |
||||
address:'', |
address: '', |
||||
result:[], |
result: [], |
||||
result2:[], |
result2: [], |
||||
pageSize:10, |
pageSize: 10, |
||||
pageNum:1, |
pageNum: 1, |
||||
} |
} |
||||
}, |
}, |
||||
|
|
||||
onLoad(option) { |
onLoad(option) { |
||||
if(uni.getStorageSync('wallet')){ |
if (uni.getStorageSync('wallet')) { |
||||
this.address=uni.getStorageSync('wallet').address |
this.address = uni.getStorageSync('wallet').address |
||||
this.wallet=uni.getStorageSync('wallet') |
this.wallet = uni.getStorageSync('wallet') |
||||
this.wallet.address = this.wallet.address.substring(0, 6) + '...' + this.wallet.address |
this.wallet.address = this.wallet.address.substring(0, 6) + '...' + this.wallet.address |
||||
.substring(25, this.wallet.address.length); |
.substring(25, this.wallet.address.length); |
||||
|
|
||||
}else{ |
} else { |
||||
this.wallet=uni.getStorageSync('walletInfo').BTC[0] |
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); |
this.wallet.address = this.wallet.address.substring(0, 6) + '...' + this.wallet.address.substring(25, this |
||||
console.log(this.wallet,111) |
.wallet.address.length); |
||||
} |
console.log(this.wallet, 111) |
||||
|
} |
||||
|
|
||||
this.item=uni.getStorageSync('nftitem') |
|
||||
|
this.item = uni.getStorageSync('nftitem') |
||||
|
|
||||
this.getProject() |
|
||||
this.getProject2() |
this.getProject() |
||||
|
this.getProject2() |
||||
}, |
}, |
||||
onReachBottom() { |
onReachBottom() { |
||||
this.pageSize+=5 |
this.pageSize += 5 |
||||
this.getProject() |
this.getProject() |
||||
this.getProject2() |
this.getProject2() |
||||
}, |
}, |
||||
methods: { |
methods: { |
||||
back(){ |
back() { |
||||
uni.reLaunch({ |
uni.reLaunch({ |
||||
url:'../index' |
url: '../index' |
||||
}) |
}) |
||||
}, |
}, |
||||
// http://wallet-api.weirui0755.com/api/nft/getNftCollectionList?nftProjectId=1&address= |
async getProject() { |
||||
getProject(){ |
let params = { |
||||
uni.request({ |
nftProjectId: this.item.id, |
||||
url: 'http://wallet-api.weirui0755.com/api/nft/getNftCollectionList?'+'nftProjectId='+this.item.id+'&'+'address='+this.address+'&'+'pageSize='+this.pageSize+'&'+'pageNum='+this.pageNum, //请求接口 |
address: this.address, |
||||
header: { |
pageSize: this.pageSize, |
||||
'content-type': 'application/x-www-form-urlencoded', //自定义请求头信息 |
pageNum: this.pageNum |
||||
}, |
} |
||||
success: (res) => { |
const response = await this.$api.getNftCollectionList(params) |
||||
this.result=res.data.data.rows |
|
||||
for(var i =0;i<this.result.length;i++){ |
this.result = response.data.rows |
||||
this.result[i].address = this.result[i].address.substring(0, 6) + '...' + this.result[i].address |
for (var i = 0; i < this.result.length; i++) { |
||||
.substring(25, this.result[i].address.length); |
this.result[i].address = this.result[i].address.substring(0, 6) + '...' + this.result[i].address |
||||
} |
.substring(25, this.result[i].address.length); |
||||
|
} |
||||
} |
|
||||
}); |
|
||||
}, |
}, |
||||
getProject2(){ |
async getProject2() { |
||||
uni.request({ |
let params = { |
||||
url: 'http://wallet-api.weirui0755.com/api/nft/getNftCollectionList?'+'nftProjectId='+this.item.id+'&'+'address='+this.address+'&'+'pageSize='+this.pageSize+'&'+'pageNum='+this.pageNum, //请求接口 |
nftProjectId: this.item.id, |
||||
header: { |
address: this.address, |
||||
'content-type': 'application/x-www-form-urlencoded', //自定义请求头信息 |
pageSize: this.pageSize, |
||||
}, |
pageNum: this.pageNum |
||||
success: (res) => { |
} |
||||
this.result2=res.data.data.rows |
const response = await this.$api.getNftCollectionList(params); |
||||
console.log( this.result2,7878) |
this.result2 = response.data.rows |
||||
} |
console.log(this.result2, 7878) |
||||
}); |
|
||||
}, |
}, |
||||
goAdd(){ |
goAdd() { |
||||
uni.navigateTo({ |
uni.navigateTo({ |
||||
url:'../addCollection/index' |
url: '../addCollection/index' |
||||
}) |
}) |
||||
}, |
}, |
||||
goDetail(index){ |
goDetail(index) { |
||||
console.log(this.result2[index]) |
console.log(this.result2[index]) |
||||
uni.setStorageSync('nftOneItem',this.result2[index]) |
uni.setStorageSync('nftOneItem', this.result2[index]) |
||||
uni.navigateTo({ |
uni.navigateTo({ |
||||
url:'../collectionDetailtrue/index' |
url: '../collectionDetailtrue/index' |
||||
}) |
}) |
||||
|
|
||||
} |
} |
||||
|
|
||||
|
|
||||
}, |
}, |
||||
|
|
||||
|
Loading…
Reference in new issue