Ver Fonte

数字货币存款

zhb há 1 mês atrás
pai
commit
ad57798493

+ 265 - 0
pages/customer/components/digitalPayConfirmPopup.vue

@@ -0,0 +1,265 @@
+<template>
+    <cwg-popup v-model:visible="visible" type="center" :mask-click="false" :showFooters="true"
+        :title="t('Custom.Deposit.DigitalAcc')">
+        <view class="popup-content">
+            <view class="dia-content digital-pay-confirm-body">
+                <view class="digital-pay-info">
+                    <view class="digital-pay-info__fields">
+                        <view class="digital-pay-field">
+                            <span class="digital-pay-field__label" v-t="'Custom.Deposit.DigitalName'"></span>
+                            <view class="digital-pay-field__value digital-pay-field__value--currency">
+                                {{
+                                    WireTransferAccount.name + "-" + WireTransferAccount.type
+                                }}
+                            </view>
+                        </view>
+                        <view class="digital-pay-field">
+                            <span class="digital-pay-field__label" v-t="'Custom.Withdraw.Title6'"></span>
+                            <view class="digital-pay-field__value digital-pay-field__value--address">
+                                {{ WireTransferAccount.address || "--" }}
+                            </view>
+                        </view>
+                    </view>
+                    <view class="digital-pay-info__qr">
+                        <view class="digital-pay-info__qr-inner">
+                            <image :src="Host05 + WireTransferAccount.url" alt="" mode="widthFix" />
+                        </view>
+                    </view>
+                </view>
+                <view class="digital-pay-divider" role="presentation"></view>
+                <view class="digital-pay-upload-wrap">
+                    <view class="digital-pay-upload__label" v-t="'Custom.Deposit.UploadRemittanceVoucher'">
+                    </view>
+                    <cwg-file-picker-wrapper v-model="imageUrl" :limit="1" :editable="true" :fileMediatype="'all'"
+                        uploadUrl="/common/upload" :baseUrl="Host80" />
+                </view>
+            </view>
+        </view>
+        <template #footer>
+            <button @click="close">{{ t('Btn.Cancel') }}</button>
+            <button type="primary" @click="handleConfirm">{{ t('Btn.Confirm') }}</button>
+        </template>
+    </cwg-popup>
+</template>
+
+<script setup>
+import { computed, ref } from 'vue';
+import { useI18n } from 'vue-i18n';
+import Config from '@/config/index'
+const { Code, Host05, Host04 } = Config
+const props = defineProps({
+    visible: { type: Boolean, default: false },
+    data: { type: Object, default: () => ({ balance: 0, income: 0 }) },
+    WireTransferAccount: { type: Object, default: () => ({ name: '', type: '', address: '', url: '' }) },
+});
+const emit = defineEmits(['update:visible']);
+
+const { t } = useI18n();
+const visible = computed({
+    get: () => props.visible,
+    set: (val) => emit('update:visible', val)
+});
+const imageUrl = ref('');
+const handleConfirm = () => {
+    if (!imageUrl.value) {
+        uni.showToast({
+            title: t('Custom.Deposit.UploadRemittanceVoucher'),
+            icon: 'none'
+        })
+        return
+    }
+    emit('confirm', imageUrl.value)
+    close()
+}
+const close = () => { visible.value = false; imageUrl.value = ""; };
+</script>
+
+<style lang="scss" scoped>
+@import "@/uni.scss";
+
+.popup-content {
+    padding: px2rpx(20);
+    text-align: center;
+
+    .des1 {
+        font-size: px2rpx(16);
+        line-height: 1.6;
+        margin: px2rpx(30) 0 px2rpx(50);
+    }
+
+    .myRED {
+        color: #f56c6c;
+        font-weight: bold;
+    }
+}
+
+.digital-pay-confirm-body {
+    text-align: left;
+    padding: 0 0 4px;
+    box-sizing: border-box;
+
+    .digital-pay-info {
+        display: flex;
+        align-items: center;
+        gap: 24px;
+        padding: 8px 0 4px;
+    }
+
+    .digital-pay-info__fields {
+        flex: 1;
+        min-width: 0;
+    }
+
+    .digital-pay-field {
+        margin-bottom: 18px;
+
+        &:last-child {
+            margin-bottom: 0;
+        }
+    }
+
+    .digital-pay-field__label {
+        display: block;
+        font-size: 14px;
+        font-weight: bold;
+        margin-bottom: 8px;
+        line-height: 1.4;
+        color: #323232;
+    }
+
+    .digital-pay-field__value {
+        font-size: 14px;
+        line-height: 1.55;
+        word-break: break-all;
+        overflow-wrap: anywhere;
+    }
+
+    .digital-pay-field__value--currency {
+        max-width: 100%;
+        padding: 10px 14px;
+        border-radius: 4px;
+        border: 1px solid #e8e8e8;
+        color: #323232;
+        box-sizing: border-box;
+    }
+
+    .digital-pay-field__value--address {
+        padding: 0;
+        border: none;
+        background: transparent;
+        font-size: 14px;
+        color: #323232;
+        line-height: 1.6;
+    }
+
+    .digital-pay-info__qr {
+        flex-shrink: 0;
+        align-self: center;
+    }
+
+    .digital-pay-info__qr-inner {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        padding: 10px;
+        border: 1px solid #e4e7ed;
+        border-radius: 6px;
+        background: #fafafa;
+        box-sizing: border-box;
+
+        image {
+            display: block;
+            width: 120px;
+            height: 120px;
+            object-fit: contain;
+        }
+    }
+
+    .digital-pay-divider {
+        border: none;
+        border-top: 1px solid #e4e7ed;
+        margin: 20px 0 22px;
+    }
+
+    .digital-pay-upload-wrap {
+        margin-top: 0;
+    }
+
+    .digital-pay-upload__label {
+        font-size: 14px;
+        font-weight: bold;
+        margin-bottom: 10px;
+        line-height: 1.4;
+        color: #323232;
+    }
+
+    .digital-pay-voucher-upload {
+        width: 100%;
+        min-height: 52px;
+        border: 1px solid #e4e7ed;
+        border-radius: 4px;
+        box-sizing: border-box;
+
+        .el-upload {
+            width: 100%;
+            min-height: 52px;
+            position: relative;
+            display: flex;
+            flex-direction: row;
+            align-items: center;
+            justify-content: flex-start;
+            padding: 0 6px 0 14px;
+            box-sizing: border-box;
+        }
+
+        .avatar-uploader-icon {
+            flex-shrink: 0;
+            order: 0;
+            font-size: 28px;
+            margin: 0 14px 0 0;
+            padding-top: 0;
+            line-height: 1;
+            color: #c0c4cc;
+        }
+
+        .avatar {
+            display: block;
+            order: 1;
+            flex: 1;
+            min-width: 0;
+            min-height: 52px;
+            line-height: 52px;
+            padding: 0 12px 0 0;
+            box-sizing: border-box;
+            overflow: hidden;
+            text-overflow: ellipsis;
+            white-space: nowrap;
+            font-size: 12px;
+            color: #606266;
+        }
+    }
+}
+
+.dialog-digital-pay {
+    border-radius: 8px;
+    overflow: hidden;
+
+    .el-dialog__header {
+        padding: 18px 24px 8px;
+    }
+
+    .el-dialog__title {
+        font-size: 16px;
+        font-weight: bold;
+        color: #323232;
+    }
+
+    .el-dialog__body {
+        padding: 4px 28px 8px;
+    }
+
+    .el-dialog__footer {
+        padding: 8px 24px 22px;
+    }
+}
+</style>

