From 08aaf067ed7a19cc43c313c6191299ab14abe368 Mon Sep 17 00:00:00 2001 From: QYF-GitLab1 <1940665526@qq.com> Date: 星期一, 16 十二月 2024 11:29:55 +0800 Subject: [PATCH] 1 --- .vscode/settings.json | 2 +- pages/personalCenter/index.js | 13 +++++++++++++ project.config.json | 3 ++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 451d977..ff37bd1 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -32,7 +32,7 @@ }, "editor.tabSize": 2, "[wxml]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "wechat.miniprogram.wxml-language-features" }, "[css]": { "editor.defaultFormatter": "HookyQR.beautify" diff --git a/pages/personalCenter/index.js b/pages/personalCenter/index.js index dc75193..16b1abe 100644 --- a/pages/personalCenter/index.js +++ b/pages/personalCenter/index.js @@ -258,6 +258,19 @@ this.setData({ userInfo: defaultUser }) + if (defaultUser?.role == 'Teacher') { + const data = [...this.data.menuData] + const list = data.filter(item => item.type != 'class') + this.setData({ + menuData: list + }) + } else { + const data = [...this.data.menuData] + const list = data.filter(item => item.type != 'course') + this.setData({ + menuData: list + }) + } this.getTeacherInfo() wx.setStorageSync(app.config.userInfoKey, JSON.stringify(this.data.userInfo)); setTimeout(() => { diff --git a/project.config.json b/project.config.json index 3f710e9..81cebec 100644 --- a/project.config.json +++ b/project.config.json @@ -136,5 +136,6 @@ "include": [] }, "appid": "wx7f362fe7cb6e0d1f", - "libVersion": "3.6.3" + "libVersion": "3.6.3", + "projectname": "jsek-applet" } \ No newline at end of file -- Gitblit v1.9.1