update 流程

This commit is contained in:
LittleBoy 2019-06-27 20:32:07 +08:00
parent 93198dc163
commit e4f573060f
2 changed files with 13 additions and 14 deletions

View File

@ -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){

View File

@ -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;