修复了我还会说提交参数

This commit is contained in:
luyuan 2020-11-02 10:36:21 +08:00
parent 05e2e2df34
commit 683b173a04
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3
2 changed files with 38 additions and 22 deletions

View File

@ -746,7 +746,7 @@ export async function putmember(data: any): Promise<any>{
mtongue: data.mtongue,
email: data.email,
interest: JSON.stringify(data.interest),
willsay: JSON.stringify(data.willsayValue),
willsay: JSON.stringify(data.willsay),
birthday: data.birthday,
zoneid: data.zoneid,
currency: data.currencyValue,

View File

@ -118,10 +118,9 @@
v-for="(item,
index) in chiveslist[1]"
:key="index"
:value="item.languageid"
:value="item.name"
>
{{ item.name }}
{{ item.languageid }}
</a-select-option>
</a-select>
<div class="proficiency">
@ -781,28 +780,45 @@ export default defineComponent({
// console.log(toRaw(formData.value).willsay[i])
// }
const uesrinfo = toRaw(formData.value);
for (let m = 0; m < toRaw(chiveslist.value).length; m++) {
for (const i in uesrinfo.willsayValue) {
// console.log(toRaw(formData.value).willsayValue[i])
// for (let m = 0; m < toRaw(chiveslist.value).length; m++) {
// for (const i in uesrinfo.willsayValue) {
// // console.log(toRaw(formData.value).willsayValue[i])
if (typeof uesrinfo.willsay[i].name == "string") {
// console.log(toRaw(chiveslist.value))
if (
uesrinfo.willsay[i].name ==
toRaw(chiveslist.value)[m].name
) {
uesrinfo.willsayValue[i].name = toRaw(
chiveslist.value
)[m].languageid;
}
} else {
uesrinfo.willsayValue[i].name =
uesrinfo.willsay[i].name;
}
// if (typeof uesrinfo.willsay[i].name == "string") {
// // console.log(toRaw(chiveslist.value))
// if (
// uesrinfo.willsay[i].name ==
// toRaw(chiveslist.value)[m].name
// ) {
// uesrinfo.willsayValue[i].name = toRaw(
// chiveslist.value
// )[m].languageid;
// }
// } else {
// uesrinfo.willsayValue[i].name =
// uesrinfo.willsay[i].name;
// }
uesrinfo.willsayValue[i].level = uesrinfo.willsay[i].level;
// uesrinfo.willsayValue[i].level = uesrinfo.willsay[i].level;
// }
// }
for(const i in uesrinfo.willsay){
for(const j in chiveslist.value[1]){
if(uesrinfo.willsay[i].name == chiveslist.value[1][j].name){
uesrinfo.willsay[i].name = chiveslist.value[1][j].languageid
}
console.log(uesrinfo.willsay[i].name, chiveslist.value[1][j].name)
}
}
const arr: any = {};
for(const i in uesrinfo.willsay){
// const a: any = {};
arr[uesrinfo.willsay[i].name] = uesrinfo.willsay[i].level
// arr.push(a);
// arr.push({uesrinfo.willsay[i].name})
}
uesrinfo.willsay = arr;
console.log(uesrinfo);
// console.log(toRaw(formData.value));
@ -839,7 +855,7 @@ export default defineComponent({
if((zonelist.value[i].city + zonelist.value[i].gmt) == uesrinfo.zoneStr){
uesrinfo.zoneid = zonelist.value[i].zoneid
}
console.log(zonelist.value[i].city + zonelist.value[i].gmt, uesrinfo.zoneStr)
// console.log(zonelist.value[i].city + zonelist.value[i].gmt, uesrinfo.zoneStr)
}
if (reg.test(userinfo.value.email)) {
putmember(uesrinfo);