+ 10 - 10
pages/customer/deposit-select.vue

@@ -7,7 +7,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>
                         <cwg-combox :clearable="false" v-model:value="loginValue" :options="loginComboxOptions"
                             :placeholder="t('placeholder.choose')" />
                     </view>
@@ -18,7 +18,7 @@
                 <view class="b-card">
                     <view class="card-top">
                         <text class="tit"><text class="iconfont icon-caret-right"></text>{{ t('Custom.Deposit.Title2')
-                            }}</text>
+                        }}</text>
                         <uni-loading v-if="currentTableData.length == 0" />
                         <template v-if="currentTableData.length">
                             <cwg-asset-tabs v-if="tabsConfig.length > 0" v-model="activeTab" :tabs="tabsConfig" />
@@ -50,7 +50,7 @@
                             </view>
                             <view class="btn-bottom">
                                 <text class="btn crm-cursor" @click="isStep3Open()">{{ t('Btn.Confirm')
-                                }}</text>
+                                    }}</text>
                             </view>
 
                         </view>
@@ -88,7 +88,7 @@
                                     <uni-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
                                         <text class="tit"><text class="iconfont icon-caret-right"></text>{{
                                             t('news_add_field.Label.Title4')
-                                        }}</text>
+                                            }}</text>
                                     </uni-col>
                                     <uni-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
                                         <uni-forms-item>
