|
@@ -1244,8 +1244,11 @@ const submitRequest = async () => {
|
|
showComType.value = "preview";
|
|
showComType.value = "preview";
|
|
previewFontSize.value = calcFontSize(baseFormData.amountValue, 238, 56);
|
|
previewFontSize.value = calcFontSize(baseFormData.amountValue, 238, 56);
|
|
isBack.value = false;
|
|
isBack.value = false;
|
|
- } else {
|
|
|
|
- console.log(res);
|
|
|
|
|
|
+ } else if(res.code == 2101){
|
|
|
|
+ const { usdPrice, minAmount, luckdropPostConfig = [] } = currentCurrencyInfo.value;
|
|
|
|
+ let currentLuckDropConfig = luckdropPostConfig.find(item => item.luckdropType === selectModeInfo.type);
|
|
|
|
+
|
|
|
|
+ message.warning(`The prize pool must be above $${currentLuckDropConfig.minTotalUsdAmount} and the average prize must be above $${currentLuckDropConfig.minAvgUsdAmount} per person.`);
|
|
}
|
|
}
|
|
})
|
|
})
|
|
.catch((err) => {
|
|
.catch((err) => {
|
|
@@ -1693,9 +1696,9 @@ const checkUsdMinNumber = (isInTemplate) => {
|
|
|
|
|
|
const isAmountForbidden = currentLuckDropConfig?.minTotalUsdAmount ? +math.format(math.multiply(math.bignumber(+amountValue), math.bignumber(usdPrice))) < currentLuckDropConfig.minTotalUsdAmount : false;
|
|
const isAmountForbidden = currentLuckDropConfig?.minTotalUsdAmount ? +math.format(math.multiply(math.bignumber(+amountValue), math.bignumber(usdPrice))) < currentLuckDropConfig.minTotalUsdAmount : false;
|
|
const isAvgForbidden = currentLuckDropConfig?.minAvgUsdAmount ? +math.format(math.divide(math.bignumber(+amountValue), math.bignumber(val1))) < currentLuckDropConfig.minAvgUsdAmount : false;
|
|
const isAvgForbidden = currentLuckDropConfig?.minAvgUsdAmount ? +math.format(math.divide(math.bignumber(+amountValue), math.bignumber(val1))) < currentLuckDropConfig.minAvgUsdAmount : false;
|
|
- forbiddenText = isAmountForbidden && isAvgForbidden ?
|
|
|
|
|
|
+ forbiddenText = isAmountForbidden || isAvgForbidden ?
|
|
`The prize pool must be above ${isInTemplate ? ('<span class="font-color-1D9BF0">$' + currentLuckDropConfig.minTotalUsdAmount + '</span>') : ('$' + currentLuckDropConfig.minTotalUsdAmount)}
|
|
`The prize pool must be above ${isInTemplate ? ('<span class="font-color-1D9BF0">$' + currentLuckDropConfig.minTotalUsdAmount + '</span>') : ('$' + currentLuckDropConfig.minTotalUsdAmount)}
|
|
- or the average prize must be above
|
|
|
|
|
|
+ and the average prize must be above
|
|
${isInTemplate ? ('<span class="font-color-1D9BF0">$' + currentLuckDropConfig.minAvgUsdAmount +' per person.</span>' ): ('$' + currentLuckDropConfig.minAvgUsdAmount + ' per person.') }`
|
|
${isInTemplate ? ('<span class="font-color-1D9BF0">$' + currentLuckDropConfig.minAvgUsdAmount +' per person.</span>' ): ('$' + currentLuckDropConfig.minAvgUsdAmount + ' per person.') }`
|
|
: '';
|
|
: '';
|
|
}
|
|
}
|