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) }} -

-
- -
-