|
@@ -230,7 +230,7 @@
|
|
|
|
|
|
<div class="submit-btn-wrapper">
|
|
|
<div class="submit-btn"
|
|
|
- :class="{ 'disabled-submit': iptErrMsgTxt != '' }"
|
|
|
+ :class="{ 'disabled-submit': iptErrMsgTxt != '' && !depositGuide }"
|
|
|
@click="confirm">
|
|
|
<img
|
|
|
class="icon-loading"
|
|
@@ -355,6 +355,8 @@ let postId = ref('');
|
|
|
|
|
|
let asyncIng = ref(false);
|
|
|
|
|
|
+let depositGuide = ref(false);
|
|
|
+
|
|
|
let messageBoxData = ref({
|
|
|
title: "",
|
|
|
content: "",
|
|
@@ -481,6 +483,10 @@ const getPayAmount = async (amountValue) => {
|
|
|
};
|
|
|
|
|
|
const confirm = () => {
|
|
|
+ if(depositGuide.value) { //余额不够去充值
|
|
|
+ goTopUp();
|
|
|
+ return;
|
|
|
+ }
|
|
|
if (submitIng.value || iptErrMsgTxt.value) {
|
|
|
return;
|
|
|
}
|
|
@@ -493,11 +499,12 @@ const confirm = () => {
|
|
|
|
|
|
const selectCurrency = (params) => {
|
|
|
tempCurrentCurrencyInfo.value = params;
|
|
|
+ depositGuide.value = false;
|
|
|
if(params.currencyCode != "USD" && params.balance < params.minAmount) {
|
|
|
let tokenSymbol = params.currencyCode == 'USD' ? 'USD' : params.tokenSymbol;
|
|
|
messageBoxBlock({
|
|
|
- title: `是否要充值 ${tokenSymbol}`,
|
|
|
- content: `${tokenSymbol} 可用余额为${params.balance},是否要去充值?`,
|
|
|
+ title: `Deposit ${tokenSymbol}`,
|
|
|
+ content: `${tokenSymbol} available balance is ${params.balance}`,
|
|
|
});
|
|
|
} else {
|
|
|
currentCurrencyInfo.value = params;
|
|
@@ -576,6 +583,7 @@ const goTopUp = () => {
|
|
|
const topUpDone = () => {
|
|
|
currentCurrencyInfo.value = tempCurrentCurrencyInfo.value;
|
|
|
asyncIng.value = true;
|
|
|
+ depositGuide.value = false;
|
|
|
asyncTokenRechRecord((res) => {
|
|
|
asyncIng.value = false;
|
|
|
showCurrencyPop.value = false;
|
|
@@ -783,6 +791,14 @@ const onAmountInput = () => {
|
|
|
if(val == '00') {
|
|
|
val = '0'
|
|
|
}
|
|
|
+ if(val.indexOf('.') > -1){ //校验 例:00.12 => 0.12
|
|
|
+ let arr = val.split('.');
|
|
|
+ if(arr[0].startsWith('0')) {
|
|
|
+ let num = +arr[0];
|
|
|
+ val = num + '.' + arr[1];
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
baseFormData.amountValue = val;
|
|
|
setInputErrorMsg({from: 'amount', type:'input'});
|
|
|
|
|
@@ -903,6 +919,7 @@ const setIsEmptyTxt = () => {
|
|
|
* 输入时 检测设置错误信息
|
|
|
*/
|
|
|
const onIptSetErrorTxt = (params) => {
|
|
|
+ depositGuide.value = false;
|
|
|
if(!currentCurrencyInfo.value.currencyCode) {
|
|
|
iptErrMsgTxt.value = "Please select a currency"
|
|
|
} else if (!baseFormData.amountValue || baseFormData.amountValue == '0') {
|
|
@@ -917,6 +934,7 @@ const onIptSetErrorTxt = (params) => {
|
|
|
iptErrMsgTxt.value = "";
|
|
|
}
|
|
|
} else if(currentCurrencyInfo.value.currencyCode != 'USD') {
|
|
|
+ depositGuide.value = true;
|
|
|
iptErrMsgTxt.value = `Insufficient ${currentCurrencyInfo.value.tokenSymbol} balance, please recharge`;
|
|
|
}
|
|
|
}
|
|
@@ -1242,6 +1260,7 @@ onMounted(() => {
|
|
|
font-size: 12px;
|
|
|
color: #ff9839;
|
|
|
cursor: pointer;
|
|
|
+ margin-left: 8px;
|
|
|
}
|
|
|
|
|
|
.icon-refresh-rotate {
|
|
@@ -1305,7 +1324,7 @@ onMounted(() => {
|
|
|
.currency-select {
|
|
|
max-width: 136px;
|
|
|
cursor: pointer;
|
|
|
- background: #389AFF;
|
|
|
+ background: #1D9BF0;
|
|
|
margin-left: 6px;
|
|
|
padding: 6px 10px;
|
|
|
border-radius: 12px;
|
|
@@ -1419,7 +1438,7 @@ onMounted(() => {
|
|
|
}
|
|
|
|
|
|
.more {
|
|
|
- color: #389aff;
|
|
|
+ color: #1D9BF0;
|
|
|
font-size: 13px;
|
|
|
padding-left: 4px;
|
|
|
cursor: pointer;
|
|
@@ -1439,7 +1458,6 @@ onMounted(() => {
|
|
|
width: 100%;
|
|
|
height: 46px;
|
|
|
text-align: center;
|
|
|
- line-height: 46px;
|
|
|
background: #4a99e9;
|
|
|
border-radius: 100px;
|
|
|
color: #fff;
|