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
dd2b2aa0
Commit
dd2b2aa0
authored
Jul 09, 2021
by
chenqikuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
s
parent
f8ccb71b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
6 deletions
+31
-6
Cell.vue
src/components/common/Cell.vue
+1
-2
nftService.ts
src/service/nftService.ts
+6
-4
form.vue
src/view/NFT/Create/form.vue
+24
-0
No files found.
src/components/common/Cell.vue
View file @
dd2b2aa0
...
@@ -210,8 +210,7 @@ export default Vue.extend({
...
@@ -210,8 +210,7 @@ export default Vue.extend({
(
item
:
any
)
=>
item
.
value
===
selected
(
item
:
any
)
=>
item
.
value
===
selected
)
as
any
;
)
as
any
;
console
.
log
(
item
,
selected
);
console
.
log
(
item
,
selected
);
return
item
&&
item
.
name
return
item
.
name
;
},
},
},
},
computed
:
{
computed
:
{
...
...
src/service/nftService.ts
View file @
dd2b2aa0
...
@@ -27,7 +27,10 @@ export class NFTService extends Service {
...
@@ -27,7 +27,10 @@ export class NFTService extends Service {
getMd5
:
{
path
:
'/nft/file/md5'
,
dataType
:
'multipart/form-data'
},
getMd5
:
{
path
:
'/nft/file/md5'
,
dataType
:
'multipart/form-data'
},
save
:
{
path
:
'/nft/save'
,
dataType
:
'multipart/form-data'
},
save
:
{
path
:
'/nft/save'
,
dataType
:
'multipart/form-data'
},
publish
:
{
path
:
'/nft/publish'
,
dataType
:
'application/json'
},
publish
:
{
path
:
'/nft/publish'
,
dataType
:
'application/json'
},
getCategory
:{
path
:
'/category/list'
,
dataType
:
'application/x-www-form-urlencoded'
}
getCategory
:
{
path
:
'/category/list'
,
dataType
:
'application/x-www-form-urlencoded'
,
},
}
}
auth
=
'Bearer '
+
token
.
getToken
()
auth
=
'Bearer '
+
token
.
getToken
()
constructor
()
{
constructor
()
{
...
@@ -59,11 +62,10 @@ export class NFTService extends Service {
...
@@ -59,11 +62,10 @@ export class NFTService extends Service {
},
},
})
})
}
}
async
getCategory
():
Promise
<
any
[]
>
{
async
getCategory
():
Promise
<
any
[]
>
{
return
await
this
.
service
.
get
(
this
.
router
.
getCategory
.
path
)
return
await
this
.
service
.
get
(
this
.
router
.
getCategory
.
path
)
}
}
/**
/**
* 获取我的NFT列表
* 获取我的NFT列表
* @param categoryId
* @param categoryId
...
@@ -157,7 +159,7 @@ export class NFTService extends Service {
...
@@ -157,7 +159,7 @@ export class NFTService extends Service {
return
await
this
.
service
.
post
(
this
.
router
.
publish
.
path
,
obj
,
{
return
await
this
.
service
.
post
(
this
.
router
.
publish
.
path
,
obj
,
{
headers
:
{
headers
:
{
Authorization
:
this
.
auth
,
Authorization
:
this
.
auth
,
'Content-Type'
:
this
.
router
.
getMd5
.
dataType
,
'Content-Type'
:
this
.
router
.
publish
.
dataType
,
},
},
})
})
}
}
...
...
src/view/NFT/Create/form.vue
View file @
dd2b2aa0
...
@@ -34,6 +34,14 @@
...
@@ -34,6 +34,14 @@
class=
"text-font-white my-3"
class=
"text-font-white my-3"
@
onClick=
"what"
@
onClick=
"what"
></app-cell>
></app-cell>
<!--
<app-cell
text=
"分类"
type=
"select"
:selected=
"createNFT.categoryType"
:list=
"categoryTypes2"
class=
"text-font-white my-3"
@
cellOnChange=
"(v) => (createNFT.categoryType = v)"
></app-cell>
-->
<div>
<div>
<div
class=
"text-font-white my-2"
>
剧本简介
</div>
<div
class=
"text-font-white my-2"
>
剧本简介
</div>
<textarea
<textarea
...
@@ -177,6 +185,7 @@ export default Vue.extend({
...
@@ -177,6 +185,7 @@ export default Vue.extend({
value_des
:
""
,
value_des
:
""
,
archives
:
0
,
archives
:
0
,
grant
:
0
,
grant
:
0
,
categoryType
:
NaN
,
},
},
publish
:
{
publish
:
{
nftId
:
""
,
nftId
:
""
,
...
@@ -193,6 +202,7 @@ export default Vue.extend({
...
@@ -193,6 +202,7 @@ export default Vue.extend({
{
value
:
0
,
name
:
"不需要授权"
},
{
value
:
0
,
name
:
"不需要授权"
},
{
value
:
1
,
name
:
"需要授权"
},
{
value
:
1
,
name
:
"需要授权"
},
],
],
categoryTypes
:
[]
as
any
[],
mySteps
:
[
mySteps
:
[
{
{
text
:
"step1"
,
text
:
"step1"
,
...
@@ -213,6 +223,11 @@ export default Vue.extend({
...
@@ -213,6 +223,11 @@ export default Vue.extend({
"app-cell"
:
()
=>
import
(
"@/components/common/Cell.vue"
),
"app-cell"
:
()
=>
import
(
"@/components/common/Cell.vue"
),
"app-btn"
:
()
=>
import
(
"@/components/common/Btn.vue"
),
"app-btn"
:
()
=>
import
(
"@/components/common/Btn.vue"
),
},
},
async
mounted
()
{
const
list
=
await
this
.
$service
.
nftService
.
getCategory
();
this
.
categoryTypes
=
list
;
this
.
createNFT
.
categoryType
=
(
list
.
length
!==
0
&&
list
[
0
].
id
)
||
NaN
;
},
computed
:
{
computed
:
{
...
mapState
(
"create"
,
{
...
mapState
(
"create"
,
{
fileHash
:
"fileHash"
,
fileHash
:
"fileHash"
,
...
@@ -240,6 +255,14 @@ export default Vue.extend({
...
@@ -240,6 +255,14 @@ export default Vue.extend({
}
}
return
disabled
;
return
disabled
;
},
},
categoryTypes2
():
any
[]
{
return
this
.
categoryTypes
.
map
((
item
:
any
)
=>
{
return
{
name
:
item
.
categoryName
,
value
:
item
.
id
,
};
});
},
},
},
methods
:
{
methods
:
{
setCreateNFT
(
obj
:
any
)
{
setCreateNFT
(
obj
:
any
)
{
...
@@ -295,6 +318,7 @@ export default Vue.extend({
...
@@ -295,6 +318,7 @@ export default Vue.extend({
wallet
:
this
.
publish
.
wallet
,
wallet
:
this
.
publish
.
wallet
,
nftId
:
this
.
publish
.
nftId
,
nftId
:
this
.
publish
.
nftId
,
});
});
this
.
$router
.
back
()
}
}
if
(
this
.
currentStep
<
this
.
mySteps
.
length
+
1
)
{
if
(
this
.
currentStep
<
this
.
mySteps
.
length
+
1
)
{
this
.
currentStep
+=
val
;
this
.
currentStep
+=
val
;
...
...
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