处理 sex
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user