正在显示
5 个修改的文件
包含
26 行增加
和
26 行删除
| @@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
| 2 | var app = getApp(); | 2 | var app = getApp(); |
| 3 | var baseUrl = app.globalData.baseUrl; | 3 | var baseUrl = app.globalData.baseUrl; |
| 4 | Page({ | 4 | Page({ |
| 5 | - self_id:null, | 5 | + self_id: null, |
| 6 | /** | 6 | /** |
| 7 | * 页面的初始数据 | 7 | * 页面的初始数据 |
| 8 | */ | 8 | */ |
| @@ -15,7 +15,7 @@ Page({ | @@ -15,7 +15,7 @@ Page({ | ||
| 15 | /** | 15 | /** |
| 16 | * 生命周期函数--监听页面加载 | 16 | * 生命周期函数--监听页面加载 |
| 17 | */ | 17 | */ |
| 18 | - onLoad: function (options) { | 18 | + onLoad: function(options) { |
| 19 | console.log('onLoad') | 19 | console.log('onLoad') |
| 20 | if (app.globalData.OSSUrl.length == 0) { | 20 | if (app.globalData.OSSUrl.length == 0) { |
| 21 | app.configOssUrl() | 21 | app.configOssUrl() |
| @@ -26,20 +26,20 @@ Page({ | @@ -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 | console.log('onShow') | 38 | console.log('onShow') |
| 39 | this.getTaxList() | 39 | this.getTaxList() |
| 40 | }, | 40 | }, |
| 41 | 41 | ||
| 42 | - getTaxList: function () { | 42 | + getTaxList: function() { |
| 43 | var that = this; | 43 | var that = this; |
| 44 | wx.showLoading({ | 44 | wx.showLoading({ |
| 45 | title: '加载中', | 45 | title: '加载中', |
| @@ -59,7 +59,7 @@ Page({ | @@ -59,7 +59,7 @@ Page({ | ||
| 59 | data: { | 59 | data: { |
| 60 | 'all': true | 60 | 'all': true |
| 61 | }, | 61 | }, |
| 62 | - success: function (res) { | 62 | + success: function(res) { |
| 63 | console.log('succ', res) | 63 | console.log('succ', res) |
| 64 | if (res.statusCode == 200) { | 64 | if (res.statusCode == 200) { |
| 65 | that.handleData(res.data); | 65 | that.handleData(res.data); |
| @@ -93,7 +93,7 @@ Page({ | @@ -93,7 +93,7 @@ Page({ | ||
| 93 | }) | 93 | }) |
| 94 | }, | 94 | }, |
| 95 | 95 | ||
| 96 | - handleData: function (data) { | 96 | + handleData: function(data) { |
| 97 | if (data.items && data.items.length > 0) { | 97 | if (data.items && data.items.length > 0) { |
| 98 | var datalist = [] | 98 | var datalist = [] |
| 99 | 99 | ||
| @@ -101,13 +101,13 @@ Page({ | @@ -101,13 +101,13 @@ Page({ | ||
| 101 | data.items[i].newmobile = this.formatMobile(data.items[i].mobile) | 101 | data.items[i].newmobile = this.formatMobile(data.items[i].mobile) |
| 102 | data.items[i].newidnum = this.formatIdNum(data.items[i].id_card_no) | 102 | data.items[i].newidnum = this.formatIdNum(data.items[i].id_card_no) |
| 103 | data.items[i].relative = data.items[i].family_ties | 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 | this.self_id = data.items[i].id | 105 | this.self_id = data.items[i].id |
| 106 | - if (data.items[i].status!='0'){//0已完善 1未完善 | 106 | + if (data.items[i].status != '0') { //0已完善 1未完善 |
| 107 | this.setData({ | 107 | this.setData({ |
| 108 | text_tip: '自然人信息不完善,立即完善' | 108 | text_tip: '自然人信息不完善,立即完善' |
| 109 | }) | 109 | }) |
| 110 | - }else{ | 110 | + } else { |
| 111 | this.setData({ | 111 | this.setData({ |
| 112 | text_tip: '去查看' | 112 | text_tip: '去查看' |
| 113 | }) | 113 | }) |
| @@ -122,7 +122,7 @@ Page({ | @@ -122,7 +122,7 @@ Page({ | ||
| 122 | console.log('handleData', this.data.taxlist) | 122 | console.log('handleData', this.data.taxlist) |
| 123 | }, | 123 | }, |
| 124 | 124 | ||
| 125 | - formatMobile: function (mobile) { | 125 | + formatMobile: function(mobile) { |
| 126 | if (mobile && mobile > 7) { | 126 | if (mobile && mobile > 7) { |
| 127 | return mobile.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2'); | 127 | return mobile.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2'); |
| 128 | } else { | 128 | } else { |
| @@ -130,7 +130,7 @@ Page({ | @@ -130,7 +130,7 @@ Page({ | ||
| 130 | } | 130 | } |
| 131 | }, | 131 | }, |
| 132 | 132 | ||
| 133 | - formatIdNum: function (idnum) { | 133 | + formatIdNum: function(idnum) { |
| 134 | if (idnum && idnum.length >= 6 && idnum.length < 10) { | 134 | if (idnum && idnum.length >= 6 && idnum.length < 10) { |
| 135 | return idnum.substring(0, 2) + '****' + idnum.substring(idnum.length - 2, idnum.length); | 135 | return idnum.substring(0, 2) + '****' + idnum.substring(idnum.length - 2, idnum.length); |
| 136 | } else if (idnum.length >= 10) { | 136 | } else if (idnum.length >= 10) { |
| @@ -140,20 +140,20 @@ Page({ | @@ -140,20 +140,20 @@ Page({ | ||
| 140 | } | 140 | } |
| 141 | }, | 141 | }, |
| 142 | 142 | ||
| 143 | - goadd: function (e) { | 143 | + goadd: function(e) { |
| 144 | console.log(e) | 144 | console.log(e) |
| 145 | wx.navigateTo({ | 145 | wx.navigateTo({ |
| 146 | url: 'addinfo/addinfo', | 146 | url: 'addinfo/addinfo', |
| 147 | }) | 147 | }) |
| 148 | }, | 148 | }, |
| 149 | 149 | ||
| 150 | - goedit: function (e) { | 150 | + goedit: function(e) { |
| 151 | console.log(e) | 151 | console.log(e) |
| 152 | - if (this.self_id != e.currentTarget.id){ | 152 | + if (this.self_id != e.currentTarget.id) { |
| 153 | wx.navigateTo({ | 153 | wx.navigateTo({ |
| 154 | url: 'addinfo/addinfo?id=' + e.currentTarget.id, | 154 | url: 'addinfo/addinfo?id=' + e.currentTarget.id, |
| 155 | }) | 155 | }) |
| 156 | - }else { | 156 | + } else { |
| 157 | wx.navigateTo({ | 157 | wx.navigateTo({ |
| 158 | url: 'editinfo/editinfo?id=' + e.currentTarget.id, | 158 | url: 'editinfo/editinfo?id=' + e.currentTarget.id, |
| 159 | }) | 159 | }) |
| @@ -163,35 +163,35 @@ Page({ | @@ -163,35 +163,35 @@ Page({ | ||
| 163 | /** | 163 | /** |
| 164 | * 生命周期函数--监听页面隐藏 | 164 | * 生命周期函数--监听页面隐藏 |
| 165 | */ | 165 | */ |
| 166 | - onHide: function () { | 166 | + onHide: function() { |
| 167 | 167 | ||
| 168 | }, | 168 | }, |
| 169 | 169 | ||
| 170 | /** | 170 | /** |
| 171 | * 生命周期函数--监听页面卸载 | 171 | * 生命周期函数--监听页面卸载 |
| 172 | */ | 172 | */ |
| 173 | - onUnload: function () { | 173 | + onUnload: function() { |
| 174 | 174 | ||
| 175 | }, | 175 | }, |
| 176 | 176 | ||
| 177 | /** | 177 | /** |
| 178 | * 页面相关事件处理函数--监听用户下拉动作 | 178 | * 页面相关事件处理函数--监听用户下拉动作 |
| 179 | */ | 179 | */ |
| 180 | - onPullDownRefresh: function () { | 180 | + onPullDownRefresh: function() { |
| 181 | 181 | ||
| 182 | }, | 182 | }, |
| 183 | 183 | ||
| 184 | /** | 184 | /** |
| 185 | * 页面上拉触底事件的处理函数 | 185 | * 页面上拉触底事件的处理函数 |
| 186 | */ | 186 | */ |
| 187 | - onReachBottom: function () { | 187 | + onReachBottom: function() { |
| 188 | 188 | ||
| 189 | }, | 189 | }, |
| 190 | 190 | ||
| 191 | /** | 191 | /** |
| 192 | * 用户点击右上角分享 | 192 | * 用户点击右上角分享 |
| 193 | */ | 193 | */ |
| 194 | - onShareAppMessage: function () { | 194 | + onShareAppMessage: function() { |
| 195 | 195 | ||
| 196 | } | 196 | } |
| 197 | -}) | 197 | +}) |
请
注册
或
登录
后发表评论