public string wxpush(string openid, string content, string key) { try { if (!key.Equals(APIKey)) { retMod.retmsg = "key不正确"; } else if (string.IsNullOrEmpty(openid)) { retMod.retmsg = "未指定openid"; } else if (string.IsNullOrEmpty(content)) { retMod.retmsg = "内容不能为空"; } else { WxAPI api = WxAPI.Code_Get(); retMod.result = api.SendMsg(openid, HttpUtility.UrlDecode(content)); retMod.retcode = M_APIResult.Success; } } catch (Exception ex) { ZLLog.L("wxpush failed:[" + openid + "][" + content + "]" + ex.Message); retMod.retmsg = ex.Message; } return(retMod.ToString()); }