更新密码找回uniapp
This commit is contained in:
1 parent
7f9a66da0f
commit
3fdda89833
1304 files changed
+3503
-26132
No files matched your search
+14
-31
@@ -2,47 +2,36 @@ package models
|
||||
|
||||
import "time"
|
||||
|
||||
// =============================================================
|
||||
// 微信公众号(服务号)绑定与推送(表结构见 docs/sql/create_platform_wechat_mp.sql)
|
||||
// 1. 配置:AppID / AppSecret / Token / EncodingAESKey(敏感字段加密存储)
|
||||
// 2. 粉丝:关注/取关事件沉淀,可绑定平台用户或租户用户,认证后定向推送
|
||||
// 3. 验证码:扫码关注 → 公众号被动回复验证码 → 平台核销完成绑定
|
||||
// =============================================================
|
||||
|
||||
// 绑定对象类型
|
||||
const (
|
||||
WechatBindTypePlatformUser = "platform_user" // 平台用户(yz_system_admin_user)
|
||||
WechatBindTypeTenantUser = "tenant_user" // 租户用户(yz_system_tenant_user)
|
||||
WechatBindTypePlatformUser = "platform_user"
|
||||
WechatBindTypeTenantUser = "tenant_user"
|
||||
)
|
||||
|
||||
// 验证码状态
|
||||
const (
|
||||
WechatVerifyStatusWaiting = 0 // 待扫码
|
||||
WechatVerifyStatusScanned = 1 // 已扫码待核销
|
||||
WechatVerifyStatusUsed = 2 // 已核销
|
||||
WechatVerifyStatusExpired = 3 // 已过期
|
||||
WechatVerifyStatusWaiting = 0
|
||||
WechatVerifyStatusScanned = 1
|
||||
WechatVerifyStatusUsed = 2
|
||||
WechatVerifyStatusExpired = 3
|
||||
)
|
||||
|
||||
// WechatMpConfig 微信公众号(服务号)配置 yz_platform_wechat_mp_config(单行)
|
||||
type WechatMpConfig struct {
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
||||
AppID string `orm:"column(app_id);size(64)" json:"app_id"`
|
||||
AppSecret string `orm:"column(app_secret);size(512)" json:"-"` // 加密存储,不回显
|
||||
AppSecret string `orm:"column(app_secret);size(512)" json:"-"`
|
||||
Token string `orm:"column(token);size(128)" json:"token"`
|
||||
AESKey string `orm:"column(aes_key);size(512)" json:"-"` // 加密存储,不回显
|
||||
EncryptMode string `orm:"column(encrypt_mode);size(16)" json:"encrypt_mode"` // plain / compatible / safe
|
||||
AESKey string `orm:"column(aes_key);size(512)" json:"-"`
|
||||
EncryptMode string `orm:"column(encrypt_mode);size(16)" json:"encrypt_mode"`
|
||||
TemplateID string `orm:"column(template_id);size(128)" json:"template_id"`
|
||||
Verified int8 `orm:"column(verified);default(0)" json:"verified"`
|
||||
Enabled int8 `orm:"column(enabled);default(0)" json:"enabled"`
|
||||
Remark string `orm:"column(remark);size(255)" json:"remark"`
|
||||
FollowQrcode string `orm:"column(follow_qrcode);type(text);null" json:"follow_qrcode"` // 关注二维码(data URL)
|
||||
FollowQrcode string `orm:"column(follow_qrcode);type(text);null" json:"follow_qrcode"`
|
||||
CreateTime time.Time `orm:"column(create_time);type(datetime);auto_now_add" json:"create_time"`
|
||||
UpdateTime *time.Time `orm:"column(update_time);type(datetime);null" json:"update_time"`
|
||||
}
|
||||
|
||||
func (m *WechatMpConfig) TableName() string { return "yz_platform_wechat_mp_config" }
|
||||
|
||||
// WechatMpFollower 微信公众号关注用户(粉丝) yz_platform_wechat_mp_follower
|
||||
type WechatMpFollower struct {
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
||||
OpenID string `orm:"column(openid);size(64)" json:"openid"`
|
||||
@@ -68,7 +57,6 @@ type WechatMpFollower struct {
|
||||
|
||||
func (m *WechatMpFollower) TableName() string { return "yz_platform_wechat_mp_follower" }
|
||||
|
||||
// WechatMpVerifyCode 公众号关注取码/绑定验证码 yz_platform_wechat_mp_verify_code
|
||||
type WechatMpVerifyCode struct {
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
||||
Scene string `orm:"column(scene);size(64)" json:"scene"`
|
||||
@@ -85,9 +73,6 @@ type WechatMpVerifyCode struct {
|
||||
|
||||
func (m *WechatMpVerifyCode) TableName() string { return "yz_platform_wechat_mp_verify_code" }
|
||||
|
||||
// WechatMpLoginToken 公众号一次性登录令牌 yz_platform_wechat_mp_login_token
|
||||
// 用户在公众号内发送「登录」→ 生成一次性令牌并回复登录链接 →
|
||||
// 用户在微信内打开链接,前端用令牌换取正式登录态(未认证公众号无法使用网页授权,用此方案替代)。
|
||||
type WechatMpLoginToken struct {
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
||||
Token string `orm:"column(token);size(64)" json:"token"`
|
||||
@@ -102,15 +87,13 @@ type WechatMpLoginToken struct {
|
||||
|
||||
func (m *WechatMpLoginToken) TableName() string { return "yz_platform_wechat_mp_login_token" }
|
||||
|
||||
// 扫码登录会话状态
|
||||
const (
|
||||
WechatScanLoginPending = 0 // 待确认(等待用户点击确认链接)
|
||||
WechatScanLoginOK = 1 // 已确认(待 PC 端领取令牌)
|
||||
WechatScanLoginExpired = 2 // 已过期
|
||||
WechatScanLoginPicked = 3 // 令牌已领取
|
||||
WechatScanLoginPending = 0
|
||||
WechatScanLoginOK = 1
|
||||
WechatScanLoginExpired = 2
|
||||
WechatScanLoginPicked = 3
|
||||
)
|
||||
|
||||
// WechatMpScanLogin 公众号扫码登录会话 yz_platform_wechat_mp_scan_login
|
||||
type WechatMpScanLogin struct {
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
||||
Scene string `orm:"column(scene);size(64)" json:"scene"`
|
||||
|
||||
Reference in new issue
Block a user