Example #1
0
        public async Task <object> MiniAuth(WeChatMiniProgramAuthenticateModel loginModel)
        {
            var appid = await _setting.GetOrNullAsync(MallManagementSetting.MiniAppId);

            var appSec = await _setting.GetOrNullAsync(MallManagementSetting.MiniAppSecret);

            return(await _weixinAppService.MiniAuth(loginModel, appid, appSec));
        }
Example #2
0
        public async Task <object> MiniAuth(WeChatMiniProgramAuthenticateModel loginModel)
        {
            var appName = _httpContextAccessor?.HttpContext.Request.Headers["AppName"].FirstOrDefault();
            var app     = await _appProvider.GetOrNullAsync(appName);

            var appid  = app["appid"] ?? throw new AbpException($"App:{appName} appid未设置");
            var appSec = app["appsec"] ?? throw new AbpException($"App:{appName} appsec未设置");

            return(await _weixinAppService.MiniAuth(loginModel, appid, appSec));
        }
Example #3
0
        public async Task <object> MiniAuth(WeChatMiniProgramAuthenticateModel loginModel)
        {
            var appName = _httpContextAccessor.GetAppName();

            return(await _weixinAppService.MiniAuth(loginModel, appName));
        }