Browse Source

[bug] fix

wenliming 3 years ago
parent
commit
9a299b9664
3 changed files with 38 additions and 18 deletions
  1. 1 1
      src/iframe/publish.js
  2. 17 8
      src/view/components/give-dialog.vue
  3. 20 9
      src/view/components/top-up.vue

+ 1 - 1
src/iframe/publish.js

@@ -3,7 +3,7 @@ import App from '@/view/publish.vue'
 import ElementPlus from 'element-plus'
 import 'element-plus/dist/index.css'
 
-import "ant-design-vue/dist/antd.css"; // or 'ant-design-vue/dist/antd.less'
+// import "ant-design-vue/dist/antd.css"; // or 'ant-design-vue/dist/antd.less'
 
 import {Button,message} from "ant-design-vue";
 

+ 17 - 8
src/view/components/give-dialog.vue

@@ -288,8 +288,8 @@ import { postPublish, verifyPaypalResult, syncChainTokenRechargeRecord } from "@
 import { payCalcFee, getPayConfig } from "@/http/pay";
 import { getFrontConfig } from "@/http/account";
 import { throttle } from "@/uilts/help"
-import { ElLoading } from "element-plus";
-import { message } from 'ant-design-vue';
+import { ElMessage, ElLoading } from "element-plus";
+import "element-plus/es/components/message/style/css";
 
 import {create, all} from "mathjs";
 
@@ -584,10 +584,10 @@ const topUpDone = () => {
     currentCurrencyInfo.value = tempCurrentCurrencyInfo.value;
     asyncIng.value = true;
     depositGuide.value = false;
+    asyncIng.value = false;
+    showCurrencyPop.value = false;
+    showComType.value = 'default';
     asyncTokenRechRecord((res) => {
-        asyncIng.value = false;
-        showCurrencyPop.value = false;
-        showComType.value = 'default';
         if(res.code == 0 && res.data && res.data.length) {
             let currencyInfo = res.data[0];
             if(currencyInfo.currencyCode == currentCurrencyInfo.value.currencyCode) {
@@ -757,13 +757,22 @@ const payStatusHandle = (payStatus) => {
             initParams();
             break;
         case 2:
-            message.error('Pay Fail');
+            ElMessage({
+                message: "Pay Fail",
+                type: "warning",
+            });
             break;
         case 3:
-            message.error('Pay Exceptions');
+            ElMessage({
+                message: "Pay Exceptions",
+                type: "warning",
+            });
             break;
         case 4:
-            message.error('Pay Exceptions');
+            ElMessage({
+                message: "Pay Exceptions",
+                type: "warning",
+            });
             break;
     }
 }

+ 20 - 9
src/view/components/top-up.vue

@@ -37,13 +37,9 @@
                 Make sure you also selected BNB Smart Chain (BEP20) as the Network on the platform where you are withdrawing funds for this deposiit. Otherwise, you'll lose your assets.
             </div>
         </div>
-        <a-button class="btn-done" 
-            type="primary" 
-            shape="circle" 
-            :loading="asyncIng" 
-            @click="doneHandle">
+        <div class="btn-done" @click="doneHandle">
             DONE
-        </a-button>
+        </div>
     </div>
 </template>
 
@@ -51,7 +47,7 @@
 /* eslint-disable */
 import { defineProps, defineEmits, onMounted, ref } from "vue";
 import { getTokenRechargeAddress } from "@/http/pay";
-import { message } from 'ant-design-vue';
+import { ElMessage } from 'element-plus'
 
 let QRCode = require('qrcode')
 let ClipboardJS = require('clipboard')
@@ -92,7 +88,14 @@ const createQRCode = (str) => {
 const copyToken = () => {
     var clipboard = new ClipboardJS('.copy-btn');
     clipboard.on('success', function (e) {
-        message.success('copy success');
+        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);
@@ -101,7 +104,12 @@ const copyToken = () => {
     });
 
     clipboard.on('error', function (e) {
-        message.error('copy error');
+        ElMessage({
+            message: 'copy error',
+            grouping: true,
+            type: 'error',
+            offset: -16
+        })
         console.error('Action:', e.action);
         console.error('Trigger:', e.trigger);
     });
@@ -233,6 +241,9 @@ onMounted(() => {
         font-size: 16px;
         color: #fff;
         margin-top: 10px;
+        display: flex;
+        align-items: center;
+        justify-content: center;
         cursor: pointer;
     }
 }