mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-04-29 04:33:24 +08:00
feat: 完成banner展示模块
This commit is contained in:
@@ -80,11 +80,12 @@ const state = reactive({
|
||||
|
||||
function getUser() {
|
||||
getUserProfile().then(response => {
|
||||
state.user = response.user;
|
||||
state.dept=response.dept;
|
||||
state.roles=response.roles;
|
||||
state.roleGroup = response.roleGroup;
|
||||
state.postGroup = response.postGroup;
|
||||
const res=response.data;
|
||||
state.user = res.user;
|
||||
state.dept=res.dept;
|
||||
state.roles=res.roles;
|
||||
state.roleGroup = res.roleGroup;
|
||||
state.postGroup = res.postGroup;
|
||||
});
|
||||
};
|
||||
onMounted(()=>{
|
||||
|
||||
@@ -115,9 +115,9 @@ async function uploadImg() {
|
||||
formData.append("file", data);
|
||||
const response = await upload(formData)
|
||||
open.value = false;
|
||||
options.img = import.meta.env.VITE_APP_BASEAPI + "/file/" + response[0].id;
|
||||
options.img = import.meta.env.VITE_APP_BASEAPI + "/file/" + response.data[0].id;
|
||||
userStore.icon = options.img;
|
||||
await updateUserIcon(response[0].id);
|
||||
await updateUserIcon(response.data[0].id);
|
||||
alert("上传成功")
|
||||
});
|
||||
};
|
||||
|
||||
@@ -49,10 +49,7 @@ function submit() {
|
||||
userRef.value.validate(valid => {
|
||||
if (valid) {
|
||||
updateUserProfile(props.user).then(response => {
|
||||
console.log(props.user.nick,"props.user.nick")
|
||||
console.log(userStore,"userStore.nick")
|
||||
userStore.name=props.user.nick
|
||||
console.log(userStore.name,"userStore.name");
|
||||
alert("修改成功");
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user