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.
110 lines
1.7 KiB
110 lines
1.7 KiB
// 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() {
|
|
|
|
}
|
|
}) |