Commit e655c1304337df14a931a10924fa43eebf8a0dc5
1 parent
3073f1bdbd
Exists in
dev_wjl
修改vip和隐藏提示
Showing 3 changed files with 32 additions and 19 deletions
littleApp_child/packageA/pages/editAddress/editAddress.js
View file @
e655c13
... | ... | @@ -10,7 +10,8 @@ |
10 | 10 | babyAddress: '' |
11 | 11 | }, |
12 | 12 | onLoad: function (options) { |
13 | - if (options.id) { | |
13 | + if (options.id&&options.id!='null') { | |
14 | + console.log('options.id',options.id); | |
14 | 15 | this.setData({ |
15 | 16 | id: options.id |
16 | 17 | }) |
17 | 18 | |
... | ... | @@ -19,12 +20,15 @@ |
19 | 20 | } |
20 | 21 | }, |
21 | 22 | findNameById(id,data) { |
22 | - for (let i = 0; i < data.length; i++) { | |
23 | - if (data[i].id == id) { | |
24 | - return data[i].name; | |
23 | + if(data.length!=0){ | |
24 | + for (let i = 0; i < data.length; i++) { | |
25 | + if (data[i].id == id) { | |
26 | + return data[i].name; | |
27 | + } | |
25 | 28 | } |
26 | - } | |
27 | - return null; | |
29 | + }else{ | |
30 | + return '' | |
31 | + } | |
28 | 32 | }, |
29 | 33 | getdz(id){ |
30 | 34 | let self=this |
littleApp_child/pages/home/home.js
View file @
e655c13
... | ... | @@ -596,18 +596,23 @@ |
596 | 596 | }, function(res) { |
597 | 597 | |
598 | 598 | if (res.errorcode == 4002) { |
599 | - wx.showModal({ | |
600 | - title: '提示', | |
601 | - content: res.errormsg, | |
602 | - showCancel: false, | |
603 | - success: function(res) { | |
604 | - wx.setStorageSync('userToken', '') | |
605 | - wx.setStorageSync('userId', '') | |
606 | - getApp().globalData.token = '' | |
607 | - getApp().globalData.userId = '' | |
608 | - self.toLogin() | |
609 | - } | |
610 | - }) | |
599 | + // wx.showModal({ | |
600 | + // title: '提示', | |
601 | + // content: res.errormsg, | |
602 | + // showCancel: false, | |
603 | + // success: function(res) { | |
604 | + // wx.setStorageSync('userToken', '') | |
605 | + // wx.setStorageSync('userId', '') | |
606 | + // getApp().globalData.token = '' | |
607 | + // getApp().globalData.userId = '' | |
608 | + // self.toLogin() | |
609 | + // } | |
610 | + // }) | |
611 | + wx.setStorageSync('userToken', '') | |
612 | + wx.setStorageSync('userId', '') | |
613 | + getApp().globalData.token = '' | |
614 | + getApp().globalData.userId = '' | |
615 | + self.toLogin() | |
611 | 616 | } else { |
612 | 617 | networkUtil.showErrorToast(res.errormsg) |
613 | 618 | } |
614 | 619 | |
... | ... | @@ -935,8 +940,11 @@ |
935 | 940 | } |
936 | 941 | networkUtil._post(api.getBabyBuildPidInfo,param,function(res){ |
937 | 942 | if (res.data.data) { |
938 | - console.log('params',param); | |
943 | + if(!res.data.data.id){ | |
939 | 944 | console.log('res.data.data.id',res.data.data.id); |
945 | + } | |
946 | + console.log('params',param); | |
947 | + | |
940 | 948 | wx.navigateTo({url: '/packageA/pages/editAddress/editAddress?id=' + res.data.data.id }) |
941 | 949 | } |
942 | 950 | },function(res){ |
littleApp_child/pages/vipService/vipService.js
View file @
e655c13
... | ... | @@ -69,6 +69,7 @@ |
69 | 69 | arr[1]=res.data.data[1] |
70 | 70 | arr[0].desc=['1.精准指导服务:'+res.data.data[0].desc,'2.随访提醒:'+res.data.data[2].desc,'3.查看检查记录:'+res.data.data[3].desc] |
71 | 71 | arr[1].desc=[res.data.data[1].desc] |
72 | + arr[1].name='儿保小助理服务' | |
72 | 73 | console.log('arr',arr); |
73 | 74 | self.setData({ |
74 | 75 | vipList: arr, |