From da620dd9613c61df5b5dd0757a8bb03ea39a52c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Mon, 22 Sep 2025 15:25:59 +0800 Subject: [PATCH] =?UTF-8?q?```=20feat(qr-login):=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E7=A7=9F=E6=88=B7ID=E6=94=AF=E6=8C=81=E5=B9=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E7=99=BB=E5=BD=95=E6=88=90=E5=8A=9F=E5=A4=84=E7=90=86?= =?UTF-8?q?=E9=80=BB=E8=BE=91-=20=E5=9C=A8=20QR=20=E7=99=BB=E7=A0=81?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E6=95=B0=E6=8D=AE=E4=B8=AD=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=20`tenantId`=20=E5=AD=97=E6=AE=B5=EF=BC=8C=E7=94=A8=E4=BA=8E?= =?UTF-8?q?=E6=A0=87=E8=AF=86=E7=94=A8=E6=88=B7=E6=89=80=E5=B1=9E=E7=A7=9F?= =?UTF-8?q?=E6=88=B7=20-=20=E7=99=BB=E5=BD=95=E6=88=90=E5=8A=9F=E5=90=8E?= =?UTF-8?q?=E5=B0=86=20`tenantId`=20=E5=AD=98=E5=85=A5=20localStorage?= =?UTF-8?q?=EF=BC=8C=E4=BE=BF=E4=BA=8E=E5=90=8E=E7=BB=AD=E6=9D=83=E9=99=90?= =?UTF-8?q?=E5=88=A4=E6=96=AD=20-=20=E8=B0=83=E6=95=B4=20`loginSuccess`?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E4=BC=A0=E9=80=92=E5=8F=82=E6=95=B0=EF=BC=8C?= =?UTF-8?q?=E7=94=B1=20token=20=E6=94=B9=E4=B8=BA=E5=AE=8C=E6=95=B4?= =?UTF-8?q?=E5=93=8D=E5=BA=94=E6=95=B0=E6=8D=AE=E5=AF=B9=E8=B1=A1-=20?= =?UTF-8?q?=E4=BA=8C=E7=BB=B4=E7=A0=81=E7=BB=84=E4=BB=B6=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E5=88=B7=E6=96=B0=E5=8A=9F=E8=83=BD=EF=BC=8C?= =?UTF-8?q?=E6=8F=90=E5=8D=87=E7=94=A8=E6=88=B7=E4=BD=93=E9=AA=8C=20-=20?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=E6=B5=8B=E8=AF=95=E7=94=A8=E7=9A=84=E4=B8=B4?= =?UTF-8?q?=E6=97=B6=E6=97=A5=E5=BF=97=E8=BE=93=E5=87=BA=E5=92=8C=E6=97=A0?= =?UTF-8?q?=E7=94=A8=E7=9A=84=E6=B5=8B=E8=AF=95=E8=B7=AF=E7=94=B1=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=20-=E4=BF=AE=E5=A4=8D=E7=99=BB=E5=BD=95=E9=A1=B5?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=E6=98=BE=E7=A4=BA=E9=80=BB=E8=BE=91=EF=BC=8C?= =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E7=99=BB=E5=BD=95=E6=96=B9=E5=BC=8F=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E4=BA=8C=E7=BB=B4=E7=A0=81/=E6=89=8B=E6=9C=BA?= =?UTF-8?q?=E5=9B=BE=E6=A0=87```?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...waRtkJyvf_!!6000000001499-55-tps-70-70.svg | 1 + src/api/passport/qrLogin/index.ts | 3 +- src/components/QrLogin/index.vue | 13 +- src/router/routes.ts | 5 - src/views/passport/login/index.vue | 21 +- src/views/test/qrLoginTest.vue | 323 ------------------ 6 files changed, 22 insertions(+), 344 deletions(-) create mode 100644 public/assets/O1CN01yz6fEl1MwaRtkJyvf_!!6000000001499-55-tps-70-70.svg delete mode 100644 src/views/test/qrLoginTest.vue diff --git a/public/assets/O1CN01yz6fEl1MwaRtkJyvf_!!6000000001499-55-tps-70-70.svg b/public/assets/O1CN01yz6fEl1MwaRtkJyvf_!!6000000001499-55-tps-70-70.svg new file mode 100644 index 0000000..a7b3b75 --- /dev/null +++ b/public/assets/O1CN01yz6fEl1MwaRtkJyvf_!!6000000001499-55-tps-70-70.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/api/passport/qrLogin/index.ts b/src/api/passport/qrLogin/index.ts index 8e307e5..0f662d8 100644 --- a/src/api/passport/qrLogin/index.ts +++ b/src/api/passport/qrLogin/index.ts @@ -19,6 +19,7 @@ export interface QrCodeStatusResponse { accessToken?: string; // 登录成功时返回的JWT token userInfo?: any; // 用户信息 expiresIn?: number; // 剩余过期时间(秒) + tenantId?: string; // 租户ID } /** @@ -69,7 +70,7 @@ export async function confirmQrLogin(requestData: QrLoginConfirmRequest): Promis SERVER_API_URL + '/qr-login/confirm', requestData ); - + console.log(res,'>>>89898989') if (res.data.code === 0 && res.data.data) { return res.data.data; } diff --git a/src/components/QrLogin/index.vue b/src/components/QrLogin/index.vue index 15bcbbd..f0d8397 100644 --- a/src/components/QrLogin/index.vue +++ b/src/components/QrLogin/index.vue @@ -7,8 +7,8 @@
正在生成二维码...
-请使用手机APP或小程序扫码登录
二维码有效期:{{ formatTime(expireTime) }}