@@ -120,7 +120,7 @@
                                                         WireTransferAccount.bankUname || '--'
                                                     }}</text></view>
                                             <view class="row"><text class="label">{{ t('Custom.Deposit.bankName')
-                                            }}</text><text class="content">{{ WireTransferAccount.bankName ||
+                                                    }}</text><text class="content">{{ WireTransferAccount.bankName ||
                                                         '--'
                                                     }}</text></view>
                                             <view class="row"><text class="label SpecialColor">{{
@@ -129,7 +129,7 @@
                                                         WireTransferAccount.bankCardNum || '--'
                                                     }}</text></view>
                                             <view class="row"><text class="label">{{ t('Custom.Deposit.bankAddr')
-                                            }}</text><text class="content">{{ WireTransferAccount.bankAddr ||
+                                                    }}</text><text class="content">{{ WireTransferAccount.bankAddr ||
                                                         '--'
                                                     }}</text></view>
                                             <view class="row"><text class="label SpecialColor">{{
@@ -138,7 +138,7 @@
                                                         WireTransferAccount.swiftCode || '--'
                                                     }}</text></view>
                                             <view class="row"><text class="label">{{ t('Custom.Deposit.bankCode')
-                                            }}</text><text class="content">{{ WireTransferAccount.bankCode ||
+                                                    }}</text><text class="content">{{ WireTransferAccount.bankCode ||
                                                         '--'
                                                     }}</text></view>
                                             <view class="row"><text class="label SpecialColor">{{
@@ -165,7 +165,7 @@
                                                         + '-' +
                                                         WireTransferAccount.type }}</text></view>
                                             <view class="row"><text class="label">{{ t('Custom.Withdraw.Title6')
-                                            }}</text><text class="content">{{ WireTransferAccount.address ||
+                                                    }}</text><text class="content">{{ WireTransferAccount.address ||
                                                         '--'
                                                     }}</text></view>
                                             <view class="row"><text class="label">QR Code</text>
@@ -241,7 +241,7 @@
                                         ">
                                             <uni-forms-item :label="t('Custom.Deposit.UploadRemittanceVoucher')">
                                                 <cwg-file-picker-wrapper v-model="imageUrl" :limit="1" :editable="true"
-                                                    :fileMediatype="'all'" uploadUrl="/wasabi/upload/file"
+                                                    :fileMediatype="'all'" uploadUrl="/common/upload"
                                                     :baseUrl="Host80" />
                                             </uni-forms-item>
                                         </uni-col>
@@ -267,7 +267,7 @@
                                                     <text>{{ t('news_add_field1.activitiesNZ.itemDeposit2') }}</text>
                                                     <text class="clause crm-cursor" @click="dialogClauseNZ = true">{{
                                                         t('news_add_field1.activitiesNZ.itemDeposit3')
-                                                        }}</text>
+                                                    }}</text>
                                                     <text>{{ t('news_add_field1.activitiesNZ.itemDeposit4') }}</text>
                                                 </view>
                                             </uni-forms-item>

+ 57 - 27
pages/customer/deposit.vue

