针对应用集成企业微信,实现推送的消息链接跳转页面:
1、消息链接打开页面,将页面路由作为参数代入(C#);
2、页面获取参数 url ,对应跳转;
public ActionResult Index(string redirect)
{
//企业微信AppId
string WXAppId = ConfigurationManager.AppSettings["WXAppId"];
string url = string.Format(@"https://open.weixin.qq.com/connect/oauth2/authorize?appid={0}&redirect_uri=http://wwwwwwwwww/App/index.html%3Furl={1}&response_type=code&scope=snsapi_base&state=QYState#wechat_redirect", WXAppId, redirect);
return Redirect(url);
}
参数url,redirect传递参数AuthPageList
链接跳转,进入页面,对应页面链接如下:
http://wwwwwwwwww/App/index.html?url=AuthPageList&code=CmKWEthJjjt57Ri41b2cf8W2A4LZWZMMKkvK3M7ehZo&state=QYState#/