| | |
| | | //接口 |
| | | var openId = wx.getStorageSync("openId"); |
| | | var that = this; |
| | | wx.showLoading(); |
| | | wx.request({ |
| | | url: app.globalData.url + '/api/ma/user/findByOpenId?openId=' + openId, |
| | | success: function(res) { |
| | | wx.hideLoading(); |
| | | if (res.data.code == '0') { |
| | | var data = res.data.data; |
| | | if (data.idcard) { |
| | | if (!data.userType) { |
| | | data.userType = 0; |
| | | } |
| | | if (!data.birthday) { |
| | | data.birthday = app.IdCard(data.idcard, 1); |
| | | data.birthday = '1985-01-01'; |
| | | } |
| | | if (!data.wxSex) { |
| | | data.wxSex = app.IdCard(data.idcard, 2); |
| | | } |
| | | } else { |
| | | data.birthday = '1985-01-01' |
| | | } |
| | | if (data.nation == "0") { |
| | | data.nation = 0; |
| | | } else { |
| | | data.nation = that.data.nations.findIndex(e => e == data.nation); |
| | | } |
| | | if (!data.userType) { |
| | | data.userType = 0 |
| | | } |
| | | var attList = data.attachments || []; |
| | | var evalList1001 = app.where(attList, { |
| | |
| | | id |
| | | })) |
| | | } |
| | | console.log('data', data) |
| | | that.setData({ |
| | | peopleInfo: data, |
| | | evalList, |