diff --git a/code/.eslintrc.js b/code 2.0/.eslintrc.js similarity index 100% rename from code/.eslintrc.js rename to code 2.0/.eslintrc.js diff --git a/code/app.js b/code 2.0/app.js similarity index 100% rename from code/app.js rename to code 2.0/app.js diff --git a/code/app.json b/code 2.0/app.json similarity index 83% rename from code/app.json rename to code 2.0/app.json index d856cce..579d913 100644 --- a/code/app.json +++ b/code 2.0/app.json @@ -1,17 +1,18 @@ { - "entryPagePath": "pages/course_detail/course_detail", + "entryPagePath": "pages/login/login", "pages": [ "pages/course/course", "pages/my/my", "pages/course_detail/course_detail", + "pages/course_detail(2)/course_detail(2)", "pages/student_info/student_info", + "pages/student_info(2)/student_info(2)", "pages/login/login", "pages/forget/forget", "pages/register/register", "pages/choose_name/choose_name", - "pages/call_the_name(1)/call_the_name(1)", - "pages/call_the_name(2)/call_the_name(2)", - "pages/call_the_name(3)/call_the_name(3)" + "pages/call_the_name/call_the_name", + "pages/my_callname/my_callname" ], "window": { "navigationBarTitleText": "点名系统", @@ -42,4 +43,5 @@ "componentFramework": "glass-easel", "sitemapLocation": "sitemap.json", "lazyCodeLoading": "requiredComponents" + } \ No newline at end of file diff --git a/code/app.wxss b/code 2.0/app.wxss similarity index 100% rename from code/app.wxss rename to code 2.0/app.wxss diff --git a/code/assets/course/arrow-right.png b/code 2.0/assets/course/arrow-right.png similarity index 100% rename from code/assets/course/arrow-right.png rename to code 2.0/assets/course/arrow-right.png diff --git a/code/assets/course/多栏明细账.png b/code 2.0/assets/course/多栏明细账.png similarity index 100% rename from code/assets/course/多栏明细账.png rename to code 2.0/assets/course/多栏明细账.png diff --git a/code/assets/login/极光.png b/code 2.0/assets/login/极光.png similarity index 100% rename from code/assets/login/极光.png rename to code 2.0/assets/login/极光.png diff --git a/code/assets/my/个人信息.png b/code 2.0/assets/my/个人信息.png similarity index 100% rename from code/assets/my/个人信息.png rename to code 2.0/assets/my/个人信息.png diff --git a/code/assets/my/修改密码.png b/code 2.0/assets/my/修改密码.png similarity index 100% rename from code/assets/my/修改密码.png rename to code 2.0/assets/my/修改密码.png diff --git a/code/assets/tabbar/我的(1).png b/code 2.0/assets/tabbar/我的(1).png similarity index 100% rename from code/assets/tabbar/我的(1).png rename to code 2.0/assets/tabbar/我的(1).png diff --git a/code/assets/tabbar/我的(2).png b/code 2.0/assets/tabbar/我的(2).png similarity index 100% rename from code/assets/tabbar/我的(2).png rename to code 2.0/assets/tabbar/我的(2).png diff --git a/code/assets/tabbar/课程(1).png b/code 2.0/assets/tabbar/课程(1).png similarity index 100% rename from code/assets/tabbar/课程(1).png rename to code 2.0/assets/tabbar/课程(1).png diff --git a/code/assets/tabbar/课程(2).png b/code 2.0/assets/tabbar/课程(2).png similarity index 100% rename from code/assets/tabbar/课程(2).png rename to code 2.0/assets/tabbar/课程(2).png diff --git a/code/openAPI/default.html b/code 2.0/openAPI/default.html similarity index 100% rename from code/openAPI/default.html rename to code 2.0/openAPI/default.html diff --git a/code 2.0/pages/call_the_name/call_the_name.js b/code 2.0/pages/call_the_name/call_the_name.js new file mode 100644 index 0000000..e3f55ea --- /dev/null +++ b/code 2.0/pages/call_the_name/call_the_name.js @@ -0,0 +1,93 @@ +Page({ + + /** + * 页面的初始数据 + */ + data: { + studentId : '', + name: '', + password: '' + }, + addScore1: function() { + this.addScore(-0.5); + this.call_the_name(); + }, + addScore2: function() { + this.call_the_name(); + }, + addScore3: function() { + this.addScore(0.5); + this.call_the_name(); + }, + addScore4: function() { + this.call_the_name(); + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + this.call_the_name(); + }, + call_the_name: function() { + const kind = wx.getStorageSync('call_kind'); + const that = this; + var url = ''; + if (kind == '1') { + url = 'http://10.133.15.50:8888/admin/randomRollCall?courseId=' + wx.getStorageSync('courseId'); + } else if (kind == '2') { + url = 'http://10.133.15.50:8888/admin/callByLastNum?courseId=' + wx.getStorageSync('courseId') + '&lastNum=' + wx.getStorageSync('lastNum'); + } else if (kind == '3') { + url = 'http://10.133.15.50:8888/admin/callByFirstname?courseId=' + wx.getStorageSync('courseId') + '&firstname=' + wx.getStorageSync('firstname'); + } + wx.request({ + url: url, + method: 'POST', + header: { + 'admin_token': wx.getStorageSync('token') // 携带token + }, + success(res) { + if (res.statusCode === 200) { + console.log(res.data.data); + that.setData({ + studentId: res.data.data.studentId, + name: res.data.data.name, + password: res.data.data.password + }); + } + }, + fail(error) { + console.error(error); + } + }); + }, + addScore: function(score) { + const that = this; + wx.request({ + url: 'http://10.133.15.50:8888/admin/addScore?score=' + score, + method: 'PUT', + header: { + 'admin_token': wx.getStorageSync('token') // 携带token + }, + data: { + student: { + studentId: that.data.studentId, + name: that.data.name, + password: that.data.password + }, + course: { + courseId: wx.getStorageSync('courseId'), + description: wx.getStorageSync('description') + } + }, + success(res) { + if (res.statusCode === 200) { + console.log("right op"); + } + }, + fail(error) { + console.error(error); + } + }); + } +}) \ No newline at end of file diff --git a/code/pages/call_the_name(1)/call_the_name(1).json b/code 2.0/pages/call_the_name/call_the_name.json similarity index 100% rename from code/pages/call_the_name(1)/call_the_name(1).json rename to code 2.0/pages/call_the_name/call_the_name.json diff --git a/code 2.0/pages/call_the_name/call_the_name.scss b/code 2.0/pages/call_the_name/call_the_name.scss new file mode 100644 index 0000000..498d1f5 --- /dev/null +++ b/code 2.0/pages/call_the_name/call_the_name.scss @@ -0,0 +1,60 @@ +page { + background-color: #eeeeee; +} + +.container { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding-top: 60rpx; +} + +.top { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; +} + +.top_detail { + font-size:45rpx; + padding: 20rpx; +} + + +.option_detail { + width: 340rpx !important; /* 根据需要调整宽度 */ + height: 85rpx; /* 根据需要调整高度 */ + border: 1px solid #BBBBBB; /* 边框颜色 */ + border-radius: 20rpx; /* 圆角半径 */ + background-color: #ffffff; /* 背景颜色 */ + display: flex; + align-items: center; + justify-content: center; + position: relative; + margin-top: 80rpx; /* 组件上外边距 */ + font-size: 40rpx; +} + +.option_detail2 { + width: 200rpx !important; /* 根据需要调整宽度 */ + height: 80rpx; /* 根据需要调整高度 */ + border: 1px solid #000000; /* 边框颜色 */ + border-radius: 20rpx; /* 圆角半径 */ + background-color: #DB4949; /* 背景颜色 */ + display: flex; + align-items: center; + justify-content: center; + position: relative; + margin-top: 80rpx; /* 组件上外边距 */ + font-size: 40rpx; + text { + color: #FFFFFF; + } +} + +.bottom_image { + width: 400rpx; + height: 400rpx; +} \ No newline at end of file diff --git a/code 2.0/pages/call_the_name/call_the_name.wxml b/code 2.0/pages/call_the_name/call_the_name.wxml new file mode 100644 index 0000000..351ba5a --- /dev/null +++ b/code 2.0/pages/call_the_name/call_the_name.wxml @@ -0,0 +1,15 @@ + + + 学号:{{studentId}} + 姓名:{{name}} + + + + + + + + + \ No newline at end of file diff --git a/code/pages/choose_name/choose_name.js b/code 2.0/pages/choose_name/choose_name.js similarity index 53% rename from code/pages/choose_name/choose_name.js rename to code 2.0/pages/choose_name/choose_name.js index b83aadd..db6e8ed 100644 --- a/code/pages/choose_name/choose_name.js +++ b/code 2.0/pages/choose_name/choose_name.js @@ -6,28 +6,43 @@ Page({ */ data: { + }, + option1: function(e) { + wx.setStorageSync('call_kind', '1'); + wx.navigateTo({ + url: '/pages/call_the_name/call_the_name', + }) }, option2: function(e) { + wx.setStorageSync('call_kind', '2'); wx.showModal({ editable:true,//显示输入框 placeholderText:'输入学号尾数',//显示输入框提示信息 success: res => { if (res.confirm) { //点击了确认 console.log(res.content);//用户输入的值 - wx.navigateTo({url: '/pages/call_the_name(2)/call_the_name(2)'}); + wx.setStorageSync("lastNum", res.content); + wx.navigateTo({ + url: '/pages/call_the_name/call_the_name', + }) } else { console.log('用户点击了取消') } } }) }, - option3: function(e) {wx.showModal({ + option3: function(e) { + wx.setStorageSync('call_kind', '3'); + wx.showModal({ editable:true,//显示输入框 placeholderText:'输入姓氏',//显示输入框提示信息 success: res => { if (res.confirm) { //点击了确认 console.log(res.content);//用户输入的值 - wx.navigateTo({url: '/pages/call_the_name(3)/call_the_name(3)'}); + wx.setStorageSync("firstname", res.content); + wx.navigateTo({ + url: '/pages/call_the_name/call_the_name', + }) } else { console.log('用户点击了取消') } @@ -41,53 +56,4 @@ Page({ onLoad(options) { }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow() { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom() { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { - - } }) \ No newline at end of file diff --git a/code/pages/choose_name/choose_name.json b/code 2.0/pages/choose_name/choose_name.json similarity index 100% rename from code/pages/choose_name/choose_name.json rename to code 2.0/pages/choose_name/choose_name.json diff --git a/code 2.0/pages/choose_name/choose_name.scss b/code 2.0/pages/choose_name/choose_name.scss new file mode 100644 index 0000000..3d81992 --- /dev/null +++ b/code 2.0/pages/choose_name/choose_name.scss @@ -0,0 +1,49 @@ +page { + background-color: #eeeeee; +} + +.container { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding-top: 70rpx; +} + +.course_name { + position: relative; + font-size: 50rpx; +} + +.option { + width: 400rpx !important; /* 根据需要调整宽度 */ + height: 100rpx; /* 根据需要调整高度 */ + border: 1px solid #000000; /* 边框颜色 */ + border-radius: 15rpx; /* 圆角半径 */ + background-color: #ffffff; /* 背景颜色 */ + display: flex; + align-items: center; + justify-content: center; + position: relative; + font-size: 40rpx; + font-weight: 500; + margin-left: 100rpx !important; +} + +.combition { + display: flex; + align-items: center; + margin-top: 90rpx; /* 组件上外边距 */ +} + +.right_image { + margin-left: 40rpx; + width: 100rpx; + height: 100rpx; +} + +.bottom_image { + width: 550rpx; + height: 550rpx; + margin-top: 50rpx; /* 组件上外边距 */ +} \ No newline at end of file diff --git a/code 2.0/pages/choose_name/choose_name.wxml b/code 2.0/pages/choose_name/choose_name.wxml new file mode 100644 index 0000000..2146cbe --- /dev/null +++ b/code 2.0/pages/choose_name/choose_name.wxml @@ -0,0 +1,16 @@ + + 选择点名方式 + + + + + + + + + + + + + + \ No newline at end of file diff --git a/code 2.0/pages/course/course.js b/code 2.0/pages/course/course.js new file mode 100644 index 0000000..45b5049 --- /dev/null +++ b/code 2.0/pages/course/course.js @@ -0,0 +1,114 @@ +Page({ + + /** + * 页面的初始数据 + */ + data: { + courseList: [], + isAdmin: true + }, + enterCourse : function(event) { + const courseId = event.currentTarget.dataset.id; + const description = event.currentTarget.dataset.description; + wx.setStorageSync('courseId', courseId); + wx.setStorageSync('description', description); + console.log('courseId', courseId); + console.log('description', description); + if (this.data.isAdmin) { + wx.navigateTo({url: '/pages/course_detail/course_detail'}); + } else { + wx.navigateTo({url: '/pages/course_detail(2)/course_detail(2)'}); + } + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + const that = this; + that.setData ({ + isAdmin: wx.getStorageSync("isAdmin") + }); + if (that.data.isAdmin) { + wx.request({ + url: 'http://10.133.15.50:8888/admin/ownCourseList', + method: 'GET', + header: { + admin_token: wx.getStorageSync('token') // 携带token + }, + success(res) { + if (res.statusCode === 200) { + console.log(res.data.data); + that.setData({ + courseList: res.data.data + }); + } + }, + fail(error) { + console.error(err); + } + }); + } else { + wx.request({ + url: 'http://10.133.15.50:8888/student/ownCourseList', + method: 'GET', + header: { + student_token: wx.getStorageSync('token') // 携带token + }, + success(res) { + if (res.statusCode === 200) { + console.log(res.data.data); + that.setData({ + courseList: res.data.data + }); + } + }, + fail(error) { + console.error(err); + } + }); + } + }, + + util: function (currentStatu) { + /* 动画部分 */ + // 第1步:创建动画实例 + var animation = wx.createAnimation({ + duration: 200, //动画时长 + timingFunction: "linear", //线性 + delay: 0 //0则不延迟 + }); + // 第2步:这个动画实例赋给当前的动画实例 + this.animation = animation; + + // 第3步:执行第一组动画 + animation.opacity(0).rotateX(-100).step(); + + // 第4步:导出动画对象赋给数据对象储存 + this.setData({ + animationData: animation.export() + }) + + // 第5步:设置定时器到指定时候后,执行第二组动画 + setTimeout(function () { + // 执行第二组动画 + animation.opacity(1).rotateX(0).step(); + // 给数据对象储存的第一组动画,更替为执行完第二组动画的动画对象 + this.setData({ + animationData: animation + }) + //关闭 + if (currentStatu == "close") { + this.setData({ + showModalStatus: false + }); + } + }.bind(this), 200) + // 显示 + if (currentStatu == "open") { + this.setData({ + showModalStatus: true + }); + } + }, +}) \ No newline at end of file diff --git a/code/pages/course/course.json b/code 2.0/pages/course/course.json similarity index 100% rename from code/pages/course/course.json rename to code 2.0/pages/course/course.json diff --git a/code/pages/course/course.scss b/code 2.0/pages/course/course.scss similarity index 88% rename from code/pages/course/course.scss rename to code 2.0/pages/course/course.scss index 2b9e103..627283d 100644 --- a/code/pages/course/course.scss +++ b/code 2.0/pages/course/course.scss @@ -38,4 +38,12 @@ page { height: 60rpx; position: absolute; right: 0%; -} \ No newline at end of file +} + +.add_icon{ + position: fixed; + width: 100rpx; + height: 100rpx; + bottom: 50rpx; + right: 45rpx; +} diff --git a/code/pages/course/course.wxml b/code 2.0/pages/course/course.wxml similarity index 73% rename from code/pages/course/course.wxml rename to code 2.0/pages/course/course.wxml index 51987d7..5f424f7 100644 --- a/code/pages/course/course.wxml +++ b/code 2.0/pages/course/course.wxml @@ -5,3 +5,9 @@ + + + + + + diff --git a/code/pages/course_detail/course_detail.js b/code 2.0/pages/course_detail(2)/course_detail(2).js similarity index 78% rename from code/pages/course_detail/course_detail.js rename to code 2.0/pages/course_detail(2)/course_detail(2).js index 37d281c..3b3a763 100644 --- a/code/pages/course_detail/course_detail.js +++ b/code 2.0/pages/course_detail(2)/course_detail(2).js @@ -83,53 +83,4 @@ Page({ }); }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow() { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom() { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { - - } }) \ No newline at end of file diff --git a/code/pages/call_the_name(2)/call_the_name(2).json b/code 2.0/pages/course_detail(2)/course_detail(2).json similarity index 100% rename from code/pages/call_the_name(2)/call_the_name(2).json rename to code 2.0/pages/course_detail(2)/course_detail(2).json diff --git a/code/pages/choose_name/choose_name.scss b/code 2.0/pages/course_detail(2)/course_detail(2).scss similarity index 60% rename from code/pages/choose_name/choose_name.scss rename to code 2.0/pages/course_detail(2)/course_detail(2).scss index db0d111..9baad0c 100644 --- a/code/pages/choose_name/choose_name.scss +++ b/code 2.0/pages/course_detail(2)/course_detail(2).scss @@ -7,7 +7,7 @@ page { flex-direction: column; align-items: center; justify-content: center; - padding-top: 150rpx; + padding-top: 200rpx; } .course_name { @@ -18,7 +18,7 @@ page { .option { width: 400rpx; /* 根据需要调整宽度 */ - height: 120rpx; /* 根据需要调整高度 */ + height: 100rpx; /* 根据需要调整高度 */ border: 1px solid #000000; /* 边框颜色 */ border-radius: 15rpx; /* 圆角半径 */ background-color: #ffffff; /* 背景颜色 */ @@ -26,6 +26,24 @@ page { align-items: center; justify-content: center; position: relative; - margin-top: 80rpx; /* 组件上外边距 */ font-size: 40rpx; + margin-left: 120rpx; +} + +.combition { + display: flex; + align-items: center; + margin-top: 100rpx; /* 组件上外边距 */ +} + +.right_image { + margin-left: 40rpx; + width: 100rpx; + height: 100rpx; +} + +.bottom_image { + width: 700rpx; + height: 700rpx; + margin-top: 100rpx; /* 组件上外边距 */ } \ No newline at end of file diff --git a/code 2.0/pages/course_detail(2)/course_detail(2).wxml b/code 2.0/pages/course_detail(2)/course_detail(2).wxml new file mode 100644 index 0000000..a801cb5 --- /dev/null +++ b/code 2.0/pages/course_detail(2)/course_detail(2).wxml @@ -0,0 +1,12 @@ + + {{description}} + + 查看学生信息 + + + + 个人点名记录 + + + + \ No newline at end of file diff --git a/code 2.0/pages/course_detail/course_detail.js b/code 2.0/pages/course_detail/course_detail.js new file mode 100644 index 0000000..6f96544 --- /dev/null +++ b/code 2.0/pages/course_detail/course_detail.js @@ -0,0 +1,137 @@ +// pages/course_detail/course_detail.js +const app = getApp() +Page({ + + /** + * 页面的初始数据 + */ + data: { + showModalStatus: false, + studentId: "", + name: "", + description: "" + }, + studentId: function(e) { + this.setData({ + studentId: e.detail.value + }); + console.log("studentId:", e.detail.value); + }, + name: function(e) { + this.setData({ + name: e.detail.value + }); + console.log("name:", e.detail.value); + }, + cancel: function (e) { + var currentStatu = e.currentTarget.dataset.statu; + this.util(currentStatu) + }, + update: function (e) { + var currentStatu = e.currentTarget.dataset.statu; + this.util(currentStatu) + /* 下面补充确定后向后端传输数据*/ + const that = this; + wx.request({ + url: 'http://10.133.15.50:8888/admin/addStudent2Course', + method: 'PUT', + header: { + 'admin_token': wx.getStorageSync('token') // 携带token + }, + data: { + student: { + studentId: that.data.studentId, + name: that.data.name, + password: that.data.password + }, + course: { + courseId: wx.getStorageSync('courseId'), + description: wx.getStorageSync('description') + } + }, + success(res) { + if (res.statusCode === 200) { + console.log("yes"); + } + }, + fail(error) { + console.error(error); + } + }); + }, + util: function (currentStatu) { + /* 动画部分 */ + // 第1步:创建动画实例 + var animation = wx.createAnimation({ + duration: 200, //动画时长 + timingFunction: "linear", //线性 + delay: 0 //0则不延迟 + }); + // 第2步:这个动画实例赋给当前的动画实例 + this.animation = animation; + + // 第3步:执行第一组动画 + animation.opacity(0).rotateX(-100).step(); + + // 第4步:导出动画对象赋给数据对象储存 + this.setData({ + animationData: animation.export() + }) + + // 第5步:设置定时器到指定时候后,执行第二组动画 + setTimeout(function () { + // 执行第二组动画 + animation.opacity(1).rotateX(0).step(); + // 给数据对象储存的第一组动画,更替为执行完第二组动画的动画对象 + this.setData({ + animationData: animation + }) + //关闭 + if (currentStatu == "close") { + this.setData({ + showModalStatus: false + }); + } + }.bind(this), 200) + // 显示 + if (currentStatu == "open") { + this.setData({ + showModalStatus: true + }); + } + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + this.setData ({ + description: wx.getStorageSync("description") + }); + + }, + chooseMessageFile: function (event) { + var that = this; + wx.chooseMessageFile({ + count: 1, + type: 'file', + success(res) { + var filename = res.tempFiles[0].name + console.info(filename); + that.setData({filename:filename}); + wx.uploadFile({ + url: 'http://10.133.15.50:8888/admin/', + filePath: res.tempFiles[0].path, + name: 'uploadFile', + header: { + admin_token: wx.getStorageSync('token') // 携带token + }, + method: 'POST', + success(res) { + //json字符串 需用JSON.parse 转 + } + }) + } + }); + } +}) \ No newline at end of file diff --git a/code/pages/course_detail/course_detail.json b/code 2.0/pages/course_detail/course_detail.json similarity index 100% rename from code/pages/course_detail/course_detail.json rename to code 2.0/pages/course_detail/course_detail.json diff --git a/code/pages/course_detail/course_detail.scss b/code 2.0/pages/course_detail/course_detail.scss similarity index 83% rename from code/pages/course_detail/course_detail.scss rename to code 2.0/pages/course_detail/course_detail.scss index 61b5d11..094c864 100644 --- a/code/pages/course_detail/course_detail.scss +++ b/code 2.0/pages/course_detail/course_detail.scss @@ -7,7 +7,7 @@ page { flex-direction: column; align-items: center; justify-content: center; - padding-top: 150rpx; + padding-top: 100rpx; } .course_name { @@ -18,7 +18,7 @@ page { .option { width: 400rpx; /* 根据需要调整宽度 */ - height: 120rpx; /* 根据需要调整高度 */ + height: 100rpx; /* 根据需要调整高度 */ border: 1px solid #000000; /* 边框颜色 */ border-radius: 15rpx; /* 圆角半径 */ background-color: #ffffff; /* 背景颜色 */ @@ -26,8 +26,26 @@ page { align-items: center; justify-content: center; position: relative; - margin-top: 80rpx; /* 组件上外边距 */ font-size: 40rpx; + margin-left: 120rpx; +} + +.combition { + display: flex; + align-items: center; + margin-top: 50rpx; /* 组件上外边距 */ +} + +.right_image { + margin-left: 40rpx; + width: 100rpx; + height: 100rpx; +} + +.bottom_image { + width: 600rpx; + height: 600rpx; + margin-top: 0rpx; /* 组件上外边距 */ } /* 隐藏内容样式 */ @@ -64,9 +82,7 @@ page { font: 20px "microsoft yahei"; text-align: center; } -.drawer_content { -} .btn { width: 100%; display: flex; diff --git a/code 2.0/pages/course_detail/course_detail.wxml b/code 2.0/pages/course_detail/course_detail.wxml new file mode 100644 index 0000000..1d49b7a --- /dev/null +++ b/code 2.0/pages/course_detail/course_detail.wxml @@ -0,0 +1,20 @@ + + {{description}} + + 查看学生信息 + + + + 点名 + + + + 添加学生 + + + + 导入学生名单 + + + + diff --git a/code/pages/forget/forget.js b/code 2.0/pages/forget/forget.js similarity index 100% rename from code/pages/forget/forget.js rename to code 2.0/pages/forget/forget.js diff --git a/code/pages/forget/forget.json b/code 2.0/pages/forget/forget.json similarity index 100% rename from code/pages/forget/forget.json rename to code 2.0/pages/forget/forget.json diff --git a/code/pages/forget/forget.scss b/code 2.0/pages/forget/forget.scss similarity index 100% rename from code/pages/forget/forget.scss rename to code 2.0/pages/forget/forget.scss diff --git a/code/pages/forget/forget.wxml b/code 2.0/pages/forget/forget.wxml similarity index 100% rename from code/pages/forget/forget.wxml rename to code 2.0/pages/forget/forget.wxml diff --git a/code 2.0/pages/login/login.js b/code 2.0/pages/login/login.js new file mode 100644 index 0000000..8471a7f --- /dev/null +++ b/code 2.0/pages/login/login.js @@ -0,0 +1,74 @@ +Page({ + data: { + account: '', + password: '' + }, + onAccountInput: function(e) { + this.setData({ + account: e.detail.value + }); + }, + onPasswordInput: function(e) { + this.setData({ + password: e.detail.value + }); + }, + onLogin: function() { + const that = this; + // 用户登录逻辑 + console.log('登录账号:', that.data.account); + console.log('登录密码:', that.data.password); + // 这里可以添加实际的登录逻辑,例如调用API + wx.request({ + url: 'http://10.133.15.50:8888/admin/login', + method: 'POST', + data: { + adminId: that.data.account, // 管理员ID + password: that.data.password // 密码 + }, + success(res) { + console.log(res.data); + if (res.statusCode === 200) { + // 处理登录成功 + that.data.isLogin = true; + wx.setStorageSync('adminId', res.data.data.adminId); + wx.setStorageSync('name', res.data.data.name); + wx.setStorageSync('token', res.data.data.token); + wx.setStorageSync('isAdmin', true); + wx.switchTab({ + url: '/pages/course/course', + }); + } else { + } + }, + fail(err) { + } + }); + wx.request({ + url: 'http://10.133.15.50:8888/student/login', + method: 'POST', + data: { + studentId: that.data.account, // 学生ID + password: that.data.password // 密码 + }, + success(res) { + console.log(res.data); + if (res.statusCode === 200) { + // 处理登录成功 + wx.setStorageSync('adminId', res.data.data.studentId); + wx.setStorageSync('name', res.data.data.name); + wx.setStorageSync('token', res.data.data.token); + wx.setStorageSync('isAdmin', false); + wx.switchTab({ + url: '/pages/course/course', + }); + } else { + + } + }, + fail(err) { + console.error(err); + } + }); + }, +}); \ No newline at end of file diff --git a/code/pages/login/login.json b/code 2.0/pages/login/login.json similarity index 100% rename from code/pages/login/login.json rename to code 2.0/pages/login/login.json diff --git a/code/pages/login/login.scss b/code 2.0/pages/login/login.scss similarity index 88% rename from code/pages/login/login.scss rename to code 2.0/pages/login/login.scss index fe9615b..6b855d1 100644 --- a/code/pages/login/login.scss +++ b/code 2.0/pages/login/login.scss @@ -12,8 +12,8 @@ } .title { - font-size: 24px; - margin-bottom: 20px; + font-size: 50rpx; + margin-bottom: 40rpx; text-align: center; font-weight: 700; } @@ -23,14 +23,15 @@ } .label { - margin-bottom: 5rpx; + font-size: 35rpx; + margin:20rpx; } .input { width: 100%; padding: 10rpx; border: 1rpx solid #ccc; - border-radius: 4rpx; + border-radius: 15rpx; } .checkbox-group { diff --git a/code/pages/login/login.wxml b/code 2.0/pages/login/login.wxml similarity index 100% rename from code/pages/login/login.wxml rename to code 2.0/pages/login/login.wxml diff --git a/code/pages/logs/logs.js b/code 2.0/pages/logs/logs.js similarity index 100% rename from code/pages/logs/logs.js rename to code 2.0/pages/logs/logs.js diff --git a/code/pages/logs/logs.json b/code 2.0/pages/logs/logs.json similarity index 100% rename from code/pages/logs/logs.json rename to code 2.0/pages/logs/logs.json diff --git a/code/pages/logs/logs.wxml b/code 2.0/pages/logs/logs.wxml similarity index 100% rename from code/pages/logs/logs.wxml rename to code 2.0/pages/logs/logs.wxml diff --git a/code/pages/logs/logs.wxss b/code 2.0/pages/logs/logs.wxss similarity index 100% rename from code/pages/logs/logs.wxss rename to code 2.0/pages/logs/logs.wxss diff --git a/code/pages/my/my.js b/code 2.0/pages/my/my.js similarity index 100% rename from code/pages/my/my.js rename to code 2.0/pages/my/my.js diff --git a/code/pages/my/my.json b/code 2.0/pages/my/my.json similarity index 100% rename from code/pages/my/my.json rename to code 2.0/pages/my/my.json diff --git a/code/pages/my/my.scss b/code 2.0/pages/my/my.scss similarity index 70% rename from code/pages/my/my.scss rename to code 2.0/pages/my/my.scss index 3154817..86fc806 100644 --- a/code/pages/my/my.scss +++ b/code 2.0/pages/my/my.scss @@ -7,7 +7,7 @@ page { flex-direction: column; align-items: center; justify-content: center; - padding-top: 150rpx; + padding-top: 100rpx; } .course_name { @@ -24,24 +24,35 @@ page { align-items: center; justify-content: center; position: relative; - margin-top: 80rpx; /* 组件上外边距 */ - font-size: 40rpx; + margin-top: 20rpx; /* 组件上外边距 */ + font-size: 35rpx; text { position: absolute; - left: 15%; + left: 13%; } } .icon1 { - width: 60rpx; + width: 50rpx; height: 60rpx; position: absolute; left: 3%; } .icon2 { - width: 80rpx; + width: 70rpx; height: 80rpx; position: absolute; right: 0%; +} + +.bottom_image { + width:700rpx; + height: 700rpx; + margin-top: 20rpx; /* 组件上外边距 */ +} + +.icon3 { + width: 100rpx; + height: 100rpx; } \ No newline at end of file diff --git a/code/pages/my/my.wxml b/code 2.0/pages/my/my.wxml similarity index 88% rename from code/pages/my/my.wxml rename to code 2.0/pages/my/my.wxml index 7ac1aa5..cadbf37 100644 --- a/code/pages/my/my.wxml +++ b/code 2.0/pages/my/my.wxml @@ -9,4 +9,5 @@ 修改密码 + \ No newline at end of file diff --git a/code 2.0/pages/my_callname/my_callname.js b/code 2.0/pages/my_callname/my_callname.js new file mode 100644 index 0000000..5c3efce --- /dev/null +++ b/code 2.0/pages/my_callname/my_callname.js @@ -0,0 +1,41 @@ +// pages/student_info/student_info.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + records : [ + ] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + const that = this; + console.log(wx.getStorageSync('token')); + wx.request({ + url: 'http://10.133.15.50:8888/student/callRecord?courseId=' + wx.getStorageSync('courseId'), + method: 'POST', + header: { + 'student_token': wx.getStorageSync('token') // 携带token + }, + data: { + page: '1', + pageSize: '10000' + }, + success: function(res) { + if (res.statusCode === 200) { + console.log(res.data.data); + that.setData({ + records: res.data.data.records + }); + } + }, + fail: function(error) { + console.error('请求失败:', error); + } + }); + }, +}) \ No newline at end of file diff --git a/code/pages/call_the_name(3)/call_the_name(3).json b/code 2.0/pages/my_callname/my_callname.json similarity index 100% rename from code/pages/call_the_name(3)/call_the_name(3).json rename to code 2.0/pages/my_callname/my_callname.json diff --git a/code/pages/student_info/student_info.wxss b/code 2.0/pages/my_callname/my_callname.scss similarity index 100% rename from code/pages/student_info/student_info.wxss rename to code 2.0/pages/my_callname/my_callname.scss diff --git a/code 2.0/pages/my_callname/my_callname.wxml b/code 2.0/pages/my_callname/my_callname.wxml new file mode 100644 index 0000000..05946e3 --- /dev/null +++ b/code 2.0/pages/my_callname/my_callname.wxml @@ -0,0 +1,14 @@ + + + 点名时间 + 点名老师 + 积分变化 + + + + {{item.callTime}} + {{item.adminName}} + {{item.score}} + + + \ No newline at end of file diff --git a/code/pages/register/register.js b/code 2.0/pages/register/register.js similarity index 100% rename from code/pages/register/register.js rename to code 2.0/pages/register/register.js diff --git a/code/pages/register/register.json b/code 2.0/pages/register/register.json similarity index 100% rename from code/pages/register/register.json rename to code 2.0/pages/register/register.json diff --git a/code/pages/register/register.scss b/code 2.0/pages/register/register.scss similarity index 100% rename from code/pages/register/register.scss rename to code 2.0/pages/register/register.scss diff --git a/code/pages/register/register.wxml b/code 2.0/pages/register/register.wxml similarity index 100% rename from code/pages/register/register.wxml rename to code 2.0/pages/register/register.wxml diff --git a/code 2.0/pages/student_info(2)/student_info(2).js b/code 2.0/pages/student_info(2)/student_info(2).js new file mode 100644 index 0000000..f508e42 --- /dev/null +++ b/code 2.0/pages/student_info(2)/student_info(2).js @@ -0,0 +1,44 @@ +// pages/student_info/student_info.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + studentId : '', + name : '', + callCount : '', + score : '' + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + const that = this; + console.log(wx.getStorageSync('token')); + wx.request({ + url: 'http://10.133.15.50:8888/student/courseInfo?courseId=' + wx.getStorageSync('courseId'), + method: 'GET', + header: { + 'student_token': wx.getStorageSync('token') // 携带token + }, + data: { + }, + success: function(res) { + if (res.statusCode === 200) { + console.log(res.data.data); + that.setData({ + studentId : res.data.data.studentId, + name : res.data.data.name, + callCount : res.data.data.callCount, + score : res.data.data.score + }); + } + }, + fail: function(error) { + console.error('请求失败:', error); + } + }); + }, +}) \ No newline at end of file diff --git a/code/pages/student_info/student_info.json b/code 2.0/pages/student_info(2)/student_info(2).json similarity index 100% rename from code/pages/student_info/student_info.json rename to code 2.0/pages/student_info(2)/student_info(2).json diff --git a/code 2.0/pages/student_info(2)/student_info(2).scss b/code 2.0/pages/student_info(2)/student_info(2).scss new file mode 100644 index 0000000..5d42fee --- /dev/null +++ b/code 2.0/pages/student_info(2)/student_info(2).scss @@ -0,0 +1,52 @@ +/* pages/table/table.wxss */ +.table { + display: block; + width: 100%; +} + +.table-row { + display: flex; + width: 100%; + border-bottom: 1px solid #ccc; +} + +.table-cell { + display: flex; /* 启用Flex布局 */ + flex: 1; /* 允许单元格伸缩以填满行 */ + padding-top: 20rpx; + padding-bottom: 20rpx; + align-items: center; /* 垂直居中 */ + justify-content: center; /* 水平居中 */ + border-right: 1rpx solid #ccc; + font-size: 25rpx; +} + +.table-row .table-cell:nth-child(1) { + flex: 2; /* 第一列宽度比例为2 */ +} + +.table-row .table-cell:nth-child(2) { + flex: 1; /* 第二列宽度比例为1 */ +} + +.table-row .table-cell:nth-child(3) { + flex: 1; /* 第三列宽度比例为1 */ +} + +.table-row .table-cell:nth-child(4) { + flex: 1; /* 第四列宽度比例为1 */ +} + +.table-row .table-cell:nth-child(5) { + flex: 1; /* 第五列宽度比例为1 */ +} + +/* 移除最后一个单元格的右边边框 */ +.table-row:last-child .table-cell { + border-bottom: none; +} + +/* 移除最后一列的右边边框 */ +.table-cell:last-child { + border-right: none; +} \ No newline at end of file diff --git a/code 2.0/pages/student_info(2)/student_info(2).wxml b/code 2.0/pages/student_info(2)/student_info(2).wxml new file mode 100644 index 0000000..6d4126e --- /dev/null +++ b/code 2.0/pages/student_info(2)/student_info(2).wxml @@ -0,0 +1,14 @@ + + + 学号 + 姓名 + 点名次数 + 积分 + + + {{studentId}} + {{name}} + {{callCount}} + {{score}} + + \ No newline at end of file diff --git a/code 2.0/pages/student_info/student_info.js b/code 2.0/pages/student_info/student_info.js new file mode 100644 index 0000000..21725d6 --- /dev/null +++ b/code 2.0/pages/student_info/student_info.js @@ -0,0 +1,41 @@ +// pages/student_info/student_info.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + student_info : [ + ] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + const that = this; + console.log(wx.getStorageSync('token')); + wx.request({ + url: 'http://10.133.15.50:8888/admin/pageQuery4Course?courseId=' + wx.getStorageSync('courseId'), + method: 'POST', + header: { + 'admin_token': wx.getStorageSync('token') // 携带token + }, + data: { + page: '1', + pageSize: '10000' + }, + success: function(res) { + if (res.statusCode === 200) { + console.log(res.data.data); + that.setData({ + student_info: res.data.data.records + }); + } + }, + fail: function(error) { + console.error('请求失败:', error); + } + }); + }, +}) \ No newline at end of file diff --git a/code 2.0/pages/student_info/student_info.json b/code 2.0/pages/student_info/student_info.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/code 2.0/pages/student_info/student_info.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/code 2.0/pages/student_info/student_info.scss b/code 2.0/pages/student_info/student_info.scss new file mode 100644 index 0000000..5d42fee --- /dev/null +++ b/code 2.0/pages/student_info/student_info.scss @@ -0,0 +1,52 @@ +/* pages/table/table.wxss */ +.table { + display: block; + width: 100%; +} + +.table-row { + display: flex; + width: 100%; + border-bottom: 1px solid #ccc; +} + +.table-cell { + display: flex; /* 启用Flex布局 */ + flex: 1; /* 允许单元格伸缩以填满行 */ + padding-top: 20rpx; + padding-bottom: 20rpx; + align-items: center; /* 垂直居中 */ + justify-content: center; /* 水平居中 */ + border-right: 1rpx solid #ccc; + font-size: 25rpx; +} + +.table-row .table-cell:nth-child(1) { + flex: 2; /* 第一列宽度比例为2 */ +} + +.table-row .table-cell:nth-child(2) { + flex: 1; /* 第二列宽度比例为1 */ +} + +.table-row .table-cell:nth-child(3) { + flex: 1; /* 第三列宽度比例为1 */ +} + +.table-row .table-cell:nth-child(4) { + flex: 1; /* 第四列宽度比例为1 */ +} + +.table-row .table-cell:nth-child(5) { + flex: 1; /* 第五列宽度比例为1 */ +} + +/* 移除最后一个单元格的右边边框 */ +.table-row:last-child .table-cell { + border-bottom: none; +} + +/* 移除最后一列的右边边框 */ +.table-cell:last-child { + border-right: none; +} \ No newline at end of file diff --git a/code/pages/student_info/student_info.wxml b/code 2.0/pages/student_info/student_info.wxml similarity index 56% rename from code/pages/student_info/student_info.wxml rename to code 2.0/pages/student_info/student_info.wxml index 1a68ada..4334453 100644 --- a/code/pages/student_info/student_info.wxml +++ b/code 2.0/pages/student_info/student_info.wxml @@ -6,22 +6,15 @@ 积分 操作 - - - - - {{item.studentId}} {{item.name}} {{item.callCount}} {{item.score}} - 删除 + + 删除 + \ No newline at end of file diff --git a/code/project.config.json b/code 2.0/project.config.json similarity index 100% rename from code/project.config.json rename to code 2.0/project.config.json diff --git a/code/project.private.config.json b/code 2.0/project.private.config.json similarity index 100% rename from code/project.private.config.json rename to code 2.0/project.private.config.json diff --git a/code/sitemap.json b/code 2.0/sitemap.json similarity index 100% rename from code/sitemap.json rename to code 2.0/sitemap.json diff --git a/code/utils/util.js b/code 2.0/utils/util.js similarity index 100% rename from code/utils/util.js rename to code 2.0/utils/util.js diff --git a/code 2.0/素材/bird,鸟,动物,卡通.png b/code 2.0/素材/bird,鸟,动物,卡通.png new file mode 100644 index 0000000..8d3b8bf Binary files /dev/null and b/code 2.0/素材/bird,鸟,动物,卡通.png differ diff --git a/code 2.0/素材/circle-plus-outline.png b/code 2.0/素材/circle-plus-outline.png new file mode 100644 index 0000000..a11d99f Binary files /dev/null and b/code 2.0/素材/circle-plus-outline.png differ diff --git a/code 2.0/素材/乌龟,卡通动物.png b/code 2.0/素材/乌龟,卡通动物.png new file mode 100644 index 0000000..eafe977 Binary files /dev/null and b/code 2.0/素材/乌龟,卡通动物.png differ diff --git a/code 2.0/素材/任务完成.png b/code 2.0/素材/任务完成.png new file mode 100644 index 0000000..d02dd4b Binary files /dev/null and b/code 2.0/素材/任务完成.png differ diff --git a/code 2.0/素材/企鹅,卡通动物.png b/code 2.0/素材/企鹅,卡通动物.png new file mode 100644 index 0000000..cf71aa3 Binary files /dev/null and b/code 2.0/素材/企鹅,卡通动物.png differ diff --git a/code 2.0/素材/各司其职.png b/code 2.0/素材/各司其职.png new file mode 100644 index 0000000..2b211ff Binary files /dev/null and b/code 2.0/素材/各司其职.png differ diff --git a/code 2.0/素材/大象,卡通动物.png b/code 2.0/素材/大象,卡通动物.png new file mode 100644 index 0000000..d7f3b7c Binary files /dev/null and b/code 2.0/素材/大象,卡通动物.png differ diff --git a/code 2.0/素材/奶牛,卡通动物.png b/code 2.0/素材/奶牛,卡通动物.png new file mode 100644 index 0000000..f24a615 Binary files /dev/null and b/code 2.0/素材/奶牛,卡通动物.png differ diff --git a/code 2.0/素材/微笑.png b/code 2.0/素材/微笑.png new file mode 100644 index 0000000..bc95284 Binary files /dev/null and b/code 2.0/素材/微笑.png differ diff --git a/code 2.0/素材/打招呼的猫.png b/code 2.0/素材/打招呼的猫.png new file mode 100644 index 0000000..a0bea87 Binary files /dev/null and b/code 2.0/素材/打招呼的猫.png differ diff --git a/code 2.0/素材/海豚,卡通动物.png b/code 2.0/素材/海豚,卡通动物.png new file mode 100644 index 0000000..1e68843 Binary files /dev/null and b/code 2.0/素材/海豚,卡通动物.png differ diff --git a/code 2.0/素材/海马,卡通动物.png b/code 2.0/素材/海马,卡通动物.png new file mode 100644 index 0000000..6cf9845 Binary files /dev/null and b/code 2.0/素材/海马,卡通动物.png differ diff --git a/code 2.0/素材/牛,卡通动物.png b/code 2.0/素材/牛,卡通动物.png new file mode 100644 index 0000000..208c6ba Binary files /dev/null and b/code 2.0/素材/牛,卡通动物.png differ diff --git a/code 2.0/素材/狗,卡通动物.png b/code 2.0/素材/狗,卡通动物.png new file mode 100644 index 0000000..e64c24f Binary files /dev/null and b/code 2.0/素材/狗,卡通动物.png differ diff --git a/code 2.0/素材/猴子,卡通动物.png b/code 2.0/素材/猴子,卡通动物.png new file mode 100644 index 0000000..221bde6 Binary files /dev/null and b/code 2.0/素材/猴子,卡通动物.png differ diff --git a/code 2.0/素材/章鱼,卡通动物.png b/code 2.0/素材/章鱼,卡通动物.png new file mode 100644 index 0000000..802cbff Binary files /dev/null and b/code 2.0/素材/章鱼,卡通动物.png differ diff --git a/code 2.0/素材/绵羊,卡通动物.png b/code 2.0/素材/绵羊,卡通动物.png new file mode 100644 index 0000000..04dc600 Binary files /dev/null and b/code 2.0/素材/绵羊,卡通动物.png differ diff --git a/code 2.0/素材/老虎,卡通动物.png b/code 2.0/素材/老虎,卡通动物.png new file mode 100644 index 0000000..7fbbe20 Binary files /dev/null and b/code 2.0/素材/老虎,卡通动物.png differ diff --git a/code 2.0/素材/蛇,卡通动物.png b/code 2.0/素材/蛇,卡通动物.png new file mode 100644 index 0000000..42d3078 Binary files /dev/null and b/code 2.0/素材/蛇,卡通动物.png differ diff --git a/code 2.0/素材/蜗牛.png b/code 2.0/素材/蜗牛.png new file mode 100644 index 0000000..61beec4 Binary files /dev/null and b/code 2.0/素材/蜗牛.png differ diff --git a/code 2.0/素材/蜜蜂,昆虫.png b/code 2.0/素材/蜜蜂,昆虫.png new file mode 100644 index 0000000..e41aae1 Binary files /dev/null and b/code 2.0/素材/蜜蜂,昆虫.png differ diff --git a/code 2.0/素材/蝴蝶,昆虫,卡通.png b/code 2.0/素材/蝴蝶,昆虫,卡通.png new file mode 100644 index 0000000..705fa74 Binary files /dev/null and b/code 2.0/素材/蝴蝶,昆虫,卡通.png differ diff --git a/code 2.0/素材/螃蟹,卡通动物.png b/code 2.0/素材/螃蟹,卡通动物.png new file mode 100644 index 0000000..22a8dd5 Binary files /dev/null and b/code 2.0/素材/螃蟹,卡通动物.png differ diff --git a/code 2.0/素材/问答.png b/code 2.0/素材/问答.png new file mode 100644 index 0000000..fe4cb44 Binary files /dev/null and b/code 2.0/素材/问答.png differ diff --git a/code 2.0/素材/鱼,卡通动物.png b/code 2.0/素材/鱼,卡通动物.png new file mode 100644 index 0000000..1f18774 Binary files /dev/null and b/code 2.0/素材/鱼,卡通动物.png differ diff --git a/code 2.0/素材/鲨鱼,卡通动物.png b/code 2.0/素材/鲨鱼,卡通动物.png new file mode 100644 index 0000000..aa62110 Binary files /dev/null and b/code 2.0/素材/鲨鱼,卡通动物.png differ diff --git a/code 2.0/素材/鸡,卡通动物.png b/code 2.0/素材/鸡,卡通动物.png new file mode 100644 index 0000000..e6c4ebe Binary files /dev/null and b/code 2.0/素材/鸡,卡通动物.png differ diff --git a/code 2.0/素材/鹰,卡通动物.png b/code 2.0/素材/鹰,卡通动物.png new file mode 100644 index 0000000..3749f9d Binary files /dev/null and b/code 2.0/素材/鹰,卡通动物.png differ diff --git a/code 2.0/素材/鹿,卡通动物.png b/code 2.0/素材/鹿,卡通动物.png new file mode 100644 index 0000000..bd7a4da Binary files /dev/null and b/code 2.0/素材/鹿,卡通动物.png differ diff --git a/code/pages/call_the_name(1)/call_the_name(1).js b/code/pages/call_the_name(1)/call_the_name(1).js deleted file mode 100644 index e035093..0000000 --- a/code/pages/call_the_name(1)/call_the_name(1).js +++ /dev/null @@ -1,85 +0,0 @@ -// pages/call_the_name(1)/call_the_name(1).js -Page({ - - /** - * 页面的初始数据 - */ - data: { - studentId : "102201111", - name: "王伊瑜", - }, - addScore1: function() { - this.setData ({ - studentId: "102201351", - name: "吴尔贰" - }) - }, - addScore2: function() { - this.setData ({ - studentId: "102201511", - name: "张飞" - }) - }, - addScore3: function() { - this.setData ({ - studentId: "102201201", - name: "李四" - }) - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad(options) { - - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow() { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom() { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { - - } -}) \ No newline at end of file diff --git a/code/pages/call_the_name(1)/call_the_name(1).scss b/code/pages/call_the_name(1)/call_the_name(1).scss deleted file mode 100644 index 2616c86..0000000 --- a/code/pages/call_the_name(1)/call_the_name(1).scss +++ /dev/null @@ -1,34 +0,0 @@ -/* pages/call_the_name(1)/call_the_name(1).wxss */ -.container { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - padding-top: 150rpx; -} - -.top { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; -} - -.top_detail { - font-size:45rpx; - padding: 20rpx; -} - -.option_detail { - width: 400rpx; /* 根据需要调整宽度 */ - height: 100rpx; /* 根据需要调整高度 */ - border: 1px solid #000000; /* 边框颜色 */ - border-radius: 15rpx; /* 圆角半径 */ - background-color: #ffffff; /* 背景颜色 */ - display: flex; - align-items: center; - justify-content: center; - position: relative; - margin-top: 80rpx; /* 组件上外边距 */ - font-size: 40rpx; -} \ No newline at end of file diff --git a/code/pages/call_the_name(1)/call_the_name(1).wxml b/code/pages/call_the_name(1)/call_the_name(1).wxml deleted file mode 100644 index 587b654..0000000 --- a/code/pages/call_the_name(1)/call_the_name(1).wxml +++ /dev/null @@ -1,12 +0,0 @@ - - - - 学号:{{studentId}} - 姓名:{{name}} - - - - - - - \ No newline at end of file diff --git a/code/pages/call_the_name(2)/call_the_name(2).js b/code/pages/call_the_name(2)/call_the_name(2).js deleted file mode 100644 index efd042b..0000000 --- a/code/pages/call_the_name(2)/call_the_name(2).js +++ /dev/null @@ -1,85 +0,0 @@ -// pages/call_the_name(1)/call_the_name(1).js -Page({ - - /** - * 页面的初始数据 - */ - data: { - studentId : "102201199", - name: "箬玉", - }, - addScore1: function() { - this.setData ({ - studentId: "102201579", - name: "陈贵林" - }) - }, - addScore2: function() { - this.setData ({ - studentId: "102201329", - name: "林克" - }) - }, - addScore3: function() { - this.setData ({ - studentId: "102201209", - name: "吴强" - }) - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad(options) { - - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow() { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom() { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { - - } -}) \ No newline at end of file diff --git a/code/pages/call_the_name(2)/call_the_name(2).scss b/code/pages/call_the_name(2)/call_the_name(2).scss deleted file mode 100644 index 2616c86..0000000 --- a/code/pages/call_the_name(2)/call_the_name(2).scss +++ /dev/null @@ -1,34 +0,0 @@ -/* pages/call_the_name(1)/call_the_name(1).wxss */ -.container { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - padding-top: 150rpx; -} - -.top { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; -} - -.top_detail { - font-size:45rpx; - padding: 20rpx; -} - -.option_detail { - width: 400rpx; /* 根据需要调整宽度 */ - height: 100rpx; /* 根据需要调整高度 */ - border: 1px solid #000000; /* 边框颜色 */ - border-radius: 15rpx; /* 圆角半径 */ - background-color: #ffffff; /* 背景颜色 */ - display: flex; - align-items: center; - justify-content: center; - position: relative; - margin-top: 80rpx; /* 组件上外边距 */ - font-size: 40rpx; -} \ No newline at end of file diff --git a/code/pages/call_the_name(2)/call_the_name(2).wxml b/code/pages/call_the_name(2)/call_the_name(2).wxml deleted file mode 100644 index 587b654..0000000 --- a/code/pages/call_the_name(2)/call_the_name(2).wxml +++ /dev/null @@ -1,12 +0,0 @@ - - - - 学号:{{studentId}} - 姓名:{{name}} - - - - - - - \ No newline at end of file diff --git a/code/pages/call_the_name(3)/call_the_name(3).js b/code/pages/call_the_name(3)/call_the_name(3).js deleted file mode 100644 index 5b0c9f6..0000000 --- a/code/pages/call_the_name(3)/call_the_name(3).js +++ /dev/null @@ -1,85 +0,0 @@ -// pages/call_the_name(1)/call_the_name(1).js -Page({ - - /** - * 页面的初始数据 - */ - data: { - studentId : "102301124", - name: "陈非", - }, - addScore1: function() { - this.setData ({ - studentId: "102301514", - name: "陈麟" - }) - }, - addScore2: function() { - this.setData ({ - studentId: "102301314", - name: "陈苣" - }) - }, - addScore3: function() { - this.setData ({ - studentId: "102303333", - name: "陈釰" - }) - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad(options) { - - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow() { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom() { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { - - } -}) \ No newline at end of file diff --git a/code/pages/call_the_name(3)/call_the_name(3).scss b/code/pages/call_the_name(3)/call_the_name(3).scss deleted file mode 100644 index 2616c86..0000000 --- a/code/pages/call_the_name(3)/call_the_name(3).scss +++ /dev/null @@ -1,34 +0,0 @@ -/* pages/call_the_name(1)/call_the_name(1).wxss */ -.container { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - padding-top: 150rpx; -} - -.top { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; -} - -.top_detail { - font-size:45rpx; - padding: 20rpx; -} - -.option_detail { - width: 400rpx; /* 根据需要调整宽度 */ - height: 100rpx; /* 根据需要调整高度 */ - border: 1px solid #000000; /* 边框颜色 */ - border-radius: 15rpx; /* 圆角半径 */ - background-color: #ffffff; /* 背景颜色 */ - display: flex; - align-items: center; - justify-content: center; - position: relative; - margin-top: 80rpx; /* 组件上外边距 */ - font-size: 40rpx; -} \ No newline at end of file diff --git a/code/pages/call_the_name(3)/call_the_name(3).wxml b/code/pages/call_the_name(3)/call_the_name(3).wxml deleted file mode 100644 index 587b654..0000000 --- a/code/pages/call_the_name(3)/call_the_name(3).wxml +++ /dev/null @@ -1,12 +0,0 @@ - - - - 学号:{{studentId}} - 姓名:{{name}} - - - - - - - \ No newline at end of file diff --git a/code/pages/choose_name/choose_name.wxml b/code/pages/choose_name/choose_name.wxml deleted file mode 100644 index 497fc79..0000000 --- a/code/pages/choose_name/choose_name.wxml +++ /dev/null @@ -1,6 +0,0 @@ - - 请选择点名方式 - 随机点名 - 根据学号尾数点名 - 根据姓氏点名 - \ No newline at end of file diff --git a/code/pages/course/course.js b/code/pages/course/course.js deleted file mode 100644 index 0b4d7ad..0000000 --- a/code/pages/course/course.js +++ /dev/null @@ -1,94 +0,0 @@ -Page({ - - /** - * 页面的初始数据 - */ - data: { - courseList: [] - }, - enterCourse : function(event) { - const courseId = event.currentTarget.dataset.id; - const description = event.currentTarget.dataset.description; - wx.setStorageSync('courseId', courseId); - wx.setStorageSync('description', description); - console.log('courseId', courseId); - console.log('description', description); - wx.navigateTo({ - url: '/pages/course_detail/course_detail' - }); - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad(options) { - this.getCourseList(); - }, - getCourseList: function() { - const that = this; - wx.request({ - url: 'http://10.133.23.136:8888/admin/courseList', - method: 'GET', - success: function(res) { - if (res.statusCode === 200) { - console.log(res.data.data); - that.setData({ - courseList: res.data.data - }); - } - }, - fail: function(error) { - console.error('请求失败:', error); - } - }); - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow() { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom() { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { - - } -}) \ No newline at end of file diff --git a/code/pages/course_detail/course_detail.wxml b/code/pages/course_detail/course_detail.wxml deleted file mode 100644 index c96c37a..0000000 --- a/code/pages/course_detail/course_detail.wxml +++ /dev/null @@ -1,31 +0,0 @@ - - {{description}} - 查看学生信息 - 添加学生 - 点名 - - - - - - - - - - 添加学生 - - - 学生学号: - - - - 学生姓名: - - - - - 取消 - 确定 - - - diff --git a/code/pages/login/login.js b/code/pages/login/login.js deleted file mode 100644 index a4f9b79..0000000 --- a/code/pages/login/login.js +++ /dev/null @@ -1,53 +0,0 @@ -Page({ - data: { - account: '', - password: '' - }, - onAccountInput: function(e) { - this.setData({ - account: e.detail.value - }); - }, - onPasswordInput: function(e) { - this.setData({ - password: e.detail.value - }); - }, - onLogin: function() { - // 用户登录逻辑 - console.log('登录账号:', this.data.account); - console.log('登录密码:', this.data.password); - // 这里可以添加实际的登录逻辑,例如调用API - wx.request({ - url: 'http://10.133.23.136:8888/admin/login', - method: 'POST', - data: { - adminId: this.data.account, // 管理员ID - password: this.data.password // 密码 - }, - success(res) { - console.log(res.data); - if (res.statusCode === 200) { - // 处理登录成功 - wx.setStorageSync('token', res.data.data.token); - wx.switchTab({ - url: '/pages/course/course', - }); - } else { - // 处理错误情况 - wx.showToast({ - title: '登录失败', - icon: 'none' - }); - } - }, - fail(err) { - console.error(err); - wx.showToast({ - title: '请求失败', - icon: 'none' - }); - } - }); - }, -}); \ No newline at end of file diff --git a/code/pages/student_info/student_info.js b/code/pages/student_info/student_info.js deleted file mode 100644 index f1e906e..0000000 --- a/code/pages/student_info/student_info.js +++ /dev/null @@ -1,110 +0,0 @@ -// pages/student_info/student_info.js -Page({ - - /** - * 页面的初始数据 - */ - data: { - student_info : [ - { - studentId: '10214256', - name: '若羌', - callCount: '5', - score: '0.9' - }, - { - studentId: '10214212', - name: '胡光', - callCount: '2', - score: '0.3' - }, - { - studentId: '10214232', - name: '似水', - callCount: '3', - score: '0.3' - }, - { - studentId: '10214256', - name: '菲戈', - callCount: '4', - score: '0' - }, - ] - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad(options) { - const that = this; - var id = wx.getStorageSync("courseId"); - wx.request({ - url: 'http://10.133.23.136:8888/student/courseInfo', - method: 'GET', - data: { - courseId : id - }, - success: function(res) { - if (res.statusCode === 200) { - console.log(res.data.data); - that.setData({ - student_info: res.data.data - }); - } - }, - fail: function(error) { - console.error('请求失败:', error); - } - }); - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow() { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom() { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { - - } -}) \ No newline at end of file