修复了我还会说提交参数

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, mtongue: data.mtongue,
email: data.email, email: data.email,
interest: JSON.stringify(data.interest), interest: JSON.stringify(data.interest),
willsay: JSON.stringify(data.willsayValue), willsay: JSON.stringify(data.willsay),
birthday: data.birthday, birthday: data.birthday,
zoneid: data.zoneid, zoneid: data.zoneid,
currency: data.currencyValue, currency: data.currencyValue,

View File

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