提交 5ff3dbab65a5fb979f952e37a07f7c5ad879f1d0

作者 wangyu
1 个父辈 8538d062

优化

@@ -36,7 +36,7 @@ Page({ @@ -36,7 +36,7 @@ Page({
36 supporter_id: curdata.id, 36 supporter_id: curdata.id,
37 name: curdata.co_supporter, 37 name: curdata.co_supporter,
38 id_card_no: curdata.id_card_no, 38 id_card_no: curdata.id_card_no,
39 - birthday: curdata.birthday, 39 + birthday: curdata.birthday ? this.formatDate(curdata.birthday ):"",
40 birthday_datelong: Date.parse(new Date(curdata.birthday)) / 1000 40 birthday_datelong: Date.parse(new Date(curdata.birthday)) / 1000
41 }) 41 })
42 } 42 }
@@ -202,6 +202,16 @@ Page({ @@ -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 * Lifecycle function--Called when page hide 216 * Lifecycle function--Called when page hide
207 */ 217 */
@@ -402,7 +402,7 @@ Page({ @@ -402,7 +402,7 @@ Page({
402 that.getAdditionInfo() 402 that.getAdditionInfo()
403 }else { 403 }else {
404 wx.showToast({ 404 wx.showToast({
405 - title: "", 405 + title: res.data.message,
406 icon: "none" 406 icon: "none"
407 }) 407 })
408 } 408 }
@@ -411,7 +411,7 @@ Page({ @@ -411,7 +411,7 @@ Page({
411 fail:function(res){ 411 fail:function(res){
412 console.log("fail",res) 412 console.log("fail",res)
413 wx.showToast({ 413 wx.showToast({
414 - title: "", 414 + title: res.data.message,
415 icon:"none" 415 icon:"none"
416 }) 416 })
417 } 417 }
@@ -532,10 +532,19 @@ Page({ @@ -532,10 +532,19 @@ Page({
532 console.log('succ', res) 532 console.log('succ', res)
533 if (res.statusCode == 200) { 533 if (res.statusCode == 200) {
534 that.handleData(res.data); 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 complete() { 549 complete() {
541 wx.hideLoading() 550 wx.hideLoading()
注册登录 后发表评论