陈建宇 1 month ago
parent 1672533caf
commit 4d7919a75f

@ -1,17 +1,18 @@
{ {
"entryPagePath": "pages/course_detail/course_detail", "entryPagePath": "pages/login/login",
"pages": [ "pages": [
"pages/course/course", "pages/course/course",
"pages/my/my", "pages/my/my",
"pages/course_detail/course_detail", "pages/course_detail/course_detail",
"pages/course_detail(2)/course_detail(2)",
"pages/student_info/student_info", "pages/student_info/student_info",
"pages/student_info(2)/student_info(2)",
"pages/login/login", "pages/login/login",
"pages/forget/forget", "pages/forget/forget",
"pages/register/register", "pages/register/register",
"pages/choose_name/choose_name", "pages/choose_name/choose_name",
"pages/call_the_name(1)/call_the_name(1)", "pages/call_the_name/call_the_name",
"pages/call_the_name(2)/call_the_name(2)", "pages/my_callname/my_callname"
"pages/call_the_name(3)/call_the_name(3)"
], ],
"window": { "window": {
"navigationBarTitleText": "点名系统", "navigationBarTitleText": "点名系统",
@ -42,4 +43,5 @@
"componentFramework": "glass-easel", "componentFramework": "glass-easel",
"sitemapLocation": "sitemap.json", "sitemapLocation": "sitemap.json",
"lazyCodeLoading": "requiredComponents" "lazyCodeLoading": "requiredComponents"
} }

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>

@ -6,28 +6,43 @@ Page({
*/ */
data: { data: {
},
option1: function(e) {
wx.setStorageSync('call_kind', '1');
wx.navigateTo({
url: '/pages/call_the_name/call_the_name',
})
}, },
option2: function(e) { option2: function(e) {
wx.setStorageSync('call_kind', '2');
wx.showModal({ wx.showModal({
editable:true,//显示输入框 editable:true,//显示输入框
placeholderText:'输入学号尾数',//显示输入框提示信息 placeholderText:'输入学号尾数',//显示输入框提示信息
success: res => { success: res => {
if (res.confirm) { //点击了确认 if (res.confirm) { //点击了确认
console.log(res.content);//用户输入的值 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 { } else {
console.log('用户点击了取消') console.log('用户点击了取消')
} }
} }
}) })
}, },
option3: function(e) {wx.showModal({ option3: function(e) {
wx.setStorageSync('call_kind', '3');
wx.showModal({
editable:true,//显示输入框 editable:true,//显示输入框
placeholderText:'输入姓氏',//显示输入框提示信息 placeholderText:'输入姓氏',//显示输入框提示信息
success: res => { success: res => {
if (res.confirm) { //点击了确认 if (res.confirm) { //点击了确认
console.log(res.content);//用户输入的值 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 { } else {
console.log('用户点击了取消') console.log('用户点击了取消')
} }
@ -41,53 +56,4 @@ Page({
onLoad(options) { onLoad(options) {
}, },
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
}) })

@ -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,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
});
}
},
})

@ -39,3 +39,11 @@ page {
position: absolute; position: absolute;
right: 0%; right: 0%;
} }
.add_icon{
position: fixed;
width: 100rpx;
height: 100rpx;
bottom: 50rpx;
right: 45rpx;
}

@ -5,3 +5,9 @@
<image class="icon2" src="/assets/course/arrow-right.png" mode="aspectFit"/> <image class="icon2" src="/assets/course/arrow-right.png" mode="aspectFit"/>
</button> </button>
</view> </view>
<view bindtap='adddetial'>
<image class="add_icon" src="/素材/circle-plus-outline.png" bindtap="update" data-statu="open"></image>
</view>

@ -83,53 +83,4 @@ Page({
}); });
}, },
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
}) })

@ -7,7 +7,7 @@ page {
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding-top: 150rpx; padding-top: 200rpx;
} }
.course_name { .course_name {
@ -18,7 +18,7 @@ page {
.option { .option {
width: 400rpx; /* 根据需要调整宽度 */ width: 400rpx; /* 根据需要调整宽度 */
height: 120rpx; /* 根据需要调整高度 */ height: 100rpx; /* 根据需要调整高度 */
border: 1px solid #000000; /* 边框颜色 */ border: 1px solid #000000; /* 边框颜色 */
border-radius: 15rpx; /* 圆角半径 */ border-radius: 15rpx; /* 圆角半径 */
background-color: #ffffff; /* 背景颜色 */ background-color: #ffffff; /* 背景颜色 */
@ -26,6 +26,24 @@ page {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
position: relative; position: relative;
margin-top: 80rpx; /* 组件上外边距 */
font-size: 40rpx; 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; /* 组件上外边距 */
} }

@ -0,0 +1,12 @@
<view class="container">
<view class="course_name">{{description}}</view>
<view class="combition">
<navigator class="option" navigator url="/pages/student_info(2)/student_info(2)">查看学生信息</navigator>
<image class="right_image" src="/素材/海豚,卡通动物.png"/>
</view>
<view class="combition">
<navigator class="option" navigator url="/pages/my_callname/my_callname">个人点名记录</navigator>
<image class="right_image" src="/素材/bird动物卡通.png"/>
</view>
<image class="bottom_image" src="/素材/任务完成.png"/>
</view>

@ -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 转
}
})
}
});
}
})

