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
9739e5c9
Commit
9739e5c9
authored
Jul 15, 2021
by
chenqikuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 登录页新增logo以及文案
parent
6ce43e35
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
3 deletions
+54
-3
cmp_logo.png
src/assets/img/cmp_logo.png
+0
-0
nftService.ts
src/service/nftService.ts
+33
-1
Login.vue
src/view/Auth/Login/Login.vue
+21
-2
No files found.
src/assets/img/cmp_logo.png
0 → 100644
View file @
9739e5c9
9.78 KB
src/service/nftService.ts
View file @
9739e5c9
...
@@ -23,6 +23,7 @@ export class NFTService extends Service {
...
@@ -23,6 +23,7 @@ export class NFTService extends Service {
path
:
'/label/list'
,
path
:
'/label/list'
,
dataType
:
'application/x-www-form-urlencoded'
,
dataType
:
'application/x-www-form-urlencoded'
,
},
},
ossPolicy
:
{
path
:
'/oss/policy'
,
dataType
:
'application/x-www-form-urlencoded'
},
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'
},
...
@@ -181,7 +182,7 @@ export class NFTService extends Service {
...
@@ -181,7 +182,7 @@ export class NFTService extends Service {
/**
/**
* 获取md5
* 获取md5
*
@param id
*
*/
*/
async
getMd5
(
file
:
File
)
{
async
getMd5
(
file
:
File
)
{
const
fd
=
new
FormData
()
const
fd
=
new
FormData
()
...
@@ -195,6 +196,37 @@ export class NFTService extends Service {
...
@@ -195,6 +196,37 @@ export class NFTService extends Service {
}
}
/**
/**
* 完成OSS签名
*/
async
ossPolicy
()
{
const
ret
=
await
this
.
service
.
get
(
this
.
router
.
ossPolicy
.
path
,
{
headers
:
{
Authorization
:
this
.
getAuth
(),
'Content-Type'
:
this
.
router
.
ossPolicy
.
dataType
,
},
})
return
ret
;
}
async
uploadFileToOss
(
file
:
File
,
data
:
any
){
const
{
accessid
,
dir
,
expire
,
host
,
policy
,
signature
}
=
data
as
any
const
fd
=
new
FormData
();
fd
.
append
(
'name'
,
file
.
name
)
fd
.
append
(
'key'
,
dir
+
'${filename}'
)
fd
.
append
(
'policy'
,
policy
)
fd
.
append
(
'OSSAccessKeyId'
,
accessid
)
fd
.
append
(
'success_action_status'
,
'200'
)
fd
.
append
(
'signature'
,
signature
)
fd
.
append
(
'file'
,
file
)
return
await
fetch
(
host
,
{
method
:
'POST'
,
body
:
fd
,
})
}
/**
* 发布
* 发布
* @param id
* @param id
*/
*/
...
...
src/view/Auth/Login/Login.vue
View file @
9739e5c9
<
template
>
<
template
>
<div
class=
"register"
>
<div
class=
"register pt-5"
>
<div
class=
"title text-font-white mt-5 mb-16 text-2xl"
>
{{
title
}}
</div>
<div
class=
"flex justify-between items-center text-base"
>
<img
src=
"@/assets/img/cmp_logo.png"
class=
"h-12"
alt=
""
/>
<div
class=
" text-font-white header-text"
>
注册/登录
</div>
</div>
<div
class=
"title text-font-white mt-10 mb-16 title-text"
>
{{
title
}}
</div>
<PhoneInput
<PhoneInput
:placeholder=
"phoneConfig.placeholder"
:placeholder=
"phoneConfig.placeholder"
:maxlength=
"phoneConfig.maxLen"
:maxlength=
"phoneConfig.maxLen"
...
@@ -367,3 +371,17 @@ export default Vue.extend({
...
@@ -367,3 +371,17 @@ export default Vue.extend({
},
},
});
});
</
script
>
</
script
>
<
style
scoped
>
.header-text
{
font-size
:
16px
;
font-family
:
PingFangSC-Semibold
,
PingFang
SC
;
font-weight
:
600
;
color
:
#EEF1F6
;
}
.title-text
{
font-size
:
30px
;
font-family
:
PingFangSC-Medium
,
PingFang
SC
;
font-weight
:
500
;
color
:
#EEF1F6
;
}
</
style
>
\ No newline at end of file
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