Labi1993
2016-07-08 01:22C#中 刷新二维码,求解
在控制器生成二维码:
[HttpGet]
public ActionResult Exchange()
{
//生成 seceneid
TimeSpan ts = DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0);
string seceneid = ts + "";
Session["auth_sceneid"] = seceneid;
return View();
}
然后在view中显示:
js:
var qrcode_url = '@(MvcApplication.WebRoot + Url.Action("Auth", "Client", new { seceneid = Session["auth_sceneid"] }))';
$('#qrcode').empty().qrcode({ render: 'canvas', size: 200, text: qrcode_url, quiet: 1 });
如果我想刷新,要什么做呢
- 点赞
- 回答
- 收藏
- 复制链接分享
1条回答
为你推荐
- C#中TEXTBOX数据怎么保存?
- c#
- visual studio
- 1个回答
- C#中panel里面的窗体如何控制?
- c#
- 2个回答
- C# 如何在其他类中通知主窗口刷新界面?
- c#
- visual studio
- microsoft
- 3个回答
- C# 中ajax如何深度使用
- ajax
- c#
- 3个回答
- C# 中zipfile有问题 ,求解111111。
- c#
- 6个回答
换一换