123
This commit is contained in:
@@ -65,6 +65,7 @@
|
|||||||
:placeholder="$t('app.pleaseWithdrawalAmount')"
|
:placeholder="$t('app.pleaseWithdrawalAmount')"
|
||||||
/>
|
/>
|
||||||
<van-field
|
<van-field
|
||||||
|
v-if="openWithdrawCode"
|
||||||
v-model="withdrawCode"
|
v-model="withdrawCode"
|
||||||
:label="$t('app.withdrawCode')"
|
:label="$t('app.withdrawCode')"
|
||||||
:placeholder="$t('app.withdrawCode')"
|
:placeholder="$t('app.withdrawCode')"
|
||||||
@@ -77,10 +78,11 @@ import {onMounted, reactive, ref} from "vue";
|
|||||||
import {showConfirmDialog, showToast} from "vant";
|
import {showConfirmDialog, showToast} from "vant";
|
||||||
import {useUserStore} from "@/store/modules/user";
|
import {useUserStore} from "@/store/modules/user";
|
||||||
import {useRouter} from "vue-router";
|
import {useRouter} from "vue-router";
|
||||||
import {getBorrowWithdraw, getCustomerInfo, getStepBorrow} from "@/api";
|
import { getBorrowWithdraw, getCustomerInfo, getSetting, getStepBorrow } from '@/api';
|
||||||
import {resetData} from "@/utils/dataUtil";
|
import {resetData} from "@/utils/dataUtil";
|
||||||
import {getAssetsImages, px2vw} from "../../../utils";
|
import {getAssetsImages, px2vw} from "../../../utils";
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { getDefaultLocal } from '@/api/system/user';
|
||||||
|
|
||||||
const defaultCoinUnit = localStorage.getItem('defaultCoinUnit')
|
const defaultCoinUnit = localStorage.getItem('defaultCoinUnit')
|
||||||
|
|
||||||
@@ -88,6 +90,7 @@ const router = useRouter()
|
|||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
|
|
||||||
|
const openWithdrawCode = ref(false);
|
||||||
const withdrawalShow = ref(false);
|
const withdrawalShow = ref(false);
|
||||||
const withdrawAmount = ref(0);
|
const withdrawAmount = ref(0);
|
||||||
const withdrawCode = ref('');
|
const withdrawCode = ref('');
|
||||||
@@ -169,8 +172,9 @@ const withdrawalBtn = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const saveUserInfoBtn = () => {
|
const saveUserInfoBtn = () => {
|
||||||
|
if (!withdrawCode.value && openWithdrawCode.value) {
|
||||||
if (withdrawCode.value) {
|
showToast(t('app.enter') + t('app.withdrawCode'))
|
||||||
|
} else {
|
||||||
getBorrowWithdraw({
|
getBorrowWithdraw({
|
||||||
withdrawAmount: withdrawAmount.value,
|
withdrawAmount: withdrawAmount.value,
|
||||||
withdrawCode: withdrawCode.value,
|
withdrawCode: withdrawCode.value,
|
||||||
@@ -180,8 +184,6 @@ const saveUserInfoBtn = () => {
|
|||||||
path: '/serveList'
|
path: '/serveList'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
} else {
|
|
||||||
showToast(t('app.enter') + t('app.withdrawCode'))
|
|
||||||
}
|
}
|
||||||
// showConfirmDialog({
|
// showConfirmDialog({
|
||||||
// title: '提示',
|
// title: '提示',
|
||||||
@@ -195,10 +197,17 @@ const saveUserInfoBtn = () => {
|
|||||||
// });
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const _getSetting = () => {
|
||||||
|
getSetting().then(res => {
|
||||||
|
openWithdrawCode.value = res.openWithdrawCode
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
_getCustomerInfo()
|
_getCustomerInfo()
|
||||||
_getStepBorrow()
|
_getStepBorrow()
|
||||||
|
_getSetting()
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user