头像自动更新
This commit is contained in:
parent
26b815e046
commit
d9e0899264
@ -1049,3 +1049,13 @@ export async function getset() {
|
||||
const res = await get('getset');
|
||||
return res.data;
|
||||
}
|
||||
|
||||
export async function setheadimg(src: string){
|
||||
const res = await put(`member/${store.state.userinfo.memberid}`,{img: src});
|
||||
console.log(res)
|
||||
}
|
||||
|
||||
export async function setusername(src: string){
|
||||
const res = await put(`member/${store.state.userinfo.memberid}`,{name: src});
|
||||
console.log(res)
|
||||
}
|
||||
|
@ -300,7 +300,7 @@ export default {
|
||||
shijirenshu: "Actual number of live broadcast",
|
||||
shijishichang: "Actual live broadcast duration",
|
||||
cshipinyaoqiu1: "The video should be no longer than 10 minutes",
|
||||
cshipinyaoqiu2: "Video size cannot exceed 500MB",
|
||||
cshipinyaoqiu2: "Video size cannot exceed 500M",
|
||||
shichangtishi:"",
|
||||
renshutishi: '',
|
||||
tixianzhu: "",
|
||||
|
@ -300,7 +300,7 @@ export default {
|
||||
shijirenshu: "实际直播人数",
|
||||
shijishichang: "实际直播时长",
|
||||
cshipinyaoqiu1: "视频长度不能超过10分钟",
|
||||
cshipinyaoqiu2: "视频大小不能超过500mb",
|
||||
cshipinyaoqiu2: "视频大小不能超过500m",
|
||||
shichangtishi:"",
|
||||
renshutishi: '',
|
||||
tixianzhu:"",
|
||||
|
@ -37,6 +37,7 @@
|
||||
size="small"
|
||||
v-model:value="userinfo.name"
|
||||
:placeholder="lan.$t('shuruxinnicheng')"
|
||||
@pressEnter="setname"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@ -525,6 +526,8 @@ import {
|
||||
interests,
|
||||
putmember,
|
||||
sendsms,
|
||||
setheadimg,
|
||||
setusername,
|
||||
} from "@/api/index";
|
||||
import { message } from "ant-design-vue";
|
||||
import { useI18n } from "@/utils/i18n";
|
||||
@ -971,6 +974,7 @@ export default defineComponent({
|
||||
// picinfo.fileId=res.fileId
|
||||
// picinfo.url=res.video.url
|
||||
formData.value.img = res.video.url;
|
||||
setheadimg(res.video.url);
|
||||
}
|
||||
|
||||
function beforeVideoUpload(file: any){
|
||||
@ -981,6 +985,13 @@ export default defineComponent({
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function setname(){
|
||||
setusername(formData.value.name).then(()=>{
|
||||
showname.value = true;
|
||||
})
|
||||
}
|
||||
|
||||
// function selguojia(e: any){
|
||||
// userinfo.value.countryValue = e;
|
||||
// console.log(e)
|
||||
@ -1029,7 +1040,8 @@ export default defineComponent({
|
||||
lan,
|
||||
interestslist,
|
||||
isdisabled,
|
||||
beforeVideoUpload
|
||||
beforeVideoUpload,
|
||||
setname
|
||||
};
|
||||
},
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user