You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
966 B
37 lines
966 B
// pages/studentHomePage/studentHomePage.js
|
|
Page({
|
|
data: {
|
|
studentId: '',
|
|
name: ''
|
|
},
|
|
onLoad: function(options) {
|
|
const studentId = decodeURIComponent(options.studentId || '');
|
|
const name = decodeURIComponent(options.name || '');
|
|
|
|
// 将学号转换为数字类型
|
|
const numStudentId = Number(studentId) || '';
|
|
|
|
// 更新页面数据
|
|
this.setData({
|
|
studentId: numStudentId,
|
|
name: name
|
|
});
|
|
},
|
|
myPoints: function() {
|
|
const { studentId, name } = this.data;
|
|
wx.navigateTo({
|
|
url: '/pages/mypoint/mypoint?studentId=' + encodeURIComponent(studentId) + '&name=' + encodeURIComponent(name)
|
|
});
|
|
},
|
|
goBack: function() {
|
|
wx.navigateTo({
|
|
url:'/pages/index/index' //返回登录界面
|
|
});
|
|
},
|
|
showRulesList: function() {
|
|
// 跳转到特殊规则总览页面
|
|
wx.navigateTo({
|
|
url: '/pages/RulesList/RulesList' // 假设特殊规则总览页面的路径
|
|
});
|
|
}
|
|
}); |