{msg}
} - + {canWechatQuick ? ( + + ) : ( ++ {wxAuthorize && !isWechatEnv() + ? '请在微信内打开以使用一键登录' + : '请使用验证码登录并绑定微信后,即可 7 天内免登录'} +
+ )} + {!canWechatQuick && ( + + 验证码登录 + + )}- 一键登录 -
+ {hasShopWxSession() && savedProfile && ( ++ 微信快捷登录 +
+ )} ); diff --git a/apps/h5-shop/src/styles.css b/apps/h5-shop/src/styles.css index e98f433..f4892c8 100644 --- a/apps/h5-shop/src/styles.css +++ b/apps/h5-shop/src/styles.css @@ -473,6 +473,11 @@ cursor: pointer; } +.shop-quick-login-btn--wechat { + background: #07c160; + box-shadow: 0 8px 24px rgba(7, 193, 96, 0.25); +} + .shop-quick-secure { display: flex; align-items: center; diff --git a/server/dukang-api/src/modules/iam/auth.service.ts b/server/dukang-api/src/modules/iam/auth.service.ts index b1ae06d..95e5d08 100644 --- a/server/dukang-api/src/modules/iam/auth.service.ts +++ b/server/dukang-api/src/modules/iam/auth.service.ts @@ -1393,7 +1393,8 @@ export class AuthService { phoneVerified, }; const accessToken = this.jwtService.sign(payload); - const refreshToken = this.jwtService.sign(payload, { expiresIn: '30d' }); + const refreshExpiresIn = actorType === 'STORE' ? '7d' : '30d'; + const refreshToken = this.jwtService.sign(payload, { expiresIn: refreshExpiresIn }); return { accessToken, refreshToken,