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