fix: 修复添加钱包 other_notify 传递缺失

This commit is contained in:
v03413
2026-02-04 15:12:51 +08:00
parent d9605819e3
commit 52b59bd609
2 changed files with 11 additions and 6 deletions
+6 -5
View File
@@ -13,10 +13,11 @@ type Wallet struct {
}
type wAddReq struct {
Name string `json:"name"`
Remark string `json:"remark"`
Address string `json:"address" binding:"required"`
TradeType string `json:"trade_type" binding:"required"`
Name string `json:"name"`
Remark string `json:"remark"`
Address string `json:"address" binding:"required"`
TradeType string `json:"trade_type" binding:"required"`
OtherNotify uint8 `json:"other_notify"`
}
type wModReq struct {
@@ -57,7 +58,7 @@ func (Wallet) Add(ctx *gin.Context) {
MatchAddr: strings.TrimSpace(req.Address),
TradeType: req.TradeType,
Status: model.WaStatusEnable,
OtherNotify: model.WaOtherDisable,
OtherNotify: req.OtherNotify,
}
if !wallet.IsValid() {
+5 -1
View File
@@ -437,7 +437,11 @@ const addWallet = async () => {
if (state) return;
try {
await addWalletAPI(addFrom.value);
const submitData = {
...addFrom.value,
other_notify: addFrom.value.other_notify ?? 0
};
await addWalletAPI(submitData);
open.value = false;
getCommonTableList();
Notification.success("添加成功");