| Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB | 
| Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB | 
| Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB | 
| Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB | 
| Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 9.5 KiB | 
| Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB | 
| Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB | 
| Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB | 
| Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB | 
| @ -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); | ||||
|       } | ||||
|     }); | ||||
|   } | ||||
| }) | ||||
| @ -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; | ||||
| } | ||||
| @ -0,0 +1,15 @@ | ||||
| <view class="container"> | ||||
|   <view class="top"> | ||||
|     <view class="top_detail">学号:{{studentId}}</view> | ||||
|     <view class="top_detail">姓名:{{name}}</view> | ||||
|   </view> | ||||
|   <view class="option"> | ||||
|     <button class="option_detail" bindtap="addScore1">-0.5分</button> | ||||
|     <button class="option_detail" bindtap="addScore2">0分</button> | ||||
|     <button class="option_detail" bindtap="addScore3">+0.5分</button> | ||||
|     <button class="option_detail2" bindtap="addScore4"> | ||||
|       <text style="color: #FFFFFF">旷课</text> | ||||
|     </button> | ||||
|   </view> | ||||
|   <image class="bottom_image" src="/素材/微笑.png"/> | ||||
| </view> | ||||
| @ -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;  /* 组件上外边距 */ | ||||
| } | ||||
| @ -0,0 +1,16 @@ | ||||
| <view class="container"> | ||||
|   <view class="course_name">选择点名方式</view> | ||||
|   <view class="combition"> | ||||
|     <button class="option" bindtap="option1">随机点名</button> | ||||
|     <image class="right_image" src="/素材/企鹅,卡通动物.png"/> | ||||
|   </view> | ||||
|   <view class="combition"> | ||||
|     <button class="option" bindtap="option2">根据学号尾数点名</button> | ||||
|     <image class="right_image" src="/素材/乌龟,卡通动物.png"/> | ||||
|   </view> | ||||
|   <view class="combition"> | ||||
|     <button class="option" bindtap="option3">根据姓氏点名</button> | ||||
|     <image class="right_image" src="/素材/鱼,卡通动物.png"/> | ||||
|   </view> | ||||
|   <image class="bottom_image" src="/素材/问答.png"/> | ||||
| </view> | ||||
| @ -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); | ||||
|       } | ||||
|     }); | ||||
|   }, | ||||
| }) | ||||
| @ -0,0 +1,14 @@ | ||||
| <view class="table"> | ||||
|   <view class="table-row"> | ||||
|     <view class="table-cell">点名时间</view> | ||||
|     <view class="table-cell">点名老师</view> | ||||
|     <view class="table-cell">积分变化</view> | ||||
|   </view> | ||||
|   <view wx:for="{{records}}" wx:key="unique"> | ||||
|     <view class="table-row"> | ||||
|       <view class="table-cell">{{item.callTime}}</view> | ||||
|       <view class="table-cell">{{item.adminName}}</view> | ||||
|       <view class="table-cell">{{item.score}}</view> | ||||
|     </view> | ||||
|   </view> | ||||
| </view> | ||||
| @ -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); | ||||
|       } | ||||
|     }); | ||||
|   }, | ||||
| }) | ||||
| @ -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; | ||||
| } | ||||
| @ -0,0 +1,14 @@ | ||||
| <view class="table"> | ||||
|   <view class="table-row"> | ||||
|     <view class="table-cell">学号</view> | ||||
|     <view class="table-cell">姓名</view> | ||||
|     <view class="table-cell">点名次数</view> | ||||
|     <view class="table-cell">积分</view> | ||||
|   </view> | ||||
|   <view class="table-row"> | ||||
|     <view class="table-cell">{{studentId}}</view> | ||||
|     <view class="table-cell">{{name}}</view> | ||||
|     <view class="table-cell">{{callCount}}</view> | ||||
|     <view class="table-cell">{{score}}</view> | ||||
|   </view> | ||||
| </view> | ||||
| @ -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); | ||||
|       } | ||||
|     }); | ||||
|   }, | ||||
| }) | ||||
| @ -0,0 +1,3 @@ | ||||
| { | ||||
|   "usingComponents": {} | ||||
| } | ||||
| @ -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; | ||||
| } | ||||
| After Width: | Height: | Size: 105 KiB | 
| After Width: | Height: | Size: 9.2 KiB | 
| After Width: | Height: | Size: 168 KiB | 
| After Width: | Height: | Size: 269 KiB | 
| After Width: | Height: | Size: 154 KiB | 
| After Width: | Height: | Size: 99 KiB | 
| After Width: | Height: | Size: 139 KiB | 
| After Width: | Height: | Size: 162 KiB | 
| After Width: | Height: | Size: 188 KiB | 
| After Width: | Height: | Size: 120 KiB | 
| After Width: | Height: | Size: 118 KiB | 
| After Width: | Height: | Size: 266 KiB | 
| After Width: | Height: | Size: 134 KiB | 
| After Width: | Height: | Size: 130 KiB | 
| After Width: | Height: | Size: 175 KiB | 
| After Width: | Height: | Size: 175 KiB | 
| After Width: | Height: | Size: 137 KiB | 
| After Width: | Height: | Size: 130 KiB | 
| After Width: | Height: | Size: 194 KiB | 
| After Width: | Height: | Size: 217 KiB | 
| After Width: | Height: | Size: 199 KiB | 
| After Width: | Height: | Size: 128 KiB | 
| After Width: | Height: | Size: 165 KiB | 
| After Width: | Height: | Size: 69 KiB | 
| After Width: | Height: | Size: 177 KiB | 
| After Width: | Height: | Size: 125 KiB | 
| After Width: | Height: | Size: 161 KiB | 
| After Width: | Height: | Size: 117 KiB | 
| After Width: | Height: | Size: 160 KiB | 
| @ -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() { | ||||
| 
 | ||||
|   } | ||||
| }) | ||||