Explorar el Código

发布器流程改动

nieyuge hace 3 años
padre
commit
8fb9a74585

BIN
src/assets/img/img-preview-bg-after.png


BIN
src/assets/img/img-preview-bg-before.png


BIN
src/assets/subject/icon-balance.png


+ 3 - 0
src/assets/subject/icon-balance.svg

@@ -0,0 +1,3 @@
+<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M3.64621 10.5473H4.03598L4.77121 7.06808C5.04442 5.78237 6.17746 4.89844 7.44308 4.89844C7.6279 4.89844 7.82076 4.91853 8.0096 4.95871L34.5797 10.5757L34.5626 10.5736C35.8926 10.7584 36.9141 11.898 36.9141 13.2795V32.6456C36.9141 34.1563 35.6926 35.3777 34.1819 35.3777H3.64621C2.13549 35.3777 0.914062 34.1563 0.914062 32.6456V13.2795C0.914062 11.7688 2.13549 10.5473 3.64621 10.5473ZM22.7863 10.5473H6.49893L7.12969 7.5663C7.16585 7.39755 7.31451 7.30915 7.44308 7.30915C7.46412 7.30915 7.48211 7.31221 7.50237 7.31567L7.51138 7.31719L22.7863 10.5473ZM34.4752 20.1181V25.04H26.3592C25.0011 25.04 23.8962 23.9351 23.8962 22.577C23.8962 21.219 25.0011 20.1141 26.3592 20.1141H34.4752V20.1181ZM34.5033 32.6456V27.4547H26.3592C23.6672 27.4547 21.4855 25.273 21.4855 22.581C21.4855 19.8891 23.6672 17.7074 26.3592 17.7074H34.5033V13.2795C34.5033 13.1027 34.3587 12.9581 34.1819 12.9581H3.64621C3.46942 12.9581 3.32478 13.1027 3.32478 13.2795V32.6456C3.32478 32.8223 3.46942 32.967 3.64621 32.967H34.1819C34.3587 32.967 34.5033 32.8223 34.5033 32.6456ZM25.5094 22.5793C25.5094 21.8119 26.1321 21.1891 26.8996 21.1891C27.667 21.1891 28.2897 21.8119 28.2897 22.5793C28.2897 23.3467 27.667 23.9695 26.8996 23.9695C26.1321 23.9695 25.5094 23.3467 25.5094 22.5793Z" fill="black"/>
+</svg>

+ 3 - 0
src/assets/subject/icon-refresh.svg

@@ -0,0 +1,3 @@
+<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M4.21664 9.31085C4.21664 9.31085 6.4009 5.93844 9.85712 4.12882C13.3133 2.31927 17.5714 2.84021 20.364 4.59492C23.1566 6.34973 24.0968 7.83024 24.0968 7.83024L26.5022 6.45938C26.5022 6.45938 27 6.21265 27 6.78841V15.3978C27 15.3978 27 16.1655 26.4193 15.8912C25.9308 15.6607 20.648 12.655 18.9833 11.7067C18.0691 11.2988 18.8723 10.9673 18.8723 10.9673L21.1935 9.63986C21.1935 9.63986 19.8695 7.98074 17.9315 7.10206C15.8571 6.02069 13.9151 5.89246 11.5362 6.79105C9.985 7.37687 8.15868 8.87707 6.84323 11.093L4.21664 9.31085ZM25.7834 20.6891C25.7834 20.6891 23.5991 24.0616 20.1429 25.8711C16.6866 27.6807 12.4286 27.1599 9.63599 25.4051C6.84326 23.6503 5.90327 22.1697 5.90327 22.1697L3.4977 23.5405C3.4977 23.5405 3 23.7874 3 23.2115V14.6022C3 14.6022 3 13.8346 3.58058 14.1087C4.06912 14.3394 9.35204 17.345 11.0167 18.2933C11.9309 18.7013 11.1278 19.0326 11.1278 19.0326L8.80649 20.3601C8.80649 20.3601 10.1306 22.0192 12.0685 22.8979C14.1428 23.9792 16.0848 24.1075 18.4638 23.2089C20.0149 22.623 21.8412 21.123 23.1566 18.9069L25.7834 20.6891Z" fill="#1D9BF0"/>
+</svg>

