zhb 2 месяцев назад
Родитель
Сommit
14daddbd86

+ 2 - 2
components/cwg-tabs.vue

@@ -43,8 +43,8 @@ const handleTabClick = (index: number) => {
         align-items: center;
         gap: px2rpx(4);
         border: 1px solid #f3f4f6;
-        font-size: px2rpx(18);
-        padding: px2rpx(12);
+        font-size: px2rpx(16);
+        padding: px2rpx(8) px2rpx(12);
         border-radius: px2rpx(2);
         background-color: white;
         justify-content: center;

+ 18 - 10
pages/customer/components/AccountCard.vue

@@ -78,7 +78,7 @@
             <view class="info-section">
                 <view class="info-column">
                     <cwg-label-line-value :label="t('Label.Leverage')" :value="account.actualLeverage" />
-                    <cwg-label-line-value :label="t('Documentary.console.item5')" :value="account.floatingPL" />
+                    <cwg-label-line-value :label="t('Label.FloatingPL')" :value="account.floatingPL" />
                     <cwg-label-line-value :label="t('Label.Balance')" :value="account.balanceWithSymbol" />
                 </view>
                 <view class="info-column">
@@ -99,6 +99,7 @@
                     </view>
                 </view>
 
+                <view class="divider"></view>
                 <!-- 更改交易密码按钮 -->
                 <view class="change-password-btn" @click="handleAction('changePassword1')" v-if="!isDemo">
                     <text class="btn-icon">
@@ -115,7 +116,8 @@
         <TerminalChangePasswordDialog v-model:visible="terminalChangePasswordDialogVisible" :pwdType="pwdType"
             :account="account" :accountLabel="t('Documentary.tradingCenter.item29') + ' # '" />
         <TerminalInfoDialog v-model:visible="terminalInfoDialogVisible" :accountNumber="accountInfo.login"
-            :form="accountInfo" :fieldList="fieldList" :title="t('Documentary.TundManagement.item29')" :accountLabel="t('Documentary.tradingCenter.item29') + ' # '" />
+            :form="accountInfo" :fieldList="fieldList" :title="t('Documentary.TundManagement.item29')"
+            :accountLabel="t('Documentary.tradingCenter.item29') + ' # '" />
     </view>
 </template>
 
@@ -175,14 +177,14 @@ const actionButtons = computed(() => [
     { key: 'transfer', label: 'Custom.Index.Transfer', icon: 'crm-transfer', color: '#2e3a47', primary: false, action: 'transfer', needDemo: isDemo.value, disabled: !(closeFunctionOpen('5') && closeFunctionOpen('6') && closeFunctionOpen('3')) }
 ])
 const fieldList = ref([
-    { label: 'Custom.PaymentHistory.AccountType', key: 'nickname', copyable: false },
-    { label: 'Label.Leverage', key: 'actualLeverage', copyable: false },
-    { label: 'Documentary.console.item5', key: 'floatingPL', copyable: false },
-    { label: 'Label.Balance', key: 'balanceWithSymbol', copyable: false },
-    { label: 'Label.Equity', key: 'equityWithSymbol', copyable: false },
-    { label: 'Label.Credit', key: 'creditWithSymbol', copyable: false },
-    { label: 'Documentary.console.item3', key: 'platform', copyable: false },
-    { label: 'Documentary.console.item4', key: 'login', copyable: true }
+    { label: t('Custom.PaymentHistory.AccountType'), key: 'nickname', copyable: false },
+    { label: t('Label.Leverage'), key: 'actualLeverage', copyable: false },
+    { label: t('Label.FloatingPL'), key: 'floatingPL', copyable: false },
+    { label: t('Label.Balance'), key: 'balanceWithSymbol', copyable: false },
+    { label: t('Label.Equity'), key: 'equityWithSymbol', copyable: false },
+    { label: t('Label.Credit'), key: 'creditWithSymbol', copyable: false },
+    { label: t('Documentary.console.item3'), key: 'platform', copyable: false },
+    { label: t('Documentary.console.item4'), key: 'login', copyable: true }
 ])
 const nickName = ref(accountInfo.value.nickName)
 
@@ -597,6 +599,12 @@ onBeforeUnmount(() => {
             }
         }
 
+        .divider {
+            width: 1px;
+            height: px2rpx(20);
+            border-left: 1px solid rgba(108, 133, 149, 0.5);
+        }
+
         .change-password-btn {
             background: transparent;
             box-sizing: border-box;

+ 1 - 1
pages/customer/components/AccountList.vue

@@ -250,7 +250,7 @@ onMounted(async () => {
     display: flex;
     justify-content: space-between;
     align-items: center;
-    font-size: px2rpx(20);
+    font-size: px2rpx(22);
     font-weight: 500;
     color: var(--color-slate-800);
     background-color: rgba(255, 255, 255, 0);

+ 1 - 1
pages/customer/components/CheckPopup.vue

@@ -55,7 +55,7 @@ const close = () => {
 };
 //支付历史
 const toHistory = () => {
-  uni.navigateTo({ url: "/pages/customer/history" })
+  uni.navigateTo({ url: "/pages/customer/payment-history" })
 }
 // 去支付
 const GoPayBtn = () => {

+ 2 - 1
pages/customer/components/PaymentMethodsList.vue

@@ -16,7 +16,8 @@
           </view>
           <view class="info-item">
             <text class="info-label" v-t="'Label.Fee'" />
-            <text class="info-value">{{ item.free != null ? item.free + '%' : '-' }}</text>
+            <text class="info-value" v-if="item.feeType==1">{{ item.free != null ? item.free + '%' : '-' }}</text>
+            <text class="info-value" v-else-if="item.feeType==2">${{ item.feeAmount != null ? item.feeAmount  : '0' }}</text>
           </view>
           <view class="info-item">
             <text class="info-label">限制</text>

+ 2 - 2
pages/customer/components/TerminalChangePasswordDialog.vue

@@ -1,6 +1,6 @@
 <template>
-    <cwg-popup :title="props.pwdType == 1 ? t('Custom.Settings.LoginPwd') : t('Custom.Settings.InvestorPwd')"
-        :visible="props.visible" :showFooter="false" @update:visible="$emit('update:visible', $event)">
+    <cwg-popup :title="props.pwdType == 1 ? t('vu.item3') : t('vu.item4')"
+        :visible="props.visible" :showFooters="false" @update:visible="$emit('update:visible', $event)">
         <view class="popup-content">
             <text class="account-number">{{ accountLabel }} {{ account.login }}</text>
 

+ 4 - 2
pages/customer/components/WithdrawCheckConfirmPopup.vue

@@ -1,13 +1,13 @@
 <template>
   <cwg-popup v-model:visible="visible" type="center" :mask-click="false" :showFooters="true" :showClose="false"
-    :title="t('Home.page_customer.item3')">
+    :title="title">
     <view class="popup-content">
       <view class="info-section">
         <cwg-label-line-value :label="t('Custom.Deposit.Title11')" :value="login" v-if="login" />
         <cwg-label-line-value :label="t('Custom.Deposit.Title22')"
           :value="locale == 'cn' ? channelData.name : channelData.enName" v-if="channelData.code" />
         <cwg-label-line-value :label="t('news_add_field.Label.Title4')" :value="selectCodes" v-if="code" />
-        <cwg-label-line-value :label="t('Custom.Withdraw.Title3')" :value="params.amount + ' ' + channelData.currency"
+        <cwg-label-line-value :label="t('Custom.Withdraw.Title3')" :value="params.amount + ' (' + channelData.currency + ')'"
           v-if="params.amount" />
         <cwg-label-line-value :label="t('Custom.Withdraw.item7')" :value="''" v-if="type !== 'IB'">
           <template #operation1>
@@ -49,6 +49,8 @@ const props = defineProps({
   FreeNumber: Number,
   dialogCheckConfirm_form: Object,
   type: String,
+  title: String,
+
   // 其他可能需要的 props
 });
 const emit = defineEmits(['update:visible', 'confirm', 'cancel']);

+ 32 - 3
pages/customer/deposit.vue

@@ -558,6 +558,25 @@ const params = reactive({
     agree5: false,
     agree6: false
 })
+const resetForm = () => {
+    //表单重置后,需要手动重置一些状态
+    params.amount = ""
+    params.amount1 = ""
+    params.promoCode = ""
+    params.agree = false
+    params.agree2 = false
+    params.agree3 = false
+    params.agree4 = false
+    params.agree5 = false
+    params.agree6 = false
+    form.bankUname = undefined
+    form.bankCardNum = undefined
+    form.cvv = undefined
+    form.expiryMonth = undefined
+    form.expiryYear = undefined
+    form.pin = undefined
+    amountErrorMessage.value = ""
+}
 const formRef = ref(null)
 const mAmount = reactive({
     minAmount: "",
@@ -1503,6 +1522,10 @@ const isShowStep3 = (row) => {
 }
 //更换支付方式
 const showTable = () => {
+    resetForm();
+    dialogCheckWait.value = false;
+    dialogVisible.value = false;
+    flag.value = false;
     form.bankUname = undefined
     form.bankCardNum = undefined
     form.cvv = undefined
@@ -1762,11 +1785,17 @@ onMounted(() => {
     isNewYear24Open()
     ActivityRequiteInfo()
 })
-
+watch(isStep3, async (newVal) => {
+    if (newVal) {
+        await nextTick();
+        formRef.value?.clearValidate();   // 先清除旧错误
+        resetForm();                      // 再重置数据(重置数据可能触发新校验)
+        await nextTick();
+        formRef.value?.clearValidate();   // 再次清除可能因数据重置产生的新错误
+    }
+});
 // Watch
 watch(loginValue, (login) => {
-    console.log(login, 1111);
-
     if (login) {
         step2.value = true
         showTable()

+ 35 - 0
pages/customer/payment-history.vue

@@ -144,6 +144,41 @@ const orderStatusMap = computed(() => ([
     { value: 6, text: t('State.Cancelled') },
 ]));
 const isZh = computed(() => ['cn', 'zh', 'zhHant'].includes(locale.value));
+
+const time = computed(() => {
+    let timezone = 2; //目标时区时间,东3区   东时区正数 西市区负数
+    let offset_GMT = new Date().getTimezoneOffset(); // 本地时间和格林威治的时间差,单位为分钟
+    let nowDate = new Date().getTime(); // 本地时间距 1970 年 1 月 1 日午夜(GMT 时间)之间的毫秒数
+    let now = new Date(
+        nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000
+    );
+
+    //当前时间
+    let hh = now.getHours(); //时
+    let mm = now.getMinutes(); //分
+    let ss = now.getSeconds(); //分
+    let clock;
+    let year = now.getFullYear(); //年
+    let month = now.getMonth() + 1; //月
+    let day = now.getDate(); //日
+    if (month < 10) {
+        month = "0" + month;
+    }
+    if (day < 10) {
+        day = "0" + day;
+    }
+    if (hh < 10) {
+        hh = "0" + hh;
+    }
+    if (mm < 10) {
+        mm = "0" + mm;
+    }
+    if (ss < 10) {
+        ss = "0" + ss;
+    }
+    clock = year + "-" + month + "-" + day + " " + hh + ":" + mm + ":" + ss;
+    return clock;
+})
 // 表格列配置
 const columns = ref([
     {

+ 15 - 1
pages/customer/transfer.vue

@@ -114,7 +114,7 @@
 </template>
 
 <script setup>
-import { ref, reactive, computed, onMounted, watch } from 'vue'
+import { ref, reactive, computed, onMounted, watch, nextTick } from 'vue'
 import { useI18n } from 'vue-i18n'
 import { onLoad, onReady } from '@dcloudio/uni-app'
 import { getCurrentInstance } from 'vue'
@@ -342,6 +342,8 @@ const toTransfer = async () => {
         }
     } finally {
         submitting.value = false;
+        flag.value = false;
+        resetForm()
         if (dialogCheckWait.value) dialogCheckWait.value = false;
     }
 };
@@ -468,11 +470,23 @@ onMounted(() => {
     getAmount()
     getTransferSystemDropdown()
 })
+const resetForm = async () => {
+    await nextTick();
+    formRef.value?.clearValidate();   // 再次清除可能因数据重置产生的新错误
+    form.customBankCode = ""
+    form.depositLogin = ""
+    form.withdrawLogin = ""
+    form.amount = ""
+    amountErrorMessage.value = ""
+    submitting.value = false;
+    flag.value = false;
 
+}
 // 侦听器
 watch(loginValue, (newVal) => {
     if (newVal) {
         step2.value = true
+        resetForm()
         form.withdrawLogin = Number(loginValue.value)
         toOptions.value = []
         if (transferType.value === 'internal') {

+ 51 - 23
pages/customer/withdrawal.vue

@@ -29,7 +29,7 @@
             </view>
             <view v-if="step3" class="reselect-btn">
               <button class="s-btn reselect" type="primary" @click="showTable">{{ t('Custom.Deposit.Reselect')
-              }}</button>
+                }}</button>
             </view>
           </view>
         </view>
@@ -52,7 +52,7 @@
               </view>
             </view>
             <!-- 表单 -->
-            <uni-forms ref="formRef" :model="form" :rules="rules" labelWidth="200" label-position="top" v-if="isStep3"
+            <uni-forms ref="formRef" :model="form" :rules="rules" labelWidth="200" label-position="top" v-show="isStep3"
               class="base-info-form" validate-trigger="submit">
               <uni-row class="demo-uni-row uni-row1">
                 <!-- 银行选择(针对有银行列表的通道) -->
@@ -121,7 +121,7 @@
                     <text>{{ t('Custom.Withdraw.addBank') }}</text>
                     <text class="add-btn crm-cursor" @click="openAddBankCard('add_bankCard')">{{
                       t('Custom.Withdraw.addBank1')
-                      }}</text>
+                    }}</text>
                   </view>
                   <view class="add-back" v-else-if="channelData.type === 'CHANNEL_TYPE_CARD'">
                     <text>{{ t('PersonalManagement.Label.addCreditCard') }}</text>
@@ -129,7 +129,7 @@
                       t('Custom.Withdraw.addBank1') }}</text>
                   </view>
 
-                  <uni-forms-item :label="t('placeholder.choose')">
+                  <uni-forms-item :label="t('Custom.Withdraw.Title4')">
                     <cwg-combox :clearable="false" v-model:value="myId" :options="bankCardOptions" @change="chooseBank"
                       :placeholder="t('placeholder.choose')" />
                   </uni-forms-item>
@@ -243,7 +243,7 @@
       <!-- 提示弹窗 -->
       <cwg-tips-popup v-model:visible="dialogTips" content="Custom.Withdraw.item2" @confirm="closeTipsConfirm" />
       <!-- 弹窗:确认信息 -->
-      <cwg-check-confirm-popup v-model:visible="dialogCheckConfirm" :title="t('Home.page_customer.item2')"
+      <cwg-check-confirm-popup v-model:visible="dialogCheckConfirm" :title="t('Home.page_customer.item3')"
         :channelData="channelData" :code="code" :selectCodes="selectCodes" :params="form" :FreeNumber="FreeNumber"
         :userName="userName" :dialogCheckConfirm_form="dialogCheckConfirm_form" :login="loginValue" @confirm="submit" />
       <!-- 协议弹窗 -->
@@ -267,7 +267,7 @@
 </template>
 
 <script setup>
-import { ref, reactive, computed, onMounted, onUnmounted, watch, getCurrentInstance } from 'vue'
+import { ref, reactive, computed, onMounted, nextTick, watch, getCurrentInstance } from 'vue'
 import { onLoad } from '@dcloudio/uni-app'
 import { showToast } from "@/utils/toast";
 import { isAfterJuly28 } from '@/utils/dateUtils'
@@ -357,6 +357,25 @@ const form = reactive({
   agree3: false          // 协议勾选3(当dialogTipsIsShow为true时显示)
 })
 const formRef = ref(null)
+const resetForm = () => {
+  //表单重置后,需要手动重置一些状态
+  form.amount = ""
+  form.amount1 = ""
+  form.bankCode = ""
+  form.address = ""
+  form.addressName = ""
+  form.addressProve = ""
+  form.bankUname = ""
+  form.bankCardNum = ""
+  form.swiftCode = ""
+  form.customBankCode = ""
+  form.bankAddr = ""
+  form.agencyNo = ""
+  form.cpf = ""
+  form.agree2 = false
+  form.agree3 = false
+  amountErrorMessage.value = ""
+}
 //数量区间
 const mAmount = reactive({
   minAmount: "",
@@ -512,7 +531,6 @@ const rules = computed(() => ({
     rules: [
       {
         validateFunction: (rule, value, data, callback) => {
-          console.log(form.agree3, value, data, 121212);
 
           if (form.agree3) {
             return true;
@@ -615,7 +633,8 @@ const bankOptions = computed(() => {
 const digitalOptions = computed(() => {
   return ruleForm.bankBlockchain.map((item, index) => ({
     text: `${item.addressName}-${item.address}`,
-    value: item.id
+    value: item.id,
+    disable: item.authStatus == 0,
   }))
 })
 
@@ -637,6 +656,7 @@ const bankList = computed(() => {
   if (channelData.value.type === 'BANK') return ruleForm.bankInfo
   if (channelData.value.type === 'BANK_TELEGRAPHIC') return ruleForm.bankWrit
   if (channelData.value.type === 'CHANNEL_TYPE_CARD') return ruleForm.xykInfo
+  if (channelData.value.type === 'DIGITAL_CURRENCY') return ruleForm.bankBlockchain
   return []
 })
 const isFree = computed(() => {
@@ -809,7 +829,6 @@ function openAddUnionpay() {
 }
 function openAddBank() {
   const wallets = bankCardOptions.value || []
-  console.log(wallets, 121212)
   if (wallets.length === 0) {
     addBankDialogRef.value?.open(2);
     return;
@@ -899,7 +918,7 @@ const onDigitalCurrencyChange = (val) => {
   chooseBank(item)
 }
 
-function chooseBank(id) {
+function chooseBank({ id }) {
   const item = bankList.value.find(b => b.id === id)
   if (!item) {
     showToast(t("Msg.item11"));
@@ -911,6 +930,7 @@ function chooseBank(id) {
       return;
     }
   }
+
   let codeTmp = "";
   if (form.bankCode) {
     codeTmp = form.bankCode;
@@ -944,22 +964,13 @@ function selectCode(codeVal) {
 
 //关闭提交后的弹出框
 function closeDia() {
+  resetForm()
   isStep3.value = false;
   step2.value = false;
   showTable();
   loginValue.value = "";
   dialogCheck.value = false;
   dialogVisible.value = false;
-  form.amount = ''
-  form.addressName = ''
-  form.address = ''
-  form.addressProve = ''
-  form.bankCode = ''
-  form.currency = ''
-  form.agree2 = false;
-  form.agree3 = false;
-
-  console.log(dialogCheck.value, dialogVisible.value, dialogSuccess.value);
 
 }
 
@@ -1323,7 +1334,9 @@ function toShop() {
 //选择支付方式
 function isShowStep3(row) {
   console.log(row, 222);
-
+  dialogCheckWait.value = false;
+  dialogVisible.value = false;
+  flag.value = false;
   //判断是否有bank
   if (row.bankValid && isChannel.value) {
     getBankList(row);
@@ -1365,18 +1378,24 @@ function isShowStep3(row) {
   if (row.type === 'CHANNEL_TYPE_ALI_WALLET') tableData.CHANNEL_TYPE_ALI_WALLET = [row]
   introduce.introduce = row.introduce
   introduce.enIntroduce = row.enIntroduce
+
+  // 重置表单并清除校验结果
+  resetForm();
+
+
 }
 //更换支付方式
 function showTable() {
+  resetForm()
   myId.value = null;
   step3.value = false;
   isStep3.value = false;
   isChannel.value = true;
+
   getDepositList();
 
-  if (formRef.value) formRef.value.clearValidate()
+
   form.currency = "USD";
-  // 注意:原代码中 form.amount 和 form.amount1 没有重置,但 resetFields 应该做了
 }
 
 //获取账户信息
@@ -1569,6 +1588,15 @@ watch(loginValue, (newVal) => {
     showTable();
   }
 });
+watch(isStep3, async (newVal) => {
+  if (newVal) {
+    await nextTick();
+    formRef.value?.clearValidate();   // 先清除旧错误
+    resetForm();                      // 再重置数据(重置数据可能触发新校验)
+    await nextTick();
+    formRef.value?.clearValidate();   // 再次清除可能因数据重置产生的新错误
+  }
+});
 
 watch(() => form.amount, (newVal) => {
   if (newVal && channelData.value.rate) {

+ 22 - 8
pages/ib/agent-transfer.vue

@@ -52,8 +52,7 @@
                                 <view class="form-row">
                                     <view class="form-col">
                                         <!-- 转入账户 -->
-                                        <uni-forms-item :label="t('Custom.Transfer.IntoAccount')" name="depositLogin"
-                                            :error-message="depositErrorMessage">
+                                        <uni-forms-item :label="t('Custom.Transfer.IntoAccount')" name="depositLogin">
                                             <cwg-combox v-model:value="form.depositLogin" :clearable="false"
                                                 :options="depositDisplayList" :placeholder="t('placeholder.choose')" />
                                         </uni-forms-item>
@@ -61,7 +60,7 @@
                                     <view class="form-col">
                                         <!-- 确认转入账户 -->
                                         <uni-forms-item :label="t('Custom.Transfer.ConfirmIntoAccount')"
-                                            name="depositLogin1" :error-message="depositLogin1ErrorMessage">
+                                            name="depositLogin1">
                                             <cwg-combox v-model:value="form.depositLogin1" :clearable="false"
                                                 :options="depositDisplayList" :placeholder="t('placeholder.choose')" />
                                         </uni-forms-item>
@@ -177,7 +176,7 @@
 </template>
 
 <script setup>
-import { ref, reactive, computed, onMounted, watch } from 'vue'
+import { ref, reactive, computed, onMounted, watch, nextTick } from 'vue'
 import { useI18n } from 'vue-i18n'
 import { onLoad } from '@dcloudio/uni-app'
 import { getCurrentInstance } from 'vue'
@@ -221,6 +220,22 @@ const form = reactive({
     agree5: false,
     agree6: false,
 })
+
+const resetForm = async () => {
+    await nextTick();
+    formRef.value?.clearValidate();   // 再次清除可能因数据重置产生的新错误
+    form.customBankCode = ""
+    form.depositLogin = ""
+    form.depositLogin1 = ""
+    form.withdrawLogin = ""
+    form.amount = ""
+    form.agree5 = false
+    form.agree6 = false
+    amountErrorMessage.value = ""
+    submitting.value = false
+    flag.value = false
+}
+
 const dialogSuccess = computed(() => dialogCheck.value && dialogVisible.value)
 const dialogError = computed(() => dialogCheck.value && !dialogVisible.value)
 const dialogCheck = ref(false)
@@ -237,8 +252,6 @@ const dialogDontActive = ref(false)
 const submitting = ref(false)
 
 // 错误信息
-const depositErrorMessage = ref('')
-const depositLogin1ErrorMessage = ref('')
 const amountErrorMessage = ref('')
 
 // 表单验证规则
@@ -392,6 +405,7 @@ function toHome() {
 }
 
 function closeDia() {
+    resetForm()
     formRef.value?.resetFields?.()
     step2.value = false
     loginValue.value = ''
@@ -454,8 +468,7 @@ async function transferConfig() {
         dialogCheck.value = true
         dialogVisible.value = false
     } finally {
-        submitting.value = false
-        flag.value = false
+        resetForm()
         if (dialogCheckWait.value) dialogCheckWait.value = false
     }
 }
@@ -558,6 +571,7 @@ watch(loginValue, (newVal) => {
     if (newVal) {
         step2.value = true
         form.withdrawLogin = newVal
+        resetForm()
     }
 })
 // 监听 loginValue 变化

+ 17 - 6
pages/ib/transfer.vue

@@ -120,7 +120,7 @@
 </template>
 
 <script setup>
-import { ref, reactive, computed, onMounted, watch } from 'vue'
+import { ref, reactive, computed, onMounted, watch, nextTick } from 'vue'
 import { useI18n } from 'vue-i18n'
 import { onLoad } from '@dcloudio/uni-app'
 import { getCurrentInstance } from 'vue'
@@ -168,6 +168,20 @@ const form = reactive({
     agree5: false,
     agree6: false,
 })
+const resetForm = async () => {
+    await nextTick();
+    formRef.value?.clearValidate();   // 再次清除可能因数据重置产生的新错误
+    form.customBankCode = ""
+    form.depositLogin = ""
+    form.withdrawLogin = ""
+    form.to = ""
+    form.amount = ""
+    form.agree5 = false
+    form.agree6 = false
+    amountErrorMessage.value = ""
+    submitting.value = false
+    flag.value = false
+}
 const dialogSuccess = computed(() => dialogCheck.value && dialogVisible.value)
 const dialogError = computed(() => dialogCheck.value && !dialogVisible.value)
 const dialogCheck = ref(false)
@@ -350,6 +364,7 @@ function toHome() {
 }
 
 function closeDia() {
+    resetForm()
     formRef.value?.resetFields?.()
     step2.value = false
     loginValue.value = ''
@@ -357,11 +372,6 @@ function closeDia() {
     dialogVisible.value = false
     tableData4TwoFlag.value = false
     tableDataNewListFlag.value = false
-    form.to = ''
-    form.amount = ''
-    form.withdrawLogin = ''
-    form.agree5 = false
-    form.agree6 = false
 }
 
 // 内转
@@ -425,6 +435,7 @@ async function transferConfig() {
     } finally {
         submitting.value = false
         flag.value = false
+        resetForm()
         if (dialogCheckWait.value) dialogCheckWait.value = false
     }
 }

+ 27 - 9
pages/ib/withdraw.vue

@@ -7,7 +7,7 @@
                 <view class="b-card">
                     <view class="card-top">
                         <text class="tit">{{ t('Custom.Deposit.Title22')
-                            }}</text>
+                        }}</text>
                         <view v-for="(group, groupKey) in tableData" :key="groupKey">
 
                             <!-- 通道分组标题 -->
@@ -17,7 +17,7 @@
                         <view v-if="step3" class="reselect-btn">
                             <button class="s-btn reselect" type="primary" @click="showTable">{{
                                 t('Custom.Deposit.Reselect')
-                                }}</button>
+                            }}</button>
                         </view>
                     </view>
                 </view>
@@ -151,7 +151,7 @@
                                             </text>
                                             <text v-if="channelData.type == 'BANK'">{{
                                                 t('Custom.Withdraw.addBank')
-                                                }}</text>
+                                            }}</text>
                                             <text v-if="channelData.type == 'BANK'" class="add-btn crm-cursor"
                                                 @click="openAddBankCard('add_bankCard')">
                                                 {{ t('Custom.Withdraw.addBank1') }}
@@ -307,7 +307,7 @@
                                         <template #label>
                                             <view class="tit">
                                                 <text>{{ t('Custom.Withdraw.Title3') + '(' + channelData.currency + ')'
-                                                    }}</text>
+                                                }}</text>
                                             </view>
                                         </template>
                                         <uni-easyinput v-model.trim="form.amount" autocomplete="off" type="number"
@@ -381,7 +381,7 @@
 </template>
 
 <script setup>
-import { ref, reactive, computed, onMounted, onUnmounted, watch } from 'vue'
+import { ref, reactive, computed, onMounted, nextTick, watch } from 'vue'
 import { onLoad } from '@dcloudio/uni-app'
 import { showToast } from "@/utils/toast";
 import useUserStore from '@/stores/use-user-store'
@@ -511,6 +511,26 @@ const params = reactive({
     bankBack: "",
     defaultBank: false
 })
+const resetForm = async () => {
+    await nextTick();
+    formRef.value?.clearValidate();   // 再次清除可能因数据重置产生的新错误
+    params.bankCardNum = ""
+    params.bankUname = ""
+    params.bankName = ""
+    params.bankBranchName = ""
+    params.bankAddr = ""
+    params.swiftCode = ""
+    params.bankFront = ""
+    params.bankBack = ""
+    params.defaultBank = false
+    form.amount = ""
+    amountErrorMessage.value = ""
+    submitting.value = false
+    flag.value = false
+    loginValue.value = ""
+    dialogCheck.value = false
+    dialogVisible.value = false
+}
 const dialogTips = ref(false)
 const dialogTipsIsShow = ref(true)
 const dialogCheckConfirm = ref(false)
@@ -1103,12 +1123,10 @@ const closeTipsConfirm = () => {
 }
 
 const closeDia = () => {
+    resetForm()
     isStep3.value = false
     step2.value = false
     showTable()
-    loginValue.value = ""
-    dialogCheck.value = false
-    dialogVisible.value = false
 }
 
 const qrCode = async (serial) => {
@@ -1260,6 +1278,7 @@ const isShowStep3 = (row) => {
 }
 
 const showTable = () => {
+    resetForm()
     myId.value = null
     step3.value = false
     isStep3.value = false
@@ -1267,7 +1286,6 @@ const showTable = () => {
     getDepositList()
     // 重置表单
     form.currency = "USD"
-    form.amount = ""
     // 其他重置...
 }
 

+ 3 - 1
pages/login/index.vue

@@ -5,6 +5,8 @@ import { post } from "@/utils/request";
 import { userToken } from "@/composables/config";
 import { userApi } from "@/api/user";
 import { ucardApi } from "@/api/ucard";
+import { customApi } from "@/service/custom";
+
 import useUserStore from "@/stores/use-user-store";
 import useRouter from "@/hooks/useRouter";
 import { useI18n } from "vue-i18n";
@@ -108,7 +110,7 @@ async function getCardUserInfo() {
 }
 async function reasonsRefusalList() {
   try {
-    const res = await ucardApi.reasonsRefusalList();
+    const res = await customApi.reasonsRefusalList();
     if (res.code === 200) {
       pickFields(res.data);
     } else {

+ 3 - 3
utils/request.js

@@ -145,7 +145,7 @@ export const request = (options) => {
   return new Promise((resolve, reject) => {
     const needLoading = urlLoading.some(item => config.url.includes(item));
     if (!needLoading) {
-      showLoading();
+      // showLoading();
     }
     uni.request({
       ...processedConfig,
@@ -157,7 +157,7 @@ export const request = (options) => {
           reject(err);
         } finally {
           if (!needLoading) {
-            hideLoading();
+            // hideLoading();
           }
         }
       },
@@ -165,7 +165,7 @@ export const request = (options) => {
         const handledError = errorHandler(error);
         reject(handledError);
         if (!needLoading) {
-          hideLoading();
+          // hideLoading();
         }
       },
     });