Commit c218bf21 authored by salitedfish's avatar salitedfish

bug 修复

parent 15048800
NODE_ENV = DEVELOPMENT NODE_ENV = DEVELOPMENT
VUE_APP_ENV = DEVELOPMENT VUE_APP_ENV = DEVELOPMENT
VUE_APP_TITLE=开发版本 VUE_APP_TITLE=开发版本
VUE_APP_URL = http://172.16.101.135:8001 VUE_APP_URL = http://172.16.101.136:8001
\ No newline at end of file \ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
"dev": "vue-cli-service serve", "dev": "vue-cli-service serve",
"test": "vue-cli-service serve --mode test", "test": "vue-cli-service serve --mode test",
"deploy:test": "vue-cli-service build --mode test && bash ./test_deploy.sh", "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": { "dependencies": {
"@tailwindcss/line-clamp": "^0.2.1", "@tailwindcss/line-clamp": "^0.2.1",
......
<template> <template>
<div id="app" class="bg-font-black"> <div id="app" class="bg-font-black">
<van-overlay :show="appState.overlay.show"> <van-overlay :show="appState.overlay.show" class="">
<div class="overlay flex flex-col items-start text-font-white w-full px-6 relative"> <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 class="text-xl py-12 pt-28">
<div>发行NFT</div> <div>发行NFT</div>
<div>使版权更具交易价值</div> <div>使版权更具交易价值</div>
...@@ -109,11 +109,12 @@ export default Vue.extend({ ...@@ -109,11 +109,12 @@ export default Vue.extend({
.overlay{ .overlay{
height: 100vh; height: 100vh;
width: 100vw; width: 100vw;
// overflow-y: scroll;
.bot{ .bot{
position: absolute; position: absolute;
top:48%; bottom:100px;
left: 5%; left: 5%;
// padding-bottom: 100px;
} }
} }
.icon-box{ .icon-box{
......
...@@ -11,7 +11,8 @@ ...@@ -11,7 +11,8 @@
<div>影视区块链版权电子数据确权书</div> <div>影视区块链版权电子数据确权书</div>
</div> </div>
<div class=" h-40 flex items-center relative"> <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 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"/> <img src="./mark.png" class=" absolute right-20 bottom-0"/>
</div> </div>
...@@ -177,6 +178,8 @@ export default Vue.extend({ ...@@ -177,6 +178,8 @@ export default Vue.extend({
return '图片' return '图片'
case '6': case '6':
return '衍生品' return '衍生品'
case 'c':
return 'NFT'
default: default:
return '' return ''
} }
......
...@@ -207,8 +207,8 @@ ...@@ -207,8 +207,8 @@
<div v-else class="text-center"> <div v-else class="text-center">
<div v-if="success" class=""> <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 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 "> <div class="w-10/12 mx-auto">
<certificate :certificateData="certificateData" :categoryId="categoryId"/> <certificate :certificateData="certificateData" :categoryId="categoryId"/>
<img <img
@click='showOverlay = !showOverlay' @click='showOverlay = !showOverlay'
......
...@@ -222,6 +222,8 @@ ...@@ -222,6 +222,8 @@
</div> </div>
<div <div
class=" class="
fixed fixed
...@@ -239,22 +241,6 @@ ...@@ -239,22 +241,6 @@
" "
v-else v-else
> >
<div class="w-10/12 pt-8" v-if="showoverlay">
<app-cell text="NFT类型" :value="nftData.category" class="my-1"></app-cell>
<app-cell
text="文件名"
:value="nftData.fileName || '未上传文件'"
class="my-1"
></app-cell>
<div class="flex justify-center">
<van-image
class="my-3 self-center text-center"
width="180"
lazy-load
:src="nftData.fileUrl"
/>
</div>
</div>
<div class="flex-grow w-10/12"> <div class="flex-grow w-10/12">
<app-btn <app-btn
:text=" :text="
...@@ -269,7 +255,50 @@ ...@@ -269,7 +255,50 @@
@click.native="confirmBtn" @click.native="confirmBtn"
></app-btn> ></app-btn>
</div> </div>
</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 || '未上传文件'"
class="my-1"
></app-cell>
<div class="flex justify-center">
<van-image
class="my-3 self-center text-center"
width="180"
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>
</div>
</div> </div>
</Layout-Child> </Layout-Child>
</template> </template>
...@@ -331,9 +360,21 @@ export default Vue.extend({ ...@@ -331,9 +360,21 @@ export default Vue.extend({
inMyCollection: false, inMyCollection: false,
isOwner: false, isOwner: false,
user: this.$util.userMsg.getUserMsg() as any, user: this.$util.userMsg.getUserMsg() as any,
getOfficialNft: ''
// loading:true // 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() { async created() {
console.log(this.$route.query.officia); console.log(this.$route.query.officia);
if (this.$route.query.officia) { if (this.$route.query.officia) {
...@@ -363,6 +404,7 @@ export default Vue.extend({ ...@@ -363,6 +404,7 @@ export default Vue.extend({
"app-btn": () => import("@/components/common/Btn.vue"), "app-btn": () => import("@/components/common/Btn.vue"),
// 'app-scrollbar':()=>import('@/components/common/ScrollBar.vue'), // 'app-scrollbar':()=>import('@/components/common/ScrollBar.vue'),
"app-collectionCard": () => import("@/components/CollectionCard.vue"), "app-collectionCard": () => import("@/components/CollectionCard.vue"),
"certificate": ()=>import("@/view/NFT/Create/components/certificate"),
SkeletonNftDetail, SkeletonNftDetail,
}, },
methods: { methods: {
...@@ -389,25 +431,41 @@ export default Vue.extend({ ...@@ -389,25 +431,41 @@ export default Vue.extend({
confirmBtn() { confirmBtn() {
console.log(this.nftData.status); console.log(this.nftData.status);
if (this.nftData.status === 1) { if (this.nftData.status === 1) {
if (!this.showoverlay) { this.getOfficialNft='loading'
this.showoverlay = true; this.$service.nftService
} else {
this.$service.nftService
.applyOfficialNft(Number(this.$route.params.id)) .applyOfficialNft(Number(this.$route.params.id))
.then((res) => { .then((res) => {
if (res) { if (res) {
this.getOfficialNft='success'
download(this.nftData.fileUrl); download(this.nftData.fileUrl);
this.$toast("领取成功"); this.$toast("领取成功");
this.$router.replace(""); 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){ }else if(this.nftData.status == 0){
this.$router.push({name:'myListNft',query:{category:this.nftData.category}}) this.$router.push({name:'myListNft',query:{category:this.nftData.category}})
}else{ }else{
console.log(11); console.log(11);
this.showoverlay = true; // this.showoverlay = true;
} }
}, },
async setMyCollection(): Promise<void> { async setMyCollection(): Promise<void> {
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
</div> </div>
<div class=" pl-3 pr-8 w-10/12 "> <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 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> </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