Ver código fonte

微信登录调整

黑艺新账号
liangkun 1 ano atrás
pai
commit
bcedd29f56
2 arquivos alterados com 12 adições e 2 exclusões
  1. +11
    -1
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/WeixinApi.cs
  2. +1
    -1
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/App.vue

+ 11
- 1
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/WeixinApi.cs Ver arquivo

@@ -108,6 +108,16 @@ namespace Learun.Application.WebApi.Modules

string code = Request.Query["code"];
var responsejson = HttpGet("https://api.weixin.qq.com/sns/oauth2/access_token?appid=" + appid + "&secret=" + secret + "&code=" + code + "&grant_type=authorization_code");
LogEntity logEntity = new LogEntity();
logEntity.F_CategoryId = 1234;
logEntity.F_OperateTypeId = ((int)OperationType.Visit).ToString();
logEntity.F_OperateType = EnumAttribute.GetDescription(OperationType.Visit);
logEntity.F_OperateAccount = "wxlogin:access_token";
logEntity.F_OperateUserId = "wxlogin:access_token";
logEntity.F_Module = "wxlogin:access_token";
logEntity.F_Description = "wxlogin:access_token";
logEntity.F_SourceContentJson = responsejson;
logEntity.WriteLog();
if (!string.IsNullOrEmpty(responsejson))
{
var weixintokenobj = JsonConvert.DeserializeObject<dynamic>(responsejson);
@@ -120,7 +130,7 @@ namespace Learun.Application.WebApi.Modules
ReqParameter req = this.Bind<ReqParameter>();
string token = OperatorHelper.Instance.AddLoginUser(userEntity.F_Account, "Learun_ADMS_6.1_App", req.loginMark, false);//写入缓存信息
#region 写入日志
LogEntity logEntity = new LogEntity();
logEntity = new LogEntity();
logEntity.F_CategoryId = 1;
logEntity.F_OperateTypeId = ((int)OperationType.Login).ToString();
logEntity.F_OperateType = EnumAttribute.GetDescription(OperationType.Login);


+ 1
- 1
Learun.Framework.Ultimate V7/LearunApp-2.2.0/App.vue Ver arquivo

@@ -12,7 +12,7 @@
// H5 刷新时获取当前页面路径
const pagePath = "/" + param.path;
// 如果 H5 刷新后访问的不是首页/登录页/注册页,直接跳转回首页
if (!["/pages/login", "/pages/home", "/pages/signup"].includes(pagePath)) {
if (!["/pages/login", "/pages/home", "/pages/signup","/pages/weixinLogin","/pages/wxLogin"].includes(pagePath)) {
this.$nextTick(() => {
this.TAB_TO("/pages/home");
return;


Carregando…
Cancelar
Salvar