SourceCode/jiouosdp/Controllers/WX/RecieverAddressController.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using RFrameGenerate.Model;
using System.Web.Script.Serialization;
using RFrameGenerate.BLL;
using RFrameGenerate.Common;
using weixinopen;
namespace jiouosdp.Controllers.WX
{
public class RecieverAddressController : BaseWeiXinController
{
//
// GET: /RecieverAddress/
[WeiXinLoginAttribute(IsAutoLogin = false, IsAuthorization = false)]//自动登录
public ActionResult SelectAdd(int o = 0)
{
string auturl = WeiXinOpenRequest.GetOAuthoUrl2(WeiXinOpenConfig.webdomain.Replace("appid", CurrentManage.AppId) + string.Format("RecieverAddress/RACall?o={0}&userid={1}",
o, CurrentManage.MerchantUserID), "author", CurrentManage.AppId, Wechat.Enum.Scope.snsapi_base);
return Redirect(auturl);
}
[WeiXinLoginAttribute(IsAutoLogin = false, IsAuthorization = false)]//自动登录
public ActionResult RACall(string code, string state, string appid, string userid, int o = 0)
{
ComponentAccessToken webToken = WeiXinOpenRequest.get_access_token(code, appid);
ViewBag.access_token = webToken.access_token;
ViewBag.userid = userid;
ViewBag.appid = appid;
ViewBag.openid = webToken.openid;
return View();
}
[WeiXinLoginAttribute(IsAutoLogin = false, IsAuthorization = false)]//自动登录
public JsonResult ApiAdd(string openid,string username, string telNumber, string addressPostalCode, string proviceFirstStageName, string addressCitySecondStageName, string addressCountiesThirdStageName, string addressDetailInfo, string nationalCode)
{
Guid RecieverAddressGuid;
var result = RecieverAddressManage.ApiAdd(out RecieverAddressGuid,openid,username, telNumber, addressPostalCode, proviceFirstStageName, addressCitySecondStageName, addressCountiesThirdStageName, addressDetailInfo, nationalCode);
if (result.State == true)
return Json(new { Result = "OK", id = RecieverAddressGuid });
else
return Json(new { Result = "NO", Msg = result.Msg });
}
public ActionResult Index(int o = 0)
{
ViewBag.o = o;
return View();
}
public ActionResult Add(int d = 0, int o = 0)
{
ViewBag.o = o;
ViewBag.d = d;
return View();
}
后面还有 46 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。