万恶的语言哦
This commit is contained in:
parent
41009afeec
commit
063975a818
@ -476,7 +476,12 @@ export async function getlanguages(): Promise<Language[]>{
|
|||||||
// export async function putmember(data: unknown): Promise<Liveaddrule>{
|
// export async function putmember(data: unknown): Promise<Liveaddrule>{
|
||||||
|
|
||||||
export async function putmember(data: any): Promise<any>{
|
export async function putmember(data: any): Promise<any>{
|
||||||
|
|
||||||
|
data.interest={}
|
||||||
console.log(data)
|
console.log(data)
|
||||||
|
for(let i=0;i<data.willsayValue.length;i++){
|
||||||
|
data.willsayValue[i].level=data.willsayValue[i].level+''
|
||||||
|
}
|
||||||
const newdata={
|
const newdata={
|
||||||
name:data.name,
|
name:data.name,
|
||||||
mobile:data.mobile,
|
mobile:data.mobile,
|
||||||
@ -497,6 +502,7 @@ export async function putmember(data: any): Promise<any>{
|
|||||||
}
|
}
|
||||||
console.log(newdata)
|
console.log(newdata)
|
||||||
return (await put<Liveaddrule>(`member/${store.state.userinfo.memberid}`, newdata) )
|
return (await put<Liveaddrule>(`member/${store.state.userinfo.memberid}`, newdata) )
|
||||||
|
store.dispatch("setUserInfo");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -55,10 +55,11 @@
|
|||||||
style="width: 171px"
|
style="width: 171px"
|
||||||
size="small"
|
size="small"
|
||||||
ref="select"
|
ref="select"
|
||||||
|
@change="choosewillsay"
|
||||||
:getPopupContainer="triggerNode => triggerNode.parentNode"
|
:getPopupContainer="triggerNode => triggerNode.parentNode"
|
||||||
>
|
>
|
||||||
<a-select-option v-for="(item, index) in chiveslist[1]" :key="index" :value="item.name">
|
<a-select-option v-for="(item, index) in chiveslist[1]" :key="index" :value="item.languageid" >
|
||||||
{{ item.name }}
|
{{ item.name }} {{item.languageid}}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
<div class="proficiency">
|
<div class="proficiency">
|
||||||
@ -303,7 +304,7 @@ export default defineComponent({
|
|||||||
})
|
})
|
||||||
const modalNode = () => document.getElementsByClassName('modal-container')[0]
|
const modalNode = () => document.getElementsByClassName('modal-container')[0]
|
||||||
|
|
||||||
const chiveslist = ref<unknown>([[],[]]);
|
const chiveslist = ref<any>([[],[]]);
|
||||||
const languages = ref<unknown>([])
|
const languages = ref<unknown>([])
|
||||||
onMounted(async ()=>{
|
onMounted(async ()=>{
|
||||||
chiveslist.value = await getarchives()
|
chiveslist.value = await getarchives()
|
||||||
@ -326,6 +327,10 @@ export default defineComponent({
|
|||||||
name: '请选择',
|
name: '请选择',
|
||||||
level: 0
|
level: 0
|
||||||
});
|
});
|
||||||
|
formData.value.willsayValue.push({
|
||||||
|
name: "",
|
||||||
|
level: 0
|
||||||
|
});
|
||||||
}
|
}
|
||||||
// 验证码
|
// 验证码
|
||||||
const verificationCode: Ref<string> = ref(''),
|
const verificationCode: Ref<string> = ref(''),
|
||||||
@ -443,7 +448,31 @@ export default defineComponent({
|
|||||||
* @return { void }
|
* @return { void }
|
||||||
*/
|
*/
|
||||||
async function submitInfo (): Promise<void> {
|
async function submitInfo (): Promise<void> {
|
||||||
// console.log(toRaw(formData.value));
|
|
||||||
|
// for(let i in toRaw(formData.value).willsay){
|
||||||
|
// console.log(toRaw(formData.value).willsay[i])
|
||||||
|
// }
|
||||||
|
for(let m=0;m<toRaw(chiveslist.value).length;m++){
|
||||||
|
for(let i in toRaw(formData.value).willsayValue){
|
||||||
|
// console.log(toRaw(formData.value).willsayValue[i])
|
||||||
|
|
||||||
|
if(typeof toRaw(formData.value).willsay[i].name=='string'){
|
||||||
|
|
||||||
|
// console.log(toRaw(chiveslist.value))
|
||||||
|
if(toRaw(formData.value).willsay[i].name==toRaw(chiveslist.value)[m].name){
|
||||||
|
toRaw(formData.value).willsayValue[i].name=toRaw(chiveslist.value)[m].languageid
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
toRaw(formData.value).willsayValue[i].name=toRaw(formData.value).willsay[i].name
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
toRaw(formData.value).willsayValue[i].level=toRaw(formData.value).willsay[i].level
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log(toRaw(formData.value).willsayValue)
|
||||||
|
|
||||||
|
console.log(toRaw(formData.value));
|
||||||
putmember(toRaw(formData.value))
|
putmember(toRaw(formData.value))
|
||||||
// putmember(toRaw(formData.value)).then((res) => {
|
// putmember(toRaw(formData.value)).then((res) => {
|
||||||
// console.log(res)
|
// console.log(res)
|
||||||
@ -486,6 +515,11 @@ export default defineComponent({
|
|||||||
uploadprogress.value = 100
|
uploadprogress.value = 100
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
function choosewillsay(e?: any){
|
||||||
|
console.log(formData.value.willsayValue)
|
||||||
|
console.log(e)
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
modalNode,
|
modalNode,
|
||||||
formData,
|
formData,
|
||||||
@ -514,7 +548,8 @@ export default defineComponent({
|
|||||||
setlevel,
|
setlevel,
|
||||||
chiveslist,
|
chiveslist,
|
||||||
languages,
|
languages,
|
||||||
uploadprogress
|
uploadprogress,
|
||||||
|
choosewillsay
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user