Parcourir la source

1.提现 - 修复自定义无法提现的问题

tags/0.0.2+7^2
杨华轩 il y a 4 ans
Parent
révision
45b1c0e6d7
1 fichiers modifiés avec 38 ajouts et 14 suppressions
  1. +38
    -14
      lib/pages/withdraw_page/withdraw_page.dart

+ 38
- 14
lib/pages/withdraw_page/withdraw_page.dart Voir le fichier

@@ -363,10 +363,28 @@ class _WithdrawContainerState extends State<_WithdrawContainer> {
}

Widget _createSubmit(WithdrawModel model) {

String value = model.cashOutDashbordItems[_currentIndex].value;
// String value = model.cashOutDashbordItems[_currentIndex].value;
// try {
// if (num.tryParse(value) != null &&
// null != _bloc.withdrawDataModel &&
// num.tryParse(value) <
// num.tryParse(_bloc.withdrawDataModel.finValue)) {
// _submitable = true;
// } else {
// _submitable = false;
// }
// } catch (e, s) {
// print(e);
// print(s);
// }
try {
if (num.tryParse(value) != null && null != _bloc.withdrawDataModel && num.tryParse(value) < num.tryParse(_bloc.withdrawDataModel.finValue)) {
var currentWithdraw = num.tryParse(_controller.text);
var finValue = num.tryParse(_bloc.withdrawDataModel.finValue);
if (currentWithdraw != null &&
currentWithdraw != 0 &&
finValue != null &&
finValue != 0 &&
currentWithdraw <= finValue) {
_submitable = true;
} else {
_submitable = false;
@@ -434,18 +452,24 @@ class _WithdrawContainerState extends State<_WithdrawContainer> {
);
}

///检查提现按钮是否可用
void _checkSubmit(String value) {
try {
if (num.tryParse(value) != null &&
num.tryParse(value) < num.tryParse(_bloc.withdrawDataModel.finValue)) {
_submitable = true;
} else {
_submitable = false;
}
} catch (e, s) {
print(e);
print(s);
}
// try {
// var currentValue = num.tryParse(value);
// var finValue = num.tryParse(_bloc.withdrawDataModel.finValue);
//
// if (currentValue != null &&
// currentValue != 0 &&
// currentValue <= finValue &&
// finValue != 0) {
// _submitable = true;
// } else {
// _submitable = false;
// }
// } catch (e, s) {
// print(e);
// print(s);
// }
setState(() {});
}
}

Chargement…
Annuler
Enregistrer