wenliming 2 vuotta sitten
vanhempi
commit
c4fb437e6b

+ 3 - 3
src/iframe/publish.js

@@ -3,10 +3,9 @@ import App from '@/view/iframe/publish/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 {Button,message} from "ant-design-vue";
+import "ant-design-vue/dist/antd.css"; // or 'ant-design-vue/dist/antd.less'
 
+import {Button,message,Tooltip} from "ant-design-vue";
 
 message.config({
     top: `10px`,
@@ -17,6 +16,7 @@ message.config({
 const app = createApp(App);
 
 app.use(Button);
+app.use(Tooltip);
 app.use(message);
 app.use(ElementPlus);
 app.mount('#app');

+ 2 - 1
src/iframe/red-packet.js

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

+ 7 - 4
src/uilts/help.js

@@ -80,8 +80,11 @@ export function scaleNumber(num) {
 
 export function getBit (value) {
   const reg = /([0-9]+\.[0-9]{4})[0-9]*/;
-  let str = value.toString();
-  str = str.replace(reg,"$1");
-  console.log(str);
-  return str;
+  if(value) {
+    let str = value.toString();
+    str = str.replace(reg,"$1");
+    return str;
+  } else {
+    return value;
+  }
 }

+ 21 - 5
src/view/components/currency-list.vue

@@ -32,8 +32,16 @@
                                 </div>
                             </div>
                             <div class="right">
-                                <div class="num">{{ data.balance }}</div>
-                                <div class="amount" v-if="data.currencyType == 2">${{ data.usdEstimateBalance }}</div>
+                                <div class="num">
+                                    <a-tooltip :title="data.balance">
+                                        {{ getBit(data.balance) }}
+                                    </a-tooltip>
+                                </div>
+                                <div class="amount" v-if="data.currencyType == 2">
+                                    <a-tooltip :title="'$'+data.usdEstimateBalance">
+                                        ${{ getBit(data.usdEstimateBalance) }}
+                                    </a-tooltip>
+                                </div>
                             </div>
                         </div>
                     </template>
@@ -54,8 +62,16 @@
                         </div>
                     </div>
                     <div class="right">
-                        <div class="num">{{ data.balance }}</div>
-                        <div class="amount" v-if="data.currencyType == 2">${{ data.usdEstimateBalance }}</div>
+                        <div class="num">
+                            <a-tooltip :title="data.balance">
+                                {{ getBit(data.balance) }}
+                            </a-tooltip>
+                        </div>
+                        <div class="amount" v-if="data.currencyType == 2">
+                            <a-tooltip :title="'$'+data.usdEstimateBalance">
+                                ${{ getBit(data.usdEstimateBalance) }}
+                            </a-tooltip>
+                        </div>
                     </div>
                 </div>
                 <div class="no-data" v-if="!searchList.length">
@@ -70,7 +86,7 @@
 /* eslint-disable */
 import { defineEmits, ref, onMounted, defineProps, defineExpose } from "vue";
 import { getCurrencyInfo, searchCurrencyInfo, syncChainTokenRechargeRecord } from "@/http/publishApi";
-import { debounce } from "@/uilts/help";
+import { debounce, getBit } from "@/uilts/help";
 
 const props = defineProps({
     page: {

+ 6 - 1
src/view/components/font-amount.vue

@@ -1,8 +1,13 @@
 <template>
-    <span :style="{ fontSize: amount_font_size + 'px' }">{{ amount }}</span>
+    <span :style="{ fontSize: amount_font_size + 'px' }">
+        <a-tooltip :title="amount">
+            {{ getBit(amount) }}
+        </a-tooltip>
+    </span>
 </template>
 <script setup>
 import { ref, defineProps, onMounted, watch } from 'vue'
+import { getBit } from "@/uilts/help";
 
 let props = defineProps({
     amount: {

+ 24 - 7
src/view/components/popup-transactions.vue

@@ -88,8 +88,10 @@
                                     <template v-if="item.bizData.withdrawStatus == 0 || item.bizData.withdrawStatus == 1">
                                         <div>
                                             <div class="balance">
-                                                <span class="amount" :title="'-'+item.trxAmountValue">
-                                                    -{{ getBit(item.trxAmountValue) || 0 }}
+                                                <span class="amount">
+                                                    <a-tooltip :title="'-'+item.trxAmountValue">
+                                                        -{{ getBit(item.trxAmountValue) || 0 }}
+                                                    </a-tooltip>
                                                 </span>
                                                 <span class="name">{{ item.trxAmountCurrencyInfo.tokenSymbol }}</span>
                                                 <img :src="item.trxAmountCurrencyInfo.iconPath" alt="">
@@ -101,7 +103,11 @@
                                     </template>
                                     <template v-else-if="item.bizData.withdrawStatus == 2">
                                         <div class="balance">
-                                            <span class="amount" :title="'-'+item.trxAmountValue">-{{ getBit(item.trxAmountValue) || 0 }}</span>
+                                            <span class="amount">
+                                                <a-tooltip :title="'-'+item.trxAmountValue">
+                                                    -{{ getBit(item.trxAmountValue) || 0 }}
+                                                </a-tooltip>
+                                            </span>
                                             <span class="name">{{ item.trxAmountCurrencyInfo.tokenSymbol }}</span>
                                             <img :src="item.trxAmountCurrencyInfo.iconPath" alt="">
                                         </div>
@@ -109,7 +115,11 @@
                                     <template v-else-if="item.bizData.withdrawStatus == 3">
                                         <div>
                                             <div class="balance">
-                                                <span class="amount">-{{ item.trxAmountValue || 0 }}</span>
+                                                <span class="amount"> 
+                                                    <a-tooltip :title="'-'+item.trxAmountValue">
+                                                        -{{ getBit(item.trxAmountValue) || 0 }}
+                                                    </a-tooltip>
+                                                </span>
                                                 <span class="name">{{ item.trxAmountCurrencyInfo.tokenSymbol }}</span>
                                                 <img :src="item.trxAmountCurrencyInfo.iconPath" alt="">
                                             </div>
@@ -119,15 +129,22 @@
                                         </div>
                                     </template>
                                     <template v-else>
-                                        <span class="amount">-{{ item.trxAmountValue || 0 }}</span>
+                                        <span class="amount">
+                                            <a-tooltip :title="'-'+item.trxAmountValue">
+                                                -{{ getBit(item.trxAmountValue) || 0 }}
+                                            </a-tooltip>
+                                        </span>
                                         <span class="name">{{ item.trxAmountCurrencyInfo.tokenSymbol }}</span>
                                         <img :src="item.trxAmountCurrencyInfo.iconPath" alt="">
                                     </template>
                                 </template>
                                 <!-- 收入 -->
                                 <template v-else>
-                                    <span class="amount" :title="'-'+item.trxAmountValue">
-                                        <template v-if="item.bizType == -2">-</template>{{ getBit(item.trxAmountValue) || 0 }}
+                                    <span class="amount">
+                                        <template v-if="item.bizType == -2">-</template>
+                                        <a-tooltip :title="item.bizType == -2 ? '-' + item.trxAmountValue : item.trxAmountValue">
+                                            {{ getBit(item.trxAmountValue) || 0 }}
+                                        </a-tooltip>
                                     </span>
                                     <span class="name">{{ item.trxAmountCurrencyInfo.tokenSymbol }}</span>
                                     <img :src="item.trxAmountCurrencyInfo.iconPath" alt="">

+ 5 - 3
src/view/iframe/publish/give-dialog.vue

@@ -144,7 +144,9 @@
                                         Balance
                                     </div>
                                     <div class="amount">
-                                        {{currentCurrencyInfo.balance}}
+                                        <a-tooltip :title="currentCurrencyInfo.balance">
+                                            {{ getBit(currentCurrencyInfo.balance) }}
+                                        </a-tooltip>
                                         <img
                                             :class="{ 'icon-refresh-rotate': refreshRotate }"
                                             @click="updateCurrencyBanlce"
@@ -319,7 +321,7 @@ import { getInviteGuildInfo, saveInviteGuildInfo } from "@/http/discordApi";
 import { payCalcFee, getPayConfig } from "@/http/pay";
 import { getFrontConfig } from "@/http/account";
 import {setChromeStorage, getChromeStorage} from "@/uilts/chromeExtension"
-import { debounce } from "@/uilts/help"
+import { debounce, getBit } from "@/uilts/help"
 import Report from "@/log-center/log"
 import { ElMessage, ElLoading } from "element-plus";
 import "element-plus/es/components/message/style/css";
@@ -1293,7 +1295,7 @@ onMounted(() => {
     right: 0;
     bottom: 0;
     left: 0;
-    z-index: 2000;
+    z-index: 1000;
     height: 100%;
     background-color: rgba(0, 0, 0, 0.5);
     overflow: auto;

+ 3 - 1
src/view/iframe/publish/publish.vue

@@ -39,6 +39,8 @@ window.addEventListener("message", function (event) {
 </script>
 
 <style>
-.main_app {
+html, body {
+    background-color: rgba(255,255,255,0)!important;
+    line-height: unset !important;
 }
 </style>

+ 52 - 9
src/view/iframe/red-packet/red-packet.vue

@@ -132,9 +132,18 @@
       </div>
       <div class="luck-list-title">
         <div>{{ state.detail.receiveCount || 0 }}/{{ state.detail.totalCount || 0 }} Winners</div>
-        <div> {{ state.detail.receiveAmountValue }} / {{ state.detail.amountValue || '' }} {{
-            state.detail.currencySymbol || ''
-        }}</div>
+        <div class="right"> 
+          <span class="text">
+            <a-tooltip :title="state.detail.receiveAmountValue">
+              {{ getBit(state.detail.receiveAmountValue) }}
+            </a-tooltip>
+            / 
+            <a-tooltip :title="state.detail.amountValue">
+              {{ getBit(state.detail.amountValue) || ''}}
+            </a-tooltip>
+          </span>
+          {{ state.detail.currencySymbol || '' }}
+        </div>
       </div>
       <div class="luck-list max" @scroll="handleScroll($event)">
         <div class="luck-item" v-for="item, i in state.detail.allReceived" v-bind:key="i">
@@ -149,7 +158,11 @@
           </div>
           <div class="luck-money">
             <img :src="state.detail.currencyIconPath" alt />
-            <div class="luck-money-txt">{{ showLastTwoPlace(item.amountValue) || 0 }}</div>
+            <div class="luck-money-txt">
+                <a-tooltip :title="item.amountValue">
+                  {{ getBit(item.amountValue) }}
+                </a-tooltip>
+            </div>
           </div>
           <div class="luck-king" v-if="item.maxAmount">
             <img :src="require('@/assets/svg/icon-king-hat.svg')" alt />
@@ -189,7 +202,16 @@
       </div>
       <div class="luck-list-title">
         <div>{{ state.detail.receiveCount || 0 }}/{{ state.detail.totalCount || 0 }} Winners</div>
-        <div> {{ state.detail.receiveAmountValue }} / {{ state.detail.amountValue || '' }} {{
+        <div class="right"> 
+          <span class="text">
+            <a-tooltip :title="state.detail.receiveAmountValue">
+              {{ getBit(state.detail.receiveAmountValue) }}
+            </a-tooltip>
+            / 
+            <a-tooltip :title="state.detail.amountValue">
+              {{ getBit(state.detail.amountValue) || '' }}
+            </a-tooltip>
+          </span> {{
             state.detail.currencySymbol || ''
         }}</div>
       </div>
@@ -205,7 +227,11 @@
           </div>
           <div class="luck-money">
             <img :src="state.detail.currencyIconPath" alt />
-            <div class="luck-money-txt">{{ showLastTwoPlace(item.amountValue) }}</div>
+            <div class="luck-money-txt">
+              <a-tooltip :title="item.amountValue">
+                {{ getBit(item.amountValue) }}
+              </a-tooltip>
+            </div>
           </div>
 
           <div class="luck-king" v-if="item.maxAmount">
@@ -235,7 +261,16 @@
 
       <div class="luck-list-title">
         <div>{{ state.detail.receiveCount || 0 }}/{{ state.detail.totalCount || 0 }} Winners</div>
-        <div> {{ state.detail.receiveAmountValue }} / {{ state.detail.amountValue || '' }} {{
+        <div class="right"> 
+          <span class="text">
+            <a-tooltip :title="state.detail.receiveAmountValue">
+              {{ getBit(state.detail.receiveAmountValue) }}
+            </a-tooltip>
+            / 
+            <a-tooltip :title="state.detail.amountValue">
+              {{ getBit(state.detail.amountValue || '') }}
+            </a-tooltip>
+          </span> {{
             state.detail.currencySymbol || ''
         }}</div>
       </div>
@@ -252,7 +287,11 @@
           </div>
           <div class="luck-money">
             <img :src="state.detail.currencyIconPath" alt />
-            <div class="luck-money-txt">{{ showLastTwoPlace(item.amountValue) || 0 }}</div>
+            <div class="luck-money-txt">
+                <a-tooltip :title="item.amountValue">
+                  {{ getBit(item.amountValue) }}
+                </a-tooltip>
+            </div>
           </div>
           <div class="luck-king" v-if="item.maxAmount">
             <img :src="require('@/assets/svg/icon-king-hat.svg')" alt />
@@ -298,7 +337,7 @@ export default {
 <script setup>
 import { onMounted, reactive, ref } from "vue";
 import { getPostDetail, getRedPacket, finishRedPacket, oneKeyLike, oneKeyReTweet, oneKeyFollow, getTaskDetail, getReceivedList } from '@/http/redPacket.js'
-import { getQueryString, guid } from '@/uilts/help.js'
+import { getQueryString, guid, getBit } from '@/uilts/help.js'
 import { message } from 'ant-design-vue';
 import FontAmount from '@/view/components/font-amount.vue'
 import GetMore from '@/view/iframe/publish/components/get-more.vue'
@@ -1542,6 +1581,10 @@ body {
       div:last-child {
         text-align: right;
       }
+  
+      .text {
+        cursor: pointer;
+      }
     }
 
     .luck-list {

+ 14 - 3
src/view/popup/popup.vue

@@ -13,7 +13,11 @@
                         <img :src="require('@/assets/svg/icon-home-bill.svg')" />
                     </div>
                 </div>
-                <div class="amount">${{ canWithdrawBalance }}</div>
+                <div class="amount">
+                    <a-tooltip :title="'$'+canWithdrawBalance">
+                        ${{ getBit(canWithdrawBalance) }}
+                    </a-tooltip>
+                </div>
                 <div class="area-btn">
                     <div class="withdraw-btn" @click="clickWithdraw">Withdraw</div>
                     <div class="top-up-btn" @click="clickTopUp">Deposit</div>
@@ -88,7 +92,10 @@
                                                 </template>
                                                 <!-- 已完成 -->
                                                 <template v-else-if="item.status == 1">
-                                                    <span class="blance" :title="item.amount">{{ getBit(item.amount) }}</span>
+                                                    <span class="blance">
+                                                        <a-tooltip :title="item.amount">
+                                                            {{ getBit(item.amount) }}</a-tooltip>
+                                                    </span>
                                                     <span class="coin-type">{{ item.currencySymbol || '' }}</span>
                                                     <img :src="item.currencyIconPath" alt="">
                                                 </template>
@@ -99,7 +106,11 @@
                                             </template>
                                             <!-- 发出去的 -->
                                             <template v-else-if="item.type == 2">
-                                                <span class="blance" :title="'-'+item.amount">-{{ item.amount }}</span>
+                                                <span class="blance">
+                                                    <a-tooltip :title="'-' + item.amount">
+                                                        -{{ getBit(item.amount) }}
+                                                    </a-tooltip>
+                                                </span>
                                                 <span class="coin-type">{{ item.currencySymbol || '' }}</span>
                                                 <img :src="item.currencyIconPath" alt="">
                                             </template>

+ 2 - 1
src/view/popup/withdraw/info.vue

@@ -59,7 +59,7 @@
       <div class="left">
         <div class="txt">Receive Amount</div>
         <div class="money">{{ state.amount || 0 }} {{ state.currency_code }}</div>
-        <div class="txt"> Network Fee: <a-tooltip :title="state.fee_amount">{{ numToFixed(state.fee_amount) }}</a-tooltip> {{ withdraw_info.token_symbol }} </div>
+        <div class="txt"> Network Fee: <a-tooltip :title="state.fee_amount">{{ getBit(state.fee_amount) }}</a-tooltip> {{ withdraw_info.token_symbol }} </div>
       </div>
       <div class="right">
         <div class="btn" @click="clickBtn" :class="{ enter: state.is_enter_state }">Confirm</div>
@@ -76,6 +76,7 @@ import { reactive, onMounted, inject } from 'vue'
 import { getWithdrawConfig } from "@/http/account";
 import { withdrawCalcFee } from "@/http/pay";
 import Report from "@/log-center/log";
+import { getBit } from "@/uilts/help";
 
 let withdraw_info = inject('withdraw_info')