diff --git a/code_bank.go b/code_bank.go index f10cf0d..4970f3f 100644 --- a/code_bank.go +++ b/code_bank.go @@ -1,6 +1,7 @@ package siterpc import ( + "encoding/json" "errors" ) @@ -41,9 +42,16 @@ func GetOneCode(site_id, dbname string, url ...string) (string, error) { return "", err } + var bankCode string + err = json.Unmarshal([]byte(res_data_de),&bankCode) + + if err != nil { + return "", err + } + if res_data_de == "" { return "", nil } - return res_data_de, nil + return bankCode, nil } \ No newline at end of file