|
@@ -11,21 +11,28 @@ Page({
|
|
|
/**
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
- onLoad: function (options) {
|
|
|
+ onLoad: function(options) {
|
|
|
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
|
*/
|
|
|
- onReady: function () {
|
|
|
- let that=this
|
|
|
+ onReady: function() {
|
|
|
+ let that = this
|
|
|
wx.request({
|
|
|
url: api.getUserInfo,
|
|
|
- data:{loginId:wx.getStorageSync('loginId')},
|
|
|
- success(res){
|
|
|
+ data: {
|
|
|
+ loginId: wx.getStorageSync('loginId')
|
|
|
+ },
|
|
|
+ success(res) {
|
|
|
+ if (res.data.roleType == 10001) {
|
|
|
+ wx.setNavigationBarTitle({
|
|
|
+ title: '教师信息',
|
|
|
+ })
|
|
|
+ }
|
|
|
that.setData({
|
|
|
- student:res.data
|
|
|
+ student: res.data
|
|
|
})
|
|
|
}
|
|
|
})
|
|
@@ -34,42 +41,42 @@ Page({
|
|
|
/**
|
|
|
* 生命周期函数--监听页面显示
|
|
|
*/
|
|
|
- onShow: function () {
|
|
|
+ onShow: function() {
|
|
|
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 生命周期函数--监听页面隐藏
|
|
|
*/
|
|
|
- onHide: function () {
|
|
|
+ onHide: function() {
|
|
|
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 生命周期函数--监听页面卸载
|
|
|
*/
|
|
|
- onUnload: function () {
|
|
|
+ onUnload: function() {
|
|
|
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 页面相关事件处理函数--监听用户下拉动作
|
|
|
*/
|
|
|
- onPullDownRefresh: function () {
|
|
|
+ onPullDownRefresh: function() {
|
|
|
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 页面上拉触底事件的处理函数
|
|
|
*/
|
|
|
- onReachBottom: function () {
|
|
|
+ onReachBottom: function() {
|
|
|
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 用户点击右上角分享
|
|
|
*/
|
|
|
- onShareAppMessage: function () {
|
|
|
+ onShareAppMessage: function() {
|
|
|
|
|
|
}
|
|
|
})
|