close_apply.js
4.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
// pages/close_apply/close_apply.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
//
showapply: false,
provincearr: [],
cityarr: [],
countryarr: [],
confirmvalarr: [0, 0, 0],
valarr: [0, 0, 0],
photo: '',
name: '',
enddata: '',
arraysex: ['男', '女'],
sex: '',
birthday: '', //生日
nation: '', //民族
nationarr: ["汉族", "蒙古族", "回族", "藏族", "维吾尔族", "苗族", "彝族", "壮族", "布依族", "朝鲜族", "满族", "侗族", "瑶族", "白族", "土家族",
"哈尼族", "哈萨克族", "傣族", "黎族", "傈僳族", "佤族", "畲族", "高山族", "拉祜族", "水族", "东乡族", "纳西族", "景颇族", "柯尔克孜族",
"土族", "达斡尔族", "仫佬族", "羌族", "布朗族", "撒拉族", "毛南族", "仡佬族", "锡伯族", "阿昌族", "普米族", "塔吉克族", "怒族", "乌孜别克族",
"俄罗斯族", "鄂温克族", "德昂族", "保安族", "裕固族", "京族", "塔塔尔族", "独龙族", "鄂伦春族", "赫哲族", "门巴族", "珞巴族", "基诺族"
],
politics: '', //政治面貌
politicsarr: ['共青团员', '中共预备党员', '中共党员', '群众', '无党派人士', '其他'], //
education: '', //学历
educationarr: ['小学', '中学', '专科', '本科', '硕士研究生', '博士研究生', '其他'], //
unit: '', //工作单位
duty: '', //职务
addr: '', //通讯地址,
postcode: '', //邮编
school: '', //
card_number: '', //身份证号码
fixed_phone: '', //固定电话
move_phone: '', //
email: '', //
urgency_phone: '', //
qq: '',
province: '',
city: '',
county: '',
address: '', //详细地址,
type: '', //1医院志愿者,2社会志愿者,3办事处志愿者
typearr: ['医院志愿者', '社会志愿者', '办事处志愿者'],
apply_nav: 0, //0为履历1,1为履历2,2为履历3,
record: [{
record_start_time: '',
record_end_time: '',
record_unit: '',
record_duty: '',
record_name: '',
record_phone: ''
},
{
record_start_time: '',
record_end_time: '',
record_unit: '',
record_duty: '',
record_name: '',
record_phone: ''
},
{
record_start_time: '',
record_end_time: '',
record_unit: '',
record_duty: '',
record_name: '',
record_phone: ''
}
],
front_card: '', //身份证正面照
reverse_card: '', //身份证反面照
id: '',//用户id,
},
getdatalist() {
let that = this;
let url = '/index/member_center/edit';
let params = {
'id': that.data.id
};
let head = {
'XX-Token': wx.getStorageSync('token')
}
app.post(url, params, head).then((res) => {
let provincearr = that.data.provincearr;
let cityarr = that.data.cityarr;
let countryarr = that.data.countryarr;
let val = [0, 0, 0];
for (let i = 0; i < provincearr.length; i++) {
if (provincearr[i].province_name == res.province) {
val[0] = i;
}
}
for (let i = 0; i < cityarr.length; i++) {
if (cityarr[i].city_name == res.city) {
val[1] = i;
}
}
for (let i = 0; i < countryarr.length; i++) {
if (countryarr[i].country_name == res.county) {
val[2] = i;
}
}
that.setData({
valarr: val,
confirmvalarr: val,
addr: res.addr,
address: res.address,
birthday: res.birthday,
card_number: res.card_number,
city: res.city,
county: res.county,
duty: res.duty,
education: res.education,
email: res.email,
fixed_phone: res.fixed_phone,
front_card: res.front_card,
move_phone: res.move_phone,
name: res.name,
nation: res.nation,
photo: res.photo,
politics: res.politics,
postcode: res.postcode,
province: res.province,
qq: res.qq,
record: res.record,
reverse_card: res.reverse_card,
school: res.school,
sex: res.sex,
unit: res.unit,
urgency_phone: res.urgency_phone,
type: res.type
})
}).catch((err) => {
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let that = this;
that.setData({
id: options.id
})
that.getdatalist();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})