Commit c218bf21 authored by salitedfish's avatar salitedfish

bug 修复

parent 15048800
NODE_ENV = DEVELOPMENT
VUE_APP_ENV = DEVELOPMENT
VUE_APP_TITLE=开发版本
VUE_APP_URL = http://172.16.101.135:8001
\ No newline at end of file
VUE_APP_URL = http://172.16.101.136:8001
\ No newline at end of file
......@@ -6,7 +6,7 @@
"dev": "vue-cli-service serve",
"test": "vue-cli-service serve --mode test",
"deploy:test": "vue-cli-service build --mode test && bash ./test_deploy.sh",
"build": "vue-cli-service build"
"build": "vue-cli-service build --mode test"
},
"dependencies": {
"@tailwindcss/line-clamp": "^0.2.1",
......
<template>
<div id="app" class="bg-font-black">
<van-overlay :show="appState.overlay.show">
<div class="overlay flex flex-col items-start text-font-white w-full px-6 relative">
<van-overlay :show="appState.overlay.show" class="">
<div class="overlay items-start flex flex-col text-font-white w-full px-6 relative">
<div class="text-xl py-12 pt-28">
<div>发行NFT</div>
<div>使版权更具交易价值</div>
......@@ -109,11 +109,12 @@ export default Vue.extend({
.overlay{
height: 100vh;
width: 100vw;
// overflow-y: scroll;
.bot{
position: absolute;
top:48%;
bottom:100px;
left: 5%;
// padding-bottom: 100px;
}
}
.icon-box{
......
......@@ -11,7 +11,8 @@
<div>影视区块链版权电子数据确权书</div>
</div>
<div class=" h-40 flex items-center relative">
<img id="coverImg" v-if="!coverName" src="/img/cover.png" class=" max-w-20 xs:max-w-24 mx-auto mt-4 mb-4 max-h-32" />
<img id="coverImg" :src="certificateData.cover" v-if="certificateData.cover" class=" max-w-20 xs:max-w-24 mx-auto mt-4 mb-4 max-h-32" />
<img id="coverImg" v-else-if="!coverName" src="/img/cover.png" class=" max-w-20 xs:max-w-24 mx-auto mt-4 mb-4 max-h-32" />
<img id="coverImg" :src="showUploadFile" v-else class=" max-w-20 xs:max-w-24 mx-auto mt-4 mb-4 max-h-32" />
<img src="./mark.png" class=" absolute right-20 bottom-0"/>
</div>
......@@ -177,6 +178,8 @@ export default Vue.extend({
return '图片'
case '6':
return '衍生品'
case 'c':
return 'NFT'
default:
return ''
}
......
......@@ -207,8 +207,8 @@
<div v-else class="text-center">
<div v-if="success" class="">
<div v-if="showOverlay" class=" fixed left-0 right-0 top-0 bottom-0 bg-gray-800 z-50 " >
<div class="w-10/12 mx-auto ">
<div v-if="showOverlay" class=" fixed left-0 right-0 top-0 bottom-0 bg-gray-800 z-50 overflow-y-scroll" >
<div class="w-10/12 mx-auto">
<certificate :certificateData="certificateData" :categoryId="categoryId"/>
<img
@click='showOverlay = !showOverlay'
......
......@@ -222,6 +222,8 @@
</div>
<div
class="
fixed
......@@ -239,8 +241,28 @@
"
v-else
>
<div class="w-10/12 pt-8" v-if="showoverlay">
<app-cell text="NFT类型" :value="nftData.category" class="my-1"></app-cell>
<div class="flex-grow w-10/12">
<app-btn
:text="
nftData.status === 0
? '已领取,去查看'
: nftData.status === 1
? '立即领取'
: '已经领完'
"
class="w-full mx-auto text-font-white rounded-2xl bg-font-blue"
border="none"
@click.native="confirmBtn"
></app-btn>
</div>
</div>
<div class=" fixed bottom-0 left-0 right-0 top-12 bg-font-black flex items-center z-50" v-if="getOfficialNft == 'loading'">
<div class=" w-4/6 mx-auto text-center">
<img src="@/assets/img/saveLoading.png" alt="" class=" mx-auto">
<div class=" mt-5">证书领取中,请稍后~~</div>
</div>
<!-- <app-cell text="NFT类型" :value="nftData.category" class="my-1"></app-cell>
<app-cell
text="文件名"
:value="nftData.fileName || '未上传文件'"
......@@ -253,21 +275,28 @@
lazy-load
:src="nftData.fileUrl"
/>
</div> -->
</div>
<div class=" fixed bottom-0 left-0 right-0 top-0 bg-font-black flex items-center z-50" v-if="getOfficialNft == 'success'">
<div class="w-10/12 mx-auto text-center">
<certificate :categoryId="'c'" :certificateData="certificateData"></certificate>
<img
@click="getOfficialNft=''"
src="@/assets/icons/close_publish.png"
class="w-4 xs:w-6 mx-auto mt-3"
/>
</div>
</div>
<div class=" fixed bottom-0 left-0 right-0 top-12 bg-font-black flex items-center z-50" v-if="getOfficialNft == 'fail'">
<div class=" w-4/6 mx-auto text-center">
<img src="@/assets/img/earth.png" alt="" class=" mx-auto w-4/6">
<div class=" mt-5">抱歉,NFT领取失败!</div>
<div>
<app-btn class=" w-2/6 mx-auto text-font-white rounded-2xl bg-font-blue" text="重新领取" @click.native="confirmBtn" border="none">
</app-btn>
</div>
<div class="flex-grow w-10/12">
<app-btn
:text="
nftData.status === 0
? '已领取,去查看'
: nftData.status === 1
? '立即领取'
: '已经领完'
"
class="w-full mx-auto text-font-white rounded-2xl bg-font-blue"
border="none"
@click.native="confirmBtn"
></app-btn>
</div>
</div>
</div>
......@@ -331,9 +360,21 @@ export default Vue.extend({
inMyCollection: false,
isOwner: false,
user: this.$util.userMsg.getUserMsg() as any,
getOfficialNft: ''
// loading:true
};
},
computed:{
certificateData():any{
return {
nftId:this.nftData.nftHash,
value_name: this.nftData.name,
wallet: this.nftData.publishAddress,
value_publisher: this.nftData.publisher,
cover: this.nftData.cover
}
}
},
async created() {
console.log(this.$route.query.officia);
if (this.$route.query.officia) {
......@@ -363,6 +404,7 @@ export default Vue.extend({
"app-btn": () => import("@/components/common/Btn.vue"),
// 'app-scrollbar':()=>import('@/components/common/ScrollBar.vue'),
"app-collectionCard": () => import("@/components/CollectionCard.vue"),
"certificate": ()=>import("@/view/NFT/Create/components/certificate"),
SkeletonNftDetail,
},
methods: {
......@@ -389,25 +431,41 @@ export default Vue.extend({
confirmBtn() {
console.log(this.nftData.status);
if (this.nftData.status === 1) {
if (!this.showoverlay) {
this.showoverlay = true;
} else {
this.getOfficialNft='loading'
this.$service.nftService
.applyOfficialNft(Number(this.$route.params.id))
.then((res) => {
if (res) {
this.getOfficialNft='success'
download(this.nftData.fileUrl);
this.$toast("领取成功");
this.$router.replace("");
this.nftData.status = 0
}else {
this.getOfficialNft='fail'
}
}).catch(()=>{
this.getOfficialNft='fail'
})
}
// if (!this.showoverlay) {
// this.showoverlay = true;
// } else {
// this.$service.nftService
// .applyOfficialNft(Number(this.$route.params.id))
// .then((res) => {
// if (res) {
// download(this.nftData.fileUrl);
// this.$toast("领取成功");
// this.$router.replace("");
// }
// })
// }
}else if(this.nftData.status == 0){
this.$router.push({name:'myListNft',query:{category:this.nftData.category}})
}else{
console.log(11);
this.showoverlay = true;
// this.showoverlay = true;
}
},
async setMyCollection(): Promise<void> {
......
......@@ -56,7 +56,7 @@
</div>
<div class=" pl-3 pr-8 w-10/12 ">
<input class="text-base bg-transparent bg-opacity-0 text-font-white w-6/12" placeholder='接收人' :value="receiver.name" disabled/>
<input v-model="receiver.addr" class=" text-xs bg-transparent bg-opacity-0 text-font-white w-full" placeholder='输入接收人地址' ref="addrInput" @blur="searchUser"/>
<input v-model="receiver.addr" class=" text-xs bg-transparent bg-opacity-0 text-font-white w-full" placeholder='输入接收人地址' ref="addrInput" @blur="searchUser"/>
</div>
</div>
</div>
......
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