mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2026-11-07 09:28:53 +08:00
feat(login): 增强扫码登录功能与会话管理
- 登录接口增加 loading 与超时配置,改善请求体验 - 根据服务端返回处理二维码过期,并动态设置有效时长 - 重构二维码刷新逻辑,改用 setTimeout 控制过期 - 合并会话管理与错误处理,简化扫码登录流程 - 移除多余 watch,精简组件行为
This commit is contained in:
@@ -124,6 +124,7 @@ export function getSCLoginCode(params) {
|
||||
url: `/buyer/passport/member/pc_session`,
|
||||
method: Method.POST,
|
||||
needToken: false,
|
||||
loading: false,
|
||||
params
|
||||
});
|
||||
}
|
||||
@@ -132,6 +133,10 @@ export function sCLogin(token,params) {
|
||||
url: `/buyer/passport/member/session_login/`+token,
|
||||
method: Method.POST,
|
||||
needToken: false,
|
||||
loading: false,
|
||||
skipMessage: true,
|
||||
// 长轮询后端最长挂起 20s,需大于该值,避免 axios 10s 默认超时把二维码请求掐断
|
||||
timeout: 25000,
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user