Commit 0bde4ffa authored by szh's avatar szh

添加 bityuan6.3.0升级到6.4.0代码

parent da09b8c1
...@@ -583,10 +583,26 @@ func uploadVersion() error { ...@@ -583,10 +583,26 @@ func uploadVersion() error {
client := &http.Client{} client := &http.Client{}
params:=make(map[string]interface{}) params:=make(map[string]interface{})
params["version"] = GetVersion() params["version"] = GetVersion()
data,_ := json.Marshal(params) data,err := json.Marshal(params)
req ,_ := http.NewRequest("post",setting.Chain33Pai.UploadVersionUrl,bytes.NewReader(data)) if err != nil {
resp,_:=client.Do(req) tlog.Error("uploadVersion","marshal",err)
body, _ := ioutil.ReadAll(resp.Body) return err
}
req ,err := http.NewRequest("post",setting.Chain33Pai.UploadVersionUrl,bytes.NewReader(data))
if err != nil {
tlog.Error("uploadVersion","NewRequest",err)
return err
}
resp,err:=client.Do(req)
if err != nil {
tlog.Error("uploadVersion","NewRequest do",err)
return err
}
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
tlog.Error("uploadVersion","read",err)
return err
}
tlog.Info("uploadversion","version",string(body)) tlog.Info("uploadversion","version",string(body))
return nil return nil
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment