正在显示
2 个修改的文件
包含
24 行增加
和
5 行删除
| ... | ... | @@ -36,7 +36,7 @@ Page({ |
| 36 | 36 | supporter_id: curdata.id, |
| 37 | 37 | name: curdata.co_supporter, |
| 38 | 38 | id_card_no: curdata.id_card_no, |
| 39 | - birthday: curdata.birthday, | |
| 39 | + birthday: curdata.birthday ? this.formatDate(curdata.birthday ):"", | |
| 40 | 40 | birthday_datelong: Date.parse(new Date(curdata.birthday)) / 1000 |
| 41 | 41 | }) |
| 42 | 42 | } |
| ... | ... | @@ -202,6 +202,16 @@ Page({ |
| 202 | 202 | } |
| 203 | 203 | }, |
| 204 | 204 | |
| 205 | + formatDate(date) { | |
| 206 | + if (date == 0 || date == -62135596800) { | |
| 207 | + date = "" | |
| 208 | + } else { | |
| 209 | + date = format.formatTime_date(date) | |
| 210 | + } | |
| 211 | + console.log("formatDate", date) | |
| 212 | + return date | |
| 213 | + }, | |
| 214 | + | |
| 205 | 215 | /** |
| 206 | 216 | * Lifecycle function--Called when page hide |
| 207 | 217 | */ | ... | ... |
| ... | ... | @@ -402,7 +402,7 @@ Page({ |
| 402 | 402 | that.getAdditionInfo() |
| 403 | 403 | }else { |
| 404 | 404 | wx.showToast({ |
| 405 | - title: "", | |
| 405 | + title: res.data.message, | |
| 406 | 406 | icon: "none" |
| 407 | 407 | }) |
| 408 | 408 | } |
| ... | ... | @@ -411,7 +411,7 @@ Page({ |
| 411 | 411 | fail:function(res){ |
| 412 | 412 | console.log("fail",res) |
| 413 | 413 | wx.showToast({ |
| 414 | - title: "", | |
| 414 | + title: res.data.message, | |
| 415 | 415 | icon:"none" |
| 416 | 416 | }) |
| 417 | 417 | } |
| ... | ... | @@ -532,10 +532,19 @@ Page({ |
| 532 | 532 | console.log('succ', res) |
| 533 | 533 | if (res.statusCode == 200) { |
| 534 | 534 | that.handleData(res.data); |
| 535 | + }else{ | |
| 536 | + wx.showToast({ | |
| 537 | + title: res.data.message, | |
| 538 | + icon: "none" | |
| 539 | + }) | |
| 535 | 540 | } |
| 536 | 541 | }, |
| 537 | - fail(res) { | |
| 538 | - console.log(res.data) | |
| 542 | + fail: function (res) { | |
| 543 | + console.log("fail", res) | |
| 544 | + wx.showToast({ | |
| 545 | + title: res.data.message, | |
| 546 | + icon: "none" | |
| 547 | + }) | |
| 539 | 548 | }, |
| 540 | 549 | complete() { |
| 541 | 550 | wx.hideLoading() | ... | ... |
请
注册
或
登录
后发表评论