Commit 9739e5c9 authored by chenqikuai's avatar chenqikuai

feat: 登录页新增logo以及文案

parent 6ce43e35
...@@ -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
*/ */
......
<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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment