mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-09-18 01:06:39 +08:00
fix: 修正前端 user_init_call 字段错误和用户注册初始化头像路径问题
This commit is contained in:
parent
0d2b60b905
commit
3f2ef1d54e
@ -72,7 +72,7 @@ func (h *UserHandler) Register(c *gin.Context) {
|
|||||||
Username: data.Username,
|
Username: data.Username,
|
||||||
Password: utils.GenPassword(data.Password, salt),
|
Password: utils.GenPassword(data.Password, salt),
|
||||||
Nickname: fmt.Sprintf("极客学长@%d", utils.RandomNumber(5)),
|
Nickname: fmt.Sprintf("极客学长@%d", utils.RandomNumber(5)),
|
||||||
Avatar: "images/avatar/user.png",
|
Avatar: "/images/avatar/user.png",
|
||||||
Salt: salt,
|
Salt: salt,
|
||||||
Status: true,
|
Status: true,
|
||||||
ChatRoles: utils.JsonEncode(roleKeys),
|
ChatRoles: utils.JsonEncode(roleKeys),
|
||||||
|
@ -81,8 +81,8 @@ import {httpGet, httpPost} from "@/utils/http";
|
|||||||
import {ElMessage} from "element-plus";
|
import {ElMessage} from "element-plus";
|
||||||
import {Plus} from "@element-plus/icons-vue";
|
import {Plus} from "@element-plus/icons-vue";
|
||||||
import Compressor from "compressorjs";
|
import Compressor from "compressorjs";
|
||||||
import {showNotify} from "vant";
|
|
||||||
|
|
||||||
|
// eslint-disable-next-line no-undef
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
show: Boolean,
|
show: Boolean,
|
||||||
user: Object,
|
user: Object,
|
||||||
@ -140,6 +140,7 @@ const afterRead = (file) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line no-undef
|
||||||
const emits = defineEmits(['hide', 'update-user']);
|
const emits = defineEmits(['hide', 'update-user']);
|
||||||
const save = function () {
|
const save = function () {
|
||||||
httpPost('/api/user/profile/update', form.value).then(() => {
|
httpPost('/api/user/profile/update', form.value).then(() => {
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<el-input v-model="system['admin_title']"/>
|
<el-input v-model="system['admin_title']"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="注册赠送次数" prop="init_calls">
|
<el-form-item label="注册赠送次数" prop="init_calls">
|
||||||
<el-input v-model.number="system['init_calls']" placeholder="新用户注册赠送对话次数"/>
|
<el-input v-model.number="system['user_init_calls']" placeholder="新用户注册赠送对话次数"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-alert type="info" show-icon :closable="false">
|
<el-alert type="info" show-icon :closable="false">
|
||||||
<p>在这里维护前端聊天页面可用的 GPT 模型列表</p>
|
<p>在这里维护前端聊天页面可用的 GPT 模型列表</p>
|
||||||
@ -84,7 +84,6 @@ const system = ref({models: []})
|
|||||||
const chat = ref({})
|
const chat = ref({})
|
||||||
const loading = ref(true)
|
const loading = ref(true)
|
||||||
const systemFormRef = ref(null)
|
const systemFormRef = ref(null)
|
||||||
const tempModel = ref('')
|
|
||||||
const models = ref([])
|
const models = ref([])
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user