+ 4 - 0
src/assets/subject/top-01.svg

@@ -0,0 +1,4 @@
+<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
+<circle cx="10" cy="10" r="10" fill="#1F2326"/>
+<path d="M9.30176 14.5H11.3457V4.63574H9.29492L6.74512 6.40625V8.26562L9.26074 6.5293H9.30176V14.5Z" fill="white"/>
+</svg>

+ 4 - 0
src/assets/subject/top-02.svg

@@ -0,0 +1,4 @@
+<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
+<circle cx="10" cy="10" r="10" fill="#1F2326"/>
+<path d="M6.35645 7.60254V7.63672H8.27051V7.60254C8.27051 6.69336 8.97461 6.02344 9.93164 6.02344C10.8477 6.02344 11.4971 6.61133 11.4971 7.34961C11.4971 8.0332 11.1895 8.53223 10.1914 9.53027L6.47266 13.1123V14.5H13.6436V12.8594H9.19336V12.8184L11.5996 10.501C12.6865 9.4209 13.5068 8.49805 13.5068 7.26758C13.5068 5.62012 12.0781 4.41699 10 4.41699C7.84668 4.41699 6.35645 5.73633 6.35645 7.60254Z" fill="white"/>
+</svg>

+ 4 - 0
src/assets/subject/top-03.svg

@@ -0,0 +1,4 @@
+<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
+<circle cx="10" cy="10" r="10" fill="#1F2326"/>
+<path d="M8.6875 10.1934H9.9043C11.0186 10.1934 11.6953 10.7402 11.6953 11.6426C11.6953 12.4766 10.9707 13.0576 9.93848 13.0576C8.85156 13.0576 8.16797 12.5107 8.10645 11.6768H6.13086C6.22656 13.4951 7.68262 14.7188 9.91113 14.7188C12.1875 14.7188 13.7939 13.543 13.7939 11.7725C13.7939 10.4053 12.8438 9.5166 11.374 9.39355V9.35254C12.584 9.13379 13.4111 8.25879 13.4111 7.04883C13.4111 5.46973 12.0098 4.41699 9.95898 4.41699C7.81934 4.41699 6.39746 5.60645 6.32227 7.43164H8.22266C8.27734 6.57031 8.91309 6.00293 9.87012 6.00293C10.8955 6.00293 11.4629 6.5293 11.4629 7.3291C11.4629 8.14258 10.8271 8.70312 9.88379 8.70312H8.6875V10.1934Z" fill="white"/>
+</svg>

+ 3 - 32
src/view/iframe/publish/components/paypal-button.vue

@@ -1,34 +1,6 @@
 <template>
 <!-- paypal 支付按钮 -->
     <div class="pay-wrapper">
-        <div class="pay-msg">
-            <div class="row">
-                <template v-if="currentCurrencyInfo.currencyCode == 'USD'">
-                    Pay ${{finalAmountData.finalAmountValue || 0}} 
-                    <span>
-                        (Available ${{finalAmountData.requestAmountValue}})
-                    </span>
-                </template>
-                <template v-else>
-                    <span class="desc">
-                        Pay
-                    </span>
-                    {{payConfig.amount || 0}}
-                    <img :src="currentCurrencyInfo.iconPath" class="icon">
-                    <span>
-                        {{currentCurrencyInfo.tokenSymbol}}
-                    </span>
-                </template>
-            </div>
-            <div class="msg">
-                <template v-if="currentCurrencyInfo.currencyCode == 'USD'">
-                    {{payConfig.feeDesc}}
-                </template>
-                <template v-else>
-                    (Balance: {{currentCurrencyInfo.balance}})
-                </template>
-            </div>
-        </div>
         <div class="pay-btn">
             <div class="iframe-pay"
                 v-show="currentCurrencyInfo.currencyCode == 'USD'"
@@ -41,7 +13,7 @@
             <div class="token-pay" 
                 v-if="currentCurrencyInfo.currencyCode != 'USD'"
                 @click="tokenPay">
-                Pay Now
+                Pay {{payConfig.amount || 0}} {{currentCurrencyInfo.tokenSymbol}}
             </div>
         </div>
     </div>
