From 3f2ef1d54e19ec67a77f95d651a888f92c437e1d Mon Sep 17 00:00:00 2001 From: RockYang Date: Wed, 28 Jun 2023 20:01:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=E5=89=8D=E7=AB=AF=20u?= =?UTF-8?q?ser=5Finit=5Fcall=20=E5=AD=97=E6=AE=B5=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E5=92=8C=E7=94=A8=E6=88=B7=E6=B3=A8=E5=86=8C=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E5=A4=B4=E5=83=8F=E8=B7=AF=E5=BE=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/go/handler/user_handler.go | 2 +- web/src/components/ConfigDialog.vue | 3 ++- web/src/views/admin/SysConfig.vue | 3 +-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/go/handler/user_handler.go b/api/go/handler/user_handler.go index 7cbe66d3..c329957c 100644 --- a/api/go/handler/user_handler.go +++ b/api/go/handler/user_handler.go @@ -72,7 +72,7 @@ func (h *UserHandler) Register(c *gin.Context) { Username: data.Username, Password: utils.GenPassword(data.Password, salt), Nickname: fmt.Sprintf("极客学长@%d", utils.RandomNumber(5)), - Avatar: "images/avatar/user.png", + Avatar: "/images/avatar/user.png", Salt: salt, Status: true, ChatRoles: utils.JsonEncode(roleKeys), diff --git a/web/src/components/ConfigDialog.vue b/web/src/components/ConfigDialog.vue index 319da219..10931e10 100644 --- a/web/src/components/ConfigDialog.vue +++ b/web/src/components/ConfigDialog.vue @@ -81,8 +81,8 @@ import {httpGet, httpPost} from "@/utils/http"; import {ElMessage} from "element-plus"; import {Plus} from "@element-plus/icons-vue"; import Compressor from "compressorjs"; -import {showNotify} from "vant"; +// eslint-disable-next-line no-undef const props = defineProps({ show: Boolean, user: Object, @@ -140,6 +140,7 @@ const afterRead = (file) => { }); }; +// eslint-disable-next-line no-undef const emits = defineEmits(['hide', 'update-user']); const save = function () { httpPost('/api/user/profile/update', form.value).then(() => { diff --git a/web/src/views/admin/SysConfig.vue b/web/src/views/admin/SysConfig.vue index 9c3b3016..4381b1c0 100644 --- a/web/src/views/admin/SysConfig.vue +++ b/web/src/views/admin/SysConfig.vue @@ -10,7 +10,7 @@ - +

在这里维护前端聊天页面可用的 GPT 模型列表

@@ -84,7 +84,6 @@ const system = ref({models: []}) const chat = ref({}) const loading = ref(true) const systemFormRef = ref(null) -const tempModel = ref('') const models = ref([]) onMounted(() => {