diff --git a/Fronts/pages.json b/Fronts/pages.json index 9dd7a52c08cdc934ecacc57358dbf7e83155023e..505ed9f9b55878a6c41d2718a78beb7d90b67097 100644 --- a/Fronts/pages.json +++ b/Fronts/pages.json @@ -1,103 +1,113 @@ { "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages { - "path": "pages/index/index", - "style": { - "navigationBarTitleText": "主页" - } - }, - { - "path": "pages/Course/Course", - "style": { - "navigationBarTitleText": "课程信息" - } - }, - { - "path": "pages/results/results", - "style": { - "navigationBarTitleText": "成绩信息" - } - }, - { - "path": "pages/Percenter/Percenter", - "style": { - "navigationBarTitleText": "个人主页" - } - }, - { - "path": "pages/TeLogin/Login", - "style": { - "navigationBarTitleText": "登录页面" - } - }, - { - "path": "pages/TeLogin/AuLogin", - "style": { - "navigationBarTitleText": "授权登录页面" - } - }, - { - "path":"pages/Percenter/Sublayout/problem", - "style": { - "navigationBarTitleText": "常见问题" - } - },{ - "path":"pages/Percenter/Sublayout/myinfo", - "style": { - "navigationBarTitleText": "个人信息" - } - },{ - "path":"pages/Percenter/Sublayout/room", - "style": { - "navigationBarTitleText": "寝室信息" - } - },{ - "path":"pages/Percenter/contact", - "style": { - "navigationBarTitleText": "联系我们" - } - }, - { - "path":"pages/register/updatepass", - "style": { - "navigationBarTitleText": "修改密码" - } - }, - { - "path":"pages/book", - "style": { - "navigationBarTitleText": "教材信息" - } - }, - { - "path":"pages/many", - "style": { - "navigationBarTitleText": "更多" - } - }, - { - "path":"pages/School", - "style": { - "navigationBarTitleText": "学校预览" - } - }, - { - "path":"pages/major", - "style": { - "navigationBarTitleText": "专业信息" - } - }, - { - "path":"pages/Teather", - "style": { - "navigationBarTitleText": "教师信息" - } - },{ - "path":"pages/register/Register", - "style": { - "navigationBarTitleText": "教师信息" - } - } + "path": "pages/index/index", + "style": { + "navigationBarTitleText": "主页" + } + }, + { + "path": "pages/Course/Course", + "style": { + "navigationBarTitleText": "课程信息" + } + }, + { + "path": "pages/results/results", + "style": { + "navigationBarTitleText": "成绩信息" + } + }, + { + "path": "pages/Percenter/Percenter", + "style": { + "navigationBarTitleText": "个人主页" + } + }, + { + "path": "pages/TeLogin/Login", + "style": { + "navigationBarTitleText": "登录页面" + } + }, + { + "path": "pages/TeLogin/AuLogin", + "style": { + "navigationBarTitleText": "授权登录页面" + } + }, + { + "path": "pages/Percenter/Sublayout/problem", + "style": { + "navigationBarTitleText": "常见问题" + } + }, { + "path": "pages/Percenter/Sublayout/myinfo", + "style": { + "navigationBarTitleText": "个人信息" + } + }, { + "path": "pages/Percenter/Sublayout/room", + "style": { + "navigationBarTitleText": "寝室信息" + } + }, { + "path": "pages/Percenter/contact", + "style": { + "navigationBarTitleText": "联系我们" + } + }, + { + "path": "pages/register/updatepass", + "style": { + "navigationBarTitleText": "修改密码" + } + }, + { + "path": "pages/book", + "style": { + "navigationBarTitleText": "教材信息" + } + }, + { + "path": "pages/many", + "style": { + "navigationBarTitleText": "更多" + } + }, + { + "path": "pages/School", + "style": { + "navigationBarTitleText": "学校预览" + } + }, + { + "path": "pages/major", + "style": { + "navigationBarTitleText": "专业信息" + } + }, + { + "path": "pages/Teather", + "style": { + "navigationBarTitleText": "教师信息" + } + }, { + "path": "pages/register/Register", + "style": { + "navigationBarTitleText": "教师信息" + } + }, { + "path": "pages/Questionnaires/Questionnaires", + "style": { + "navigationBarTitleText": "问卷调查" + } + }, { + "path": "pages/Questionnaires/Record", + "style": { + "navigationBarTitleText": "问卷调查" + } + } ], "globalStyle": { "navigationBarTextStyle": "black", diff --git a/Fronts/pages/Course/components/Course.vue b/Fronts/pages/Course/components/Course.vue index 029750040c4a3f65f93b76625774b4459802815a..6fa25cce693447e513c4ee94bd6580e5655e896b 100644 --- a/Fronts/pages/Course/components/Course.vue +++ b/Fronts/pages/Course/components/Course.vue @@ -1,51 +1,129 @@ diff --git a/Fronts/pages/Questionnaires/Record.vue b/Fronts/pages/Questionnaires/Record.vue new file mode 100644 index 0000000000000000000000000000000000000000..f855b861d8ea5ec62ac2f82f415cfe41a5a2dc2d --- /dev/null +++ b/Fronts/pages/Questionnaires/Record.vue @@ -0,0 +1,16 @@ + + + + + diff --git a/Fronts/pages/Questionnaires/components/Body.vue b/Fronts/pages/Questionnaires/components/Body.vue new file mode 100644 index 0000000000000000000000000000000000000000..1931a82cef79db61d6624fdaaff4bc22f85a9f02 --- /dev/null +++ b/Fronts/pages/Questionnaires/components/Body.vue @@ -0,0 +1,47 @@ + + + + + diff --git a/Fronts/pages/Questionnaires/components/Head.vue b/Fronts/pages/Questionnaires/components/Head.vue new file mode 100644 index 0000000000000000000000000000000000000000..81a7ca19b87f75528e79a2c8747670492a473d9f --- /dev/null +++ b/Fronts/pages/Questionnaires/components/Head.vue @@ -0,0 +1,67 @@ + + + + + diff --git a/Fronts/pages/index/TedentSon/Menu.vue b/Fronts/pages/index/TedentSon/Menu.vue index 00c3587f3a592d9b17574638595a8179122939d6..3e82c13c1f22682c40dac7bcb128cb780800c028 100644 --- a/Fronts/pages/index/TedentSon/Menu.vue +++ b/Fronts/pages/index/TedentSon/Menu.vue @@ -3,7 +3,7 @@ - + diff --git a/Fronts/pages/index/index.vue b/Fronts/pages/index/index.vue index 03506883de7423c97552cdee4082a8aa4a4f4ef9..c691ddbc7202cd0178c55b4d6e8458e4a1afca8c 100644 --- a/Fronts/pages/index/index.vue +++ b/Fronts/pages/index/index.vue @@ -34,6 +34,72 @@ Menu, Title, College + }, + data() { + return { + islogin: '' + } + }, + onLoad() { + this.studentNum = wx.getStorageSync('studentnum'); + this.studentClass = wx.getStorageSync('studentclass'); + this.StudentName = wx.getStorageSync('myname'); + this.token = wx.getStorageSync('token'); + this.openid = wx.getStorageSync('openid'); + if (this.token || this.openid) { + this.islogin = true + this.getClass() + this.getName() + } else { + this.islogin = false + } + + }, + methods:{ + getClass() { + uni.request({ + url: 'http://localhost:5003/student?keyword=' + this.studentNum, + method: 'GET', + data: {}, + success: res => { + console.log(res) + this.Class = res.data.data; + console.log(this.Class); + this.Class.forEach((item) => { + this.classname = item.classInfo.className + }) + console.log(this.classname); + uni.setStorage({ + key: 'studentclass', + data: this.classname, + }); + }, + fail: () => {}, + complete: () => {} + }); + }, + getName() { + uni.request({ + url: 'http://localhost:5003/student?keyword=' + this.studentNum, + method: 'GET', + data: {}, + success: res => { + console.log(res) + this.Name = res.data.data; + console.log(this.Name); + this.Name.forEach((item) => { + this.studentname = item.studentInfo.studentName + }) + console.log(this.studentname); + uni.setStorage({ + key: 'myname', + data: this.studentname, + }); + }, + fail: () => {}, + complete: () => {} + }); + }, } } diff --git a/Fronts/pages/results/components/Grades.vue b/Fronts/pages/results/components/Grades.vue index c16da823e6a28be9c4606ce372c4318de1d48db7..2d27e4136ebe7b382b43aff8f3a740e17d96d39a 100644 --- a/Fronts/pages/results/components/Grades.vue +++ b/Fronts/pages/results/components/Grades.vue @@ -1,8 +1,9 @@ @@ -53,11 +62,26 @@ searchResult: [], array: ['第一学期', '第二学期', '第三学期', '第四学期', '第五学期', '第六学期'], index: 0, - num: "第一学期" + num: "第一学期", + studentNum: "", + Name: "", + studentname: "", + islogin: '' + + } + }, + onLoad() { + this.StudentName = wx.getStorageSync('myname'); + this.token = wx.getStorageSync('token'); + this.openid = wx.getStorageSync('openid'); + if (this.token || this.openid) { + this.islogin = true + } else { + this.islogin = false } }, mounted() { - this.getScoresAll(), + this.getScoresAll(), this.searchAction() }, methods: { @@ -68,9 +92,12 @@ console.log(this.num) }, + + getScoresAll() { + console.log(this.StudentName); uni.request({ - url: 'http://localhost:5003/Score', + url: 'http://localhost:5003/Score?keyword=' + this.StudentName, method: 'GET', data: {}, success: res => { @@ -85,7 +112,7 @@ searchAction(e) { const inputValut = e; this.searchResult = this.result.filter((item) => { - if (item.subjects.includes(inputValut)) { + if (item.courseInfo.courseName.includes(inputValut)) { return item; } }) @@ -95,15 +122,22 @@