SourceCode/jiouosdp/Controllers/WeiXinTestController.cs
(完整代码) 1KBusing RFrameGenerate.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Wechat;
using weixinopen;
namespace JiouSDP.Controllers
{
public class WeiXinTestController : BaseWeiXinController
{
//需要获取openid的,添加该属性
//[WeiXinAuthorization(IsAuthorization = true)]
public ActionResult AuthorizationTest(string name)
{
return Content("你好");
}
//分享,如果需要带上参数,在调用的时间应该加上(例:http://liuyi.rightcode.cn/weixintest/sharetest?shareopenid=1234567865432&name=value)
[WeiXinShare(
IsShare = true,
guideStr = "让朋友也来享受吧",
title = "测试分享",
desc = "分享描述",
imgUrl = "http://p5.qhimg.com/t0103c1e1d812407d87.png")]
public ActionResult ShareTest()
{
//var currentParam = System.Web.Param.GetOrPostParam.GetRequestGet(Request);
return View();
}
public ActionResult ShareTest1()
{
var share = new Share(Request.Url.ToString())
{
desc = "分享描述",
title = "测试分享",
guideStr = "让朋友也来享受吧",
imgUrl = "http://p5.qhimg.com/t0103c1e1d812407d87.png",
};
ViewBag.sharejs = share.CreateShareToHtml();
return View();
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。