@ -7,7 +7,7 @@ page {
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding-top: 150rpx; padding-top: 100rpx;
} }
.course_name { .course_name {
@ -18,7 +18,7 @@ page {
.option { .option {
width: 400rpx; /* 根据需要调整宽度 */ width: 400rpx; /* 根据需要调整宽度 */
height: 120rpx; /* 根据需要调整高度 */ height: 100rpx; /* 根据需要调整高度 */
border: 1px solid #000000; /* 边框颜色 */ border: 1px solid #000000; /* 边框颜色 */
border-radius: 15rpx; /* 圆角半径 */ border-radius: 15rpx; /* 圆角半径 */
background-color: #ffffff; /* 背景颜色 */ background-color: #ffffff; /* 背景颜色 */
@ -26,8 +26,26 @@ page {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
position: relative; position: relative;
margin-top: 80rpx; /* 组件上外边距 */
font-size: 40rpx; 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"; font: 20px "microsoft yahei";
text-align: center; text-align: center;
} }
.drawer_content {
}
.btn { .btn {
width: 100%; width: 100%;
display: flex; display: flex;

@ -0,0 +1,20 @@
<view class="container">
<view class="course_name">{{description}}</view>
<view class="combition">
<navigator class="option" navigator url="/pages/student_info/student_info">查看学生信息</navigator>
<image class="right_image" src="/素材/海豚,卡通动物.png"/>
</view>
<view class="combition">
<navigator class="option" navigator url="/pages/choose_name/choose_name">点名</navigator>
<image class="right_image" src="/素材/bird动物卡通.png"/>
</view>
<view class="combition">
<view class="option" bindtap="update" data-statu="open">添加学生</view>
<image class="right_image" src="/素材/章鱼,卡通动物.png"/>
</view>
<view class="combition">
<view class="option" bindtap="chooseMessageFile">导入学生名单</view>
<image class="right_image" src="/素材/猴子,卡通动物.png"/>
</view>
<image class="bottom_image" src="/素材/任务完成.png"/>
</view>

@ -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);
}
});
},
});

@ -12,8 +12,8 @@
} }
.title { .title {
font-size: 24px; font-size: 50rpx;
margin-bottom: 20px; margin-bottom: 40rpx;
text-align: center; text-align: center;
font-weight: 700; font-weight: 700;
} }
@ -23,14 +23,15 @@
} }
.label { .label {
margin-bottom: 5rpx; font-size: 35rpx;
margin:20rpx;
} }
.input { .input {
width: 100%; width: 100%;
padding: 10rpx; padding: 10rpx;
border: 1rpx solid #ccc; border: 1rpx solid #ccc;
border-radius: 4rpx; border-radius: 15rpx;
} }
.checkbox-group { .checkbox-group {

@ -7,7 +7,7 @@ page {
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding-top: 150rpx; padding-top: 100rpx;
} }
.course_name { .course_name {
@ -24,24 +24,35 @@ page {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
position: relative; position: relative;
margin-top: 80rpx; /* 组件上外边距 */ margin-top: 20rpx; /* 组件上外边距 */
font-size: 40rpx; font-size: 35rpx;
text { text {
position: absolute; position: absolute;
left: 15%; left: 13%;
} }
} }
.icon1 { .icon1 {
width: 60rpx; width: 50rpx;
height: 60rpx; height: 60rpx;
position: absolute; position: absolute;
left: 3%; left: 3%;
} }
.icon2 { .icon2 {
width: 80rpx; width: 70rpx;
height: 80rpx; height: 80rpx;
position: absolute; position: absolute;
right: 0%; right: 0%;
} }
.bottom_image {
width:700rpx;
height: 700rpx;
margin-top: 20rpx; /* 组件上外边距 */
}
.icon3 {
width: 100rpx;
height: 100rpx;
}

@ -9,4 +9,5 @@
<text>修改密码</text> <text>修改密码</text>
<image class="icon2" src="/assets/course/arrow-right.png" mode="aspectFit"/> <image class="icon2" src="/assets/course/arrow-right.png" mode="aspectFit"/>
</navigator> </navigator>
<image class="bottom_image" src="/素材/各司其职.png"/>
</view> </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;
}

@ -6,22 +6,15 @@
<view class="table-cell">积分</view> <view class="table-cell">积分</view>
<view class="table-cell">操作</view> <view class="table-cell">操作</view>
</view> </view>
<view wx:for="{{courseList}}" wx:key="unique">
<button class="course" bindtap="enterCourse" data-id="{{item.courseId}}" data-description="{{item.description}}">
<image class="icon1" src="/assets/course/多栏明细账.png" mode="aspectFit"/>
<text class="name">{{item.description}}</text>
<image class="icon2" src="/assets/course/arrow-right.png" mode="aspectFit"/>
</button>
</view>
<view wx:for="{{student_info}}" wx:key="unique"> <view wx:for="{{student_info}}" wx:key="unique">
<view class="table-row"> <view class="table-row">
<view class="table-cell">{{item.studentId}}</view> <view class="table-cell">{{item.studentId}}</view>
<view class="table-cell">{{item.name}}</view> <view class="table-cell">{{item.name}}</view>
<view class="table-cell">{{item.callCount}}</view> <view class="table-cell">{{item.callCount}}</view>
<view class="table-cell">{{item.score}}</view> <view class="table-cell">{{item.score}}</view>
<view class="table-cell">删除</view> <view class="table-cell">
<text style="color: #5DADE2">删除</text>
</view>
</view> </view>
</view> </view>
</view> </view>

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

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() {
}
})

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save