处理 sex

This commit is contained in:
17792275749
2025-04-08 17:05:23 +08:00
parent 526aac8ec3
commit 7554edfb93
+2 -2
View File
@@ -58,7 +58,7 @@ Page({
let [year, month, day] = userInfo.birthday.split("-");
this.setData({
realname: userInfo.realname,
["sex.index"]: this.data.sex.data.findIndex(item => {return item.name === userInfo.sex_dictText}),
["sex.index"]: this.data.sex.data.findIndex(item => {return item.id === userInfo.sex}),
birthday: {
label: year + "年" + month + "月" + day + "日",
value: userInfo.birthday
@@ -432,7 +432,7 @@ Page({
let [year, month, day] = res.result.birthday.split("-");
this.setData({
realname: res.result.realname,
["sex.index"]: this.data.sex.data.findIndex(item => {return item.name === res.result.sex_dictText}),
["sex.index"]: this.data.sex.data.findIndex(item => {return item.id === res.result.sex}),
birthday: {
label: year + "年" + month + "月" + day + "日",
value: res.result.birthday