|
|
@@ -89,7 +89,7 @@
|
|
|
<el-col :span="24">
|
|
|
<div class="input">
|
|
|
<el-form-item :label="$t('common.use') + $t('common.baomibi')" v-if="transformationIndex" prop="orderAmt">
|
|
|
- <el-input-number v-model="walletForm.orderAmt" :min="1" :max="appStore?.userInfo?.baoMiBalance"
|
|
|
+ <el-input-number v-model="walletForm.orderAmt" :min="1" :max="appStore?.userInfo?.baoMiBalance || 1"
|
|
|
controls-position="right" size="large" @change="handleChange" style="width: 100%;"
|
|
|
:placeholder="$t('common.placeholderInput')" align="left" :input-style="{ fontSize: '28px' }"
|
|
|
class="inputStyle" step-strictly />
|
|
|
@@ -97,7 +97,7 @@
|
|
|
|
|
|
<el-form-item :label="$t('common.use') + $t('common.mibi')" v-else prop="orderAmt">
|
|
|
<el-input-number v-model="walletForm.orderAmt" :min="1"
|
|
|
- :max="appStore?.userInfo?.pointsBalance" :step="Number(configTxt.configValue)"
|
|
|
+ :max="appStore?.userInfo?.pointsBalance || 1" :step="Number(configTxt.configValue)"
|
|
|
controls-position="right" size="large" @change="handleChange" style="width: 100%;"
|
|
|
:placeholder="$t('common.placeholderInput')" align="left" :input-style="{ fontSize: '28px' }"
|
|
|
class="inputStyle" step-strictly />
|
|
|
@@ -230,6 +230,7 @@ import { useAppStore } from '@/pinia/appStore'
|
|
|
import DGTMessage from '@/utils/message'
|
|
|
|
|
|
import { useI18n } from 'vue-i18n'
|
|
|
+import { el } from 'element-plus/es/locale'
|
|
|
|
|
|
const { t } = useI18n()
|
|
|
|
|
|
@@ -418,6 +419,8 @@ const confirmTransformation = async (formEl) => {
|
|
|
|
|
|
// 米币暴米币转换
|
|
|
const changeTransformation = async (index: any) => {
|
|
|
+
|
|
|
+
|
|
|
transformationIndex.value = index;
|
|
|
walletForm.value.payMethod = index ? 'BMI' : 'MI';
|
|
|
walletForm.value.orderType = index ? 'exchange_mi' : 'exchange_bmi';
|
|
|
@@ -428,6 +431,13 @@ const changeTransformation = async (index: any) => {
|
|
|
configTxt.value = result[0]
|
|
|
}
|
|
|
walletForm.value.orderAmt = index == 0 ? Number(configTxt.value.configValue) : 1
|
|
|
+ if(index==0 && appStore?.userInfo?.pointsBalance < Number(configTxt.value.configValue)){
|
|
|
+ DGTMessage.warning(`${t('common.balanceNotEnough')}${t('common.baomibi')}`);
|
|
|
+ return;
|
|
|
+ }else if(index==1 && appStore?.userInfo?.baoMiBalance < 1){
|
|
|
+ DGTMessage.warning(`${t('common.balanceNotEnough')}${t('common.mibi')}`);
|
|
|
+ return;
|
|
|
+ }
|
|
|
handleChange()
|
|
|
dialogVisible.value = true;
|
|
|
}
|