提交 7b2fbbc3bc13cad1da5e11359e7fa6a9e9831d18

作者 wangyu
1 个父辈 9ffa318c

优化

... ... @@ -61,10 +61,6 @@ Page({
61 61 console.log('id_info', res.data)
62 62 if (res.data && res.data.length > 0) {
63 63 var id_info = JSON.parse(res.data)
64   - if (that.data.name.length > 0 && id_info.name != that.data.name) {
65   - that.showtoast("姓名冲突")
66   - return
67   - }
68 64 var birth_day
69 65 if (id_info.birthday.month > 9 && id_info.birthday.day > 9) {
70 66 birth_day = id_info.birthday.year + '-' + id_info.birthday.month + '-' + id_info.birthday.day;
... ... @@ -75,7 +71,7 @@ Page({
75 71 } else if (id_info.birthday.month < 10 && id_info.birthday.day < 10) {
76 72 birth_day = id_info.birthday.year + '-0' + id_info.birthday.month + '-0' + id_info.birthday.day;
77 73 }
78   -
  74 + console.log("birth_day", birth_day)
79 75 that.setData({
80 76 name: id_info.name,
81 77 id_card_no: id_info.id_card_number,
... ... @@ -148,19 +144,13 @@ Page({
148 144 delta: 1
149 145 })
150 146 }else{
151   - wx.showToast({
152   - title: res.data.message,
153   - icon:"none"
154   - })
  147 + that.showToast(res.data.message)
155 148 }
156 149 }
157 150 },
158 151 fail:function(res){
159 152 console.log("fail", res)
160   - wx.showToast({
161   - title: res.data.message,
162   - icon: 'none'
163   - })
  153 + that.showToast(res.data.message)
164 154 }
165 155 })
166 156 },
... ...
注册登录 后发表评论