Commit f892d1d5 authored by salitedfish's avatar salitedfish

开放图片NFT和用户中心

parent 330e6d3b
......@@ -24,8 +24,8 @@
<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>
<div class="flex flex-col items-center content-center">
<app-icon name="icon-a-tupian" size="26px" class='icon-box bg-icon-bg rounded-full mx-auto'></app-icon>
<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-app-red rounded-full mx-auto'></app-icon>
<div class=" text-xs py-3">图片</div>
</div>
<div class="flex flex-col items-center content-center">
......
......@@ -122,6 +122,14 @@ const routes: Array<RouteConfig> = [
component: () => import('@/view/User/index.vue')
},
{
path:'/UserDetail',
name:'UserDetail',
meta: {
title: '用户中心'
},
component: () => import('@/view/UserDetail/index.vue')
},
{
path:'/User/edit/:type',
name:'Edit',
component:()=>import('@/view/User/Edit.vue'),
......
......@@ -21,8 +21,8 @@
<div class="w-full text-left ">
<div>NFT哈希</div>
<div>{{certificateData.NFTHash?certificateData.NFTHash:'无'}}</div>
<div class="pt-1" v-if="categoryId==1">剧本哈希</div>
<div v-if="categoryId==1">{{certificateData.fileHash?certificateData.fileHash:'无'}}</div>
<div class="pt-1" v-if="categoryId==1 || categoryId==5">{{getPreText()}}哈希</div>
<div v-if="categoryId==1 || categoryId==5">{{certificateData.fileHash?certificateData.fileHash:'无'}}</div>
</div>
</div>
</div>
......
......@@ -98,6 +98,7 @@
@cellOnChange="$router.push({ name: 'NftUpload',query:{type:'封面图片'}})"
></app-cell>
<app-cell
v-if="['1','2'].indexOf(categoryId) != -1"
text="附件上传"
type="select"
:selected="createNFT.archives"
......@@ -296,19 +297,9 @@ export default Vue.extend({
{ value: 1, name: "需要授权" },
],
categoryTypes: [] as any[],
mySteps: [
{
text: "基本信息",
},
{
text: "加密上链",
},
{
text: "NFT发行",
},
],
currentStep: 1,
categoryId:this.$route.query.id as string,
currentStep: 1,
showOverlay:true,
loading2: false,
loading3: false,
......@@ -384,6 +375,19 @@ export default Vue.extend({
};
});
},
mySteps():Array<any>{
return [
{
text: "基本信息",
},
{
text: this.categoryId == '5'?'信息上链':"加密上链",
},
{
text: "NFT发行",
},
]
}
},
methods: {
...mapMutations("create", {
......@@ -540,6 +544,14 @@ export default Vue.extend({
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){
const coverImgUrl = await this.$service.nftService.fileUpload(this.coverFile)
data = {
......
......@@ -50,6 +50,7 @@ export default Vue.extend({
maxNum: {
'剧本题材': 3,
"视频题材": 1,
"图片题材": 1,
},
selectType: this.$route.query.text
};
......
......@@ -59,7 +59,8 @@
</div>
</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">
<app-btn
......@@ -163,7 +164,7 @@ export default Vue.extend({
showUploadFile():string{
if(this.uploadType == '封面图片' && 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)
}else {
return ''
......
......@@ -70,6 +70,7 @@
<img
:src="nftData.avatar ? nftData.avatar : '/img/mokeImg/avatar.png'"
class="h-12 w-12 rounded-full"
@click="gotoUserDetail()"
/>
</div>
<div>
......@@ -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>
<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>
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