fix: 修复添加钱包 other_notify 传递缺失
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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("添加成功");
|
||||
|
||||
Reference in New Issue
Block a user