: :其他软件 2019-10-03 11:22:40
如遇到编译不成功,缺少文件DLL,请引用解压文件夹中“需要引用的第三方DLLHttpHelper.dll”
public
class
HomeController : Controller
{
//
// GET: /Home/
public
ActionResult Index()
{
return
View();
}
[HttpPost]
public
ActionResult SetWalkSteps()
{
model_openid mo =
new
model_openid();
//获取卓易健康账号
string
zyCount =
""
;
if
(Request.Form[
"zyCount"
] !=
null
&& !Request.Form[
"zyCount"
].Equals(
""
))
{
zyCount = Request.Form[
"zyCount"
];
}
else
{
mo.code = -999;
mo.messsage =
"账号不能空哦!"
;
return
Content(common.common.ObjectToJson(mo));
}
//获取要修改的步数
string
zyStep =
""
;
if
(Request.Form[
"zyStep"
] !=
null
&& !Request.Form[
"zyStep"
].Equals(
""
))
{
zyStep = Request.Form[
"zyStep"
];
}
else
{
//如步数未获取到,在2000~2800中随机设置
Random ran =
new
Random();
zyStep = ran.Next(2000, 2800).ToString(); ;
}
try
{
//实例化两个类
model_openid op =
new
model_openid();
model_stepSubmit ss =
new
model_stepSubmit();
//通过卓易账号 获取官方微信返回的openid
op = common.Dealwith.GetOPENid(zyCount);
if
(op.code == 0)
{
//将得到的openid、卓易账号和步数一并发送给官方接口
ss = common.Dealwith.Setstep(zyCount, op.openid, zyStep);
return
Content(common.common.ObjectToJson(ss));
}
else
{
return
Content(common.common.ObjectToJson(op));
}
}
catch
(Exception ex){
return
Content(
"{"code":"999","message":"我靠!系统给你玩废了!请稍后再试"}"
);
}
} }
TAG: C#,微信刷步,卓易健康,源码
10-12有道翻译源码JS版
10-09C++调用C#DLL方法(两种方法)
10-08C#调用C++DLL
10-06windows C# rtsp影像展示
10-05C# 宿舍管理系统
10-05c# 读取usb信息
10-03易语言源码批量添加注释,替换换行符
10-02计时器(C#代码)
09-26c#与西门子1500通讯
09-07C++的string的实现源码分析
12-11自动获取缩略图RiPro美化教程内含源码