add 3 new api

This commit is contained in:
2025-03-08 20:34:14 +08:00
parent 9c03fe8f7c
commit 42ea1bd929
14 changed files with 530 additions and 31 deletions

View File

@@ -6,7 +6,6 @@ import (
"fmt"
"github.com/pkg/errors"
"io"
"log"
"net/http"
"strconv"
"time"
@@ -99,18 +98,14 @@ func (w *WestDexService) CallAPI(code string, reqData map[string]interface{}) (r
return nil, DecryptErr
}
return decryptedData, errors.New(westDexResp.Message)
log.Println(string(decryptedData))
}
if westDexResp.Data == "" {
return nil, errors.New(westDexResp.Message)
}
// 解密响应数据
decryptedData, DecryptErr := crypto.WestDexDecrypt(westDexResp.Data, w.config.Key)
if DecryptErr != nil {
return nil, DecryptErr
}
// 输出解密后的数据
log.Println(string(decryptedData))
return decryptedData, nil
}