...
|
...
|
@@ -2,7 +2,7 @@ |
2
|
2
|
var app = getApp();
|
3
|
3
|
var baseUrl = app.globalData.baseUrl;
|
4
|
4
|
Page({
|
5
|
|
- self_id:null,
|
|
5
|
+ self_id: null,
|
6
|
6
|
/**
|
7
|
7
|
* 页面的初始数据
|
8
|
8
|
*/
|
...
|
...
|
@@ -15,7 +15,7 @@ Page({ |
15
|
15
|
/**
|
16
|
16
|
* 生命周期函数--监听页面加载
|
17
|
17
|
*/
|
18
|
|
- onLoad: function (options) {
|
|
18
|
+ onLoad: function(options) {
|
19
|
19
|
console.log('onLoad')
|
20
|
20
|
if (app.globalData.OSSUrl.length == 0) {
|
21
|
21
|
app.configOssUrl()
|
...
|
...
|
@@ -26,20 +26,20 @@ Page({ |
26
|
26
|
/**
|
27
|
27
|
* 生命周期函数--监听页面初次渲染完成
|
28
|
28
|
*/
|
29
|
|
- onReady: function () {
|
|
29
|
+ onReady: function() {
|
30
|
30
|
|
31
|
31
|
},
|
32
|
32
|
|
33
|
33
|
/**
|
34
|
34
|
* 生命周期函数--监听页面显示
|
35
|
35
|
*/
|
36
|
|
- onShow: function () {
|
|
36
|
+ onShow: function() {
|
37
|
37
|
|
38
|
38
|
console.log('onShow')
|
39
|
39
|
this.getTaxList()
|
40
|
40
|
},
|
41
|
41
|
|
42
|
|
- getTaxList: function () {
|
|
42
|
+ getTaxList: function() {
|
43
|
43
|
var that = this;
|
44
|
44
|
wx.showLoading({
|
45
|
45
|
title: '加载中',
|
...
|
...
|
@@ -59,7 +59,7 @@ Page({ |
59
|
59
|
data: {
|
60
|
60
|
'all': true
|
61
|
61
|
},
|
62
|
|
- success: function (res) {
|
|
62
|
+ success: function(res) {
|
63
|
63
|
console.log('succ', res)
|
64
|
64
|
if (res.statusCode == 200) {
|
65
|
65
|
that.handleData(res.data);
|
...
|
...
|
@@ -93,7 +93,7 @@ Page({ |
93
|
93
|
})
|
94
|
94
|
},
|
95
|
95
|
|
96
|
|
- handleData: function (data) {
|
|
96
|
+ handleData: function(data) {
|
97
|
97
|
if (data.items && data.items.length > 0) {
|
98
|
98
|
var datalist = []
|
99
|
99
|
|
...
|
...
|
@@ -101,7 +101,7 @@ Page({ |
101
|
101
|
data.items[i].newmobile = this.formatMobile(data.items[i].mobile)
|
102
|
102
|
data.items[i].newidnum = this.formatIdNum(data.items[i].id_card_no)
|
103
|
103
|
data.items[i].relative = data.items[i].family_ties
|
104
|
|
- if (data.items[i].family_ties=="本人"){
|
|
104
|
+ if (data.items[i].family_ties == "本人") {
|
105
|
105
|
this.self_id = data.items[i].id
|
106
|
106
|
// if (data.items[i].status!='0'){//0已完善 1未完善
|
107
|
107
|
// this.setData({
|
...
|
...
|
@@ -123,7 +123,7 @@ Page({ |
123
|
123
|
console.log('handleData', this.data.taxlist)
|
124
|
124
|
},
|
125
|
125
|
|
126
|
|
- formatMobile: function (mobile) {
|
|
126
|
+ formatMobile: function(mobile) {
|
127
|
127
|
if (mobile && mobile > 7) {
|
128
|
128
|
return mobile.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');
|
129
|
129
|
} else {
|
...
|
...
|
@@ -131,7 +131,7 @@ Page({ |
131
|
131
|
}
|
132
|
132
|
},
|
133
|
133
|
|
134
|
|
- formatIdNum: function (idnum) {
|
|
134
|
+ formatIdNum: function(idnum) {
|
135
|
135
|
if (idnum && idnum.length >= 6 && idnum.length < 10) {
|
136
|
136
|
return idnum.substring(0, 2) + '****' + idnum.substring(idnum.length - 2, idnum.length);
|
137
|
137
|
} else if (idnum.length >= 10) {
|
...
|
...
|
@@ -141,20 +141,20 @@ Page({ |
141
|
141
|
}
|
142
|
142
|
},
|
143
|
143
|
|
144
|
|
- goadd: function (e) {
|
|
144
|
+ goadd: function(e) {
|
145
|
145
|
console.log(e)
|
146
|
146
|
wx.navigateTo({
|
147
|
147
|
url: 'addinfo/addinfo',
|
148
|
148
|
})
|
149
|
149
|
},
|
150
|
150
|
|
151
|
|
- goedit: function (e) {
|
|
151
|
+ goedit: function(e) {
|
152
|
152
|
console.log(e)
|
153
|
|
- if (this.self_id != e.currentTarget.id){
|
|
153
|
+ if (this.self_id != e.currentTarget.id) {
|
154
|
154
|
wx.navigateTo({
|
155
|
155
|
url: 'addinfo/addinfo?id=' + e.currentTarget.id,
|
156
|
156
|
})
|
157
|
|
- }else {
|
|
157
|
+ } else {
|
158
|
158
|
wx.navigateTo({
|
159
|
159
|
url: 'editinfo/editinfo?id=' + e.currentTarget.id,
|
160
|
160
|
})
|
...
|
...
|
@@ -164,35 +164,35 @@ Page({ |
164
|
164
|
/**
|
165
|
165
|
* 生命周期函数--监听页面隐藏
|
166
|
166
|
*/
|
167
|
|
- onHide: function () {
|
|
167
|
+ onHide: function() {
|
168
|
168
|
|
169
|
169
|
},
|
170
|
170
|
|
171
|
171
|
/**
|
172
|
172
|
* 生命周期函数--监听页面卸载
|
173
|
173
|
*/
|
174
|
|
- onUnload: function () {
|
|
174
|
+ onUnload: function() {
|
175
|
175
|
|
176
|
176
|
},
|
177
|
177
|
|
178
|
178
|
/**
|
179
|
179
|
* 页面相关事件处理函数--监听用户下拉动作
|
180
|
180
|
*/
|
181
|
|
- onPullDownRefresh: function () {
|
|
181
|
+ onPullDownRefresh: function() {
|
182
|
182
|
|
183
|
183
|
},
|
184
|
184
|
|
185
|
185
|
/**
|
186
|
186
|
* 页面上拉触底事件的处理函数
|
187
|
187
|
*/
|
188
|
|
- onReachBottom: function () {
|
|
188
|
+ onReachBottom: function() {
|
189
|
189
|
|
190
|
190
|
},
|
191
|
191
|
|
192
|
192
|
/**
|
193
|
193
|
* 用户点击右上角分享
|
194
|
194
|
*/
|
195
|
|
- onShareAppMessage: function () {
|
|
195
|
+ onShareAppMessage: function() {
|
196
|
196
|
|
197
|
197
|
}
|
198
|
|
-}) |
|
198
|
+}) |
|
|
\ No newline at end of file |
...
|
...
|
|