@@ -11,7 +11,7 @@
                         <view class="card-top">
                             <text class="tit"><text class="iconfont icon-caret-right"></text>{{
                                 t('Custom.Deposit.Title1')
-                                }}</text>
+                            }}</text>
                             <cwg-combox :clearable="false" v-model:value="loginValue" :options="loginComboxOptions"
                                 :placeholder="t('placeholder.choose')" />
                         </view>
@@ -23,7 +23,7 @@
                         <view class="card-top">
                             <text class="tit"><text class="iconfont icon-caret-right"></text>{{
                                 t('Custom.Deposit.Title2')
-                                }}</text>
+                            }}</text>
                             <cwg-combox :clearable="false" v-model:value="channelId" :options="channelListOptions"
                                 :placeholder="t('placeholder.choose')">
                             </cwg-combox>
@@ -72,7 +72,7 @@
                                     <view>
                                         <text class="tit"><text class="iconfont icon-caret-right"></text>{{
                                             t('news_add_field.Label.Title4')
-                                            }}</text>
+                                        }}</text>
                                     </view>
                                     <view>
                                         <uni-forms-item>
@@ -103,7 +103,7 @@
                                                         WireTransferAccount.bankUname || '--'
                                                     }}</text></view>
                                             <view class="row"><text class="label">{{ t('Custom.Deposit.bankName')
-                                                    }}</text><text class="content">{{ WireTransferAccount.bankName
+                                            }}</text><text class="content">{{ WireTransferAccount.bankName
                                                         ||
                                                         '--'
                                                     }}</text></view>
@@ -113,7 +113,7 @@
                                                         WireTransferAccount.bankCardNum || '--'
                                                     }}</text></view>
                                             <view class="row"><text class="label">{{ t('Custom.Deposit.bankAddr')
-                                                    }}</text><text class="content">{{ WireTransferAccount.bankAddr
+                                            }}</text><text class="content">{{ WireTransferAccount.bankAddr
                                                         ||
                                                         '--'
                                                     }}</text></view>
@@ -123,7 +123,7 @@
                                                         WireTransferAccount.swiftCode || '--'
                                                     }}</text></view>
                                             <view class="row"><text class="label">{{ t('Custom.Deposit.bankCode')
-                                                    }}</text><text class="content">{{ WireTransferAccount.bankCode
+                                            }}</text><text class="content">{{ WireTransferAccount.bankCode
                                                         ||
                                                         '--'
                                                     }}</text></view>
@@ -137,7 +137,7 @@
 
 
                                 <!-- 数字货币信息展示 -->
-                                <template
+                                <!-- <template
                                     v-if="isStep3 && channelData.code && channelData.code.indexOf('DIGITAL_PAY_TYPE_KEY') === 0">
                                     <view>
                                         <text class="tit"><text class="iconfont icon-caret-right"></text>{{
@@ -151,7 +151,7 @@
                                                         + '-' +
                                                         WireTransferAccount.type }}</text></view>
                                             <view class="row"><text class="label">{{ t('Custom.Withdraw.Title6')
-                                                    }}</text><text class="content">{{ WireTransferAccount.address ||
+                                            }}</text><text class="content">{{ WireTransferAccount.address ||
                                                         '--'
                                                     }}</text></view>
                                             <view class="row"><text class="label">QR Code</text>
@@ -160,7 +160,7 @@
                                             </view>
                                         </view>
                                     </view>
-                                </template>
+                                </template> -->
                                 <!-- 表单区域(含金额、预估金额、上传凭证、优惠码) -->
                                 <template v-if="isStep3">
                                     <view>
@@ -220,12 +220,11 @@
                                         <view v-if="
                                             channelData.code == 'UNION_PAY_TELEGRAPHIC' ||
                                             channelData.code == 'UNION_PAY_TELEGRAPHIC_SPECIAL' ||
-                                            channelData.code && channelData.code.indexOf('DIGITAL_PAY_TYPE_KEY') === 0 ||
                                             channelData.code == 'UNION_PAY_TELEGRAPHIC_TWO'
                                         ">
                                             <uni-forms-item :label="t('Custom.Deposit.UploadRemittanceVoucher')">
                                                 <cwg-file-picker-wrapper v-model="imageUrl" :limit="1" :editable="true"
