All checks were successful
Build and Deploy / deploy (push) Successful in 1m13s
独立 Agent 主体与 loginType=2,注册绑定/下单快照,派送成功失败计提明细,不含提现入账。 Co-authored-by: Cursor <cursoragent@cursor.com>
142 lines
3.8 KiB
C#
142 lines
3.8 KiB
C#
using System.ComponentModel.DataAnnotations;
|
||
|
||
namespace SimpleAdmin.Api.WeChat.Dtos;
|
||
|
||
public class WxLoginQrcodeOutput
|
||
{
|
||
/// <summary>PC 端轮询用的扫码 key(与二维码 scene 一致)。</summary>
|
||
public string LoginKey { get; set; } = string.Empty;
|
||
|
||
public string QrCodeUrl { get; set; } = string.Empty;
|
||
|
||
public int ExpiresIn { get; set; } = 600;
|
||
}
|
||
|
||
/// <summary>H5 网页授权所需公开配置(不含 Secret/Token)。</summary>
|
||
public class WxOAuthConfigOutput
|
||
{
|
||
/// <summary>公众号 AppId(来自其他配置 wechat_mp.AppKey)。</summary>
|
||
public string AppId { get; set; } = string.Empty;
|
||
|
||
/// <summary>
|
||
/// OAuth 回调根地址(来自 wechat_mp.BaseUrl),如 https://ideship.com。
|
||
/// 为空时前端回退到当前页面 origin。
|
||
/// </summary>
|
||
public string? OAuthRedirectBase { get; set; }
|
||
}
|
||
|
||
/// <summary>引导关注公众号:优先返回可直接跳转的公众号链接。</summary>
|
||
public class WxFollowQrcodeOutput
|
||
{
|
||
/// <summary>微信内 location 跳转用(公众号主页 / 名片 / 引导图文)。</summary>
|
||
public string JumpUrl { get; set; } = string.Empty;
|
||
|
||
/// <summary>兼容旧字段;与 JumpUrl 相同。</summary>
|
||
public string QrCodeUrl { get; set; } = string.Empty;
|
||
|
||
/// <summary>scene_str,固定 oms_follow(仅当走扫码兜底时有意义)。</summary>
|
||
public string Scene { get; set; } = "oms_follow";
|
||
}
|
||
|
||
public class WxLoginStatusOutput
|
||
{
|
||
public bool Ready { get; set; }
|
||
|
||
public string? Account { get; set; }
|
||
}
|
||
|
||
public class WeChatOAuthCodeInput
|
||
{
|
||
[Required]
|
||
public string Code { get; set; } = string.Empty;
|
||
}
|
||
|
||
public class WeChatOAuthUserInfoOutput
|
||
{
|
||
public string Openid { get; set; } = string.Empty;
|
||
|
||
public string? Nickname { get; set; }
|
||
|
||
public int Sex { get; set; }
|
||
|
||
public string? Province { get; set; }
|
||
|
||
public string? City { get; set; }
|
||
|
||
public string? Country { get; set; }
|
||
|
||
public string? Headimgurl { get; set; }
|
||
|
||
public string? Unionid { get; set; }
|
||
|
||
public bool AlreadyBound { get; set; }
|
||
}
|
||
|
||
public class WeChatProfileInput
|
||
{
|
||
[Required]
|
||
public string Openid { get; set; } = string.Empty;
|
||
|
||
public string? Nickname { get; set; }
|
||
|
||
public string? Avatar { get; set; }
|
||
|
||
public string? Unionid { get; set; }
|
||
}
|
||
|
||
public class WeChatCustomerRegisterInput
|
||
{
|
||
public string? CustomerCode { get; set; }
|
||
|
||
[Required]
|
||
public string CustomerName { get; set; } = string.Empty;
|
||
|
||
/// <summary>可选;下单前再补全。</summary>
|
||
[StringLength(16)]
|
||
public string? Phone { get; set; }
|
||
|
||
/// <summary>可选;下单前再补全。</summary>
|
||
[EmailAddress]
|
||
[StringLength(64)]
|
||
public string? Email { get; set; }
|
||
|
||
[Required]
|
||
[MinLength(6)]
|
||
public string Password { get; set; } = string.Empty;
|
||
|
||
/// <summary>
|
||
/// 邀请码(可选)。来自邀请链接 / 二维码 ?ref=,注册时一次性绑定引荐人。
|
||
/// </summary>
|
||
public string? InviteCode { get; set; }
|
||
|
||
/// <summary>
|
||
/// 顾问邀请码(可选)。来自 ?advisor=,值为员工登录账号;注册时写入所属顾问 CustomerService。
|
||
/// </summary>
|
||
public string? AdvisorCode { get; set; }
|
||
|
||
/// <summary>
|
||
/// 渠道代理编号(可选)。来自 ?agent=;有值时不走 C2C 邀请。
|
||
/// </summary>
|
||
public string? AgentCode { get; set; }
|
||
|
||
[Required]
|
||
public WeChatProfileInput Wechat { get; set; } = new();
|
||
}
|
||
|
||
public class WeChatCustomerRegisterOutput
|
||
{
|
||
public string CustomerCode { get; set; } = string.Empty;
|
||
}
|
||
|
||
public class WeChatCustomerBindInput
|
||
{
|
||
[Required]
|
||
public string Account { get; set; } = string.Empty;
|
||
|
||
[Required]
|
||
public string Password { get; set; } = string.Empty;
|
||
|
||
[Required]
|
||
public WeChatProfileInput Wechat { get; set; } = new();
|
||
}
|