zhb 2 ay önce
ebeveyn
işleme
aa06155beb
1 değiştirilmiş dosya ile 23 ekleme ve 64 silme
  1. 23 64
      pages/customer/deposit.vue

+ 23 - 64
pages/customer/deposit.vue

@@ -10,7 +10,7 @@
             <view class="b-card">
                 <view class="card-top">
                     <text class="tit"><text class="iconfont icon-caret-right"></text>{{ t('Custom.Deposit.Title1')
-                    }}</text>
+                        }}</text>
                     <picker mode="selector" :range="loginOptions" :range-key="'label'" @change="onAccountChange"
                         :value="selectedAccountIndex">
                         <view class="picker-view">{{ selectedAccountLabel || t('placeholder.choose') }}</view>
@@ -24,57 +24,10 @@
             <view class="b-card">
                 <view class="card-top">
                     <text class="tit"><text class="iconfont icon-caret-right"></text>{{ t('Custom.Deposit.Title2')
-                    }}</text>
-                    <view v-for="(group, idx) in sortedTableData" :key="idx">
-                        <!-- 分组标题 -->
-                        <text class="channelType" v-if="group.length && group[0].type == 1">{{
-                            t('Custom.Deposit.Channel1') }}</text>
-                        <text class="channelType" v-if="group.length && group[0].type == 2">{{
-                            t('Custom.Deposit.Channel2') }}</text>
-                        <text class="channelType" v-if="group.length && group[0].type == 3">{{
-                            t('Custom.Deposit.Channel3') }}</text>
-                        <text class="channelType" v-if="group.length && group[0].type == 4">{{
-                            t('Custom.Deposit.Channel4') }}</text>
-                        <text class="channelType" v-if="group.length && group[0].type == 5">{{ t('card.title')
                         }}</text>
-
-                        <!-- 卡片列表(原表格) -->
-                        <view class="payment-list">
-                            <view class="payment-card" v-for="item in group" :key="item.code"
-                                @click="isShowStep3(item)">
-                                <view class="icon-wrapper">
-                                    <image class="icon" :src="imgUrl + item.icon" mode="aspectFit" />
-                                </view>
-                                <view class="content">
-                                    <view class="header">
-                                        <text class="title">{{ locale == 'cn' ? item.name : item.enName }}</text>
-                                    </view>
-                                    <view class="info-list">
-                                        <view class="info-item">
-                                            <text class="info-label">{{ t('Label.AmountRange') }}</text>
-                                            <text class="info-value">${{ item.minAmount }} - ${{ item.maxAmount
-                                            }}</text>
-                                        </view>
-                                        <view class="info-item">
-                                            <text class="info-label">{{ t('Label.ProcessingTime') }}</text>
-                                            <text class="info-value">{{ item.fundingTime || '-' }}</text>
-                                        </view>
-                                        <view class="info-item">
-                                            <text class="info-label">{{ t('Label.Fee') }}</text>
-                                            <text class="info-value">{{ item.free != null ? item.free + '%' : '-'
-                                            }}</text>
-                                        </view>
-                                    </view>
-                                    <button class="s-btn" :class="{ active: step3 }" type="primary"
-                                        @click.stop="isShowStep3(item)">
-                                        <text v-if="step3" class="iconfont icon-check"></text>
-                                        <text v-else class="iconfont icon-caret-right"></text>
-                                        <text>{{ step3 ? t('Custom.Deposit.Selected') : t('Custom.Deposit.Choose')
-                                        }}</text>
-                                    </button>
-                                </view>
-                            </view>
-                        </view>
+                    <view v-for="(group, index) in sortedTableData" :key="index">
+                        <view class="channelType" v-if="group.length" v-t="groupTitleMap[group[0].type]" />
+                        <PaymentMethodsList :list="group" @select="isShowStep3" />
                     </view>
                     <view v-if="step3" class="reselect-btn">
                         <button class="s-btn reselect" type="primary" @click="showTable">{{
@@ -138,22 +91,22 @@
                                 t('Custom.Deposit.Title5') }}</text>
                             <view class="wire-transfer-account">
                                 <view class="row"><text class="label SpecialColor">{{ t('Custom.Deposit.bankUname')
-                                }}</text><text class="content SpecialColor">{{ WireTransferAccount.bankUname ||
+                                        }}</text><text class="content SpecialColor">{{ WireTransferAccount.bankUname ||
                                             '--' }}</text></view>
                                 <view class="row"><text class="label">{{ t('Custom.Deposit.bankName') }}</text><text
                                         class="content">{{ WireTransferAccount.bankName || '--' }}</text></view>
                                 <view class="row"><text class="label SpecialColor">{{ t('Custom.Deposit.bankCardNum')
-                                }}</text><text class="content SpecialColor">{{ WireTransferAccount.bankCardNum
+                                        }}</text><text class="content SpecialColor">{{ WireTransferAccount.bankCardNum
                                             || '--' }}</text></view>
                                 <view class="row"><text class="label">{{ t('Custom.Deposit.bankAddr') }}</text><text
                                         class="content">{{ WireTransferAccount.bankAddr || '--' }}</text></view>
                                 <view class="row"><text class="label SpecialColor">{{ t('Custom.Deposit.swiftCode')
-                                }}</text><text class="content SpecialColor">{{ WireTransferAccount.swiftCode ||
+                                        }}</text><text class="content SpecialColor">{{ WireTransferAccount.swiftCode ||
                                             '--' }}</text></view>
                                 <view class="row"><text class="label">{{ t('Custom.Deposit.bankCode') }}</text><text
                                         class="content">{{ WireTransferAccount.bankCode || '--' }}</text></view>
                                 <view class="row"><text class="label SpecialColor">{{ t('Custom.Recording.Note')
-                                }}</text><text class="content SpecialColor">{{ WireTransferAccount.bankMsg ||
+                                        }}</text><text class="content SpecialColor">{{ WireTransferAccount.bankMsg ||
                                             '--' }}</text></view>
                             </view>
                         </view>
