wenliming 2 lat temu
rodzic
commit
a96fab151d

+ 2 - 1
src/view/components/custom-card-horizontal-cover.vue

@@ -20,7 +20,8 @@
                     DeNet.me
                 </div>
                 <div class="desc">
-                    🎁 <template v-if="data.tokenSymbol=='USD'">$</template>{{data.amountValue}} GIVEAWAY
+                    DeNet: An Easy Web3 Tool For GIVEAWAY / AIRDROP
+                    <!-- 🎁 <template v-if="data.tokenSymbol=='USD'">$</template>{{data.amountValue}} GIVEAWAY -->
                 </div>
             </div>
 

+ 28 - 8
src/view/iframe/publish/give-dialog.vue

@@ -875,19 +875,24 @@ const close = () => {
             isBack.value = true;
         } else {
             initParams();
-            emits("close", false);
+            closeDialog();
         }
     }
 };
 
 const closeToolBoxPage = () => {
     if(toolBoxPageData.activePage == "EDITOR") {
-        emits("close", false);
+        closeDialog();
     } else if(toolBoxPageData.activePage == "PREVIEW") {
         toolBoxPageData.activePage = "EDITOR";
     }
 };
 
+const closeDialog = () => {
+    visible.value = false;
+    emits("close", false);
+}
+
 /**
  * 设置弹窗高度
  */
@@ -1529,7 +1534,14 @@ const onUsdEstimateOrderAmountInput = () => {
         val = '0'
     }
     treasureFormData.usdEstimateOrderAmount = val;
+
     calcTokenEstimate({type: 'ORDER_AMOUNT'});
+
+    if(+treasureFormData.usdEstimateFansUnitAmount > val) {
+        treasureFormData.usdEstimateFansUnitAmount = val;
+        calcTokenEstimate({type: 'FANS_AMOUNT'});
+    }
+
     onIptSetErrorTxt();
 
     if(val && treasureFormData.usdEstimateFansUnitAmount) {
@@ -1548,7 +1560,7 @@ const onUsdEstimateFansUnitAmountInput = () => {
         val = '0'
     }
 
-    if(val > treasureFormData.usdEstimateOrderAmount) {
+    if(treasureFormData.usdEstimateOrderAmount !== '' && val > treasureFormData.usdEstimateOrderAmount) {
         val = treasureFormData.usdEstimateOrderAmount
     }
 
@@ -1571,7 +1583,7 @@ const onFansUnitAmountInput = () => {
         val = '0'
     }
 
-    if(+val > +baseFormData.amountValue) {
+    if(baseFormData.amountValue !== '' && +val > +baseFormData.amountValue) {
         val = baseFormData.amountValue
     }
 
@@ -1615,6 +1627,11 @@ const onAmountInput = () => {
     calcUsdEstimate({type: 'ORDER_AMOUNT'});
     onIptSetErrorTxt();
 
+    if(+baseFormData.fansUnitAmountValue > val) {
+        baseFormData.fansUnitAmountValue = val;
+        calcUsdEstimate({type: 'FANS_AMOUNT'});
+    }
+
     if(val && baseFormData.fansUnitAmountValue) {
         treasureFormData.addFans = calcAddFans({totalAmount: val, unitPrice: baseFormData.fansUnitAmountValue});
     }
@@ -2142,10 +2159,13 @@ const getCurrencyInfo = async (_params) => {
         if(currencyCode) {
             let currencyInfoRes = await getCurrencyByCode({currencyCode});
             if(currencyInfoRes.code == 0 && currencyInfoRes.data) {
-                currentCurrencyInfo.value = currencyInfoRes.data;
-                tempCurrentCurrencyInfo.value = currencyInfoRes.data;
-                if(!loop) {
-                    onIptSetErrorTxt();
+                let currentCurrencyCode= currentCurrencyInfo.value.currencyCode;
+                if(currentCurrencyCode && currentCurrencyCode == currencyInfoRes.data.currencyCode || !currentCurrencyCode) {
+                    currentCurrencyInfo.value = currencyInfoRes.data;
+                    tempCurrentCurrencyInfo.value = currencyInfoRes.data;
+                    if(!loop) {
+                        onIptSetErrorTxt();
+                    }
                 }
             }
         }

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

@@ -26,7 +26,9 @@ let selectVisible = ref(false);
 
 const close = () => {
     dialogData.visible = false;
-    hideIframe();
+    setTimeout(() => {
+        hideIframe();
+    }, 500)
 };
 
 const finish = (params) => {

+ 1 - 1
src/view/iframe/publish/tool-box/child/preview.vue

@@ -198,7 +198,7 @@ const publishHandler = () => {
         return;
     }
 
-    if ((!appId || appId && !props.previewData.linkImagePath) && (!props.screenshotWebsiteData.url || !props.screenshotWebsiteData.status)) {
+    if ((!appId || appId && !props.previewData.linkImagePath) && (!props.screenshotWebsiteData.url && !props.screenshotWebsiteData.status)) {
         loadingHide = message.loading('loading...', 0);
         return;
     }

+ 7 - 4
src/view/popup/withdraw/info.vue

@@ -93,6 +93,9 @@ let state = reactive({
 })
 
 const inputWithdrawCalcFee = () => {
+  if(!state.input_amount) {
+    return;
+  }
   withdrawCalcFee({
     params: {
       "amountValue": state.input_amount,
@@ -104,7 +107,7 @@ const inputWithdrawCalcFee = () => {
       if (res.data) {
         state.currency_code = res.data.currencyCode || ''
         state.fee_amount = res.data.feeAmountValue || 0
-        state.amount = res.data.finalAmountValue || 111
+        state.amount = res.data.finalAmountValue > 0 ? res.data.finalAmountValue : 0
         state.is_enter_state = true
         inputText('yes')
       }
@@ -114,6 +117,9 @@ const inputWithdrawCalcFee = () => {
 }
 
 const inputText = (is_check_input) => {
+  if (is_check_input != 'yes') {
+    inputWithdrawCalcFee()
+  }
   if (!state.withdraw_switch) {
     return
   }
@@ -144,9 +150,6 @@ const inputText = (is_check_input) => {
     return
   } else {
     state.error_msg = ''
-    if (is_check_input != 'yes') {
-      inputWithdrawCalcFee()
-    }
   }
 }