From 609515783ba2383dde8bdc2924ef6bec5b3260d7 Mon Sep 17 00:00:00 2001 From: listen <494177603@qq.com> Date: Thu, 9 Sep 2021 19:33:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code_bank.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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