nieyuge 2 anos atrás
pai
commit
34a4f73889

+ 53 - 0
src/pages/nft/add.vue

@@ -77,12 +77,20 @@
     <div class="loading" v-if="showLoading">
         <img src="../../static/img/icon-add-loading.svg" alt="" />
     </div>
+
+    <div class="succ" v-if="showSuccess">
+        <img class="icon" src="../../static/img/icon-notice-succ.svg" alt="" />
+        <div class="notic">Your NFTs are Created</div>
+        <button class="btn">Done</button>
+    </div>
+    <div class="succ-bg" v-if="showSuccess"></div>
 </template>
 
 <script lang="ts" setup>
 import { ref } from 'vue';
 
 const showLoading = ref(false);
+const showSuccess = ref(false)
 </script>
 
 
@@ -379,4 +387,49 @@ const showLoading = ref(false);
         transform: rotate(360deg);
     }
 }
+
+.succ {
+    position: absolute;
+    z-index: 2;
+    top: 50%;
+    left: 50%;
+    width: 500px;
+    height: 400px;
+    border-radius: 20px;
+    background-color: #fff;
+    transform: translate(-50%, -50%);
+    .icon {
+        display: block;
+        width: 120px;
+        height: 120px;
+        margin: 78px auto 27px auto;
+    }
+    .notic {
+        font-size: 20px;
+        font-weight: 700;
+        text-align: center;
+        line-height: 24px;
+    }
+    .btn {
+        display: block;
+        border: 0;
+        cursor: pointer;
+        width: 440px;
+        height: 50px;
+        color: #fff;
+        font-size: 18px;
+        font-weight: 700;
+        margin: 70px auto 0;
+        border-radius: 50px;
+        background: #1D9BF0;
+    }
+}
+.succ-bg {
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 100%;
+    background: rgba(0, 0, 0, .8);
+}
 </style>

+ 3 - 1
src/pages/nft/index.vue

@@ -11,7 +11,9 @@ let router = useRouter()
 
 onMounted(() => {
     let userInfo = getStorage(storageKey.userInfo);
-    if (!userInfo) router.push({ name: 'home' });
+    if (!userInfo) {
+        location.href = '/'
+    }
 })
 </script>
 

+ 4 - 0
src/static/img/icon-notice-succ.svg

@@ -0,0 +1,4 @@
+<svg width="120" height="121" viewBox="0 0 120 121" fill="none" xmlns="http://www.w3.org/2000/svg">
+<circle cx="60" cy="60.9961" r="60" fill="#39BC70"/>
+<path d="M35.1562 61.1187L54.5409 82.0725L87.7716 38.9648" stroke="white" stroke-width="8"/>
+</svg>