Skip to content

Commit b944a9f

Browse files
author
piexlMax(奇淼
committed
feat(初始化): 添加AI助手配置提示弹窗
在数据库初始化完成后显示提示弹窗,引导用户配置AI助手以获得更好的开发体验。确认后跳转至配置文档,取消则直接进入登录页。
1 parent 4668167 commit b944a9f

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

web/src/view/init/index.vue

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
// @ts-ignore
137137
import { initDB } from '@/api/initdb'
138138
import { reactive, ref } from 'vue'
139-
import { ElLoading, ElMessage } from 'element-plus'
139+
import { ElLoading, ElMessage, ElMessageBox } from 'element-plus'
140140
import { useRouter } from 'vue-router'
141141
142142
defineOptions({
@@ -274,7 +274,25 @@
274274
type: 'success',
275275
message: res.msg
276276
})
277-
router.push({ name: 'Login' })
277+
278+
// 显示AI助手配置提示弹窗
279+
ElMessageBox.confirm(
280+
'已经完成基础数据库初始化!建议先进行编辑器AI助手配置,以获得更好的开发体验。',
281+
'配置完成',
282+
{
283+
confirmButtonText: '查看AI配置文档',
284+
cancelButtonText: '稍后配置',
285+
type: 'success',
286+
center: true
287+
}
288+
).then(() => {
289+
// 点击确认按钮,打开AI配置文档
290+
window.open('https://www.gin-vue-admin.com/guide/server/mcp.html', '_blank')
291+
router.push({ name: 'Login' })
292+
}).catch(() => {
293+
// 点击取消按钮或关闭弹窗,直接跳转到登录页
294+
router.push({ name: 'Login' })
295+
})
278296
}
279297
loading.close()
280298
} catch (_) {

0 commit comments

Comments
 (0)