diff --git a/29WxOrderWpf/StartUp.cs b/29WxOrderWpf/StartUp.cs index 06276b9..f5c80c5 100644 --- a/29WxOrderWpf/StartUp.cs +++ b/29WxOrderWpf/StartUp.cs @@ -61,7 +61,11 @@ namespace _29WxOrderWpf { BaseClass.Balance = BaseRegex.GetDecimalJson(ref html, "balance"); 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")); + } } } } diff --git a/Work/_29Tools/Forms/UserForms/WXGetBalanceQrCodeForm.cs b/Work/_29Tools/Forms/UserForms/WXGetBalanceQrCodeForm.cs index ec7ba25..f516212 100644 --- a/Work/_29Tools/Forms/UserForms/WXGetBalanceQrCodeForm.cs +++ b/Work/_29Tools/Forms/UserForms/WXGetBalanceQrCodeForm.cs @@ -192,6 +192,8 @@ namespace Work._29Tools.Forms.UserForms paymentList = JsonHelper.DeserializeJsonToList(JsonHelper.JObjectParse(html3)["data"].ParseToString()); foreach (var payment in paymentList) { + if (!this.Created) + return; Invoke(new Action(() => { var rowIndex = this.dgvPayment.Rows.Add(