@@ -164,7 +117,7 @@
                                 t('Custom.Deposit.DigitalAcc') }}</text>
                             <view class="wire-transfer-account">
                                 <view class="row"><text class="label SpecialColor">{{ t('Custom.Deposit.DigitalName')
-                                }}</text><text class="content SpecialColor">{{ WireTransferAccount.name + '-' +
+                                        }}</text><text class="content SpecialColor">{{ WireTransferAccount.name + '-' +
                                             WireTransferAccount.type }}</text></view>
                                 <view class="row"><text class="label">{{ t('Custom.Withdraw.Title6') }}</text><text
                                         class="content">{{ WireTransferAccount.address || '--' }}</text></view>
@@ -177,11 +130,11 @@
 
                         <!-- 表单字段:金额、预估金额、上传凭证、优惠码 -->
                         <text class="tit"><text class="iconfont icon-caret-right"></text>{{ t('Custom.Deposit.Title3')
-                        }}</text>
+                            }}</text>
                         <view class="form-row">
                             <view class="form-item">
                                 <text class="label">{{ t('Custom.Deposit.Title3') + '(' + channelData.currency + ')'
-                                }}</text>
+                                    }}</text>
                                 <input class="input" v-model="params.amount" type="number" @input="onAmountInput" />
                                 <text class="error" v-if="amountError">{{ amountError }}</text>
                             </view>
@@ -339,7 +292,7 @@
                                         <span>{{ t('news_add_field1.deposit.item4') }}</span>
                                         <span class="clause crm-cursor" @click="dialogClause1 = true">{{
                                             t('news_add_field1.deposit.item5')
-                                        }}</span>
+                                            }}</span>
                                         <span>{{ t('news_add_field1.deposit.item6') }}</span>
                                     </p>
                                 </view>
@@ -363,12 +316,12 @@
                         locale ==
                             'cn' ? channelData.name : channelData.enName }}</text></view>
                     <view class="popup-row" v-if="code"><text class="label">{{ t('news_add_field.Label.Title4')
-                    }}:</text><text>{{ selectCodes }}</text></view>
+                            }}:</text><text>{{ selectCodes }}</text></view>
                     <view class="popup-row"><text class="label">{{ t('Custom.Deposit.Title3') }}:</text><text>{{
                         params.amount
-                    }}({{ channelData.currency }})</text></view>
+                            }}({{ channelData.currency }})</text></view>
                     <view class="popup-row" v-if="channelData.confirmName"><text class="label">{{ t('Label.Name')
-                    }}:</text><text>{{ userName }}</text></view>
+                            }}:</text><text>{{ userName }}</text></view>
                     <view class="popup-row" v-if="channelData.confirmAreaCode">
                         <text class="label">{{ t('placeholder.phone') }}:</text>
                         <input class="small-input" v-model="dialogConfirmForm.confirmAreaCode" />
@@ -488,7 +441,7 @@ import Config from '@/config/index'
 // import tool from '@/global/tool'
 import { initLink } from '@/utils/setUrl'
 import isImageType from '@/global/isImageType'
-
+import PaymentMethodsList from './components/PaymentMethodsList.vue'
 const { t, locale } = useI18n()
 const { Code, Host80, Host04 } = Config
 const imgUrl = Host80
@@ -515,7 +468,13 @@ const countries = [
     "AU", "CA",
     "AL", "AD", "AM", "AT", "AZ", "BY", "BE", "BA", "BG", "HR", "CY", "CZ", "DK", "EE", "FI", "FR", "GE", "DE", "GR", "HU", "IS", "IE", "IT", "XK", "LV", "LI", "LT", "LU", "MT", "MD", "MC", "ME", "NL", "MK", "NO", "PL", "PT", "RO", "RU", "SM", "RS", "SK", "SI", "ES", "SE", "CH", "UA", "VA"
 ]
-
+const groupTitleMap = {
+    1: 'Custom.Deposit.Channel1',
+    2: 'Custom.Deposit.Channel2',
+    3: 'Custom.Deposit.Channel3',
+    4: 'Custom.Deposit.Channel4',
+    5: 'card.title'
+}
 // 响应式数据
 const loginOptions = ref([])
 const selectedAccountIndex = ref(-1)