Quellcode durchsuchen

Merge branch 'test' of https://git.yishihui.com/DeNet/de-net into test

zhangwei vor 3 Jahren
Ursprung
Commit
a212ac0efc

+ 4 - 1
src/iframe/home.js

@@ -6,12 +6,15 @@ const app = createApp(App)
 // 引入路由对象实例
 import router from '@/router/popup.js'
 import "ant-design-vue/dist/antd.css"; // or 'ant-design-vue/dist/antd.less'
+import { Button, message } from "ant-design-vue";
 
-import { message } from "ant-design-vue";
 message.config({
     top: `10px`,
     duration: 3,
     maxCount: 1,
 });
+
+app.use(Button);
+app.use(message);
 app.use(router)
 app.mount('#app')

+ 8 - 4
src/view/components/currency-list.vue

@@ -59,7 +59,7 @@
                     </div>
                 </div>
                 <div class="no-data" v-if="!searchList.length">
-                    not found
+                    {{page != 'top-up' ? 'Not found' : 'No balance'}}
                 </div>
             </div>
         </div>
@@ -68,7 +68,7 @@
 
 <script setup>
 /* eslint-disable */
-import { defineEmits, ref, onMounted, defineProps } from "vue";
+import { defineEmits, ref, onMounted, defineProps, defineExpose } from "vue";
 import { getCurrencyInfo, searchCurrencyInfo, syncChainTokenRechargeRecord } from "@/http/publishApi";
 import { debounce } from "@/uilts/help";
 
@@ -226,6 +226,10 @@ onMounted(() => {
     getCurrencyInfoList();
 })
 
+defineExpose({
+    getCurrencyInfoList
+})
+
 </script>
 
 <style scoped lang="scss">
@@ -348,8 +352,8 @@ onMounted(() => {
 
         .no-data {
             font-weight: 500;
-            font-size: 20px;
-            color: #BDBDBD;
+            font-size: 22px;
+            color: #BBBBBB;
             position: absolute;
             top: 50%;
             left: 50%;

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

@@ -82,7 +82,7 @@
                                     <div
                                         class="label currency-select"
                                         :class="{'selected': currentCurrencyInfo.currencyCode}"
-                                        @click="showCurrencyPop = true"
+                                        @click="selectCurrencyPopHandle"
                                     >
                                         <img v-if="currentCurrencyInfo.iconPath"
                                             class="icon"
@@ -191,7 +191,7 @@
                                 </div>
                             </div>
                             <!-- 机器人 -->
-                            <div class="anti-bot-wrapper">
+                            <!-- <div class="anti-bot-wrapper">
                                 <div class="label">
                                     <img
                                         :src="
@@ -214,7 +214,7 @@
                                     />
                                 </div>
                                 <el-switch v-model="openAntiBot" />
-                            </div>
+                            </div> -->
                             <!-- 提示 -->
                             <ul class="tips-wrapper">
                                 <li class="row">
@@ -345,7 +345,7 @@ let showCurrencyPop = ref(false);
 
 let showMoreOption = ref(false);
 
-let currencyListDom = ref(null);
+let currencyListDom = ref('');
 
 let refreshRotate = ref(false);
 
@@ -464,6 +464,15 @@ const setDialogHeight = (resize = false) => {
     }
 };
 
+const selectCurrencyPopHandle = () => {
+    showCurrencyPop.value = true;
+    nextTick(() => {
+        if(currencyListDom.value) {
+            currencyListDom.value.getCurrencyInfoList && currencyListDom.value.getCurrencyInfoList();
+        }
+    })
+}
+
 /**
  * 获取实际支付金额
  */
@@ -591,11 +600,14 @@ const topUpDone = () => {
     showCurrencyPop.value = false;
     showComType.value = 'default';
     calcDomZoom();
+    onIptSetErrorTxt()
+    
     asyncTokenRechRecord((res) => {
         if(res.code == 0 && res.data && res.data.length) {
             let currencyInfo = res.data[0];
             if(currencyInfo.currencyCode == currentCurrencyInfo.value.currencyCode) {
                 currentCurrencyInfo.value.balance = currencyInfo.balance;
+                onIptSetErrorTxt()
             }
         }
     })
@@ -915,7 +927,7 @@ const onIptSetErrorTxt = (params) => {
         iptErrMsgTxt.value = "Enter an amount";
     } else if (!baseFormData.totalCount || baseFormData.totalCount == '0') {
             iptErrMsgTxt.value = "Enter the number of winners";
-    } else if(+baseFormData.amountValue < +currentCurrencyInfo.value.balance) {
+    } else if(+baseFormData.amountValue <= +currentCurrencyInfo.value.balance) {
         let res = calcIptValue();
         if (!res.flag) {
             iptErrMsgTxt.value = `${baseFormData.amountValue} ${currentCurrencyInfo.value.tokenSymbol} Can send up to ${res.count} winners`;

+ 1 - 1
src/view/components/preview-card.vue

@@ -296,7 +296,7 @@ onMounted(() => {
                 }
                 .content-text {
                     position: absolute;
-                    top: 43px;
+                    top: 58px;
                     left: 35px;
                     .title {
                         font-weight: 800;

+ 9 - 6
src/view/popup/popup.vue

@@ -146,7 +146,10 @@
                     </template>
                 </div>
                 <div class="more-list" v-else>
-                    <div class="cell" v-for="(item, index) in moreTabList" :key="index">
+                    <div class="cell" 
+                    v-for="(item, index) in moreTabList" 
+                    :key="index"
+                    @click="moreItemHandle(item)">
                         <img class="icon" :src="item.icon" />
                         <div class="info-wrapper">
                             <div class="left">
@@ -230,11 +233,8 @@ let moreTabList = ref([
     {
         icon: require("@/assets/svg/icon-twitter.svg"),
         label: "Twitter contact",
-    },
-    {
-        icon: require("@/assets/svg/icon-about.svg"),
-        label: "About",
-    },
+        href: 'https://twitter.com/denet2022'
+    }
 ]);
 
 let tabList = ref([
@@ -257,6 +257,9 @@ onMounted(() => {
     });
 });
 
+const moreItemHandle = (params) => {
+    window.open(params.href);
+}
 
 
 /**

+ 1 - 0
src/view/popup/top-up/info.vue

@@ -157,6 +157,7 @@ onMounted(() => {
 .info {
     position: relative;
     height: 100%;
+    overflow-y: auto;
 
     .content {
         padding: 12px 16px 0 16px;