首先对学生登录login,登录学生评教页面,得到id,no数据
然后获取教师信息,做好评教的基础准备后,做评教页面
获取数据信息,最重要的是先要调用接口
onLoad: function (options) {
var id = options.id;
// var that = this;
var url = "接口地址";
var student = wx.getStorageSync('student');
var no = student.no;
wx.request({
url: url, //仅为示例,并非真实的接口地址
data: {
id: id,
no: no,
},
header: {
'content-type': 'application/json' // 默认值
},
success: (res) =>{
console.log(res.data);
if(res.data.error){
wx.navigateBack({
delta:1
})
wx.showToast({
title: res.data.errormsg,
icon:'none',
duration:1000
})
}else{
this.setData({
data: res.data.data,
pj: res.data.pj,
count: res.data.data.length+2,
});
}
}
})
},
今天要展示的是评教页面的数据处理,评教内容页面,代码展示:
<swiper bindchange='swiper_change' current='{
{currentid}}' style='height:400px' duration='300'>
<view class='father'