Browse Source

pref: use storage data

wangyuan 2 years ago
parent
commit
474c57abb1
1 changed files with 3 additions and 2 deletions
  1. 3 2
      pages/myAppointment/myAppointment.js

+ 3 - 2
pages/myAppointment/myAppointment.js

@@ -11,7 +11,7 @@ Page({
     appointmentList: [],
     appointmentList: [],
     currentPage: 1,
     currentPage: 1,
     hasNext: false,
     hasNext: false,
-    globalDataUserName: app.globalData.userInfo.userName,
+    globalDataUserName: '',
     appointmentId: ''
     appointmentId: ''
   },
   },
 
 
@@ -20,7 +20,8 @@ Page({
    */
    */
   onShow() {
   onShow() {
     this.setData({
     this.setData({
-      navItemActive: '0'
+      navItemActive: '0',
+      globalDataUserName: wx.getStorageSync('userName')
     })
     })
     this.getAppointmentList()
     this.getAppointmentList()
   },
   },