wangyuan 2 лет назад
Родитель
Сommit
474c57abb1
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      pages/myAppointment/myAppointment.js

+ 3 - 2
pages/myAppointment/myAppointment.js

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