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
f892d1d5
Commit
f892d1d5
authored
Aug 25, 2021
by
salitedfish
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
开放图片NFT和用户中心
parent
330e6d3b
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
92 additions
and
18 deletions
+92
-18
App.vue
src/App.vue
+2
-2
index.ts
src/router/index.ts
+8
-0
index.vue
src/view/NFT/Create/components/certificate/index.vue
+2
-2
form.vue
src/view/NFT/Create/form.vue
+24
-12
pick.vue
src/view/NFT/Create/pick.vue
+1
-0
upload.vue
src/view/NFT/Create/upload.vue
+3
-2
index.vue
src/view/NFT/Detail/index.vue
+11
-0
index.vue
src/view/UserDetail/index.vue
+41
-0
No files found.
src/App.vue
View file @
f892d1d5
...
@@ -24,8 +24,8 @@
...
@@ -24,8 +24,8 @@
<app-icon
name=
"icon-yinle"
size=
"26px"
class=
'icon-box bg-icon-bg rounded-full mx-auto'
></app-icon>
<app-icon
name=
"icon-yinle"
size=
"26px"
class=
'icon-box bg-icon-bg rounded-full mx-auto'
></app-icon>
<div
class=
" text-xs py-3"
>
音频
</div>
<div
class=
" text-xs py-3"
>
音频
</div>
</div>
</div>
<div
class=
"flex flex-col items-center content-center"
>
<div
class=
"flex flex-col items-center content-center"
@
click=
"goNTF(
{url:'createNft',id:'5'})"
>
<app-icon
name=
"icon-a-tupian"
size=
"26px"
class=
'icon-box bg-
icon-bg
rounded-full mx-auto'
></app-icon>
<app-icon
name=
"icon-a-tupian"
size=
"26px"
class=
'icon-box bg-
app-red
rounded-full mx-auto'
></app-icon>
<div
class=
" text-xs py-3"
>
图片
</div>
<div
class=
" text-xs py-3"
>
图片
</div>
</div>
</div>
<div
class=
"flex flex-col items-center content-center"
>
<div
class=
"flex flex-col items-center content-center"
>
...
...
src/router/index.ts
View file @
f892d1d5
...
@@ -122,6 +122,14 @@ const routes: Array<RouteConfig> = [
...
@@ -122,6 +122,14 @@ const routes: Array<RouteConfig> = [
component
:
()
=>
import
(
'@/view/User/index.vue'
)
component
:
()
=>
import
(
'@/view/User/index.vue'
)
},
},
{
{
path
:
'/UserDetail'
,
name
:
'UserDetail'
,
meta
:
{
title
:
'用户中心'
},
component
:
()
=>
import
(
'@/view/UserDetail/index.vue'
)
},
{
path
:
'/User/edit/:type'
,
path
:
'/User/edit/:type'
,
name
:
'Edit'
,
name
:
'Edit'
,
component
:()
=>
import
(
'@/view/User/Edit.vue'
),
component
:()
=>
import
(
'@/view/User/Edit.vue'
),
...
...
src/view/NFT/Create/components/certificate/index.vue
View file @
f892d1d5
...
@@ -21,8 +21,8 @@
...
@@ -21,8 +21,8 @@
<div
class=
"w-full text-left "
>
<div
class=
"w-full text-left "
>
<div>
NFT哈希
</div>
<div>
NFT哈希
</div>
<div>
{{
certificateData
.
NFTHash
?
certificateData
.
NFTHash
:
'无'
}}
</div>
<div>
{{
certificateData
.
NFTHash
?
certificateData
.
NFTHash
:
'无'
}}
</div>
<div
class=
"pt-1"
v-if=
"categoryId==1
"
>
剧本
哈希
</div>
<div
class=
"pt-1"
v-if=
"categoryId==1
|| categoryId==5"
>
{{
getPreText
()
}}
哈希
</div>
<div
v-if=
"categoryId==1"
>
{{
certificateData
.
fileHash
?
certificateData
.
fileHash
:
'无'
}}
</div>
<div
v-if=
"categoryId==1
|| categoryId==5
"
>
{{
certificateData
.
fileHash
?
certificateData
.
fileHash
:
'无'
}}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
src/view/NFT/Create/form.vue
View file @
f892d1d5
...
@@ -98,6 +98,7 @@
...
@@ -98,6 +98,7 @@
@
cellOnChange=
"$router.push(
{ name: 'NftUpload',query:{type:'封面图片'}})"
@
cellOnChange=
"$router.push(
{ name: 'NftUpload',query:{type:'封面图片'}})"
>
</app-cell>
>
</app-cell>
<app-cell
<app-cell
v-if=
"['1','2'].indexOf(categoryId) != -1"
text=
"附件上传"
text=
"附件上传"
type=
"select"
type=
"select"
:selected=
"createNFT.archives"
:selected=
"createNFT.archives"
...
@@ -296,19 +297,9 @@ export default Vue.extend({
...
@@ -296,19 +297,9 @@ export default Vue.extend({
{
value
:
1
,
name
:
"需要授权"
},
{
value
:
1
,
name
:
"需要授权"
},
],
],
categoryTypes
:
[]
as
any
[],
categoryTypes
:
[]
as
any
[],
mySteps
:
[
{
text
:
"基本信息"
,
},
{
text
:
"加密上链"
,
},
{
text
:
"NFT发行"
,
},
],
currentStep
:
1
,
categoryId
:
this
.
$route
.
query
.
id
as
string
,
categoryId
:
this
.
$route
.
query
.
id
as
string
,
currentStep
:
1
,
showOverlay
:
true
,
showOverlay
:
true
,
loading2
:
false
,
loading2
:
false
,
loading3
:
false
,
loading3
:
false
,
...
@@ -384,6 +375,19 @@ export default Vue.extend({
...
@@ -384,6 +375,19 @@ export default Vue.extend({
};
};
});
});
},
},
mySteps
():
Array
<
any
>
{
return
[
{
text
:
"基本信息"
,
},
{
text
:
this
.
categoryId
==
'5'
?
'信息上链'
:
"加密上链"
,
},
{
text
:
"NFT发行"
,
},
]
}
},
},
methods
:
{
methods
:
{
...
mapMutations
(
"create"
,
{
...
mapMutations
(
"create"
,
{
...
@@ -540,6 +544,14 @@ export default Vue.extend({
...
@@ -540,6 +544,14 @@ export default Vue.extend({
isGrant
:
this
.
createNFT
.
grant
,
isGrant
:
this
.
createNFT
.
grant
,
};
};
}
}
if
(
this
.
categoryId
==
'5'
){
const
imgUrl
=
await
this
.
$service
.
nftService
.
fileUpload
(
this
.
file
)
data
=
{
...
data
,
fileUrl
:
imgUrl
,
fileName
:
this
.
file
.
name
,
}
}
if
(
this
.
coverFile
){
if
(
this
.
coverFile
){
const
coverImgUrl
=
await
this
.
$service
.
nftService
.
fileUpload
(
this
.
coverFile
)
const
coverImgUrl
=
await
this
.
$service
.
nftService
.
fileUpload
(
this
.
coverFile
)
data
=
{
data
=
{
...
...
src/view/NFT/Create/pick.vue
View file @
f892d1d5
...
@@ -50,6 +50,7 @@ export default Vue.extend({
...
@@ -50,6 +50,7 @@ export default Vue.extend({
maxNum
:
{
maxNum
:
{
'剧本题材'
:
3
,
'剧本题材'
:
3
,
"视频题材"
:
1
,
"视频题材"
:
1
,
"图片题材"
:
1
,
},
},
selectType
:
this
.
$route
.
query
.
text
selectType
:
this
.
$route
.
query
.
text
};
};
...
...
src/view/NFT/Create/upload.vue
View file @
f892d1d5
...
@@ -59,7 +59,8 @@
...
@@ -59,7 +59,8 @@
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
class
=
"mt-2 mx-auto w-56 text-center text-font-white text-xs"
>
{{
uploadAccept
.
acceptText
}}
<
/div
>
<
div
class
=
"mt-2 mx-auto w-56 text-center text-font-white text-xs"
>
{{
uploadAccept
.
acceptText
}}
<
/div
>
<
div
class
=
" text-xs mt-10 mx-auto w-80 text-left text-font-white"
v
-
if
=
"uploadType!='封面图片'"
>
说明:一幕影链将为您的本地文件计算文件
HASH
。在该环节,您的
{{
uploadType
}}
不会上传到平台。
<
/div
>
<
div
class
=
" text-xs mt-10 mx-auto w-80 text-left text-font-white"
v
-
if
=
"uploadType!='封面图片' && uploadType!='图片'"
>
说明:一幕影链将为您的本地文件计算文件
HASH
。在该环节,您的
{{
uploadType
}}
不会上传到平台。
<
/div
>
<
div
class
=
" text-xs mt-10 mx-auto w-80 text-left text-font-white"
v
-
if
=
"uploadType =='图片'"
>
说明:一幕影链将为您的图片文件计算文件
HASH
,
并上传到平台。
<
/div
>
<
div
class
=
"flex justify-between fixed bottom-3 left-0 right-0"
>
<
div
class
=
"flex justify-between fixed bottom-3 left-0 right-0"
>
<
app
-
btn
<
app
-
btn
...
@@ -163,7 +164,7 @@ export default Vue.extend({
...
@@ -163,7 +164,7 @@ export default Vue.extend({
showUploadFile
():
string
{
showUploadFile
():
string
{
if
(
this
.
uploadType
==
'封面图片'
&&
this
.
coverFile
)
{
if
(
this
.
uploadType
==
'封面图片'
&&
this
.
coverFile
)
{
return
window
.
URL
.
createObjectURL
(
this
.
coverFile
)
return
window
.
URL
.
createObjectURL
(
this
.
coverFile
)
}
else
if
(
this
.
uploadType
!
==
'图片'
&&
this
.
file
)
{
}
else
if
(
this
.
uploadType
==
'图片'
&&
this
.
file
)
{
return
window
.
URL
.
createObjectURL
(
this
.
file
)
return
window
.
URL
.
createObjectURL
(
this
.
file
)
}
else
{
}
else
{
return
''
return
''
...
...
src/view/NFT/Detail/index.vue
View file @
f892d1d5
...
@@ -70,6 +70,7 @@
...
@@ -70,6 +70,7 @@
<img
<img
:src=
"nftData.avatar ? nftData.avatar : '/img/mokeImg/avatar.png'"
:src=
"nftData.avatar ? nftData.avatar : '/img/mokeImg/avatar.png'"
class=
"h-12 w-12 rounded-full"
class=
"h-12 w-12 rounded-full"
@
click=
"gotoUserDetail()"
/>
/>
</div>
</div>
<div>
<div>
...
@@ -544,6 +545,16 @@ export default Vue.extend({
...
@@ -544,6 +545,16 @@ export default Vue.extend({
}
}
});
});
},
},
gotoUserDetail
(){
this
.
$router
.
push
({
name
:
'UserDetail'
,
query
:{
avatar
:
this
.
nftData
.
avatar
||
'/img/mokeImg/avatar.png'
,
nickName
:
this
.
nftData
.
publisher
||
"匿名"
,
signature
:
this
.
nftData
.
signature
||
'暂无'
,
}
})
}
},
},
});
});
</
script
>
</
script
>
src/view/UserDetail/index.vue
0 → 100644
View file @
f892d1d5
<
template
>
<Layout-Child>
<div
class=
" w-11/12 mx-auto py-6 text-font-white flex mt-5"
>
<div
class=
"pr-5"
>
<img
:src=
"userData.avatar"
alt=
""
class=
" h-20 w-20 rounded-full"
>
</div>
<div
class=
" flex-1 "
>
<div
class=
" flex items-center"
>
<div
class=
"text-lg leading-10"
>
{{
userData
.
nickName
}}
</div>
<app-tag
text=
"未实名"
:id=
"1"
class=
" bg-font-light-black ml-2"
:disabled=
"true"
></app-tag>
</div>
<div></div>
</div>
</div>
<div
class=
"w-11/12 mx-auto text-font-white leading-7"
>
{{
userData
.
signature
}}
</div>
</Layout-Child>
</
template
>
<
script
lang=
"ts"
>
import
Vue
from
'vue'
;
import
{
ActionSheet
}
from
'vant'
;
Vue
.
use
(
ActionSheet
);
export
default
Vue
.
extend
({
data
(){
return
{
userData
:
this
.
$route
.
query
}
},
components
:{
'Layout-Child'
:()
=>
import
(
'@/layout/Child.vue'
),
"app-tag"
:
()
=>
import
(
"@/components/common/Tag.vue"
),
},
methods
:{
}
});
</
script
>
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