更新密码找回uniapp

This commit is contained in:
hero920103 committed 2026-11-16 17:22:50 +08:00
1 parent 7f9a66da0f
commit 3fdda89833
1304 files changed
+3503 -26132

No files matched your search

-23
View File
@@ -1,16 +1,3 @@
-- =============================================================
-- 微信小程序配置(统一认证 · 小程序一键登录)
--
-- 小程序与公众号是两套独立应用,AppID / AppSecret 不可混用,
-- 因此单独建表。app_secret 以 AES-256-GCM 密文存储(YZW1: 前缀)。
--
-- 关联链路:
-- uniapp 小程序 → wx.login / getPhoneNumber
-- → POST /auth/wechat/miniapp/login
-- → jscode2session 换 openid → 按手机号定位 yz_auth_identity
-- → 写入 yz_auth_identity_third(provider='wechat_mini')
-- → 复用统一认证的会话与令牌(yz_auth_session / yz_auth_refresh_token)
-- =============================================================
CREATE TABLE IF NOT EXISTS `yz_platform_wechat_mini_config` (
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
@@ -24,19 +11,9 @@ CREATE TABLE IF NOT EXISTS `yz_platform_wechat_mini_config` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='微信小程序配置';
-- -------------------------------------------------------------
-- 接入应用:微信小程序(app_type=4)
-- 小程序不走浏览器跳转,只用 POST /auth/wechat/miniapp/login 换令牌,
-- 因此无需登记 redirect_uris。
-- -------------------------------------------------------------
INSERT INTO `yz_auth_client`
(`client_id`, `app_code`, `name`, `app_type`, `grant_types`, `scope`, `access_ttl`, `refresh_ttl`, `realm`)
VALUES
('yz-miniapp', 'miniapp', '微信小程序', 4, 'authorization_code,refresh_token', 'openid,profile,tenant', 1800, 2592000, 'tenant')
ON DUPLICATE KEY UPDATE `name` = VALUES(`name`);
-- -------------------------------------------------------------
-- 第三方身份源:允许 yz_auth_identity_third.provider 出现 'wechat_mini'
-- (表结构本身为 varchar,无需 DDL;此处仅作说明)
-- provider = 'wechat_mini',open_id = 小程序 openid,union_id = 小程序 unionid
-- -------------------------------------------------------------