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.

41 lines
883 B

1 month ago
// 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);
}
});
},
})