-                                                    :fileMediatype="'all'" uploadUrl="/wasabi/upload/file"
+                                                    :fileMediatype="'all'" uploadUrl="/common/upload"
                                                     :baseUrl="Host80" />
                                             </uni-forms-item>
                                         </view>
@@ -246,16 +245,16 @@
                                                     <checkbox :checked="params.agree4"
                                                         @click="params.agree4 = !params.agree4" />
                                                     <text>{{ t('news_add_field1.activitiesNZ.itemDeposit1')
-                                                        }}</text>
+                                                    }}</text>
                                                 </label>
                                                 <view style="line-height: 1.5; font-size: 14px">
                                                     <text>{{ t('news_add_field1.activitiesNZ.itemDeposit2')
-                                                        }}</text>
+                                                    }}</text>
                                                     <text class="clause crm-cursor" @click="dialogClauseNZ = true">{{
                                                         t('news_add_field1.activitiesNZ.itemDeposit3')
-                                                        }}</text>
+                                                    }}</text>
                                                     <text>{{ t('news_add_field1.activitiesNZ.itemDeposit4')
-                                                        }}</text>
+                                                    }}</text>
                                                 </view>
                                             </uni-forms-item>
 
@@ -268,15 +267,15 @@
                                                     <checkbox :checked="params.agree5"
                                                         @click="params.agree5 = !params.agree5" />
                                                     <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit1')
-                                                        }}</text>
+                                                    }}</text>
                                                 </label>
                                                 <view style="line-height: 1.5; font-size: 14px">
                                                     <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit2')
-                                                        }}</text>
+                                                    }}</text>
                                                     <text class="clause crm-cursor" @click="dialogClauseNZTwo = true">{{
                                                         t('news_add_field1.activitiesNZTwo.itemDeposit3') }}</text>
                                                     <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit4')
-                                                        }}</text>
+                                                    }}</text>
                                                 </view>
                                             </uni-forms-item>
 
@@ -360,7 +359,7 @@
                                     </view>
                                 </template>
                                 <button class="s-btn" type="primary" @click="submitConfirm">{{ t('Btn.Submit')
-                                    }}</button>
+                                }}</button>
                             </uni-forms>
                         </view>
                     </view>
@@ -371,8 +370,7 @@
             <view class="step3-attention">
                 <view class="tips" v-if="(introduce.introduce || introduce.enIntroduce)">
                     <view>
-                        <cwg-rich-text class="attention"
-                            :nodes="isZh ? introduce.introduce : introduce.enIntroduce" />
+                        <cwg-rich-text class="attention" :nodes="isZh ? introduce.introduce : introduce.enIntroduce" />
                     </view>
                 </view>
             </view>
@@ -418,6 +416,9 @@
             @confirm="submitDealResult" />
         <!-- KYC成功弹窗 -->
         <cwg-kyc-popup v-model:visible="dialogKyc" :qrText="text1" />
+        <!-- 数字支付确认弹窗 -->
+        <DigitalPayConfirmPopup v-model:visible="dialogDigitalPayConfirm" :WireTransferAccount="WireTransferAccount"
+            @close="closeDigitalPayConfirm" @confirm="confirmDigitalPayModal" />
     </cwg-page-wrapper>
 </template>
 
@@ -446,6 +447,7 @@ import CheckPopup from './components/CheckPopup.vue'
 import CwgCheckConfirmPopup from './components/DepositCheckConfirmPopup.vue'
 import VietnamNoticePopup from './components/VietnamNoticePopup.vue'
 import NewYear24Popup from './components/NewYear24Popup.vue'
+import DigitalPayConfirmPopup from './components/digitalPayConfirmPopup.vue'
 // 假设原有导入路径保持不变
 import tool from "@/global/tool"
 // import { createUploadRequest } from "@/lib/upload"
