2025-04-21 14:10:27 +08:00

42 lines
1.3 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using MyCode.Project.Infrastructure.Common;
using MyCode.Project.Infrastructure.Config;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MyCode.Project.Infrastructure.Constant
{
public static class WechatConfigConst
{
private static string json = WebConfigUtils.GetAppSettingsInfo("WechatConfig");
private static WechatConfig wechatConfig = JsonHelper.ToObject<WechatConfig>(json);
/// <summary>
/// API授权域名
/// </summary>
public static string ApiAuthDomain = wechatConfig.ApiAuthDomain;
/// <summary>
/// 授权方式。
/// snsapi_base不弹出授权页面直接跳转只能获取用户openid;
/// snsapi_userinfo出授权页面可通过openid拿到昵称、性别、所在地。并且即使在未关注的情况下只要用户授权也能获取其信息.
/// </summary>
public static string Scope = wechatConfig.Scope;
/// <summary>
/// 微信公众号名
/// </summary>
public static string WechatPublic = wechatConfig.WechatPublic;
/// <summary>
/// 打开小程序的网站地址
/// </summary>
public static string AppHtml = wechatConfig.AppHtml;
}
}