using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Web.Mvc;
using WX.CRM.Common;
namespace Core.Web.Controllers
{
public class QwMessageController : BaseController
{
///
/// 付费版企业微信
///
///
public ActionResult QwFFBan(string exuserid, string companyCode, string resid )
{
//ConStringHelper.CompanyCode code = (ConStringHelper.CompanyCode)Enum.Parse(typeof(ConStringHelper.CompanyCode), companyCode);
var host = ConfigurationManager.AppSettings["QxMessage_" + companyCode].ToString();
// var host = "http://183.6.86.112:8082";
ViewBag.host = host;
ViewBag.exuserid = exuserid;
ViewBag.resid = resid;
ViewBag.eid = Eid;
return View();
}
// GET: QwMessage
public ActionResult Index()
{
return View();
}
[HttpGet]
public ActionResult List()
{
return View();
}
[HttpPost]
public JsonResult List(string resId, string companyCode)
{
//ConStringHelper.CompanyCode code = (ConStringHelper.CompanyCode)Enum.Parse(typeof(ConStringHelper.CompanyCode), companyCode);
var host = ConfigurationManager.AppSettings["WxMessage_" + companyCode].ToString();
var url = host + "/WxMessageSvr.svc/QwRcontact/Get/" + resId;
var res = CRM.Core.Common.Utility.GetData(url, string.Empty);
var result = JsonConvert.DeserializeObject>>(res);
var data = new
{
msg = "数据加载成功!",
count = 1,
code = 0,
data = result.retmsg
};
return Json(data, JsonRequestBehavior.AllowGet);
}
public class QwRcontactView
{
public string vid { get; set; }
public string remoteid { get; set; }
public string customername { get; set; }
public string companyremark { get; set; }
public string realremark { get; set; }
public string remarkphone { get; set; }
public string remarks { get; set; }
public string username { get; set; }
public string realname { get; set; }
}
public class ajaxResult
{
public bool result { get; set; }
public int retcode { get; set; }
public T retmsg { get; set; }
}
}
}