Explorar o código

feat:美分账户弹窗

ljc hai 3 semanas
pai
achega
20630e5d8a

+ 23 - 3
pages/customer/wallet-transfer.vue

@@ -21,7 +21,7 @@
                                         <h5 class="mb-3" v-t="'Custom.Transfer.IntoAccount'"></h5>
                                         <uni-forms-item name="login">
                                             <cwg-combox v-model:value="form.login" :clearable="false"
-                                                :options="toOptionsDisplay" :placeholder="t('placeholder.choose')" />
+                                                :options="toOptionsDisplay" :placeholder="t('placeholder.choose')" @change="showCentAccountTransferTip"/>
                                         </uni-forms-item>
                                     </view>
                                     <view class="col-lg-6 mb-3">
@@ -54,16 +54,18 @@
         <cwg-success-popup v-model:visible="dialogSuccess" @confirm="closeDia" />
         <!-- 等待弹窗 -->
         <cwg-wait-popup v-model:visible="dialogCheckWait" type="center" :mask-click="false" :showFooters="false" />
+      <cwg-confirm-popup />
     </cwg-page-wrapper>
 </template>
 
 <script setup lang="ts">
-import { ref, reactive, computed, onMounted } from 'vue'
+import { ref, reactive, computed, onMounted,watch } from 'vue'
 import { useI18n } from 'vue-i18n'
 import { customApi } from '@/service/custom'
 import { drawApi } from '@/service/draw'
 import Config from '@/config/index'
-
+import { useConfirm } from '@/hooks/useConfirm'
+const confirm = useConfirm()
 const { Code } = Config
 const { t } = useI18n()
 
@@ -228,6 +230,24 @@ const getWalletList = async () => {
         console.log(e)
     }
 }