@@ -638,6 +640,9 @@ const resetForm = () => {
     form.expiryYear = undefined
     form.pin = undefined
     amountErrorMessage.value = ""
+    requiteVoucherUrl.value = ""
+    imageUrl.value = ""
+    imageUrl1.value = ""
 }
 const formRef = ref(null)
 const mAmount = reactive({
@@ -1127,9 +1132,9 @@ const chooseBank = (item) => {
 const toHome = () => {
     uni.switchTab({ url: "/pages/customer/index" })
 }
+const dialogDigitalPayConfirm = ref(false)
 // 提交确认信息弹窗
 const submitConfirm = async () => {
-    console.log(params.requiteVoucherUrl, 1212);
 
     if (channelData.confirmCreditCard == 1 && !myId.value) {
         $pigeon.MessageWarning(t("PersonalManagement.Label.selectCreditCard"))
@@ -1163,15 +1168,24 @@ const submitConfirm = async () => {
         $pigeon.MessageWarning(t("news_add_field.Des.item2"))
         return
     }
-    if (channelData.code && channelData.code.indexOf('DIGITAL_PAY_TYPE_KEY') === 0 && !imageUrl.value) {
-        $pigeon.MessageWarning(t("vaildate.depositVoucher.empty"))
-        return
-    }
+    // if (channelData.code && channelData.code.indexOf('DIGITAL_PAY_TYPE_KEY') === 0 && !imageUrl.value) {
+    //     $pigeon.MessageWarning(t("vaildate.depositVoucher.empty"))
+    //     return
+    // }
 
     try {
         if (formRef.value) {
             await formRef.value.validate()
-            openDontActive()
+            console.log(channelData, channelData.code, 12);
+            if (
+                channelData.code &&
+                channelData.code.indexOf("DIGITAL_PAY_TYPE_KEY") === 0
+            ) {
+                imageUrl.value = "";
+                dialogDigitalPayConfirm.value = true;
+            } else {
+                openDontActive();
+            }
         }
     } catch (error) {
         if (error instanceof Array) {
@@ -1183,6 +1197,15 @@ const submitConfirm = async () => {
     }
 
 }
+const confirmDigitalPayModal = (e) => {
+    dialogDigitalPayConfirm.value = false;
+    imageUrl.value = e;
+    openDontActive();
+}
+// 关闭数字支付确认弹窗
+const closeDigitalPayConfirm = () => {
+    dialogDigitalPayConfirm.value = false;
+}
 // 打开不参加活动弹窗
 const openDontActive = () => {
     if (!tableData4Flag.value && !tableData4TwoFlag.value && !tableDataNewListFlag.value && (country.value != "CN" || (country.value == "CN" && (ACCType.value == 1 || ACCType.value == 2 || ACCType.value == 7))) && ACCType.value != 3 && params.agree2) {
@@ -1531,6 +1554,7 @@ const doShowStep3 = (row) => {
         isChannel.value = false
         step3.value = true
         Object.assign(channelData, row)
+        console.log(channel.value, channelListOptions.value, channelData, 1112);
         mAmount.minAmount = row.minAmount
         mAmount.maxAmount = row.maxAmount
     } else {
@@ -1603,6 +1627,7 @@ const showTable = () => {
     params.promoCode = ""
     isChannel.value = true
     imageUrl.value = ""
+    requiteVoucherUrl.value = ""
     code.value = ""
     WireTransferAccount.bankMsg = ""
     introduce.introduce = ""
@@ -1880,6 +1905,8 @@ onMounted(() => {
         channelListOptions.value = formatChannels(channelList.value)
     }
     channelId.value = channel.value
+
+
     getDateList()
     isStep3Open()
     setTimeout(() => {
@@ -1898,9 +1925,12 @@ onUnmounted(() => {
 })
 
 watch(channelId, async (newVal) => {
+
     if (newVal) {
         showTable()
         let row = channelListOptions.value.find(item => item.code == newVal)
+        console.log(newVal, channelListOptions, 12);
+        console.log(row, 12);
         isShowStep3(row)
     }
 });

+ 1 - 1
service/ucard.ts

@@ -30,7 +30,7 @@ export const ucardApi = {
     if (params.file) {
       let formData = new FormData();
       formData.append('file', params.file);
-      return post('/wasabi/upload/file', formData, 'Host80');
+      return post('/common/upload', formData, 'Host80');
     }
     return { code: 400, msg: 'File is required' };
   },