修复拍单余额查看闪退bug 优化每单拍单金额逻辑

This commit is contained in:
wule committed 2026-11-09 11:02:04 +08:00
1 parent ec13db7cc1
commit ba6da5e85f
2 files changed
+7 -1

No files matched your search

+5 -1
View File
@@ -61,7 +61,11 @@ namespace _29WxOrderWpf
{ {
BaseClass.Balance = BaseRegex.GetDecimalJson(ref html, "balance"); BaseClass.Balance = BaseRegex.GetDecimalJson(ref html, "balance");
MainWindow.Instance.Balance = BaseClass.Balance.ToString("0.00"); MainWindow.Instance.Balance = BaseClass.Balance.ToString("0.00");
}
// 更新下每单扣费金额
BaseClass.PostagePerOrder = Math.Max(2.2m, BaseRegex.GetDecimalJson(ref html, "postage_per_order"));
BaseClass.RefundPostagePerOrder = Math.Max(2.5m, BaseRegex.GetDecimalJson(ref html, "refund_postage_per_order"));
}
} }
} }
} }
@@ -192,6 +192,8 @@ namespace Work._29Tools.Forms.UserForms
paymentList = JsonHelper.DeserializeJsonToList<user_payment_record>(JsonHelper.JObjectParse(html3)["data"].ParseToString()); paymentList = JsonHelper.DeserializeJsonToList<user_payment_record>(JsonHelper.JObjectParse(html3)["data"].ParseToString());
foreach (var payment in paymentList) foreach (var payment in paymentList)
{ {
if (!this.Created)
return;
Invoke(new Action(() => Invoke(new Action(() =>
{ {
var rowIndex = this.dgvPayment.Rows.Add( var rowIndex = this.dgvPayment.Rows.Add(