@@ -165,7 +137,7 @@ onMounted(() => {
     position: absolute;
     left: 0;
     bottom: 0;
-    box-shadow: 0 -4px 8px -3px #00000026;
+    box-shadow: 0px -1px 0px #ECECEC;
     border-bottom-right-radius: 16px;
     padding: 12px 30px;
     box-sizing: border-box;
@@ -209,11 +181,9 @@ onMounted(() => {
     }
 
     .pay-btn {
-        width: 206px;
         height: 48px;
 
         .token-pay {
-            width: 100%;
             height: 100%;
             background: #1D9BF0;
             border-radius: 10000px;
@@ -224,6 +194,7 @@ onMounted(() => {
             font-size: 18px;
             color: #fff;
             cursor: pointer;
+            padding: 0 30px;
         }
 
         .iframe-pay {

+ 12 - 18
src/view/iframe/publish/components/preview-card.vue

@@ -2,11 +2,6 @@
 <template>
     <div class="wrapper">
         <div class="card-container">
-            <div class="preview-txt">
-                <span>{{installStatus ? 'After' : 'Before'}}</span>
-                DeNet installed
-            </div>
-
             <!-- 安装之后的卡片样式 -->
             <div v-show="installStatus" class="left" :style="{'width': reviewCanvasParams.width+ 'px'}">
                 <div class="head" :style="{'zoom': reviewCanvasParams.zoom}">
@@ -90,7 +85,7 @@
 </template>
 
 <script setup>
-import { ref, defineProps, onMounted, nextTick, watch, reactive } from "vue";
+import { ref, defineProps, onMounted, nextTick, watch, reactive, inject, onUnmounted } from "vue";
 
 import customCardCover from '@/view/components/custom-card-cover.vue'
 
@@ -102,8 +97,8 @@ let reviewCanvasParams = reactive({
     width: 396,
     zoom: 1
 });
-
-let installStatus = ref(false);
+let timer = ref(null);
+let installStatus = inject('installStatus');
 
 defineProps({
     postData: {
@@ -191,7 +186,8 @@ onMounted(() => {
         if(res) {
             getUserName(res.nickName);
         }
-        setInterval(() => {
+        clearInterval(timer.value);
+        timer.value = setInterval(() => {
             installStatus.value = !installStatus.value;
         }, 3000)
     });
@@ -200,17 +196,18 @@ onMounted(() => {
     })
 })
 
+onUnmounted(() => {
+    clearInterval(timer.value);
+})
+
 </script>
 
 <style lang="scss" scoped>
 .wrapper {
     width: 100%;
     height: 100%;
-    padding: 10px 16px;
     box-sizing: border-box;
-    border-bottom-right-radius: 16px;
     overflow-y: auto;
-    padding-bottom: 80px;
     display: flex;
 
     &::-webkit-scrollbar {
@@ -223,7 +220,6 @@ onMounted(() => {
         background: #ffffff;
         box-sizing: border-box;
         border-radius: 20px;
-        padding: 0 6px;
         display: flex;
         align-items: center;
 
@@ -239,7 +235,7 @@ onMounted(() => {
         .head {
             position: absolute;
             z-index: 1100;
-            top: 136px;
+            top: 132px;
             left: 17px;
             display: flex;
 
@@ -274,6 +270,7 @@ onMounted(() => {
             width: 387px;
             height: 100%;
             background-size: contain;
+            background-repeat: no-repeat;
             .tips {
                 right: 15px !important;
             }
@@ -310,11 +307,8 @@ onMounted(() => {
         .content-before {
             background: url('@/assets/img/img-preview-bg-before.png');
             background-size: contain;
+            background-repeat: no-repeat;
             height: 100%;
-            .head {
-                top: 138px !important;
-                left: 17px !important;
-            }
             .card-wrapper {
                 width: 491px;
                 border: 1px solid #D1D9DD;

+ 221 - 0
src/view/iframe/publish/components/top-up2.vue

@@ -0,0 +1,221 @@
+<!-- 充值 -->
+<template>
+    <div class="token-content">
+        <div class="item">
+            <div class="token-l">Recommended Deposit</div>
+            <div class="token-r">
+                <img
+                    class="icon"
+                    :src="currentCurrencyInfo.iconPath"
+                />{{currentCurrencyInfo.tokenSymbol}}
+            </div>
+        </div>
+        <div class="item">
+            <div class="token-l">Network</div>
+            <div class="token-r">
+                <img
+                    class="icon"
+                    :src="require('@/assets/svg/icon-BNB.svg')"
+                />
+                BNB Smart Chain (BEP20)
+            </div>
+        </div>
+        <div class="item none">
+            <div class="token-l">Address</div>
+        </div>
+        <div class="qrCode">
+            <div class="canvas">
+                <canvas id="canvas"></canvas>
+            </div>
+            <div class="code">
+                <div class="address">{{tokenRechargeAddress}}</div>
+                <div class="copy-btn" :data-clipboard-text="tokenRechargeAddress">copy</div>
+            </div>
+        </div>
+        <div class="desc">Make sure you also selected <span class="blod">BNB Smart Chain (BEP20)</span> as the network on the platform where you are withdrawing funds for this deposit. Otherwise, you'll lose your assets.</div>
+    </div>
+</template>
+
+<script setup>
+/* eslint-disable */
+import { defineProps, defineEmits, onMounted, ref } from "vue";
+import { getTokenRechargeAddress } from "@/http/pay";
+import { ElMessage } from 'element-plus'
+
+let QRCode = require('qrcode')
+let ClipboardJS = require('clipboard')
+
+let tokenRechargeAddress = ref('');
+
+const props = defineProps({
+    currentCurrencyInfo: {
+        type: Object,
+        default: () => {
+
+        }
+    },
+    asyncIng: {
+        type: Boolean,
+        default: false
+    }
+})
+
+const emits = defineEmits(['doneHandle']);
+
+const createQRCode = (str) => {
+    var canvas = document.getElementById('canvas')
+    QRCode.toCanvas(canvas, str, {
+        width: 130,
+        height: 130,
+        scale: 1,
+        color: {
+            dark: '#000', // 二维码前景颜色
+            light: '#fff' // 二维码背景颜色
+        }
+    }, function (error) {
+        if (error) console.error(error)
+        console.log('success!');
+    })
+}
+const copyToken = () => {
+    var clipboard = new ClipboardJS('.copy-btn');
+    clipboard.on('success', function (e) {
+        ElMessage({
+            message: 'copy success',
+            grouping: true,
+            type: 'success',
+            offset: -16,
+            appendTo: document.body
+
+        })
+        console.info('Action:', e.action);
+        console.info('Text:', e.text);
+        console.info('Trigger:', e.trigger);
+
+        e.clearSelection();
+    });
+
+    clipboard.on('error', function (e) {
+        ElMessage({
+            message: 'copy error',
+            grouping: true,
+            type: 'error',
+            offset: -16
+        })
+        console.error('Action:', e.action);
+        console.error('Trigger:', e.trigger);
+    });
+}
+
+
+const doneHandle = () => {
+    emits('topUpDone', {});
+}
+
+const getTokenAddress = () => {
+    getTokenRechargeAddress({
+        params: {
+            tokenChain: props.currentCurrencyInfo.tokenChain
+        },
+    }).then((res) => {
+        if(res.code == 0) {
+            if (res.data && res.data.rechargeAddress) {
+                tokenRechargeAddress.value = res.data.rechargeAddress;
+                createQRCode(res.data.rechargeAddress)
+                copyToken()
+            }
+        }    
+    })
+}
+
+onMounted(() => {
+    getTokenAddress();
+}) 
+
+</script>
+
+<style scoped lang="scss">
+.token-content {
+    padding: 0 16px;
+    margin-bottom: 16px;
+    border-radius: 20px;
+    border: 1px solid #E6E6E6;
+    .item {
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        clear: both;
+        height: 42px;
+        box-shadow: inset 0px -1px 0px #E6E6E6;
+        &.none {
+            box-shadow: unset;
+        }
+        .token-l {
+            font-size: 15px;
+            font-weight: 400;
+            color: #707070;
+        }
+        .token-r {
+            font-size: 16px;
+            font-weight: 500;
+        }
+        img {
+            width: 20px;
+            height: 20px;
+            vertical-align: middle;
+            margin-right: 6px;
+        }
+    }
+    .desc {
+        color: #A9A9A9;
+        font-size: 12px;
+        font-weight: 400;
+        margin-bottom: 20px;
+        span {
+            color: #ff0016;
+            font-weight: bold;
+        }
+    }
+    .qrCode {
+        display: flex;
+        margin-bottom: 12px;
+        .canvas {
+            overflow: hidden;
+            width: 130px;
+            height: 130px;
+            canvas {
+                transform: scale(1.24);
+            }
+        }
+        .code {
+            width: 300px;
+            padding: 0 20px;
+            display: flex;
+            align-items: center;
+            flex-direction: column;
+            justify-content: center;
+            .address {
+                font-size: 16px;
+                font-weight: 500;
+                line-height: 25px;
+                margin-bottom: 20px;
+                word-break: break-all;
+            }
+            .copy-btn {
+                display: flex;
+                align-items: center;
+                justify-content: center;
+                cursor: pointer;
+                width: 100%;
+                height: 40px;
+                color: #1D9BF0;
+                font-size: 17px;
+                font-weight: 600;
+                text-align: center;
+                border: 1px solid #1D9BF0;
+                border-radius: 40px;
+            }
+        }
+    }
+}
+</style>

+ 240 - 34
src/view/iframe/publish/give-dialog.vue

@@ -3,7 +3,7 @@
         <div class="content"
             :style="{
                 height: dialogHeight + 'px',
-                width: showComType != 'preview' ? '600px' : 'auto'}">   
+                width: showComType != 'preview' ? '600px' : '1100px'}">   
             <div class="pop-mask"  
                 v-show="showCurrencyPop" 
                 @click.stop="showCurrencyPop = false"></div>
@@ -273,12 +273,97 @@
 
                         <!-- 预览 -->
                         <template v-else-if="showComType == 'preview'">
-                            <preview-card
-                                :currentCurrencyInfo="currentCurrencyInfo"
-                                :postData="publishRes"
-                                :baseFormData="baseFormData"
-                                :amountFontSize="previewFontSize"
-                            ></preview-card>
+                            <div class="preview">
+                                <div
+                                    class="card"
+                                    :class="{ center: Number(baseFormData.amountValue) <= Number(currentCurrencyInfo.balance) }">
+                                    <div class="card-title">
+                                        <img
+                                            class="img"
+                                            v-if="Number(baseFormData.amountValue) > Number(currentCurrencyInfo.balance)"
+                                            :src=" require('@/assets/subject/top-01.svg') " />
+                                        <div class="font">
+                                            Preview: <span>{{installStatus ? 'After' : 'Before' }}</span> DeNet Installed
+                                        </div>
+                                    </div>
+                                    <div class="flash">
+                                        <preview-card
+                                            :currentCurrencyInfo="currentCurrencyInfo"
+                                            :postData="publishRes"
+                                            :baseFormData="baseFormData"
+                                            :amountFontSize="previewFontSize"
+                                        ></preview-card>
+                                    </div>
+                                    <div class="balance" v-if="Number(baseFormData.amountValue) <= Number(currentCurrencyInfo.balance)">
+                                        <img class="icon" src="@/assets/subject/icon-balance.png" />
+                                        <div class="con">
+                                            <div class="desc">Balance</div>
+                                            <div class="price">{{currentCurrencyInfo.balance}} {{currentCurrencyInfo.tokenSymbol}}</div>
+                                        </div>
+                                        <img
+                                            class="refresh"
+                                            :class="{ 'icon-refresh-rotate': refreshRotate }"
+                                            @click="updateCurrencyBanlce"
+                                            :src=" require('@/assets/svg/icon-form-refresh.svg') "
+                                        />
+                                    </div>
+                                </div>
+                                <!-- 需充值 -->
+                                <div class="card-content" v-if="Number(baseFormData.amountValue) > Number(currentCurrencyInfo.balance)">
+                                    <template v-if="currentCurrencyInfo.currencyCode === 'USD'">
+                                        <div class="card-title">
+                                            <img class="img" :src=" require('@/assets/subject/top-02.svg') " />
+                                            <div class="font">Deposit to Send Giveaway</div>
+                                        </div>
+                                        <div class="card-list">
+                                            <div class="item">
+                                                <div class="l">Giveaway Amount</div>
+                                                <div class="r"></div>
+                                            </div>
+                                            <div class="item">
+                                                <div class="l">Balance</div>
+                                                <div class="r"></div>
+                                            </div>
+                                            <div class="item">
+                                                <div class="l">Paypal charges fee ()</div>
+                                                <div class="r"></div>
+                                            </div>
+                                            <div class="item">
+                                                <div class="l">Deposit Amount</div>
+                                                <div class="r"></div>
+                                            </div>
+                                        </div>
+                                    </template>
+                                    <template v-else>
+                                        <div class="card-title">
+                                            <img class="img" :src=" require('@/assets/subject/top-02.svg') " />
+                                            <div class="font">Deposit to Send Giveaway</div>
+                                        </div>
+                                        <top-up2
+                                            :asyncIng="asyncIng"
+                                            :currentCurrencyInfo="tempCurrentCurrencyInfo"
+                                            @topUpDone="topUpDone">
+                                        </top-up2>
+                                        <div class="card-title">
+                                            <img class="img" :src=" require('@/assets/subject/top-03.svg') " />
+                                            <div class="font">Wait for the amount to arrive</div>
+                                        </div>
+                                        <div class="card-amount">
+                                            <img class="icon" src="@/assets/subject/icon-balance.png" />
+                                            <div class="con">
+                                                <div class="desc">Balance</div>
+                                                <div class="price">{{currentCurrencyInfo.balance}} {{currentCurrencyInfo.tokenSymbol}}</div>
+                                            </div>
+                                            <img
+                                                class="refresh"
+                                                :class="{ 'icon-refresh-rotate': refreshRotate }"
+                                                @click="updateCurrencyBanlce"
+                                                :src=" require('@/assets/svg/icon-form-refresh.svg') "
+                                            />
+                                        </div>
+                                    </template>
+                                </div>
+                            </div>
                         </template>
 
                         <!-- paypal支付按钮 -->
@@ -313,7 +398,7 @@
 </template>
 
 <script setup>
-import { ref, watch, reactive, defineProps, defineEmits, onMounted, nextTick } from "vue";
+import { ref, watch, reactive, defineProps, defineEmits, onMounted, nextTick, provide } from "vue";
 import { postPublish, verifyPaypalResult, syncChainTokenRechargeRecord, getCurrencyInfoByCode } from "@/http/publishApi";
 import { getInviteGuildInfo, saveInviteGuildInfo } from "@/http/discordApi";
 import { payCalcFee, getPayConfig } from "@/http/pay";
@@ -333,7 +418,7 @@ import previewCard from "@/view/iframe/publish/components/preview-card";
 import followInput from "@/view/iframe/publish/components/follow-input";
 import paypalButton from "@/view/iframe/publish/components/paypal-button";
 import topUp from "@/view/iframe/publish/components/top-up.vue";
-
+import topUp2 from "@/view/iframe/publish/components/top-up2.vue";
 const config = {
     number: 'BigNumber',
 }
@@ -345,12 +430,15 @@ let tempCurrentCurrencyInfo = ref({});
 let paypalClientId = ref("");
 let payConfig = ref({});
 let paypalHtml = ref("");
+let installStatus = ref(false);
+let timer = ref(null);
+provide('installStatus', installStatus)
 
 // 发布后返回的结果
 let publishRes = reactive({});
 
 //弹窗是否展示
-let visible = ref(false);
+let visible = ref(true);
 
 //弹窗高度
 let dialogHeight = ref(680);
@@ -362,7 +450,7 @@ let currentComData = {
         title: "Giveaway",
     },
     preview: {
-        title: "Preview",
+        title: "Giveaway",
     },
     topUp: {
         title: "Deposit",
@@ -1033,9 +1121,8 @@ const onIptSetErrorTxt = (params = {}) => {
                 setDiscordErrTxt({getDuildId: true});
             }
         }
-    } else if(currentCurrencyInfo.value.currencyCode != 'USD') {
-        depositGuide.value = true;
-        iptErrMsgTxt.value = `Insufficient ${currentCurrencyInfo.value.tokenSymbol} balance, please deposit`;
+    } else {
+        iptErrMsgTxt.value = ``;
     } 
 }
 
@@ -1249,24 +1336,28 @@ const goTransactionsList = () => {
  */
 const getLocalCurrencyInfoByCode = () => {
     if(!currentCurrencyInfo.value.currencyCode) {
-        getChromeStorage('selectCurrencyInfo', (res) => {
-            if(res && res.currencyCode) {
-                getCurrencyInfoByCode({
-                    params: {
-                        currencyCode: res.currencyCode
-                    }
-                }).then(res => {
-                    if(res.code == 0 && res.data) {
-                        currentCurrencyInfo.value = res.data;
-                        tempCurrentCurrencyInfo.value = res.data;
-                        onIptSetErrorTxt();
-                    }
-                });
-            }
-        })
+        getCurrencyInfo();
     }
 }
 
+const getCurrencyInfo = () => {
+    getChromeStorage('selectCurrencyInfo', (res) => {
+        if(res && res.currencyCode) {
+            getCurrencyInfoByCode({
+                params: {
+                    currencyCode: res.currencyCode
+                }
+            }).then(res => {
+                if(res.code == 0 && res.data) {
+                    currentCurrencyInfo.value = res.data;
+                    tempCurrentCurrencyInfo.value = res.data;
+                    onIptSetErrorTxt();
+                }
+            });
+        }
+    })
+}
+
 onMounted(() => {
     setFrontConfig();
     setPayConfig();
@@ -1283,6 +1374,11 @@ onMounted(() => {
     window.addEventListener('resize', function () {
         setDialogHeight(true);
     })
+    // 更新余额
+    clearInterval(timer.value);
+    timer.value = setInterval(() => {
+        getCurrencyInfo();
+    }, 10000)
 });
 </script>
 
@@ -1557,11 +1653,6 @@ onMounted(() => {
                                 cursor: pointer;
                                 margin-left: 8px;
                             }
-
-                            .icon-refresh-rotate {
-                                transform: rotate(360deg);
-                                transition-duration: 1s;
-                            }
                         }
 
                         .msg {
@@ -1845,4 +1936,119 @@ onMounted(() => {
         }
     }
 }
+
+.preview {
+    padding: 30px 50px;
+    .card {
+        float: left;
+        position: relative;
+        .flash {
+            overflow: hidden;
+            height: 450px;
+            border-radius: 26px;
+            border: solid 1px #ECECEC;
+        }
+        &.center {
+            margin-left: 50%;
+            transform: translateX(-50%);
+        }
+        .balance {
+            position: absolute;
+            display: flex;
+            bottom: 0;
+            right: -350px;
+            .icon {
+                width: 40px;
+                height: 40px;
+            }
+            .con {
+                padding: 0 10px;
+                .desc {
+                    color: rgba($color: #000000, $alpha: 0.5);
+                    font-size: 12px;
+                    margin-bottom: 4px;
+                }
+                .price {
+                    font-size: 16px;
+                    font-weight: bold;
+                }
+            }
+            .refresh {
+                width: 40px;
+                cursor: pointer;
+            }
+        }
+    }
+    .card-title {
+        height: 32px;
+        .img {
+            float: left;
+            width: 20px;
+            height: 20px;
+            margin-right: 8px;
+        }
+        .font {
+            float: left;
+            font-size: 17px;
+            font-weight: 500;
+            span {
+                color: #0091e9;
+            }
+        }
+    }
+    .card-content {
+        float: right;
+        width: 630px;
+    }
+    .card-amount {
+        overflow: hidden;
+        display: flex;
+        height: 40px;
+        padding: 20px;
+        border-radius: 20px;
+        border: 1px solid #E6E6E6;
+        .icon {
+            width: 40px;
+            height: 40px;
+        }
+        .con {
+            flex: 1;
+            padding: 0 10px;
+            .desc {
+                color: rgba($color: #000000, $alpha: 0.5);
+                font-size: 12px;
+                margin-bottom: 4px;
+            }
+            .price {
+                font-size: 16px;
+                font-weight: bold;
+            }
+        }
+        .refresh {
+            cursor: pointer;
+            width: 50px;
+            height: 50px;
+            margin-top: -5px;
+        }
+    }
+    .card-list {
+        padding: 20px;
+        border-radius: 20px;
+        border: 1px solid #E6E6E6;
+        .item {
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+            height: 47px;
+            font-size: 14px;
+            font-weight: 500;
+            box-shadow: inset 0px -1px 0px #EAEAEA;
+        }
+    }
+}
+
+.icon-refresh-rotate {
+    transform: rotate(360deg);
+    transition-duration: 1s;
+}
 </style>