Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
NFT
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hanfeng zhang
NFT
Commits
c87e0258
Commit
c87e0258
authored
Jul 14, 2021
by
hanfeng zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
321
parent
3c80252b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
6 deletions
+17
-6
nftService.ts
src/service/nftService.ts
+1
-1
index.vue
src/view/NFT/Collection/index.vue
+9
-2
index.vue
src/view/NFT/Detail/index.vue
+7
-3
No files found.
src/service/nftService.ts
View file @
c87e0258
...
...
@@ -54,7 +54,7 @@ export class NFTService extends Service {
* @param id
* @returns
*/
async
getNFTdetail
(
id
:
number
){
async
getNFTdetail
(
id
:
number
)
:
Promise
<
any
>
{
return
await
this
.
service
.
get
(
this
.
router
.
detail
.
path
+
'/'
+
id
,{
headers
:
{
Authorization
:
this
.
getAuth
(),
...
...
src/view/NFT/Collection/index.vue
View file @
c87e0258
...
...
@@ -2,7 +2,10 @@
<Layout-Child>
<div
class=
'w-11/12 mx-auto mt-6'
>
<div
class=
'collection-list'
>
<app-collectionCard
v-for=
"i in collectionList"
:key=
"i.id"
:colletionData=
'i'
class=
'mt-3'
></app-collectionCard>
<div
v-for=
"i in collectionList"
:key=
"i.id"
class=
'mt-3'
@
click=
"goDetail(i.id)"
>
<app-collectionCard
:colletionData=
'i'
></app-collectionCard>
</div>
</div>
</div>
...
...
@@ -27,6 +30,10 @@ export default Vue.extend({
// 'app-cell':()=>import('@/components/common/Cell.vue'),
// 'app-btn':()=>import('@/components/common/Btn.vue')
},
methods
:{
goDetail
(
id
:
any
){
this
.
$router
.
push
({
name
:
'Nftdetail'
,
params
:
{
id
:
id
}})
}
}
});
</
script
>
src/view/NFT/Detail/index.vue
View file @
c87e0258
...
...
@@ -5,7 +5,7 @@
</div>
-->
<div
class=
"w-11/12 mx-auto mt-6 text-font-white"
>
<app-collectionCard
:colletionData=
'nftData'
></app-collectionCard>
<div
class=
"app-icons mx-auto grid grid-cols-4 my-6"
>
<div
class=
"app-icons mx-auto grid grid-cols-4 my-6"
v-if=
"isOwner"
>
<div
v-for=
"(i, index) in apps"
:key=
"index"
...
...
@@ -151,14 +151,18 @@ export default Vue.extend({
return
{
id
:
this
.
$route
.
params
.
id
,
apps
,
nftData
:{},
nftData
:{}
as
any
,
collectionData
:{},
inMyCollection
:
false
inMyCollection
:
false
,
isOwner
:
false
,
user
:
this
.
$util
.
userMsg
.
getUserMsg
()
as
any
// loading:true
};
},
async
created
()
{
this
.
nftData
=
await
this
.
$service
.
nftService
.
getNFTdetail
(
parseInt
(
this
.
id
))
console
.
log
(
this
.
nftData
.
wallet
);
this
.
nftData
.
wallet
==
this
.
user
.
wallet
?
this
.
isOwner
=
true
:
this
.
isOwner
=
false
await
this
.
setMyCollection
()
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment