public object SendMsg([FromBody] FormParam.ReuqestForm from)
 {
     try
     {
         return(msg.SendTemplateMsg(from.openId, from.templateId,
                                    from.getData(), from.appId, from.appurl, from.pagepath, from.color));
     }
     catch (Exception ex)
     {
         throw new ApiResultException(ex.Message, ex);
     }
 }
示例#2
0
        public IActionResult Index()
        {
            #region 消息推送接口测试方法
            MsgAPI  api  = new MsgAPI();
            string  data = @"{
                             'User': {

                                    'value': 'Bill',
                              'color': '#173177'

                                },
                             'Prod': {
                              'value': 'A-202',
                              'color': '#173177'
                             },
                             'Date': {
                              'value': '5',
                              'color': '#173177'
                             },
                             'Money': {
                              'value': '500000',
                              'color': 'red'
                             }
                            }";
            JObject obj  = JObject.Parse(data);
            string  str4 = api.SendTemplateMsg("oaleEuK_SDBBqhpcE6nrehfSaGWg", "s11wtORaOEKO_BLL4Kd7OrAynTzO5KNCvQPvOAwvJu0", obj, UserConfig.appid);
            #endregion
            #region 用户信息获取测试方法
            //UserInfoAPI userInfo = new UserInfoAPI();
            //var str4 = userInfo.GetUserList();
            #endregion
            //string str = Token.GetToken();
            return(Ok());
            //return Ok(_services.dosomething());
        }