+const showCentAccountTransferTip = (login) => {
+  const selectedAccount = toOptions.value.find(
+    (item) => item.login == login,
+  );
+  if (!selectedAccount) {
+    return;
+  }
+  const isCentAccount =
+    selectedAccount.type == "8" || selectedAccount.currency === "USC";
+  if (isCentAccount) {
+    confirm({
+      title: t("Msg.SystemPrompt"),
+      content: t("vu.item14") + t("vu.item15") + t("vu.item16"),
+      confirmText: t("Btn.Confirm"),
+      cancelText: t("Btn.Cancel"),
+    })
+  }
+}
 
 onMounted(() => {
     getToDateList()

+ 22 - 1
pages/customer/withdrawal-select.vue

@@ -395,6 +395,7 @@
     <cwg-email-code-popup v-model:visible="dialogDealResult" @confirm="submitCode" :api="emailCodeApi" />
     <!-- 新增银行弹窗 -->
     <add-bank-dialog ref="addBankDialogRef" @success="addSuccess" />
+    <cwg-confirm-popup />
   </cwg-page-wrapper>
 
 </template>
@@ -424,6 +425,8 @@ const router = useRouter()
 import useUserStore from '@/stores/use-user-store'
 const userStore = useUserStore()
 const isZh = computed(() => ['cn', 'zhHant'].includes(locale.value))
+import { useConfirm } from '@/hooks/useConfirm'
+const confirm = useConfirm()
 // 获取组件实例,用于访问全局挂载的属性和方法(替代 this)
 const { proxy } = getCurrentInstance()
 
@@ -1756,11 +1759,29 @@ function getFirstDayOfNextMonth() {
   //   return new Date(nextYear, nextMonth, 1); // 下个月的1日
   // }
 }
-
+const showCentAccountTransferTip = (login) => {
+  const selectedAccount = loginOptions.value.find(
+    (item) => item.login == login,
+  );
+  if (!selectedAccount) {
+    return;
+  }
+  const isCentAccount =
+    selectedAccount.type == "8" || selectedAccount.currency === "USC";
+  if (isCentAccount) {
+    confirm({
+      title: t("Msg.SystemPrompt"),
+      content: t("vu.item14") + t("vu.item15") + t("vu.item16"),
+      confirmText: t("Btn.Confirm"),
+      cancelText: t("Btn.Cancel"),
+    })
+  }
+}
 // -------------------- watch --------------------
 watch(loginValue, (newVal) => {
   if (newVal) {
     step2.value = true;
+    showCentAccountTransferTip(newVal)
     const found = loginOptions.value.find(opt => opt.login === Number(newVal))
     loginValueDoc.value = found.label
     showTable();

+ 22 - 2
pages/follow/transfer.vue

@@ -21,7 +21,7 @@
                                         <h5 class="mb-3" v-t="'Custom.Transfer.IntoAccount'"></h5>
                                         <uni-forms-item name="login">
                                             <cwg-combox v-model:value="form.login" :clearable="false"
-                                                :options="toOptionsDisplay" :placeholder="t('placeholder.choose')" />
+                                                :options="toOptionsDisplay" :placeholder="t('placeholder.choose')" @change="showCentAccountTransferTip"/>
                                         </uni-forms-item>
                                     </view>
                                     <view class="col-lg-6 mb-3">
@@ -48,6 +48,7 @@
 
             </view>
         </view>
+      <cwg-confirm-popup />
     </cwg-page-wrapper>
 </template>
 
@@ -57,6 +58,8 @@ import { useI18n } from 'vue-i18n'
 import { customApi } from '@/service/custom'
 import { documentaryApi } from '@/service/documentary'
 import Config from '@/config/index'
+import { useConfirm } from '@/hooks/useConfirm'
+const confirm = useConfirm()
 
 const { Code } = Config
 const { t } = useI18n()
@@ -146,7 +149,24 @@ function validateAmount() {
     return true
 }
 const formRef = ref(null)
-
+const showCentAccountTransferTip = (login) => {
+  const selectedAccount = toOptions.value.find(
+    (item) => item.login == login,
+  );
+  if (!selectedAccount) {
+    return;
+  }
+  const isCentAccount =
+    selectedAccount.type == "8" || selectedAccount.currency === "USC";
+  if (isCentAccount) {
+    confirm({
+      title: t("Msg.SystemPrompt"),
+      content: t("vu.item14") + t("vu.item15") + t("vu.item16"),
+      confirmText: t("Btn.Confirm"),
+      cancelText: t("Btn.Cancel"),
+    })
+  }
+}
 const closeDia = () => {
     if (formRef.value) {
         form.amount = ''

+ 19 - 1
pages/ib/agent-transfer.vue

@@ -21,7 +21,7 @@
                                         <h5 class="mb-3" v-t="'Custom.Transfer.IntoAccount'"></h5>
                                         <uni-forms-item name="depositLogin">
                                             <cwg-combox v-model:value="form.depositLogin" :clearable="false"
-                                                :options="depositDisplayList" :placeholder="t('placeholder.choose')" />
+                                                :options="depositDisplayList" :placeholder="t('placeholder.choose')" @change="showCentAccountTransferTip1"/>
                                         </uni-forms-item>
                                     </view>
                                     <view class="col-lg-6">
@@ -558,6 +558,24 @@ const showCentAccountTransferTip = (login) => {
         })
     }
 }
+const showCentAccountTransferTip1 = (login) => {
+    const selectedAccount = toOptions.value.find(
+        (item) => item.login == login,
+    );
+    if (!selectedAccount) {
+        return;
+    }
+    const isCentAccount =
+        selectedAccount.type == "8" || selectedAccount.currency === "USC";
+    if (isCentAccount) {
+        confirm({
+            title: t("Msg.SystemPrompt"),
+            content: t("vu.item14") + t("vu.item15") + t("vu.item16"),
+            confirmText: t("Btn.Confirm"),
+            cancelText: t("Btn.Cancel"),
+        })
+    }
+}
 // 监听 loginValue 变化
 watch(loginValue, (newVal) => {
     if (newVal != null) {

+ 21 - 2
pages/ib/transfer.vue

@@ -55,7 +55,7 @@
                                                         <!-- <uni-forms-item name="to" :error-message="deposittoErrorMessage" class="form-select mb-3"></uni-forms-item> -->
                                                         <cwg-combox v-model:value="form.to" :clearable="false"
                                                             :options="depositDisplayList"
-                                                            :placeholder="t('placeholder.choose')" />
+                                                            :placeholder="t('placeholder.choose')" @change="showCentAccountTransferTip"/>
                                                     </uni-forms-item>
                                                 </view>
                                                 <view class="col-lg-6 mb-3">
@@ -523,7 +523,26 @@ async function toTransfer() {
         console.error('验证失败:', error)
     }
 }
-
+const showCentAccountTransferTip = (login) => {
+  const list =  activeTab.value != 3 ? toInfo.value:agentInfo.value
+
+  const selectedAccount = list.find(
+    (item) => item.login == login,
+  );
+  if (!selectedAccount) {
+    return;
+  }
+  const isCentAccount =
+    selectedAccount.type == "8" || selectedAccount.currency === "USC";
+  if (isCentAccount) {
+    confirm({
+      title: t("Msg.SystemPrompt"),
+      content: t("vu.item14") + t("vu.item15") + t("vu.item16"),
+      confirmText: t("Btn.Confirm"),
+      cancelText: t("Btn.Cancel"),
+    })
+  }
+}
 // 打开不参加活动弹窗
 function openDontActive() {
     tosubmitConfirm()