ソースを参照

feat: 新增费率功能/忽略会冲突的文件

liangan 2 週間 前
コミット
5e3e12bce8
2 ファイル変更16 行追加0 行削除
  1. 3 0
      .gitignore
  2. 13 0
      src/pages/wallet/withdraw.vue

+ 3 - 0
.gitignore

@@ -12,6 +12,9 @@ node_modules
 dist
 *.local
 
+env
+manifest.config.ts
+
 # Editor directories and files
 .idea
 *.suo

+ 13 - 0
src/pages/wallet/withdraw.vue

@@ -117,6 +117,16 @@ async function getConfig() {
   }
 }
 
+// 计算服务费
+const serviceFee = computed(() => {
+  const amount = Number(formData.value.amount)
+  if (!amount || Number.isNaN(amount) || !withdrawRate.value) {
+    return '0.00'
+  }
+  const rate = Number(withdrawRate.value)
+  return formatNumber(amount * (rate / 100))
+})
+
 onLoad((options) => {
   getConfig()
   queryParams.value = options
@@ -201,6 +211,9 @@ onLoad((options) => {
               {{ $t('wallet.withdraw.form.allAmount') }}
             </wd-button>
           </view>
+          <view class="text-24rpx">
+            Service Fee:৳{{ serviceFee }}
+          </view>
         </view>
         <wd-button plain block custom-class="h-80rpx!" :loading="loading" @click="submit">
           {{ $t('wallet.withdraw.form.submit') }}