From 326467df08eb1af36cce83ac161addaa947e2e82 Mon Sep 17 00:00:00 2001
From: litian <C21AF165>
Date: 星期五, 29 三月 2024 19:31:17 +0800
Subject: [PATCH] css

---
 pages/personalCenter/index.js |   25 +++++++++++++------------
 1 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/pages/personalCenter/index.js b/pages/personalCenter/index.js
index 0d20c2e..bbeb19f 100644
--- a/pages/personalCenter/index.js
+++ b/pages/personalCenter/index.js
@@ -47,7 +47,7 @@
   {
     title: '鍑轰功鐢宠',
     icon: '/static/images/personal/chushu.png',
-    url: '/packagePersonal/pages/publishBooks/index',
+    url: '',
     type: 'publishBooks',
   }
 ];
@@ -135,6 +135,14 @@
       barHeight: systInfo.statusBarHeight,
       navBarHeight: navBarHeight,
     });
+
+  },
+  onShow() {
+    if (typeof this.getTabBar === 'function' && this.getTabBar()) {
+      this.getTabBar().setData({
+        active: 4
+      })
+    }
     // 妫�鏌ョ櫥褰曠姸鎬�
     const token = wx.getStorageSync(app.config.tokenKey)
     if (!token) {
@@ -151,13 +159,6 @@
         currAuthStep: 1,
       });
       this.getUserInfo()
-    }
-  },
-  onShow() {
-    if (typeof this.getTabBar === 'function' && this.getTabBar()) {
-      this.getTabBar().setData({
-        active: 4
-      })
     }
   },
   /**
@@ -197,8 +198,8 @@
         if (teacherRole && teacherInfos) {
           defaultUser = {
             ...teacherInfos,
-            nickName: teacherInfos.name,
-            icon: nickNameData ? JSON.parse(nickNameData.data).icon : WeChatInfo ? WeChatInfo.icon : '',
+            nickName: nickNameData && JSON.parse(nickNameData.data).nickName ? JSON.parse(nickNameData.data).nickName : WeChatInfo.name,
+            icon: nickNameData && JSON.parse(nickNameData.data).icon ? JSON.parse(nickNameData.data).icon : WeChatInfo.icon,
             userId: res.userId,
             role: 'Teacher',
             roleId: teacherRole.role.id,
@@ -211,8 +212,8 @@
         } else if (WeChatInfo) {
           defaultUser = {
             ...WeChatInfo,
-            nickName: nickNameData ? JSON.parse(nickNameData.data).nickName : WeChatInfo.name,
-            icon: nickNameData ? JSON.parse(nickNameData.data).icon : WeChatInfo.icon,
+            nickName: nickNameData && JSON.parse(nickNameData.data).nickName ? JSON.parse(nickNameData.data).nickName : WeChatInfo.name,
+            icon: nickNameData && JSON.parse(nickNameData.data).icon ? JSON.parse(nickNameData.data).icon : WeChatInfo.icon,
             userId: res.userId,
             userType: type,
             role: 'Student',

--
Gitblit v1.9.1