From b7ed8541113f8fa116b19d13e34a70a929310077 Mon Sep 17 00:00:00 2001 From: litian <C21AF165> Date: 星期二, 12 三月 2024 14:38:22 +0800 Subject: [PATCH] 样书申请 --- pages/personalCenter/index.js | 46 ++++++++++++++++++++++++++++++++-------------- 1 files changed, 32 insertions(+), 14 deletions(-) diff --git a/pages/personalCenter/index.js b/pages/personalCenter/index.js index e086528..e7c30db 100644 --- a/pages/personalCenter/index.js +++ b/pages/personalCenter/index.js @@ -15,7 +15,7 @@ { title: '鎴戠殑璇佷功', icon: '/static/images/personal/certificate.png', - url: '/pages/personalCenter/certificate/index', + url: '', type: 'certificate', }, { @@ -37,16 +37,16 @@ type: 'sampleBook', }, { - title: '鍑轰功鐢宠', - icon: '/static/images/personal/chushu.png', - url: '/pages/personalCenter/publishBooks/index', - type: 'publishBooks', - }, - { title: '鎴戠殑涓婁紶', icon: '/static/images/personal/upload.png', url: '', type: 'upload', + }, + { + title: '鍑轰功鐢宠', + icon: '/static/images/personal/chushu.png', + url: '/pages/personalCenter/publishBooks/index', + type: 'publishBooks', } ]; const moreMenu = [ @@ -59,7 +59,7 @@ { title: '寤鸿涓庡弽棣�', icon: '/static/images/personal/feedback.png', - url: '/pages/personalCenter/feedback/index', + url: '/pages/personalCenter/feedBack/index', type: 'feedback', } ]; @@ -67,7 +67,7 @@ { title: '鍏充簬鎴戜滑', icon: '/static/images/personal/about.png', - url: '', + url: '/pages/aboutUs/index', type: 'aboutUs', }, { @@ -83,6 +83,7 @@ * 椤甸潰鐨勫垵濮嬫暟鎹� */ data: { + isWhite: false, show: false, userInfo: { avatarUrl: @@ -104,6 +105,7 @@ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 */ onLoad(options) { + console.log(options); }, @@ -122,9 +124,11 @@ selected: 4 //杩欎釜鏁板瓧鏄綋鍓嶉〉闈㈠湪tabBar涓璴ist鏁扮粍鐨勭储寮� }) } - if (this.data.userInfo) { - this.getTeacherInfo() - } + this.getTeacherInfo() + } else { + wx.navigateTo({ + url: "/pages/testLogin/index", + }); } }, /** @@ -159,7 +163,8 @@ } } app.MG.ugc.getTopicMessageList(data).then((res) => { - const resData = res.datas.find((i) => i.appUserCreator.userId == userId.value) + console.log(this.data.userInfo, "userInfo") + const resData = res.datas.find((i) => i.appUserCreator.userId == this.data.userInfo.userId) if (resData) { this.setData({ teacherState: { @@ -170,11 +175,17 @@ } }) }, + //鏁欏笀璁よ瘉 + toCertification() { + wx.navigateTo({ + url: "/pages/teacherCertification/index", + }); + }, //鐐瑰嚮鐩綍 toPages(item) { console.log(item) - let info = item.target.dataset.info + let info = item.currentTarget.dataset.info if (info.url) { wx.navigateTo({ url: info.url @@ -193,5 +204,12 @@ */ onShareAppMessage() { + }, + + onPageScroll(e) { + this.setData({ + isWhite: e.scrollTop > 50 ? true : false + }) + } }) \ No newline at end of file -- Gitblit v1.9.1