From 3efa5db533fa8735bd7429c58b53f77a77b53368 Mon Sep 17 00:00:00 2001 From: Sisyphus Date: Fri, 10 Jul 2026 11:01:56 +0800 Subject: [PATCH] =?UTF-8?q?fix(F006):=20=E5=88=A0=E9=99=A4=E9=87=8D?= =?UTF-8?q?=E5=8F=91=E4=BA=8C=E7=BB=B4=E7=A0=81=E5=8A=9F=E8=83=BD=20+=20?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5ConnectCode=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit connectCode/扫码绑定场景从未落地(平台助手/小程序/PC均未消费), 重发二维码按钮和详情页ConnectCode/过期时间是无用功能, 删除清理. 后端端点/数据库字段保留不动(铁律8 不碰没坏的东西) --- src/modules/openapi/OpenAppListView.vue | 88 +------------------------ 1 file changed, 1 insertion(+), 87 deletions(-) diff --git a/src/modules/openapi/OpenAppListView.vue b/src/modules/openapi/OpenAppListView.vue index 2fbaf4f..9fb6ce7 100644 --- a/src/modules/openapi/OpenAppListView.vue +++ b/src/modules/openapi/OpenAppListView.vue @@ -6,10 +6,9 @@ * - 操作列(根据状态显示): * * 详情(任意状态,弹窗) * * 重置密钥(status=0 或 1) - * * 重发二维码(status=0 或 1, W4.4 后端补 resend-qr) * * 撤销(status=0 或 1) * * 删除(status=2) - * - 5 个弹窗:详情/撤销确认/删除确认/重置密钥/重发连接码 + * - 4 个弹窗:详情/撤销确认/删除确认/重置密钥 * - 申请 APIKey 走 ApplyApiKeyDialog 2 步向导 * * 后端端点: @@ -40,8 +39,6 @@ interface OpenApp { totalCallCount: number | string lastUsedAt?: string | null createDate: string - connectCode?: string - connectCodeExpire?: string | number activatedAt?: string | null lastUsedIp?: string | null ipWhitelist?: string | null @@ -91,11 +88,6 @@ const resetSecretVisible = ref(false) const resetSecretTarget = ref(null) const newSecret = ref('') -const resendQrVisible = ref(false) -const resendQrTarget = ref(null) -const newConnectCode = ref('') -const newConnectCodeExpire = ref('') - function fmtDate(ts?: string | number | null) { if (!ts) return '--' const n = typeof ts === 'string' ? Date.parse(ts) : ts @@ -127,8 +119,6 @@ async function load() { totalCallCount: it.totalCallCount ?? 0, lastUsedAt: it.lastUsedAt, createDate: it.createDate, - connectCode: it.connectCode, - connectCodeExpire: it.connectCodeExpire, activatedAt: it.activatedAt, lastUsedIp: it.lastUsedIp, ipWhitelist: it.ipWhitelist, @@ -258,29 +248,6 @@ async function resetSecretConfirm() { } } -function resendQrHandle(row: OpenApp) { - resendQrTarget.value = row - newConnectCode.value = '' - newConnectCodeExpire.value = '' - resendQrVisible.value = true -} - -async function resendQrConfirm() { - if (!resendQrTarget.value) return - try { - const data = await httpPost<{ connectCode: string; connectCodeExpire: string | number }>( - `/sys/openapi/app/resend-qr/${resendQrTarget.value.id}` - ) - newConnectCode.value = data?.connectCode || '' - newConnectCodeExpire.value = data?.connectCodeExpire - ? String(data.connectCodeExpire) - : '' - ElMessage.success('连接码已重发,旧码已作废') - } catch (e: any) { - ElMessage.error(e?.msg || e?.message || '重发失败') - } -} - async function copyText(text: string, label = '已复制') { // 优先用现代 Clipboard API (HTTPS / localhost 才允许) try { @@ -378,7 +345,6 @@ onMounted(() => { load(); loadCustomers() }) :row="row" :actions="[ { label: '详情', type: 'primary', onClick: detailHandle }, - { label: '重发二维码', type: 'primary', when: (r: any) => r.status === 0 || r.status === 1, onClick: resendQrHandle }, { label: '重置密钥', type: 'warning', when: (r: any) => r.status === 0 || r.status === 1, onClick: resetSecretHandle }, { label: '撤销', type: 'danger', divided: true, when: (r: any) => r.status === 0 || r.status === 1, onClick: revokeHandle }, { label: '删除', type: 'danger', divided: true, when: (r: any) => r.status === 2, onClick: deleteHandle } @@ -402,10 +368,6 @@ onMounted(() => { load(); loadCustomers() }) {{ STATUS_LABEL[currentRow.status] || currentRow.status }} - - {{ currentRow.connectCode || '—' }} - - {{ fmtDate(currentRow.connectCodeExpire) }} {{ currentRow.scopes }} {{ currentRow.ipWhitelist || '—' }} {{ currentRow.activatedAt || '—' }} @@ -483,54 +445,6 @@ onMounted(() => { load(); loadCustomers() }) - - - -

重发后会生成新的 connectCode,旧码立即作废

-

新码有效期 2 小时,请尽快发给客户扫码激活

-
- -

新连接码仅显示一次!请立即复制并通过安全渠道发给客户

-

关闭弹窗后无法再次查看(只能再次重发)

-
-

- app: {{ resendQrTarget.appId }} - ({{ resendQrTarget.appName }}) -

-
-

- 新的 ConnectCode: (明文,可直接选中复制) -

- - - -

- 过期时间: {{ fmtDate(newConnectCodeExpire) }} -

-
- -
-