From 4e44bc1fd7806a6c1611302120882b91d96640b5 Mon Sep 17 00:00:00 2001 From: liuwh <hugeinfo123> Date: Mon, 27 Apr 2020 17:50:19 +0800 Subject: [PATCH] bug修复 --- SunshineLnsMinApp/pages/personInfo/personInfo.js | 23 +++++++++++------------ 1 files changed, 11 insertions(+), 12 deletions(-) diff --git a/SunshineLnsMinApp/pages/personInfo/personInfo.js b/SunshineLnsMinApp/pages/personInfo/personInfo.js index 0118cd4..631c322 100644 --- a/SunshineLnsMinApp/pages/personInfo/personInfo.js +++ b/SunshineLnsMinApp/pages/personInfo/personInfo.js @@ -69,28 +69,26 @@ //接口 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.birthday) { - data.birthday = app.IdCard(data.idcard, 1); - } - if (!data.wxSex) { - data.wxSex = app.IdCard(data.idcard, 2); - } - } else { - data.birthday = '1985-01-01' + if (!data.userType) { + data.userType = 0; + } + if (!data.birthday) { + data.birthday = '1985-01-01'; + } + if (!data.wxSex) { + data.wxSex = app.IdCard(data.idcard, 2); } 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, { @@ -116,6 +114,7 @@ id })) } + console.log('data', data) that.setData({ peopleInfo: data, evalList, -- Gitblit v1.8.0