修复了选择语言不刷新的问题

This commit is contained in:
luyuan 2020-11-03 10:17:52 +08:00
parent 613dc56db2
commit 74ccc85a0d
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3
2 changed files with 37 additions and 11 deletions

View File

@ -1005,3 +1005,9 @@ export async function getaddr() {
// const res = await get('StopMCUMixTranscode', {roomid});
// console.log(res)
// }
export async function interests() {
const res = await get('interests');
return res.data;
}

View File

@ -85,9 +85,9 @@
"
>
<a-select-option
v-for="(item, index) in chiveslist[1]"
v-for="(item, index) in interestslist"
:key="index"
:value="item.languageid"
:value="parseInt(item.value)"
>
{{ item.name }}
</a-select-option>
@ -516,6 +516,7 @@ import {
getlanguages,
getquhaolist,
getzonelist,
interests,
putmember,
sendsms,
} from "@/api/index";
@ -549,6 +550,10 @@ export default defineComponent({
const formData = ref(toRaw(userinfo.value));
watch(userinfo, () => {
formData.value = toRaw(userinfo.value);
// console.log(lan.$s(), formData.value.languageValue)
if(lan.$s() != formData.value.languageValue){
location.reload();
}
console.log(userinfo.value.currencyValue, "listsssss");
currencyindex.value = userinfo.value.currency;
console.log(currencyindex.value, "listsssss");
@ -586,6 +591,20 @@ export default defineComponent({
zoneid: 1,
},
]);
const interestslist = ref<any>([
{
"dictionaryid": 202,
"name": "中文",
"alias": "",
"code": "104110001000",
"position": 1,
"publish": 1,
"value": "1",
"deleted_at": null,
"created_at": "2020-08-13 18:17:18",
"updated_at": "2020-08-13 18:17:18"
}
])
onMounted(async () => {
chiveslist.value = await getarchives();
languages.value = await getlanguages();
@ -593,8 +612,8 @@ export default defineComponent({
myquhao.value = quhaolist.value[0].code;
currencylist.value = await getcurrencys();
zonelist.value = await getzonelist();
interestslist.value = await interests();
// currencyindex.value=userinfo.value.currencyValue
console.log(userinfo.value);
});
@ -974,6 +993,7 @@ export default defineComponent({
showname,
uploadspic,
lan,
interestslist
};
},
});
@ -1176,7 +1196,7 @@ export default defineComponent({
.confirm-btn {
display: inline-block;
border-radius: 2px;
background: #ccc;
background: #07ad97;
font-size: 9px;
font-weight: 500;
color: #ffffff;
@ -1188,9 +1208,9 @@ export default defineComponent({
padding: 0 17px;
}
.confirm-btn:hover {
background: #07ad97;
}
// .confirm-btn:hover {
// background: #07ad97;
// }
}
.password-container {
.title {
@ -1254,7 +1274,7 @@ export default defineComponent({
.submit-btn {
width: 63px;
height: 23px;
background: #ccc;
background: #08ae98;
border-radius: 3px;
font-size: 10px;
font-weight: 500;
@ -1264,9 +1284,9 @@ export default defineComponent({
cursor: pointer;
user-select: none;
}
.submit-btn:hover {
background: #08ae98;
}
// .submit-btn:hover {
// background: #08ae98;
// }
}
::v-deep(.ant-upload-list) {
display: none;