update 流程
This commit is contained in:
parent
93198dc163
commit
e4f573060f
@ -61,30 +61,29 @@ Page({
|
||||
* 初始化用户数据
|
||||
*/
|
||||
async initUserData() {
|
||||
let evaluationData = await api.queryAllEvaluation();
|
||||
var tags = [];
|
||||
console.log(evaluationData);
|
||||
evaluationData.forEach((o,i) => {
|
||||
tags.push(true);
|
||||
})
|
||||
let d = app.globalData.userInfo.detail;
|
||||
medicalList.forEach((o, i) => {
|
||||
medicalList[i].checked = d.medical_history.indexOf(i) != -1
|
||||
})
|
||||
smokeList[d.smoke].checked = true;
|
||||
// d['address'] = this.parseUserAddress(
|
||||
// d.province,d.city
|
||||
// )
|
||||
|
||||
this.setData({
|
||||
userDetail:d,
|
||||
userDetail: d,
|
||||
userInfo: app.globalData.userInfo,
|
||||
dataList: evaluationData,
|
||||
collapseTags: tags,
|
||||
subjects: {
|
||||
smoke:smokeList,
|
||||
smoke: smokeList,
|
||||
medical_histories: medicalList
|
||||
}
|
||||
});
|
||||
let evaluationData = await api.queryAllEvaluation();
|
||||
var tags = [];
|
||||
evaluationData.forEach((o, i) => {
|
||||
tags.push(true);
|
||||
});
|
||||
this.setData({
|
||||
dataList: evaluationData,
|
||||
collapseTags: tags
|
||||
});
|
||||
},
|
||||
|
||||
parseUserAddress(province,city){
|
||||
|
@ -1,4 +1,4 @@
|
||||
const API_URL = 'http://192.168.10.121:8000';
|
||||
const API_URL = 'http://127.0.0.1:8000';
|
||||
|
||||
const getOpenId = () => {
|
||||
return getApp().globalData.openId;
|
||||
|
Loading…
x
Reference in New Issue
Block a user