|
@ -39,19 +39,19 @@ func SendUniformMessage(dbname, site_id string, appid, secret, touser, mp_appid, |
|
|
|
|
|
|
|
|
conn, err := rpc_server_conn(url...) |
|
|
conn, err := rpc_server_conn(url...) |
|
|
|
|
|
|
|
|
data := UniformMessageReq{} |
|
|
|
|
|
data.SiteId = site_id |
|
|
|
|
|
data.Dbname = dbname |
|
|
|
|
|
data.Appid = appid |
|
|
|
|
|
data.Secret = secret |
|
|
|
|
|
data.Touser = touser |
|
|
|
|
|
data.MpAppid = mp_appid |
|
|
|
|
|
data.TemplateId = temp_id |
|
|
|
|
|
data.Url = redirect_url |
|
|
|
|
|
data.MiniProgram = mini_program |
|
|
|
|
|
data.Data = data |
|
|
|
|
|
|
|
|
|
|
|
data_json, err := json.Marshal(data) |
|
|
|
|
|
|
|
|
uniform_message_data := UniformMessageReq{} |
|
|
|
|
|
uniform_message_data.SiteId = site_id |
|
|
|
|
|
uniform_message_data.Dbname = dbname |
|
|
|
|
|
uniform_message_data.Appid = appid |
|
|
|
|
|
uniform_message_data.Secret = secret |
|
|
|
|
|
uniform_message_data.Touser = touser |
|
|
|
|
|
uniform_message_data.MpAppid = mp_appid |
|
|
|
|
|
uniform_message_data.TemplateId = temp_id |
|
|
|
|
|
uniform_message_data.Url = redirect_url |
|
|
|
|
|
uniform_message_data.MiniProgram = mini_program |
|
|
|
|
|
uniform_message_data.Data = data |
|
|
|
|
|
|
|
|
|
|
|
data_json, err := json.Marshal(uniform_message_data) |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
return nil, err |
|
|
return nil, err |
|
|
} |
|
|
} |
|
|